X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetdate.y;h=3807e2f82ce771e45276a2cbffa4aa10bff26078;hb=365c522e3a5b3ae36005ab1d7f3a8bfbb0a9dee7;hp=0407f153f1bb53088efabfdb75386c0401db19b5;hpb=dc062ad089529e692add3aee0564a73a0812f212;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index 0407f153f..3807e2f82 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -28,6 +28,10 @@ #include #include +#if HAVE_STDLIB_H +# include /* for `free'; used by Bison 1.27 */ +#endif + #if defined (STDC_HEADERS) || (!defined (isascii) && !defined (HAVE_ISASCII)) # define IN_CTYPE_DOMAIN(c) 1 #else @@ -706,7 +710,7 @@ LookupWord (buff) /* Make it lowercase. */ for (p = buff; *p; p++) - if (ISUPPER (*p)) + if (ISUPPER ((unsigned char) *p)) *p = tolower (*p); if (strcmp (buff, "am") == 0 || strcmp (buff, "a.m.") == 0) @@ -787,7 +791,7 @@ LookupWord (buff) } /* Military timezones. */ - if (buff[1] == '\0' && ISALPHA (*buff)) + if (buff[1] == '\0' && ISALPHA ((unsigned char) *buff)) { for (tp = MilitaryTable; tp->name; tp++) if (strcmp (buff, tp->name) == 0) @@ -818,7 +822,7 @@ LookupWord (buff) static int yylex () { - register char c; + register unsigned char c; register char *p; char buff[20]; int Count; @@ -826,7 +830,7 @@ yylex () for (;;) { - while (ISSPACE (*yyInput)) + while (ISSPACE ((unsigned char) *yyInput)) yyInput++; if (ISDIGIT (c = *yyInput) || c == '-' || c == '+') @@ -877,8 +881,7 @@ yylex () /* Yield A - B, measured in seconds. */ static long -difftm (a, b) - struct tm *a, *b; +difftm (struct tm *a, struct tm *b) { int ay = a->tm_year + (TM_YEAR_ORIGIN - 1); int by = b->tm_year + (TM_YEAR_ORIGIN - 1);