diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index c9148ee..4eef2bb 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -S . -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install + run: cmake -B ${{github.workspace}}/build -S . -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install - name: Build run: cmake --build ${{github.workspace}}/build --target install --config ${{env.BUILD_TYPE}} diff --git a/CHANGELOG b/CHANGELOG index c26c7c3..de666fb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,11 @@ All changes to the repository will be reported here +## [0.1.2] +### Changed +- Move static variables in header +### Removed +- Remove unused variable in CI + ## [0.1.1] ### Removed - Variables in header diff --git a/CMakeLists.txt b/CMakeLists.txt index 6049250..942db46 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ Author Marco M. Mosca, email: marcomichele.mosca@gmail.com ]] cmake_minimum_required(VERSION 3.5.0) -project(cmd-api VERSION 0.1.1 LANGUAGES C) +project(cmd-api VERSION 0.1.2 LANGUAGES C) include(CTest) diff --git a/cmd-api/include/cmd-api.h b/cmd-api/include/cmd-api.h index 2a3ba9b..7310676 100644 --- a/cmd-api/include/cmd-api.h +++ b/cmd-api/include/cmd-api.h @@ -27,7 +27,10 @@ Author Marco M. Mosca, email: marcomichele.mosca@gmail.com #include #include -#include +#include + +static int optind = 1, argvind = 2, formatind = -1, argformatind = 0; +static char *optargW = NULL, *curr_option; int isCharInString(char c, char* str); int AreStringsEqualFrom(const char* s1, const char* s2, int from); diff --git a/cmd-api/src/cmd-api.c b/cmd-api/src/cmd-api.c index 18675a7..54e0182 100644 --- a/cmd-api/src/cmd-api.c +++ b/cmd-api/src/cmd-api.c @@ -101,8 +101,6 @@ char* strsep(char** elem_pointer, char* pattern) { char* getoptW(int argc, char** argv, char* format) { - static int optind = 1, argvind = 2, formatind = -1, argformatind = 0; - static char *optargW = NULL, *curr_option; /*if optind is one means that there are no more options*/ if (optind == -1) { return NULL;