summaryrefslogtreecommitdiff
path: root/lib/getdate.y
diff options
context:
space:
mode:
Diffstat (limited to 'lib/getdate.y')
-rw-r--r--lib/getdate.y21
1 files changed, 6 insertions, 15 deletions
diff --git a/lib/getdate.y b/lib/getdate.y
index 0185048251..534e2681ef 100644
--- a/lib/getdate.y
+++ b/lib/getdate.y
@@ -68,15 +68,6 @@
#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)