[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ...
From: |
Derek Robert Price |
Subject: |
[Cvs-cvs] ccvs/lib ChangeLog Makefile.am Makefile.gnulib ... |
Date: |
Tue, 25 Apr 2006 14:48:47 +0000 |
CVSROOT: /cvsroot/cvs
Module name: ccvs
Branch:
Changes by: Derek Robert Price <address@hidden> 06/04/25 14:48:47
Modified files:
lib : ChangeLog Makefile.am Makefile.gnulib
Makefile.in base64.c getdate.c getdate.y
Log message:
* base64.c, getdate.c, getdate.y: Updated from gnulib.
* Makefile.am: Initialize AM_CPPFLAGS, Add gettext module support.
* Makefile.gnulib: Regenerated by gnulib-update.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/ChangeLog.diff?tr1=1.504&tr2=1.505&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.am.diff?tr1=1.109&tr2=1.110&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.gnulib.diff?tr1=1.71&tr2=1.72&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/Makefile.in.diff?tr1=1.207&tr2=1.208&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/base64.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/getdate.c.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/cvs/ccvs/lib/getdate.y.diff?tr1=1.34&tr2=1.35&r1=text&r2=text
Patches:
Index: ccvs/lib/ChangeLog
diff -u ccvs/lib/ChangeLog:1.504 ccvs/lib/ChangeLog:1.505
--- ccvs/lib/ChangeLog:1.504 Mon Apr 24 18:50:25 2006
+++ ccvs/lib/ChangeLog Tue Apr 25 14:48:46 2006
@@ -1,3 +1,9 @@
+2006-04-25 Derek Price <address@hidden>
+
+ * base64.c, getdate.c, getdate.y: Updated from gnulib.
+ * Makefile.am: Initialize AM_CPPFLAGS, Add gettext module support.
+ * Makefile.gnulib: Regenerated by gnulib-update.
+
2006-04-12 Derek Price <address@hidden>
* Makefile.am: Backout previous change introduced by gnulib-tool.
Index: ccvs/lib/Makefile.am
diff -u ccvs/lib/Makefile.am:1.109 ccvs/lib/Makefile.am:1.110
--- ccvs/lib/Makefile.am:1.109 Mon Apr 24 18:50:25 2006
+++ ccvs/lib/Makefile.am Tue Apr 25 14:48:46 2006
@@ -40,6 +40,9 @@
MOSTLYCLEANFILES =
DISTCLEANFILES =
MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS =
+
TESTS =
check_PROGRAMS =
@@ -185,6 +188,20 @@
## end gnulib module getopt
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS += -I$(top_builddir)/intl
+
+## end gnulib module gettext
+
## begin gnulib module gettext-h
libcvs_a_SOURCES += gettext.h
Index: ccvs/lib/Makefile.gnulib
diff -u ccvs/lib/Makefile.gnulib:1.71 ccvs/lib/Makefile.gnulib:1.72
--- ccvs/lib/Makefile.gnulib:1.71 Mon Apr 24 18:50:25 2006
+++ ccvs/lib/Makefile.gnulib Tue Apr 25 14:48:46 2006
@@ -25,6 +25,8 @@
DISTCLEANFILES =
MAINTAINERCLEANFILES =
+AM_CPPFLAGS =
+
## begin gnulib module alloca
@@ -130,6 +132,20 @@
## end gnulib module getopt
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS += -I$(top_builddir)/intl
+
+## end gnulib module gettext
+
## begin gnulib module gettext-h
libgnu_a_SOURCES += gettext.h
Index: ccvs/lib/Makefile.in
diff -u ccvs/lib/Makefile.in:1.207 ccvs/lib/Makefile.in:1.208
--- ccvs/lib/Makefile.in:1.207 Mon Apr 24 18:50:25 2006
+++ ccvs/lib/Makefile.in Tue Apr 25 14:48:46 2006
@@ -351,6 +351,16 @@
glob.h glob.h-t stdbool.h stdbool.h-t stdint.h stdint.h-t
DISTCLEANFILES = getdate.log
MAINTAINERCLEANFILES = getdate.c
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS = -I$(top_builddir)/intl
TESTS = test-getdate.sh
EXTRA_DIST = .cvsignore ChangeLog.fsf Makefile.gnulib build_lib.com \
libcvs.dep libcvs.dsp libcvs.mak test-getdate.sh alloca_.h \
Index: ccvs/lib/base64.c
diff -u ccvs/lib/base64.c:1.2 ccvs/lib/base64.c:1.3
--- ccvs/lib/base64.c:1.2 Mon Apr 24 18:50:25 2006
+++ ccvs/lib/base64.c Tue Apr 25 14:48:46 2006
@@ -305,7 +305,9 @@
otherwise. If *OUTLEN is too small, as many bytes as possible will
be written to OUT. On return, *OUTLEN holds the length of decoded
bytes in OUT. Note that as soon as any non-alphabet characters are
- encountered, decoding is stopped and false is returned. */
+ encountered, decoding is stopped and false is returned. This means
+ that, when applicable, you must remove any line terminators that is
+ part of the data stream before calling this function. */
bool
base64_decode (const char *restrict in, size_t inlen,
char *restrict out, size_t *outlen)
Index: ccvs/lib/getdate.c
diff -u ccvs/lib/getdate.c:1.43 ccvs/lib/getdate.c:1.44
--- ccvs/lib/getdate.c:1.43 Wed Dec 21 02:18:42 2005
+++ ccvs/lib/getdate.c Tue Apr 25 14:48:46 2006
@@ -1,7 +1,7 @@
-/* A Bison parser, made by GNU Bison 1.875d. */
+/* A Bison parser, made by GNU Bison 2.1. */
/* Skeleton parser for Yacc-like parsing with Bison,
- Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software
Foundation, Inc.
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005 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
@@ -15,8 +15,8 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
/* As a special exception, when this file is copied by Bison into a
Bison output file, you may use that output file without restriction.
@@ -36,6 +36,9 @@
/* Identify Bison output. */
#define YYBISON 1
+/* Bison version. */
+#define YYBISON_VERSION "2.1"
+
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
@@ -74,6 +77,7 @@
tUDECIMAL_NUMBER = 276
};
#endif
+/* Tokens. */
#define tAGO 258
#define tDST 259
#define tYEAR_UNIT 260
@@ -102,7 +106,7 @@
/* Parse a string into an internal time stamp.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -323,6 +327,11 @@
# define YYERROR_VERBOSE 0
#endif
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
#line 222 "getdate.y"
typedef union YYSTYPE {
@@ -331,8 +340,8 @@
struct timespec timespec;
relative_time rel;
} YYSTYPE;
-/* Line 191 of yacc.c. */
-#line 336 "getdate.c"
+/* Line 196 of yacc.c. */
+#line 345 "getdate.c"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
@@ -343,30 +352,49 @@
/* Copy the second part of user declarations. */
-/* Line 214 of yacc.c. */
-#line 348 "getdate.c"
+/* Line 219 of yacc.c. */
+#line 357 "getdate.c"
-#if ! defined (yyoverflow) || YYERROR_VERBOSE
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T) && (defined (__STDC__) || defined (__cplusplus))
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
-# ifndef YYFREE
-# define YYFREE free
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
# endif
-# ifndef YYMALLOC
-# define YYMALLOC malloc
+# ifndef YY_
+# define YY_(msgid) msgid
# endif
+#endif
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
-# define YYSTACK_ALLOC alloca
-# endif
-# else
-# if defined (alloca) || defined (_ALLOCA_H)
-# define YYSTACK_ALLOC alloca
-# else
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYINCLUDED_STDLIB_H
+# endif
# endif
# endif
# endif
@@ -374,13 +402,39 @@
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
-# else
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2005 */
# endif
+# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
+# endif
+# ifdef __cplusplus
+extern "C" {
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if (! defined (free) && ! defined (YYINCLUDED_STDLIB_H) \
+ && (defined (__STDC__) || defined (__cplusplus)))
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifdef __cplusplus
+}
+# endif
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
@@ -415,7 +469,7 @@
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -465,7 +519,7 @@
#define YYUNDEFTOK 2
#define YYMAXUTOK 276
-#define YYTRANSLATE(YYX) \
+#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
@@ -558,8 +612,8 @@
};
#endif
-#if YYDEBUG || YYERROR_VERBOSE
-/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
First, the terminals, then, starting at YYNTOKENS, nonterminals. */
static const char *const yytname[] =
{
@@ -708,22 +762,6 @@
43, 41, 19, 18, 44, 43
};
-#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
-# define YYSIZE_T __SIZE_TYPE__
-#endif
-#if ! defined (YYSIZE_T) && defined (size_t)
-# define YYSIZE_T size_t
-#endif
-#if ! defined (YYSIZE_T)
-# if defined (__STDC__) || defined (__cplusplus)
-# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
-# define YYSIZE_T size_t
-# endif
-#endif
-#if ! defined (YYSIZE_T)
-# define YYSIZE_T unsigned int
-#endif
-
#define yyerrok (yyerrstatus = 0)
#define yyclearin (yychar = YYEMPTY)
#define YYEMPTY (-2)
@@ -753,26 +791,59 @@
goto yybackup; \
} \
else \
- { \
- yyerror (pc, "syntax error: cannot back up");\
+ { \
+ yyerror (pc, YY_("syntax error: cannot back up")); \
YYERROR; \
} \
while (0)
+
#define YYTERROR 1
#define YYERRCODE 256
-/* YYLLOC_DEFAULT -- Compute the default location (before the actions
- are run). */
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
-# define YYLLOC_DEFAULT(Current, Rhs, N) \
- ((Current).first_line = (Rhs)[1].first_line, \
- (Current).first_column = (Rhs)[1].first_column, \
- (Current).last_line = (Rhs)[N].last_line, \
- (Current).last_column = (Rhs)[N].last_column)
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
#endif
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
/* YYLEX -- calling `yylex' with the right arguments. */
#ifdef YYLEX_PARAM
@@ -795,19 +866,13 @@
YYFPRINTF Args; \
} while (0)
-# define YYDSYMPRINT(Args) \
-do { \
- if (yydebug) \
- yysymprint Args; \
-} while (0)
-
-# define YYDSYMPRINTF(Title, Token, Value, Location) \
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
do { \
if (yydebug) \
{ \
YYFPRINTF (stderr, "%s ", Title); \
- yysymprint (stderr, \
- Token, Value); \
+ yysymprint (stderr, \
+ Type, Value); \
YYFPRINTF (stderr, "\n"); \
} \
} while (0)
@@ -854,13 +919,13 @@
#endif
{
int yyi;
- unsigned int yylno = yyrline[yyrule];
- YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu), ",
yyrule - 1, yylno);
/* Print the symbols being reduced, and their result. */
for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
- YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
- YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname[yyr1[yyrule]]);
}
# define YY_REDUCE_PRINT(Rule) \
@@ -874,8 +939,7 @@
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
-# define YYDSYMPRINT(Args)
-# define YYDSYMPRINTF(Title, Token, Value, Location)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */
@@ -890,13 +954,9 @@
if the built-in stack extension method is used).
Do not make this value too large; the results are undefined if
- SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
evaluated with infinite-precision integer arithmetic. */
-#if defined (YYMAXDEPTH) && YYMAXDEPTH == 0
-# undef YYMAXDEPTH
-#endif
-
#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif
@@ -918,7 +978,7 @@
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -943,8 +1003,8 @@
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -954,7 +1014,55 @@
# endif
# endif
-#endif /* !YYERROR_VERBOSE */
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ size_t yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+#endif /* YYERROR_VERBOSE */
@@ -978,15 +1086,15 @@
(void) yyvaluep;
if (yytype < YYNTOKENS)
- {
- YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
-# ifdef YYPRINT
- YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
-# endif
- }
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
else
YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
switch (yytype)
{
default:
@@ -1002,10 +1110,11 @@
#if defined (__STDC__) || defined (__cplusplus)
static void
-yydestruct (int yytype, YYSTYPE *yyvaluep)
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
#else
static void
-yydestruct (yytype, yyvaluep)
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
int yytype;
YYSTYPE *yyvaluep;
#endif
@@ -1013,6 +1122,10 @@
/* Pacify ``unused variable'' warnings. */
(void) yyvaluep;
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
switch (yytype)
{
@@ -1032,7 +1145,7 @@
# endif
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
-int yyparse ( parser_control *pc );
+int yyparse (parser_control *pc);
#else
int yyparse ();
#endif
@@ -1057,29 +1170,29 @@
#else /* ! YYPARSE_PARAM */
#if defined (__STDC__) || defined (__cplusplus)
int
-yyparse ( parser_control *pc )
+yyparse (parser_control *pc)
#else
int
yyparse (pc)
- parser_control *pc ;
+ parser_control *pc;
#endif
#endif
{
- /* The lookahead symbol. */
+ /* The look-ahead symbol. */
int yychar;
-/* The semantic value of the lookahead symbol. */
+/* The semantic value of the look-ahead symbol. */
YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
- /* Lookahead token as an internal (translated) token number. */
+ /* Look-ahead token as an internal (translated) token number. */
int yytoken = 0;
/* Three stacks and their tools:
@@ -1093,12 +1206,12 @@
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
- register short int *yyssp;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
@@ -1130,7 +1243,6 @@
yyssp = yyss;
yyvsp = yyvs;
-
goto yysetstate;
/*------------------------------------------------------------.
@@ -1163,7 +1275,7 @@
data in use in that stack, in bytes. This used to be a
conditional around just the two extra args, but that might
be undefined if yyoverflow is a macro. */
- yyoverflow ("parser stack overflow",
+ yyoverflow (YY_("memory exhausted"),
&yyss1, yysize * sizeof (*yyssp),
&yyvs1, yysize * sizeof (*yyvsp),
@@ -1174,11 +1286,11 @@
}
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
- goto yyoverflowlab;
+ goto yyexhaustedlab;
# else
/* Extend the stack our own way. */
if (YYMAXDEPTH <= yystacksize)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
yystacksize *= 2;
if (YYMAXDEPTH < yystacksize)
yystacksize = YYMAXDEPTH;
@@ -1188,7 +1300,7 @@
union yyalloc *yyptr =
(union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
if (! yyptr)
- goto yyoverflowlab;
+ goto yyexhaustedlab;
YYSTACK_RELOCATE (yyss);
YYSTACK_RELOCATE (yyvs);
@@ -1220,18 +1332,18 @@
yybackup:
/* Do appropriate processing given the current state. */
-/* Read a lookahead token if we need one and don't already have one. */
+/* Read a look-ahead token if we need one and don't already have one. */
/* yyresume: */
- /* First try to decide what to do without reference to lookahead token. */
+ /* First try to decide what to do without reference to look-ahead token. */
yyn = yypact[yystate];
if (yyn == YYPACT_NINF)
goto yydefault;
- /* Not known => get a lookahead token if don't already have one. */
+ /* Not known => get a look-ahead token if don't already have one. */
- /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
if (yychar == YYEMPTY)
{
YYDPRINTF ((stderr, "Reading a token: "));
@@ -1246,7 +1358,7 @@
else
{
yytoken = YYTRANSLATE (yychar);
- YYDSYMPRINTF ("Next token is", yytoken, &yylval, &yylloc);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
}
/* If the proper action on seeing token YYTOKEN is to reduce or to
@@ -1266,8 +1378,8 @@
if (yyn == YYFINAL)
YYACCEPT;
- /* Shift the lookahead token. */
- YYDPRINTF ((stderr, "Shifting token %s, ", yytname[yytoken]));
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
/* Discard the token being shifted unless it is eof. */
if (yychar != YYEOF)
@@ -1319,7 +1431,7 @@
case 4:
#line 254 "getdate.y"
{
- pc->seconds = yyvsp[0].timespec;
+ pc->seconds = (yyvsp[0].timespec);
pc->timespec_seen = true;
}
break;
@@ -1357,65 +1469,65 @@
case 14:
#line 283 "getdate.y"
{
- pc->hour = yyvsp[-1].textintval.value;
+ pc->hour = (yyvsp[-1].textintval).value;
pc->minutes = 0;
pc->seconds.tv_sec = 0;
pc->seconds.tv_nsec = 0;
- pc->meridian = yyvsp[0].intval;
+ pc->meridian = (yyvsp[0].intval);
}
break;
case 15:
#line 291 "getdate.y"
{
- pc->hour = yyvsp[-3].textintval.value;
- pc->minutes = yyvsp[-1].textintval.value;
+ pc->hour = (yyvsp[-3].textintval).value;
+ pc->minutes = (yyvsp[-1].textintval).value;
pc->seconds.tv_sec = 0;
pc->seconds.tv_nsec = 0;
- pc->meridian = yyvsp[0].intval;
+ pc->meridian = (yyvsp[0].intval);
}
break;
case 16:
#line 299 "getdate.y"
{
- pc->hour = yyvsp[-4].textintval.value;
- pc->minutes = yyvsp[-2].textintval.value;
+ pc->hour = (yyvsp[-4].textintval).value;
+ pc->minutes = (yyvsp[-2].textintval).value;
pc->seconds.tv_sec = 0;
pc->seconds.tv_nsec = 0;
pc->meridian = MER24;
pc->zones_seen++;
- pc->time_zone = time_zone_hhmm (yyvsp[-1].textintval, yyvsp[0].intval);
+ pc->time_zone = time_zone_hhmm ((yyvsp[-1].textintval),
(yyvsp[0].intval));
}
break;
case 17:
#line 309 "getdate.y"
{
- pc->hour = yyvsp[-5].textintval.value;
- pc->minutes = yyvsp[-3].textintval.value;
- pc->seconds = yyvsp[-1].timespec;
- pc->meridian = yyvsp[0].intval;
+ pc->hour = (yyvsp[-5].textintval).value;
+ pc->minutes = (yyvsp[-3].textintval).value;
+ pc->seconds = (yyvsp[-1].timespec);
+ pc->meridian = (yyvsp[0].intval);
}
break;
case 18:
#line 316 "getdate.y"
{
- pc->hour = yyvsp[-6].textintval.value;
- pc->minutes = yyvsp[-4].textintval.value;
- pc->seconds = yyvsp[-2].timespec;
+ pc->hour = (yyvsp[-6].textintval).value;
+ pc->minutes = (yyvsp[-4].textintval).value;
+ pc->seconds = (yyvsp[-2].timespec);
pc->meridian = MER24;
pc->zones_seen++;
- pc->time_zone = time_zone_hhmm (yyvsp[-1].textintval, yyvsp[0].intval);
+ pc->time_zone = time_zone_hhmm ((yyvsp[-1].textintval),
(yyvsp[0].intval));
}
break;
case 19:
#line 328 "getdate.y"
{
- pc->local_isdst = yyvsp[0].intval;
- pc->dsts_seen += (0 < yyvsp[0].intval);
+ pc->local_isdst = (yyvsp[0].intval);
+ pc->dsts_seen += (0 < (yyvsp[0].intval));
}
break;
@@ -1423,48 +1535,48 @@
#line 333 "getdate.y"
{
pc->local_isdst = 1;
- pc->dsts_seen += (0 < yyvsp[-1].intval) + 1;
+ pc->dsts_seen += (0 < (yyvsp[-1].intval)) + 1;
}
break;
case 21:
#line 341 "getdate.y"
- { pc->time_zone = yyvsp[0].intval; }
+ { pc->time_zone = (yyvsp[0].intval); }
break;
case 22:
#line 343 "getdate.y"
- { pc->time_zone = yyvsp[-1].intval;
- pc->rel.ns += yyvsp[0].rel.ns;
- pc->rel.seconds += yyvsp[0].rel.seconds;
- pc->rel.minutes += yyvsp[0].rel.minutes;
- pc->rel.hour += yyvsp[0].rel.hour;
- pc->rel.day += yyvsp[0].rel.day;
- pc->rel.month += yyvsp[0].rel.month;
- pc->rel.year += yyvsp[0].rel.year;
+ { pc->time_zone = (yyvsp[-1].intval);
+ pc->rel.ns += (yyvsp[0].rel).ns;
+ pc->rel.seconds += (yyvsp[0].rel).seconds;
+ pc->rel.minutes += (yyvsp[0].rel).minutes;
+ pc->rel.hour += (yyvsp[0].rel).hour;
+ pc->rel.day += (yyvsp[0].rel).day;
+ pc->rel.month += (yyvsp[0].rel).month;
+ pc->rel.year += (yyvsp[0].rel).year;
pc->rels_seen = true; }
break;
case 23:
#line 353 "getdate.y"
- { pc->time_zone = yyvsp[-2].intval + time_zone_hhmm (yyvsp[-1].textintval,
yyvsp[0].intval); }
+ { pc->time_zone = (yyvsp[-2].intval) + time_zone_hhmm
((yyvsp[-1].textintval), (yyvsp[0].intval)); }
break;
case 24:
#line 355 "getdate.y"
- { pc->time_zone = yyvsp[0].intval + 60; }
+ { pc->time_zone = (yyvsp[0].intval) + 60; }
break;
case 25:
#line 357 "getdate.y"
- { pc->time_zone = yyvsp[-1].intval + 60; }
+ { pc->time_zone = (yyvsp[-1].intval) + 60; }
break;
case 26:
#line 362 "getdate.y"
{
pc->day_ordinal = 1;
- pc->day_number = yyvsp[0].intval;
+ pc->day_number = (yyvsp[0].intval);
}
break;
@@ -1472,31 +1584,31 @@
#line 367 "getdate.y"
{
pc->day_ordinal = 1;
- pc->day_number = yyvsp[-1].intval;
+ pc->day_number = (yyvsp[-1].intval);
}
break;
case 28:
#line 372 "getdate.y"
{
- pc->day_ordinal = yyvsp[-1].intval;
- pc->day_number = yyvsp[0].intval;
+ pc->day_ordinal = (yyvsp[-1].intval);
+ pc->day_number = (yyvsp[0].intval);
}
break;
case 29:
#line 377 "getdate.y"
{
- pc->day_ordinal = yyvsp[-1].textintval.value;
- pc->day_number = yyvsp[0].intval;
+ pc->day_ordinal = (yyvsp[-1].textintval).value;
+ pc->day_number = (yyvsp[0].intval);
}
break;
case 30:
#line 385 "getdate.y"
{
- pc->month = yyvsp[-2].textintval.value;
- pc->day = yyvsp[0].textintval.value;
+ pc->month = (yyvsp[-2].textintval).value;
+ pc->day = (yyvsp[0].textintval).value;
}
break;
@@ -1508,17 +1620,17 @@
The goal in recognizing YYYY/MM/DD is solely to support legacy
machine-generated dates like those in an RCS log listing. If
you want portability, use the ISO 8601 format. */
- if (4 <= yyvsp[-4].textintval.digits)
+ if (4 <= (yyvsp[-4].textintval).digits)
{
- pc->year = yyvsp[-4].textintval;
- pc->month = yyvsp[-2].textintval.value;
- pc->day = yyvsp[0].textintval.value;
+ pc->year = (yyvsp[-4].textintval);
+ pc->month = (yyvsp[-2].textintval).value;
+ pc->day = (yyvsp[0].textintval).value;
}
else
{
- pc->month = yyvsp[-4].textintval.value;
- pc->day = yyvsp[-2].textintval.value;
- pc->year = yyvsp[0].textintval;
+ pc->month = (yyvsp[-4].textintval).value;
+ pc->day = (yyvsp[-2].textintval).value;
+ pc->year = (yyvsp[0].textintval);
}
}
break;
@@ -1527,9 +1639,9 @@
#line 410 "getdate.y"
{
/* ISO 8601 format. YYYY-MM-DD. */
- pc->year = yyvsp[-2].textintval;
- pc->month = -yyvsp[-1].textintval.value;
- pc->day = -yyvsp[0].textintval.value;
+ pc->year = (yyvsp[-2].textintval);
+ pc->month = -(yyvsp[-1].textintval).value;
+ pc->day = -(yyvsp[0].textintval).value;
}
break;
@@ -1537,10 +1649,10 @@
#line 417 "getdate.y"
{
/* e.g. 17-JUN-1992. */
- pc->day = yyvsp[-2].textintval.value;
- pc->month = yyvsp[-1].intval;
- pc->year.value = -yyvsp[0].textintval.value;
- pc->year.digits = yyvsp[0].textintval.digits;
+ pc->day = (yyvsp[-2].textintval).value;
+ pc->month = (yyvsp[-1].intval);
+ pc->year.value = -(yyvsp[0].textintval).value;
+ pc->year.digits = (yyvsp[0].textintval).digits;
}
break;
@@ -1548,241 +1660,241 @@
#line 425 "getdate.y"
{
/* e.g. JUN-17-1992. */
- pc->month = yyvsp[-2].intval;
- pc->day = -yyvsp[-1].textintval.value;
- pc->year.value = -yyvsp[0].textintval.value;
- pc->year.digits = yyvsp[0].textintval.digits;
+ pc->month = (yyvsp[-2].intval);
+ pc->day = -(yyvsp[-1].textintval).value;
+ pc->year.value = -(yyvsp[0].textintval).value;
+ pc->year.digits = (yyvsp[0].textintval).digits;
}
break;
case 35:
#line 433 "getdate.y"
{
- pc->month = yyvsp[-1].intval;
- pc->day = yyvsp[0].textintval.value;
+ pc->month = (yyvsp[-1].intval);
+ pc->day = (yyvsp[0].textintval).value;
}
break;
case 36:
#line 438 "getdate.y"
{
- pc->month = yyvsp[-3].intval;
- pc->day = yyvsp[-2].textintval.value;
- pc->year = yyvsp[0].textintval;
+ pc->month = (yyvsp[-3].intval);
+ pc->day = (yyvsp[-2].textintval).value;
+ pc->year = (yyvsp[0].textintval);
}
break;
case 37:
#line 444 "getdate.y"
{
- pc->day = yyvsp[-1].textintval.value;
- pc->month = yyvsp[0].intval;
+ pc->day = (yyvsp[-1].textintval).value;
+ pc->month = (yyvsp[0].intval);
}
break;
case 38:
#line 449 "getdate.y"
{
- pc->day = yyvsp[-2].textintval.value;
- pc->month = yyvsp[-1].intval;
- pc->year = yyvsp[0].textintval;
+ pc->day = (yyvsp[-2].textintval).value;
+ pc->month = (yyvsp[-1].intval);
+ pc->year = (yyvsp[0].textintval);
}
break;
case 39:
#line 458 "getdate.y"
{
- pc->rel.ns -= yyvsp[-1].rel.ns;
- pc->rel.seconds -= yyvsp[-1].rel.seconds;
- pc->rel.minutes -= yyvsp[-1].rel.minutes;
- pc->rel.hour -= yyvsp[-1].rel.hour;
- pc->rel.day -= yyvsp[-1].rel.day;
- pc->rel.month -= yyvsp[-1].rel.month;
- pc->rel.year -= yyvsp[-1].rel.year;
+ pc->rel.ns -= (yyvsp[-1].rel).ns;
+ pc->rel.seconds -= (yyvsp[-1].rel).seconds;
+ pc->rel.minutes -= (yyvsp[-1].rel).minutes;
+ pc->rel.hour -= (yyvsp[-1].rel).hour;
+ pc->rel.day -= (yyvsp[-1].rel).day;
+ pc->rel.month -= (yyvsp[-1].rel).month;
+ pc->rel.year -= (yyvsp[-1].rel).year;
}
break;
case 40:
#line 468 "getdate.y"
{
- pc->rel.ns += yyvsp[0].rel.ns;
- pc->rel.seconds += yyvsp[0].rel.seconds;
- pc->rel.minutes += yyvsp[0].rel.minutes;
- pc->rel.hour += yyvsp[0].rel.hour;
- pc->rel.day += yyvsp[0].rel.day;
- pc->rel.month += yyvsp[0].rel.month;
- pc->rel.year += yyvsp[0].rel.year;
+ pc->rel.ns += (yyvsp[0].rel).ns;
+ pc->rel.seconds += (yyvsp[0].rel).seconds;
+ pc->rel.minutes += (yyvsp[0].rel).minutes;
+ pc->rel.hour += (yyvsp[0].rel).hour;
+ pc->rel.day += (yyvsp[0].rel).day;
+ pc->rel.month += (yyvsp[0].rel).month;
+ pc->rel.year += (yyvsp[0].rel).year;
}
break;
case 41:
#line 481 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.year = yyvsp[-1].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = (yyvsp[-1].intval); }
break;
case 42:
#line 483 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.year =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year =
(yyvsp[-1].textintval).value; }
break;
case 43:
#line 485 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.year = 1; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year = 1; }
break;
case 44:
#line 487 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.month = yyvsp[-1].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = (yyvsp[-1].intval); }
break;
case 45:
#line 489 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.month =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month =
(yyvsp[-1].textintval).value; }
break;
case 46:
#line 491 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.month = 1; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month = 1; }
break;
case 47:
#line 493 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.day = yyvsp[-1].intval *
yyvsp[0].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[-1].intval) *
(yyvsp[0].intval); }
break;
case 48:
#line 495 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.day = yyvsp[-1].textintval.value
* yyvsp[0].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day =
(yyvsp[-1].textintval).value * (yyvsp[0].intval); }
break;
case 49:
#line 497 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.day = yyvsp[0].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day = (yyvsp[0].intval); }
break;
case 50:
#line 499 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.hour = yyvsp[-1].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = (yyvsp[-1].intval); }
break;
case 51:
#line 501 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.hour =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour =
(yyvsp[-1].textintval).value; }
break;
case 52:
#line 503 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.hour = 1; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour = 1; }
break;
case 53:
#line 505 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.minutes = yyvsp[-1].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = (yyvsp[-1].intval);
}
break;
case 54:
#line 507 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.minutes =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes =
(yyvsp[-1].textintval).value; }
break;
case 55:
#line 509 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.minutes = 1; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes = 1; }
break;
case 56:
#line 511 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds = yyvsp[-1].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = (yyvsp[-1].intval);
}
break;
case 57:
#line 513 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].textintval).value; }
break;
case 58:
#line 515 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds =
yyvsp[-1].timespec.tv_sec; yyval.rel.ns = yyvsp[-1].timespec.tv_nsec; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; }
break;
case 59:
#line 517 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds =
yyvsp[-1].timespec.tv_sec; yyval.rel.ns = yyvsp[-1].timespec.tv_nsec; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].timespec).tv_sec; (yyval.rel).ns = (yyvsp[-1].timespec).tv_nsec; }
break;
case 60:
#line 519 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds = 1; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds = 1; }
break;
case 62:
#line 525 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.year =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).year =
(yyvsp[-1].textintval).value; }
break;
case 63:
#line 527 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.month =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).month =
(yyvsp[-1].textintval).value; }
break;
case 64:
#line 529 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.day = yyvsp[-1].textintval.value
* yyvsp[0].intval; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).day =
(yyvsp[-1].textintval).value * (yyvsp[0].intval); }
break;
case 65:
#line 531 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.hour =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).hour =
(yyvsp[-1].textintval).value; }
break;
case 66:
#line 533 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.minutes =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).minutes =
(yyvsp[-1].textintval).value; }
break;
case 67:
#line 535 "getdate.y"
- { yyval.rel = RELATIVE_TIME_0; yyval.rel.seconds =
yyvsp[-1].textintval.value; }
+ { (yyval.rel) = RELATIVE_TIME_0; (yyval.rel).seconds =
(yyvsp[-1].textintval).value; }
break;
case 71:
#line 543 "getdate.y"
- { yyval.timespec.tv_sec = yyvsp[0].textintval.value;
yyval.timespec.tv_nsec = 0; }
+ { (yyval.timespec).tv_sec = (yyvsp[0].textintval).value;
(yyval.timespec).tv_nsec = 0; }
break;
case 73:
#line 549 "getdate.y"
- { yyval.timespec.tv_sec = yyvsp[0].textintval.value;
yyval.timespec.tv_nsec = 0; }
+ { (yyval.timespec).tv_sec = (yyvsp[0].textintval).value;
(yyval.timespec).tv_nsec = 0; }
break;
case 74:
#line 554 "getdate.y"
{
if (pc->dates_seen && ! pc->year.digits
- && ! pc->rels_seen && (pc->times_seen || 2 <
yyvsp[0].textintval.digits))
- pc->year = yyvsp[0].textintval;
+ && ! pc->rels_seen && (pc->times_seen || 2 <
(yyvsp[0].textintval).digits))
+ pc->year = (yyvsp[0].textintval);
else
{
- if (4 < yyvsp[0].textintval.digits)
+ if (4 < (yyvsp[0].textintval).digits)
{
pc->dates_seen++;
- pc->day = yyvsp[0].textintval.value % 100;
- pc->month = (yyvsp[0].textintval.value / 100) % 100;
- pc->year.value = yyvsp[0].textintval.value / 10000;
- pc->year.digits = yyvsp[0].textintval.digits - 4;
+ pc->day = (yyvsp[0].textintval).value % 100;
+ pc->month = ((yyvsp[0].textintval).value / 100) % 100;
+ pc->year.value = (yyvsp[0].textintval).value / 10000;
+ pc->year.digits = (yyvsp[0].textintval).digits - 4;
}
else
{
pc->times_seen++;
- if (yyvsp[0].textintval.digits <= 2)
+ if ((yyvsp[0].textintval).digits <= 2)
{
- pc->hour = yyvsp[0].textintval.value;
+ pc->hour = (yyvsp[0].textintval).value;
pc->minutes = 0;
}
else
{
- pc->hour = yyvsp[0].textintval.value / 100;
- pc->minutes = yyvsp[0].textintval.value % 100;
+ pc->hour = (yyvsp[0].textintval).value / 100;
+ pc->minutes = (yyvsp[0].textintval).value % 100;
}
pc->seconds.tv_sec = 0;
pc->seconds.tv_nsec = 0;
@@ -1794,29 +1906,30 @@
case 75:
#line 591 "getdate.y"
- { yyval.intval = -1; }
+ { (yyval.intval) = -1; }
break;
case 76:
#line 593 "getdate.y"
- { yyval.intval = yyvsp[0].textintval.value; }
+ { (yyval.intval) = (yyvsp[0].textintval).value; }
break;
case 77:
#line 598 "getdate.y"
- { yyval.intval = MER24; }
+ { (yyval.intval) = MER24; }
break;
case 78:
#line 600 "getdate.y"
- { yyval.intval = yyvsp[0].intval; }
+ { (yyval.intval) = (yyvsp[0].intval); }
break;
+ default: break;
}
-/* Line 1010 of yacc.c. */
-#line 1820 "getdate.c"
+/* Line 1126 of yacc.c. */
+#line 1933 "getdate.c"
yyvsp -= yylen;
yyssp -= yylen;
@@ -1855,12 +1968,36 @@
if (YYPACT_NINF < yyn && yyn < YYLAST)
{
- YYSIZE_T yysize = 0;
int yytype = YYTRANSLATE (yychar);
- const char* yyprefix;
- char *yymsg;
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ char *yymsg = 0;
+# define YYERROR_VERBOSE_ARGS_MAXIMUM 5
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
int yyx;
+#if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+#endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
/* Start YYX at -YYN if negative to avoid negative indexes in
YYCHECK. */
int yyxbegin = yyn < 0 ? -yyn : 0;
@@ -1868,81 +2005,91 @@
/* Stay within bounds of both yycheck and yytname. */
int yychecklim = YYLAST - yyn;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
- int yycount = 0;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
- yyprefix = ", expecting ";
for (yyx = yyxbegin; yyx < yyxend; ++yyx)
if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
{
- yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
- yycount += 1;
- if (yycount == 5)
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
{
- yysize = 0;
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
break;
}
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
}
- yysize += (sizeof ("syntax error, unexpected ")
- + yystrlen (yytname[yytype]));
- yymsg = (char *) YYSTACK_ALLOC (yysize);
- if (yymsg != 0)
- {
- char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
- yyp = yystpcpy (yyp, yytname[yytype]);
- if (yycount < 5)
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= yysize1 < yysize;
+ yysize = yysize1;
+
+ if (!yysize_overflow && yysize <= YYSTACK_ALLOC_MAXIMUM)
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yymsg;
+ int yyi = 0;
+ while ((*yyp = *yyf))
{
- yyprefix = ", expecting ";
- for (yyx = yyxbegin; yyx < yyxend; ++yyx)
- if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
- {
- yyp = yystpcpy (yyp, yyprefix);
- yyp = yystpcpy (yyp, yytname[yyx]);
- yyprefix = " or ";
- }
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
}
yyerror (pc, yymsg);
YYSTACK_FREE (yymsg);
}
else
- yyerror (pc, "syntax error; also virtual memory exhausted");
+ {
+ yyerror (pc, YY_("syntax error"));
+ goto yyexhaustedlab;
+ }
}
else
#endif /* YYERROR_VERBOSE */
- yyerror (pc, "syntax error");
+ yyerror (pc, YY_("syntax error"));
}
if (yyerrstatus == 3)
{
- /* If just tried and failed to reuse lookahead token after an
+ /* If just tried and failed to reuse look-ahead token after an
error, discard it. */
if (yychar <= YYEOF)
{
- /* If at end of input, pop the error token,
- then the rest of the stack, then return failure. */
+ /* Return failure if at end of input. */
if (yychar == YYEOF)
- for (;;)
- {
- YYPOPSTACK;
- if (yyssp == yyss)
- YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[*yyssp], yyvsp);
- }
+ YYABORT;
}
else
{
- YYDSYMPRINTF ("Error: discarding", yytoken, &yylval, &yylloc);
- yydestruct (yytoken, &yylval);
+ yydestruct ("Error: discarding", yytoken, &yylval);
yychar = YYEMPTY;
-
}
}
- /* Else will try to reuse lookahead token after shifting the error
+ /* Else will try to reuse look-ahead token after shifting the error
token. */
goto yyerrlab1;
@@ -1952,14 +2099,13 @@
`---------------------------------------------------*/
yyerrorlab:
-#ifdef __GNUC__
- /* Pacify GCC when the user code never invokes YYERROR and the label
- yyerrorlab therefore never appears in user code. */
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
if (0)
goto yyerrorlab;
-#endif
- yyvsp -= yylen;
+yyvsp -= yylen;
yyssp -= yylen;
yystate = *yyssp;
goto yyerrlab1;
@@ -1989,8 +2135,8 @@
if (yyssp == yyss)
YYABORT;
- YYDSYMPRINTF ("Error: popping", yystos[*yyssp], yyvsp, yylsp);
- yydestruct (yystos[yystate], yyvsp);
+
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
YYPOPSTACK;
yystate = *yyssp;
YY_STACK_PRINT (yyss, yyssp);
@@ -1999,11 +2145,12 @@
if (yyn == YYFINAL)
YYACCEPT;
- YYDPRINTF ((stderr, "Shifting error token, "));
-
*++yyvsp = yylval;
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
yystate = yyn;
goto yynewstate;
@@ -2023,16 +2170,25 @@
goto yyreturn;
#ifndef yyoverflow
-/*----------------------------------------------.
-| yyoverflowlab -- parser overflow comes here. |
-`----------------------------------------------*/
-yyoverflowlab:
- yyerror (pc, "parser stack overflow");
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (pc, YY_("memory exhausted"));
yyresult = 2;
/* Fall through. */
#endif
yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK;
+ }
#ifndef yyoverflow
if (yyss != yyssa)
YYSTACK_FREE (yyss);
@@ -2879,6 +3035,10 @@
tm.tm_year = year;
tm.tm_mon = month;
tm.tm_mday = day;
+ tm.tm_hour = tm0.tm_hour;
+ tm.tm_min = tm0.tm_min;
+ tm.tm_sec = tm0.tm_sec;
+ tm.tm_isdst = tm0.tm_isdst;
Start = mktime (&tm);
if (Start == (time_t) -1)
goto fail;
Index: ccvs/lib/getdate.y
diff -u ccvs/lib/getdate.y:1.34 ccvs/lib/getdate.y:1.35
--- ccvs/lib/getdate.y:1.34 Tue Oct 4 02:34:54 2005
+++ ccvs/lib/getdate.y Tue Apr 25 14:48:46 2006
@@ -1,7 +1,7 @@
%{
/* Parse a string into an internal time stamp.
- Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software
+ Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -1437,6 +1437,10 @@
tm.tm_year = year;
tm.tm_mon = month;
tm.tm_mday = day;
+ tm.tm_hour = tm0.tm_hour;
+ tm.tm_min = tm0.tm_min;
+ tm.tm_sec = tm0.tm_sec;
+ tm.tm_isdst = tm0.tm_isdst;
Start = mktime (&tm);
if (Start == (time_t) -1)
goto fail;