diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cf970c..aa57310 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.0.4 (2025-01-05) + +## Bug Fixes + +- fix getopt bugs + ## 1.0.3 (2024-11-30) ## Bug Fixes diff --git a/project/stm32f407/MDK/stm32f407.uvprojx b/project/stm32f407/MDK/stm32f407.uvprojx index 5bbe36c..b613896 100644 --- a/project/stm32f407/MDK/stm32f407.uvprojx +++ b/project/stm32f407/MDK/stm32f407.uvprojx @@ -10,14 +10,14 @@ stm32f407 0x4 ARM-ADS - 6140000::V6.14::ARMCLANG + 6220000::V6.22::ARMCLANG 1 STM32F407ZGTx STMicroelectronics - Keil.STM32F4xx_DFP.2.14.0 - http://www.keil.com/pack/ + Keil.STM32F4xx_DFP.3.0.0 + https://www.keil.com/pack/ IRAM(0x20000000,0x00020000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE @@ -186,6 +186,7 @@ 2 0 0 + 0 1 0 8 @@ -979,11 +980,6 @@ <Project Info> - - - - - 0 1 diff --git a/project/stm32f407/usr/src/getopt.c b/project/stm32f407/usr/src/getopt.c index b9499bc..bf4a0d1 100644 --- a/project/stm32f407/usr/src/getopt.c +++ b/project/stm32f407/usr/src/getopt.c @@ -180,9 +180,7 @@ static char *my_index (const char *str, int chr); extern char *getenv (); #endif -static int -my_strlen (str) - const char *str; +static int my_strlen(const char *str) { int n = 0; while (*str++) @@ -190,10 +188,7 @@ my_strlen (str) return n; } -static char * -my_index (str, chr) - const char *str; - int chr; +static char *my_index(const char *str, int chr) { while (*str) { @@ -234,12 +229,10 @@ static int last_nonopt; */ #if __STDC__ || defined(PROTO) -static void exchange (char **argv); +static void exchange(char **argv); #endif -static void -exchange (argv) - char **argv; +static void exchange(char **argv) { char *temp, **first, **last; @@ -322,14 +315,13 @@ exchange (argv) If LONG_ONLY is nonzero, '-' as well as '--' can introduce long-named options. */ -int -_getopt_internal (argc, argv, optstring, longopts, longind, long_only) - int argc; - char *const *argv; - const char *optstring; - const struct option *longopts; - int *longind; - int long_only; +int _getopt_internal(int argc, + char *const *argv, + const char *optstring, + const struct option *longopts, + int *longind, + int long_only + ) { int option_index; @@ -656,11 +648,10 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) } } -int -getopt (argc, argv, optstring) - int argc; - char *const *argv; - const char *optstring; +int getopt(int argc, + char *const *argv, + const char *optstring + ) { return _getopt_internal (argc, argv, optstring, (const struct option *) 0, @@ -668,13 +659,12 @@ getopt (argc, argv, optstring) 0); } -int -getopt_long (argc, argv, options, long_options, opt_index) - int argc; - char *const *argv; - const char *options; - const struct option *long_options; - int *opt_index; +int getopt_long(int argc, + char *const *argv, + const char *options, + const struct option *long_options, + int *opt_index + ) { return _getopt_internal (argc, argv, options, long_options, opt_index, 0); }