%{
/* 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
/* FIXME: Check for arithmetic overflow in all cases, not just
some of them. */
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <config.h>
#include "getdate.h"
+#include "timespec.h"
/* There's no need to extend the stack, so there's no need to involve
alloca. */
/* 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
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);
%}
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++)
/* 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;
}