]> sjero.net Git - wget/blobdiff - src/cmpt.c
[svn] Applied Philipp Thomas's safe-ctype patch. Published in
[wget] / src / cmpt.c
index b193ae3b794381c126b3c559b9e86c94a6f34fbf..a07fdff13eae0c62f1fb947d7b6f3682b0406b9b 100644 (file)
@@ -26,7 +26,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 #else
 # include <strings.h>
 #endif /* HAVE_STRING_H */
-#include <ctype.h>
 
 #include <sys/types.h>
 #ifdef HAVE_UNISTD_H
@@ -67,8 +66,8 @@ strcasecmp (const char *s1, const char *s2)
 
   do
     {
-      c1 = tolower (*p1++);
-      c2 = tolower (*p2++);
+      c1 = TOLOWER (*p1++);
+      c2 = TOLOWER (*p2++);
       if (c1 == '\0')
        break;
     }
@@ -96,8 +95,8 @@ strncasecmp (const char *s1, const char *s2, size_t n)
 
   do
     {
-      c1 = tolower (*p1++);
-      c2 = tolower (*p2++);
+      c1 = TOLOWER (*p1++);
+      c2 = TOLOWER (*p2++);
       if (c1 == '\0' || c1 != c2)
        return c1 - c2;
     } while (--n > 0);
@@ -657,9 +656,9 @@ strptime_internal (buf, format, tm, decided)
     {
       /* A white space in the format string matches 0 more or white
         space in the input string.  */
-      if (isspace (*fmt))
+      if (ISSPACE (*fmt))
        {
-         while (isspace (*rp))
+         while (ISSPACE (*rp))
            ++rp;
          ++fmt;
          continue;
@@ -851,7 +850,7 @@ strptime_internal (buf, format, tm, decided)
        case 'n':
        case 't':
          /* Match any white space.  */
-         while (isspace (*rp))
+         while (ISSPACE (*rp))
            ++rp;
          break;
        case 'p':