X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetdate.y;h=cbf3ca104aa877d3192335843f03cc3f723aa335;hb=4ad44dd748d5da39555cdf305568280d69a23354;hp=534e2681ef77adcc322545e8a55be6cc3a91d553;hpb=4fde4952d5a3db51a122f96a31bfcd6879399fea;p=gnulib.git diff --git a/lib/getdate.y b/lib/getdate.y index 534e2681e..cbf3ca104 100644 --- a/lib/getdate.y +++ b/lib/getdate.y @@ -1,7 +1,7 @@ %{ /* Parse a string into an internal time stamp. - Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software + Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -32,11 +32,10 @@ /* FIXME: Check for arithmetic overflow in all cases, not just some of them. */ -#ifdef HAVE_CONFIG_H -# include -#endif +#include #include "getdate.h" +#include "timespec.h" /* There's no need to extend the stack, so there's no need to involve alloca. */ @@ -70,8 +69,8 @@ /* ISDIGIT differs from isdigit, as follows: - - Its arg may be any int or unsigned int; it need not be an unsigned char. - - It's guaranteed to evaluate its argument exactly once. + - Its arg may be any int or unsigned int; it need not be an unsigned char + or EOF. - It's typically faster. POSIX says that only '0' through '9' are digits. Prefer ISDIGIT to isdigit unless it's important to use the locale's definition @@ -197,7 +196,7 @@ typedef struct union YYSTYPE; static int yylex (union YYSTYPE *, parser_control *); -static int yyerror (parser_control *, char *); +static int yyerror (parser_control const *, char const *); static long int time_zone_hhmm (textint, long int); %} @@ -887,8 +886,7 @@ lookup_word (parser_control const *pc, char *word) for (p = word; *p; p++) { unsigned char ch = *p; - if (islower (ch)) - *p = toupper (ch); + *p = toupper (ch); } for (tp = meridian_table; tp->name; tp++) @@ -1109,7 +1107,8 @@ yylex (YYSTYPE *lvalp, parser_control *pc) /* Do nothing if the parser reports an error. */ static int -yyerror (parser_control *pc ATTRIBUTE_UNUSED, char *s ATTRIBUTE_UNUSED) +yyerror (parser_control const *pc ATTRIBUTE_UNUSED, + char const *s ATTRIBUTE_UNUSED) { return 0; }