%{
/* Parse a string into an internal time stamp.
- Copyright (C) 1999-2000, 2002-2012 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2013 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
typedef time_t long_time_t;
#endif
+/* Convert a possibly-signed character to an unsigned character. This is
+ a bit safer than casting to unsigned char, since it catches some type
+ errors that the cast doesn't. */
+static unsigned char to_uchar (char ch) { return ch; }
+
/* Lots of this code assumes time_t and time_t-like values fit into
long_time_t. */
verify (TYPE_MINIMUM (long_time_t) <= TYPE_MINIMUM (time_t)
}
if (c != '(')
- return *pc->input++;
+ return to_uchar (*pc->input++);
+
count = 0;
do
{