From bbd1dbb908f25d6885720b5b5ee65155126a754e Mon Sep 17 00:00:00 2001 From: Marco Michele Mosca Date: Mon, 30 Jun 2025 20:24:29 +0100 Subject: [PATCH 1/3] Move static variables --- cmd-api/include/cmd-api.h | 5 ++++- cmd-api/src/cmd-api.c | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) 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; From d4ef1c33558f203d201d4e16d5d9d5b4721738ef Mon Sep 17 00:00:00 2001 From: Marco Michele Mosca Date: Mon, 30 Jun 2025 20:25:20 +0100 Subject: [PATCH 2/3] Remove unused variable in CI --- .github/workflows/run_tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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}} From 8bf793b425b55bd1700542368d50abf4c6eced06 Mon Sep 17 00:00:00 2001 From: Marco Michele Mosca Date: Mon, 30 Jun 2025 20:37:01 +0100 Subject: [PATCH 3/3] Update version and changelog for 0.1.2 --- CHANGELOG | 6 ++++++ CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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)