Skip to content

Commit

Permalink
Updated json to 3.11.3 and argparse to 1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
eduardodoria committed Jan 15, 2024
1 parent 2c2e034 commit 6460fb1
Show file tree
Hide file tree
Showing 10 changed files with 8,099 additions and 8,315 deletions.
28 changes: 28 additions & 0 deletions libs/argparse/.github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: ci

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
pull:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler:
- gcc
- clang
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Run with the compiler ${{ matrix.compiler }}
run: |
sudo apt-get install -y $compiler
CC=$compiler make test
env:
compiler: ${{ matrix.compiler }}
1 change: 1 addition & 0 deletions libs/argparse/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ test_argparse
*.[ao]
*.dylib
*.so
.vscode
5 changes: 0 additions & 5 deletions libs/argparse/.travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions libs/argparse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ option(ARGPARSE_STATIC "Build static library" ON)

if(ARGPARSE_SHARED)
add_library(argparse_shared SHARED ${sources})
target_include_directories(argparse_shared PUBLIC .)
set_target_properties(argparse_shared PROPERTIES OUTPUT_NAME argparse)
endif()
if(ARGPARSE_STATIC)
add_library(argparse STATIC ${sources})
target_include_directories(argparse PUBLIC .)
endif()
if(NOT (ARGPARSE_STATIC OR ARGPARSE_SHARED))
add_library(argparse OBJECT ${sources})
Expand Down
4 changes: 3 additions & 1 deletion libs/argparse/argparse.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ argparse_parse(struct argparse *self, int argc, const char **argv)
unknown:
fprintf(stderr, "error: unknown option `%s`\n", self->argv[0]);
argparse_usage(self);
exit(EXIT_FAILURE);
if (!(self->flags & ARGPARSE_IGNORE_UNKNOWN_ARGS)) {
exit(EXIT_FAILURE);
}
}

end:
Expand Down
3 changes: 2 additions & 1 deletion libs/argparse/argparse.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ typedef int argparse_callback (struct argparse *self,
const struct argparse_option *option);

enum argparse_flag {
ARGPARSE_STOP_AT_NON_OPTION = 1,
ARGPARSE_STOP_AT_NON_OPTION = 1 << 0,
ARGPARSE_IGNORE_UNKNOWN_ARGS = 1 << 1,
};

enum argparse_option_type {
Expand Down
2 changes: 1 addition & 1 deletion libs/json/LICENSE.MIT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2013-2020 Niels Lohmann
Copyright (c) 2013-2022 Niels Lohmann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
1,233 changes: 747 additions & 486 deletions libs/json/README.md

Large diffs are not rendered by default.

Loading

0 comments on commit 6460fb1

Please sign in to comment.