Would not it better to use to use case insensitive (strcasecmp) in  is_number()  function?

diff -rup clzip-1.16-rc1/carg_parser.c clzip-1.16-rc1-strcasecmp/carg_parser.c
--- clzip-1.16-rc1/carg_parser.c	2025-12-06 17:46:29.000000000 +0000
+++ clzip-1.16-rc1-strcasecmp/carg_parser.c	2025-12-24 16:13:34.000000000 +0000
@@ -23,17 +23,17 @@
 
 #include "carg_parser.h"
 
+#if defined __MSVCRT__
+#define strcasecmp stricmp
+#endif
 
 static char is_number( const char * const p )
   {
   return isdigit( *p ) || ( *p == '.' && isdigit( p[1] ) ) ||
          ( strlen( p ) == 3 &&
-           ( strcmp( p, "inf" ) == 0 || strcmp( p, "nan" ) == 0 ||
-             strcmp( p, "Inf" ) == 0 || strcmp( p, "NaN" ) == 0 ||
-             strcmp( p, "INF" ) == 0 || strcmp( p, "NAN" ) == 0 ) );
+           ( strcasecmp( p, "inf" ) == 0 || strcasecmp( p, "nan" ) ) == 0 );
   }
 
-
 /* assure at least a minimum size for buffer 'buf' */
 static void * ap_resize_buffer( void * buf, const int min_size )
   {

Reply via email to