]> sjero.net Git - wget/blobdiff - src/snprintf.c
[svn] Applied Philipp Thomas's safe-ctype patch. Published in
[wget] / src / snprintf.c
index 3202c5c08d8763064450fe4b95abb91c4c5a2465..bc83def4ff6686445434f24c3e6b05750abdb67d 100644 (file)
@@ -78,9 +78,9 @@
 #if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF)
 
 #include <string.h>
-#include <ctype.h>
 #include <sys/types.h>
 #include <stdio.h>             /* for NULL */
+#include <safe-ctype.h>
 
 /* varargs declarations: */
 
@@ -227,7 +227,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
       }
       break;
     case DP_S_MIN:
-      if (isdigit(ch)) 
+      if (ISDIGIT(ch)) 
       {
        min = 10*min + char_to_int (ch);
        ch = *format++;
@@ -251,7 +251,7 @@ static int dopr (char *buffer, size_t maxlen, const char *format, va_list args)
        state = DP_S_MOD;
       break;
     case DP_S_MAX:
-      if (isdigit(ch)) 
+      if (ISDIGIT(ch)) 
       {
        if (max < 0)
          max = 0;