* lib/memcasecmp.c: Include <limits.h>.
[gnulib.git] / lib / getdate.y
index 0185048..534e268 100644 (file)
 #include "setenv.h"
 #include "xalloc.h"
 
-#if STDC_HEADERS || (! defined isascii && ! HAVE_ISASCII)
-# define IN_CTYPE_DOMAIN(c) 1
-#else
-# define IN_CTYPE_DOMAIN(c) isascii (c)
-#endif
-
-#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
-#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
-#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
 
 /* ISDIGIT differs from isdigit, as follows:
    - Its arg may be any int or unsigned int; it need not be an unsigned char.
@@ -896,7 +887,7 @@ lookup_word (parser_control const *pc, char *word)
   for (p = word; *p; p++)
     {
       unsigned char ch = *p;
-      if (ISLOWER (ch))
+      if (islower (ch))
        *p = toupper (ch);
     }
 
@@ -962,7 +953,7 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
 
   for (;;)
     {
-      while (c = *pc->input, ISSPACE (c))
+      while (c = *pc->input, isspace (c))
        pc->input++;
 
       if (ISDIGIT (c) || c == '-' || c == '+')
@@ -973,7 +964,7 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
          if (c == '-' || c == '+')
            {
              sign = c == '-' ? -1 : 1;
-             while (c = *++pc->input, ISSPACE (c))
+             while (c = *++pc->input, isspace (c))
                continue;
              if (! ISDIGIT (c))
                /* skip the '-' sign */
@@ -1077,7 +1068,7 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
            }
        }
 
-      if (ISALPHA (c))
+      if (isalpha (c))
        {
          char buff[20];
          char *p = buff;
@@ -1089,7 +1080,7 @@ yylex (YYSTYPE *lvalp, parser_control *pc)
                *p++ = c;
              c = *++pc->input;
            }
-         while (ISALPHA (c) || c == '.');
+         while (isalpha (c) || c == '.');
 
          *p = '\0';
          tp = lookup_word (pc, buff);
@@ -1201,7 +1192,7 @@ get_date (struct timespec *result, char const *p, struct timespec const *now)
   if (! tmp)
     return false;
 
-  while (c = *p, ISSPACE (c))
+  while (c = *p, isspace (c))
     p++;
 
   if (strncmp (p, "TZ=\"", 4) == 0)