wok-next rev 20091
Up ptlib (2.10.11)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Oct 28 12:28:24 2017 +0200 (2017-10-28) |
parents | 7902ab258271 |
children | 4531cfd68634 |
files | dahdi-linux/receipt ptlib-dev/receipt ptlib/receipt ptlib/stuff/patches/ptlib-2.10.11-bison_fixes-2.patch ptlib/stuff/patches/series |
line diff
1.1 --- a/dahdi-linux/receipt Sat Oct 28 11:29:09 2017 +0200 1.2 +++ b/dahdi-linux/receipt Sat Oct 28 12:28:24 2017 +0200 1.3 @@ -52,7 +52,7 @@ 1.4 ;; 1.5 dahdi-linux-dev) 1.6 CAT="development|Digium Asterisk Hardware Device Interface: kernel modules dev files." 1.7 - EXTRAVERSION=${kvers} 1.8 + EXTRAVERSION=_${kvers} 1.9 mkdir -p $fs/usr 1.10 cp -a $install/usr/include $fs/usr 1.11 ;;
2.1 --- a/ptlib-dev/receipt Sat Oct 28 11:29:09 2017 +0200 2.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 2.3 @@ -1,17 +0,0 @@ 2.4 -# SliTaz package receipt. 2.5 - 2.6 -PACKAGE="ptlib-dev" 2.7 -VERSION="2.6.5" 2.8 -CATEGORY="network" 2.9 -SHORT_DESC="Portable Tools Library for unix and windows, development files." 2.10 -MAINTAINER="pascal.bellard@slitaz.org" 2.11 -LICENSE="MPL" 2.12 -WEB_SITE="http://www.ekiga.org/" 2.13 -WANTED="ptlib" 2.14 - 2.15 -# Rules to gen a SliTaz package suitable for Tazpkg. 2.16 -genpkg_rules() 2.17 -{ 2.18 - mkdir -p $fs/usr 2.19 - cp -a $install/usr/include $fs/usr 2.20 -}
3.1 --- a/ptlib/receipt Sat Oct 28 11:29:09 2017 +0200 3.2 +++ b/ptlib/receipt Sat Oct 28 12:28:24 2017 +0200 3.3 @@ -1,23 +1,21 @@ 3.4 -# SliTaz package receipt. 3.5 +# SliTaz package receipt v2. 3.6 3.7 PACKAGE="ptlib" 3.8 -VERSION="2.6.5" 3.9 +VERSION="2.10.11" 3.10 CATEGORY="network" 3.11 SHORT_DESC="Portable Tools Library for unix and windows." 3.12 MAINTAINER="pascal.bellard@slitaz.org" 3.13 LICENSE="MPL" 3.14 -TARBALL="$PACKAGE-$VERSION.tar.bz2" 3.15 +TARBALL="$PACKAGE-$VERSION.tar.xz" 3.16 WEB_SITE="http://www.ekiga.org/" 3.17 WGET_URL="http://ftp.gnome.org/pub/gnome/sources/$PACKAGE/${VERSION%.*}/$TARBALL" 3.18 3.19 -DEPENDS="alsa-lib cyrus-sasl expat libsdl libdv libraw1394 \ 3.20 -libunixODBC openssl" 3.21 BUILD_DEPENDS="pkg-config flex openssl-dev cyrus-sasl-dev zlib-dev alsa-lib-dev" 3.22 +SPLIT="ptlib ptlib-dev" 3.23 3.24 # Rules to configure and make the package. 3.25 compile_rules() 3.26 { 3.27 - cd $src 3.28 ./configure --prefix=/usr --bindir=/bin \ 3.29 --libexecdir=/usr/bin --mandir=/usr/share/man \ 3.30 $CONFIGURE_ARGS && 3.31 @@ -28,8 +26,19 @@ 3.32 # Rules to gen a SliTaz package suitable for Tazpkg. 3.33 genpkg_rules() 3.34 { 3.35 - mkdir -p $fs/usr 3.36 - cp -a $install/usr/lib $fs/usr 3.37 - cp -a $install/usr/bin $fs/usr 3.38 - cp -a $install/usr/share $fs/usr 3.39 + case $PACKAGE in 3.40 + ptlib) 3.41 + DEPENDS="alsa-lib cyrus-sasl expat libsdl libdv libraw1394 \ 3.42 + libunixODBC openssl" 3.43 + mkdir -p $fs/usr 3.44 + cp -a $install/usr/lib $fs/usr 3.45 + cp -a $install/usr/bin $fs/usr 3.46 + cp -a $install/usr/share $fs/usr 3.47 + ;; 3.48 + ptlib-dev) 3.49 + CAT="network|Portable Tools Library for unix and windows, development files." 3.50 + mkdir -p $fs/usr 3.51 + cp -a $install/usr/include $fs/usr 3.52 + ;; 3.53 + esac 3.54 }
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 4.2 +++ b/ptlib/stuff/patches/ptlib-2.10.11-bison_fixes-2.patch Sat Oct 28 12:28:24 2017 +0200 4.3 @@ -0,0 +1,2951 @@ 4.4 +Submitted By: Armin K. <krejzi at email dot com> 4.5 +Updated By: Bruce Dubbs <bduubs at linuxfromscratch dot org> 4.6 +Date: 2013-08-20 4.7 + 2016-05-04 4.8 +Initial Package Version: 2.10.10 4.9 +Upstream Status: Reported 4.10 +Origin: Self 4.11 +Description: Adds pregenerated C file which isn't generated correctly 4.12 + with Bison 3.0. 4.13 +Update: Add fixes for gcc-6 4.14 + 4.15 +diff -Naur ptlib-2.10.11.orig/include/ptlib/critsec.h ptlib-2.10.11/include/ptlib/critsec.h 4.16 +--- ptlib-2.10.11.orig/include/ptlib/critsec.h 2013-08-14 18:20:32.000000000 -0500 4.17 ++++ ptlib-2.10.11/include/ptlib/critsec.h 2016-05-04 19:40:01.626203961 -0500 4.18 +@@ -40,7 +40,7 @@ 4.19 + #if P_HAS_ATOMIC_INT 4.20 + 4.21 + #if defined(__GNUC__) 4.22 +-# if __GNUC__ >= 4 && __GNUC_MINOR__ >= 2 4.23 ++# if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2) || __GNUC__ >= 5 4.24 + # include <ext/atomicity.h> 4.25 + # else 4.26 + # include <bits/atomicity.h> 4.27 +diff -Naur ptlib-2.10.11.orig/make/unix.mak ptlib-2.10.11/make/unix.mak 4.28 +--- ptlib-2.10.11.orig/make/unix.mak 2013-08-14 18:20:27.000000000 -0500 4.29 ++++ ptlib-2.10.11/make/unix.mak 2016-05-04 19:38:50.921583820 -0500 4.30 +@@ -729,4 +729,6 @@ 4.31 + 4.32 + LDLIBS += -l$(PTLIB_BASE)$(LIB_TYPE) 4.33 + 4.34 ++STDCCFLAGS += -Wno-deprecated-declarations 4.35 ++ 4.36 + # End of unix.mak 4.37 +diff -Naur ptlib-2.10.11.orig/src/ptlib/common/getdate.tab.c ptlib-2.10.11/src/ptlib/common/getdate.tab.c 4.38 +--- ptlib-2.10.11.orig/src/ptlib/common/getdate.tab.c 1969-12-31 18:00:00.000000000 -0600 4.39 ++++ ptlib-2.10.11/src/ptlib/common/getdate.tab.c 2016-05-04 19:38:59.892281859 -0500 4.40 +@@ -0,0 +1,2884 @@ 4.41 ++/* A Bison parser, made by GNU Bison 2.7.12-4996. */ 4.42 ++ 4.43 ++/* Bison implementation for Yacc-like parsers in C 4.44 ++ 4.45 ++ Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. 4.46 ++ 4.47 ++ This program is free software: you can redistribute it and/or modify 4.48 ++ it under the terms of the GNU General Public License as published by 4.49 ++ the Free Software Foundation, either version 3 of the License, or 4.50 ++ (at your option) any later version. 4.51 ++ 4.52 ++ This program is distributed in the hope that it will be useful, 4.53 ++ but WITHOUT ANY WARRANTY; without even the implied warranty of 4.54 ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4.55 ++ GNU General Public License for more details. 4.56 ++ 4.57 ++ You should have received a copy of the GNU General Public License 4.58 ++ along with this program. If not, see <http://www.gnu.org/licenses/>. */ 4.59 ++ 4.60 ++/* As a special exception, you may create a larger work that contains 4.61 ++ part or all of the Bison parser skeleton and distribute that work 4.62 ++ under terms of your choice, so long as that work isn't itself a 4.63 ++ parser generator using the skeleton or a modified version thereof 4.64 ++ as a parser skeleton. Alternatively, if you modify or redistribute 4.65 ++ the parser skeleton itself, you may (at your option) remove this 4.66 ++ special exception, which will cause the skeleton and the resulting 4.67 ++ Bison output files to be licensed under the GNU General Public 4.68 ++ License without this special exception. 4.69 ++ 4.70 ++ This special exception was added by the Free Software Foundation in 4.71 ++ version 2.2 of Bison. */ 4.72 ++ 4.73 ++/* C LALR(1) parser skeleton written by Richard Stallman, by 4.74 ++ simplifying the original so-called "semantic" parser. */ 4.75 ++ 4.76 ++/* All symbols defined below should begin with yy or YY, to avoid 4.77 ++ infringing on user name space. This should be done even for local 4.78 ++ variables, as they might otherwise be expanded by user macros. 4.79 ++ There are some unavoidable exceptions within include files to 4.80 ++ define necessary library symbols; they are noted "INFRINGES ON 4.81 ++ USER NAME SPACE" below. */ 4.82 ++ 4.83 ++/* Identify Bison output. */ 4.84 ++#define YYBISON 1 4.85 ++ 4.86 ++/* Bison version. */ 4.87 ++#define YYBISON_VERSION "2.7.12-4996" 4.88 ++ 4.89 ++/* Skeleton name. */ 4.90 ++#define YYSKELETON_NAME "yacc.c" 4.91 ++ 4.92 ++/* Pure parsers. */ 4.93 ++#define YYPURE 1 4.94 ++ 4.95 ++/* Push parsers. */ 4.96 ++#define YYPUSH 0 4.97 ++ 4.98 ++/* Pull parsers. */ 4.99 ++#define YYPULL 1 4.100 ++ 4.101 ++ 4.102 ++ 4.103 ++ 4.104 ++/* Copy the first part of user declarations. */ 4.105 ++/* Line 371 of yacc.c */ 4.106 ++#line 1 "ptlib/common/getdate.y" 4.107 ++ 4.108 ++/* 4.109 ++** Originally written by Steven M. Bellovin <smb@research.att.com> while 4.110 ++** at the University of North Carolina at Chapel Hill. Later tweaked by 4.111 ++** a couple of people on Usenet. Completely overhauled by Rich $alz 4.112 ++** <rsalz@bbn.com> and Jim Berets <jberets@bbn.com> in August, 1990; 4.113 ++** 4.114 ++** Major hack to coerce it into use with the Equivalence Portable 4.115 ++** Windows Library. 4.116 ++** 4.117 ++** This grammar has 10 shift/reduce conflicts. 4.118 ++** 4.119 ++** This code is in the public domain and has no copyright. 4.120 ++*/ 4.121 ++/* SUPPRESS 287 on yaccpar_sccsid *//* Unused static variable */ 4.122 ++/* SUPPRESS 288 on yyerrlab *//* Label unused */ 4.123 ++ 4.124 ++ 4.125 ++#include <time.h> 4.126 ++#include <string.h> 4.127 ++#include <ctype.h> 4.128 ++#include <stdlib.h> 4.129 ++ 4.130 ++#ifndef EOF 4.131 ++#include <stdio.h> 4.132 ++#endif 4.133 ++ 4.134 ++ 4.135 ++#ifdef _WIN32 4.136 ++#ifdef _MSC_VER 4.137 ++#pragma warning(disable:4131 4701 4996) 4.138 ++#endif 4.139 ++#define STDAPICALLTYPE __stdcall 4.140 ++#define MSDOS 4.141 ++#else 4.142 ++#define STDAPICALLTYPE 4.143 ++#endif 4.144 ++ 4.145 ++ 4.146 ++extern int STDAPICALLTYPE PTimeGetChar(void * stream); 4.147 ++extern void STDAPICALLTYPE PTimeUngetChar(void * stream, int c); 4.148 ++int STDAPICALLTYPE PTimeGetDateOrder(); 4.149 ++int STDAPICALLTYPE PTimeIsMonthName(const char *, int, int); 4.150 ++int STDAPICALLTYPE PTimeIsDayName(const char *, int, int); 4.151 ++ 4.152 ++ 4.153 ++#define EPOCH 1970 4.154 ++#define HOUR(x) ((time_t)(x) * 60) 4.155 ++#define SECSPERDAY (24L * 60L * 60L) 4.156 ++ 4.157 ++ 4.158 ++/* 4.159 ++** An entry in the lexical lookup table. 4.160 ++*/ 4.161 ++typedef struct _TABLE { 4.162 ++ char *name; 4.163 ++ int type; 4.164 ++ time_t value; 4.165 ++} TABLE; 4.166 ++ 4.167 ++ 4.168 ++/* 4.169 ++** Daylight-savings mode: on, off, or not yet known. 4.170 ++*/ 4.171 ++typedef enum _DSTMODE { 4.172 ++ DSTon, DSToff, DSTmaybe 4.173 ++} DSTMODE; 4.174 ++ 4.175 ++/* 4.176 ++** Meridian: am, pm, or 24-hour style. 4.177 ++*/ 4.178 ++typedef enum _MERIDIAN { 4.179 ++ MERam, MERpm, MER24 4.180 ++} MERIDIAN; 4.181 ++ 4.182 ++ 4.183 ++/* 4.184 ++** Global variables. We could get rid of most of these by using a good 4.185 ++** union as the yacc stack. (This routine was originally written before 4.186 ++** yacc had the %union construct.) Maybe someday; right now we only use 4.187 ++** the %union very rarely. 4.188 ++*/ 4.189 ++struct Variables { 4.190 ++ void *yyInput; 4.191 ++ DSTMODE yyDSTmode; 4.192 ++ time_t yyDayOrdinal; 4.193 ++ time_t yyDayNumber; 4.194 ++ int yyHaveDate; 4.195 ++ int yyHaveDay; 4.196 ++ int yyHaveRel; 4.197 ++ int yyHaveTime; 4.198 ++ int yyHaveZone; 4.199 ++ time_t yyTimezone; 4.200 ++ time_t yyDay; 4.201 ++ time_t yyHour; 4.202 ++ time_t yyMinutes; 4.203 ++ time_t yyMonth; 4.204 ++ time_t yySeconds; 4.205 ++ time_t yyYear; 4.206 ++ MERIDIAN yyMeridian; 4.207 ++ time_t yyRelMonth; 4.208 ++ time_t yyRelSeconds; 4.209 ++}; 4.210 ++ 4.211 ++#define VARIABLE ((struct Variables*)parseParam) 4.212 ++ 4.213 ++ 4.214 ++#define YYPURE 1 4.215 ++#define YYLEX_PARAM VARIABLE 4.216 ++#define YYPARSE_PARAM parseParam 4.217 ++ 4.218 ++#define yyparse PTime_yyparse 4.219 ++#define yylex PTime_yylex 4.220 ++#define yyerror PTime_yyerror 4.221 ++ 4.222 ++#define GCC_VERSION (__GNUC__ * 10000 \ 4.223 ++ + __GNUC_MINOR__ * 100 \ 4.224 ++ + __GNUC_PATCHLEVEL__) 4.225 ++ 4.226 ++static int yyparse(void *); 4.227 ++static int yylex(); 4.228 ++ 4.229 ++#ifdef __GNUC__ 4.230 ++static int yyerror(char const *msg); 4.231 ++#else 4.232 ++static void yyerror(char const *msg); 4.233 ++#endif 4.234 ++ 4.235 ++ 4.236 ++static void SetPossibleDate(struct Variables*, time_t, time_t, time_t); 4.237 ++ 4.238 ++ 4.239 ++ 4.240 ++/* Line 371 of yacc.c */ 4.241 ++#line 202 "ptlib/common/getdate.tab.c" 4.242 ++ 4.243 ++# ifndef YY_NULL 4.244 ++# if defined __cplusplus && 201103L <= __cplusplus 4.245 ++# define YY_NULL nullptr 4.246 ++# else 4.247 ++# define YY_NULL 0 4.248 ++# endif 4.249 ++# endif 4.250 ++ 4.251 ++/* Enabling verbose error messages. */ 4.252 ++#ifdef YYERROR_VERBOSE 4.253 ++# undef YYERROR_VERBOSE 4.254 ++# define YYERROR_VERBOSE 1 4.255 ++#else 4.256 ++# define YYERROR_VERBOSE 0 4.257 ++#endif 4.258 ++ 4.259 ++ 4.260 ++/* Enabling traces. */ 4.261 ++#ifndef YYDEBUG 4.262 ++# define YYDEBUG 0 4.263 ++#endif 4.264 ++#if YYDEBUG 4.265 ++extern int yydebug; 4.266 ++#endif 4.267 ++ 4.268 ++/* Tokens. */ 4.269 ++#ifndef YYTOKENTYPE 4.270 ++# define YYTOKENTYPE 4.271 ++ /* Put the tokens into the symbol table, so that GDB and other debuggers 4.272 ++ know about them. */ 4.273 ++ enum yytokentype { 4.274 ++ tAGO = 258, 4.275 ++ tDAY = 259, 4.276 ++ tDAYZONE = 260, 4.277 ++ tID = 261, 4.278 ++ tMERIDIAN = 262, 4.279 ++ tMINUTE_UNIT = 263, 4.280 ++ tMONTH = 264, 4.281 ++ tMONTH_UNIT = 265, 4.282 ++ tSNUMBER = 266, 4.283 ++ tS4DIGITNUMBER = 267, 4.284 ++ tUNUMBER = 268, 4.285 ++ t4DIGITNUMBER = 269, 4.286 ++ t6DIGITNUMBER = 270, 4.287 ++ t8DIGITNUMBER = 271, 4.288 ++ tSEC_UNIT = 272, 4.289 ++ tZONE = 273, 4.290 ++ tMILZONE = 274, 4.291 ++ tRFC3339 = 275, 4.292 ++ tDST = 276 4.293 ++ }; 4.294 ++#endif 4.295 ++ 4.296 ++ 4.297 ++#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED 4.298 ++typedef union YYSTYPE 4.299 ++{ 4.300 ++/* Line 387 of yacc.c */ 4.301 ++#line 137 "ptlib/common/getdate.y" 4.302 ++ 4.303 ++ time_t Number; 4.304 ++ enum _MERIDIAN Meridian; 4.305 ++ 4.306 ++ 4.307 ++/* Line 387 of yacc.c */ 4.308 ++#line 269 "ptlib/common/getdate.tab.c" 4.309 ++} YYSTYPE; 4.310 ++# define YYSTYPE_IS_TRIVIAL 1 4.311 ++# define yystype YYSTYPE /* obsolescent; will be withdrawn */ 4.312 ++# define YYSTYPE_IS_DECLARED 1 4.313 ++#endif 4.314 ++ 4.315 ++ 4.316 ++#ifdef YYPARSE_PARAM 4.317 ++#if defined __STDC__ || defined __cplusplus 4.318 ++int yyparse (void *YYPARSE_PARAM); 4.319 ++#else 4.320 ++int yyparse (); 4.321 ++#endif 4.322 ++#else /* ! YYPARSE_PARAM */ 4.323 ++#if defined __STDC__ || defined __cplusplus 4.324 ++int yyparse (void); 4.325 ++#else 4.326 ++int yyparse (); 4.327 ++#endif 4.328 ++#endif /* ! YYPARSE_PARAM */ 4.329 ++ 4.330 ++ 4.331 ++ 4.332 ++/* Copy the second part of user declarations. */ 4.333 ++ 4.334 ++/* Line 390 of yacc.c */ 4.335 ++#line 296 "ptlib/common/getdate.tab.c" 4.336 ++ 4.337 ++#ifdef short 4.338 ++# undef short 4.339 ++#endif 4.340 ++ 4.341 ++#ifdef YYTYPE_UINT8 4.342 ++typedef YYTYPE_UINT8 yytype_uint8; 4.343 ++#else 4.344 ++typedef unsigned char yytype_uint8; 4.345 ++#endif 4.346 ++ 4.347 ++#ifdef YYTYPE_INT8 4.348 ++typedef YYTYPE_INT8 yytype_int8; 4.349 ++#elif (defined __STDC__ || defined __C99__FUNC__ \ 4.350 ++ || defined __cplusplus || defined _MSC_VER) 4.351 ++typedef signed char yytype_int8; 4.352 ++#else 4.353 ++typedef short int yytype_int8; 4.354 ++#endif 4.355 ++ 4.356 ++#ifdef YYTYPE_UINT16 4.357 ++typedef YYTYPE_UINT16 yytype_uint16; 4.358 ++#else 4.359 ++typedef unsigned short int yytype_uint16; 4.360 ++#endif 4.361 ++ 4.362 ++#ifdef YYTYPE_INT16 4.363 ++typedef YYTYPE_INT16 yytype_int16; 4.364 ++#else 4.365 ++typedef short int yytype_int16; 4.366 ++#endif 4.367 ++ 4.368 ++#ifndef YYSIZE_T 4.369 ++# ifdef __SIZE_TYPE__ 4.370 ++# define YYSIZE_T __SIZE_TYPE__ 4.371 ++# elif defined size_t 4.372 ++# define YYSIZE_T size_t 4.373 ++# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ 4.374 ++ || defined __cplusplus || defined _MSC_VER) 4.375 ++# include <stddef.h> /* INFRINGES ON USER NAME SPACE */ 4.376 ++# define YYSIZE_T size_t 4.377 ++# else 4.378 ++# define YYSIZE_T unsigned int 4.379 ++# endif 4.380 ++#endif 4.381 ++ 4.382 ++#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) 4.383 ++ 4.384 ++#ifndef YY_ 4.385 ++# if defined YYENABLE_NLS && YYENABLE_NLS 4.386 ++# if ENABLE_NLS 4.387 ++# include <libintl.h> /* INFRINGES ON USER NAME SPACE */ 4.388 ++# define YY_(Msgid) dgettext ("bison-runtime", Msgid) 4.389 ++# endif 4.390 ++# endif 4.391 ++# ifndef YY_ 4.392 ++# define YY_(Msgid) Msgid 4.393 ++# endif 4.394 ++#endif 4.395 ++ 4.396 ++#ifndef __attribute__ 4.397 ++/* This feature is available in gcc versions 2.5 and later. */ 4.398 ++# if (! defined __GNUC__ || __GNUC__ < 2 \ 4.399 ++ || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)) 4.400 ++# define __attribute__(Spec) /* empty */ 4.401 ++# endif 4.402 ++#endif 4.403 ++ 4.404 ++/* Suppress unused-variable warnings by "using" E. */ 4.405 ++#if ! defined lint || defined __GNUC__ 4.406 ++# define YYUSE(E) ((void) (E)) 4.407 ++#else 4.408 ++# define YYUSE(E) /* empty */ 4.409 ++#endif 4.410 ++ 4.411 ++ 4.412 ++/* Identity function, used to suppress warnings about constant conditions. */ 4.413 ++#ifndef lint 4.414 ++# define YYID(N) (N) 4.415 ++#else 4.416 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.417 ++ || defined __cplusplus || defined _MSC_VER) 4.418 ++static int 4.419 ++YYID (int yyi) 4.420 ++#else 4.421 ++static int 4.422 ++YYID (yyi) 4.423 ++ int yyi; 4.424 ++#endif 4.425 ++{ 4.426 ++ return yyi; 4.427 ++} 4.428 ++#endif 4.429 ++ 4.430 ++#if ! defined yyoverflow || YYERROR_VERBOSE 4.431 ++ 4.432 ++/* The parser invokes alloca or malloc; define the necessary symbols. */ 4.433 ++ 4.434 ++# ifdef YYSTACK_USE_ALLOCA 4.435 ++# if YYSTACK_USE_ALLOCA 4.436 ++# ifdef __GNUC__ 4.437 ++# define YYSTACK_ALLOC __builtin_alloca 4.438 ++# elif defined __BUILTIN_VA_ARG_INCR 4.439 ++# include <alloca.h> /* INFRINGES ON USER NAME SPACE */ 4.440 ++# elif defined _AIX 4.441 ++# define YYSTACK_ALLOC __alloca 4.442 ++# elif defined _MSC_VER 4.443 ++# include <malloc.h> /* INFRINGES ON USER NAME SPACE */ 4.444 ++# define alloca _alloca 4.445 ++# else 4.446 ++# define YYSTACK_ALLOC alloca 4.447 ++# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 4.448 ++ || defined __cplusplus || defined _MSC_VER) 4.449 ++# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 4.450 ++ /* Use EXIT_SUCCESS as a witness for stdlib.h. */ 4.451 ++# ifndef EXIT_SUCCESS 4.452 ++# define EXIT_SUCCESS 0 4.453 ++# endif 4.454 ++# endif 4.455 ++# endif 4.456 ++# endif 4.457 ++# endif 4.458 ++ 4.459 ++# ifdef YYSTACK_ALLOC 4.460 ++ /* Pacify GCC's `empty if-body' warning. */ 4.461 ++# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) 4.462 ++# ifndef YYSTACK_ALLOC_MAXIMUM 4.463 ++ /* The OS might guarantee only one guard page at the bottom of the stack, 4.464 ++ and a page size can be as small as 4096 bytes. So we cannot safely 4.465 ++ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number 4.466 ++ to allow for a few compiler-allocated temporary stack slots. */ 4.467 ++# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ 4.468 ++# endif 4.469 ++# else 4.470 ++# define YYSTACK_ALLOC YYMALLOC 4.471 ++# define YYSTACK_FREE YYFREE 4.472 ++# ifndef YYSTACK_ALLOC_MAXIMUM 4.473 ++# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM 4.474 ++# endif 4.475 ++# if (defined __cplusplus && ! defined EXIT_SUCCESS \ 4.476 ++ && ! ((defined YYMALLOC || defined malloc) \ 4.477 ++ && (defined YYFREE || defined free))) 4.478 ++# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ 4.479 ++# ifndef EXIT_SUCCESS 4.480 ++# define EXIT_SUCCESS 0 4.481 ++# endif 4.482 ++# endif 4.483 ++# ifndef YYMALLOC 4.484 ++# define YYMALLOC malloc 4.485 ++# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 4.486 ++ || defined __cplusplus || defined _MSC_VER) 4.487 ++void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ 4.488 ++# endif 4.489 ++# endif 4.490 ++# ifndef YYFREE 4.491 ++# define YYFREE free 4.492 ++# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ 4.493 ++ || defined __cplusplus || defined _MSC_VER) 4.494 ++void free (void *); /* INFRINGES ON USER NAME SPACE */ 4.495 ++# endif 4.496 ++# endif 4.497 ++# endif 4.498 ++#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ 4.499 ++ 4.500 ++ 4.501 ++#if (! defined yyoverflow \ 4.502 ++ && (! defined __cplusplus \ 4.503 ++ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) 4.504 ++ 4.505 ++/* A type that is properly aligned for any stack member. */ 4.506 ++union yyalloc 4.507 ++{ 4.508 ++ yytype_int16 yyss_alloc; 4.509 ++ YYSTYPE yyvs_alloc; 4.510 ++}; 4.511 ++ 4.512 ++/* The size of the maximum gap between one aligned stack and the next. */ 4.513 ++# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) 4.514 ++ 4.515 ++/* The size of an array large to enough to hold all stacks, each with 4.516 ++ N elements. */ 4.517 ++# define YYSTACK_BYTES(N) \ 4.518 ++ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ 4.519 ++ + YYSTACK_GAP_MAXIMUM) 4.520 ++ 4.521 ++# define YYCOPY_NEEDED 1 4.522 ++ 4.523 ++/* Relocate STACK from its old location to the new one. The 4.524 ++ local variables YYSIZE and YYSTACKSIZE give the old and new number of 4.525 ++ elements in the stack, and YYPTR gives the new location of the 4.526 ++ stack. Advance YYPTR to a properly aligned location for the next 4.527 ++ stack. */ 4.528 ++# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ 4.529 ++ do \ 4.530 ++ { \ 4.531 ++ YYSIZE_T yynewbytes; \ 4.532 ++ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ 4.533 ++ Stack = &yyptr->Stack_alloc; \ 4.534 ++ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ 4.535 ++ yyptr += yynewbytes / sizeof (*yyptr); \ 4.536 ++ } \ 4.537 ++ while (YYID (0)) 4.538 ++ 4.539 ++#endif 4.540 ++ 4.541 ++#if defined YYCOPY_NEEDED && YYCOPY_NEEDED 4.542 ++/* Copy COUNT objects from SRC to DST. The source and destination do 4.543 ++ not overlap. */ 4.544 ++# ifndef YYCOPY 4.545 ++# if defined __GNUC__ && 1 < __GNUC__ 4.546 ++# define YYCOPY(Dst, Src, Count) \ 4.547 ++ __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) 4.548 ++# else 4.549 ++# define YYCOPY(Dst, Src, Count) \ 4.550 ++ do \ 4.551 ++ { \ 4.552 ++ YYSIZE_T yyi; \ 4.553 ++ for (yyi = 0; yyi < (Count); yyi++) \ 4.554 ++ (Dst)[yyi] = (Src)[yyi]; \ 4.555 ++ } \ 4.556 ++ while (YYID (0)) 4.557 ++# endif 4.558 ++# endif 4.559 ++#endif /* !YYCOPY_NEEDED */ 4.560 ++ 4.561 ++/* YYFINAL -- State number of the termination state. */ 4.562 ++#define YYFINAL 2 4.563 ++/* YYLAST -- Last index in YYTABLE. */ 4.564 ++#define YYLAST 105 4.565 ++ 4.566 ++/* YYNTOKENS -- Number of terminals. */ 4.567 ++#define YYNTOKENS 25 4.568 ++/* YYNNTS -- Number of nonterminals. */ 4.569 ++#define YYNNTS 12 4.570 ++/* YYNRULES -- Number of rules. */ 4.571 ++#define YYNRULES 51 4.572 ++/* YYNRULES -- Number of states. */ 4.573 ++#define YYNSTATES 63 4.574 ++ 4.575 ++/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ 4.576 ++#define YYUNDEFTOK 2 4.577 ++#define YYMAXUTOK 276 4.578 ++ 4.579 ++#define YYTRANSLATE(YYX) \ 4.580 ++ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) 4.581 ++ 4.582 ++/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ 4.583 ++static const yytype_uint8 yytranslate[] = 4.584 ++{ 4.585 ++ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.586 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.587 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.588 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.589 ++ 2, 2, 2, 2, 23, 2, 2, 24, 2, 2, 4.590 ++ 2, 2, 2, 2, 2, 2, 2, 2, 22, 2, 4.591 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.592 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.593 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.594 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.595 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.596 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.597 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.598 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.599 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.600 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.601 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.602 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.603 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.604 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.605 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.606 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.607 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.608 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.609 ++ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4.610 ++ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 4.611 ++ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 4.612 ++ 15, 16, 17, 18, 19, 20, 21 4.613 ++}; 4.614 ++ 4.615 ++#if YYDEBUG 4.616 ++/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in 4.617 ++ YYRHS. */ 4.618 ++static const yytype_uint8 yyprhs[] = 4.619 ++{ 4.620 ++ 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, 4.621 ++ 19, 22, 25, 28, 33, 38, 45, 52, 54, 56, 4.622 ++ 59, 61, 63, 66, 69, 73, 79, 84, 86, 90, 4.623 ++ 93, 98, 101, 105, 108, 110, 113, 116, 118, 121, 4.624 ++ 124, 126, 129, 132, 134, 136, 138, 140, 142, 144, 4.625 ++ 146, 147 4.626 ++}; 4.627 ++ 4.628 ++/* YYRHS -- A `-1'-separated list of the rules' RHS. */ 4.629 ++static const yytype_int8 yyrhs[] = 4.630 ++{ 4.631 ++ 26, 0, -1, -1, 26, 27, -1, 28, -1, 29, 4.632 ++ -1, 31, -1, 30, -1, 32, -1, 35, -1, 13, 4.633 ++ 7, -1, 14, 12, -1, 15, 12, -1, 34, 22, 4.634 ++ 34, 36, -1, 34, 22, 34, 12, -1, 34, 22, 4.635 ++ 34, 22, 34, 36, -1, 34, 22, 34, 22, 34, 4.636 ++ 12, -1, 18, -1, 5, -1, 18, 21, -1, 19, 4.637 ++ -1, 4, -1, 4, 23, -1, 34, 4, -1, 34, 4.638 ++ 24, 34, -1, 34, 24, 34, 24, 34, -1, 34, 4.639 ++ 11, 11, 20, -1, 16, -1, 34, 9, 11, -1, 4.640 ++ 9, 34, -1, 9, 34, 23, 34, -1, 34, 9, 4.641 ++ -1, 34, 9, 34, -1, 33, 3, -1, 33, -1, 4.642 ++ 34, 8, -1, 11, 8, -1, 8, -1, 11, 17, 4.643 ++ -1, 34, 17, -1, 17, -1, 11, 10, -1, 34, 4.644 ++ 10, -1, 10, -1, 13, -1, 14, -1, 15, -1, 4.645 ++ 13, -1, 14, -1, 15, -1, -1, 7, -1 4.646 ++}; 4.647 ++ 4.648 ++/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ 4.649 ++static const yytype_uint16 yyrline[] = 4.650 ++{ 4.651 ++ 0, 153, 153, 154, 157, 160, 163, 166, 169, 172, 4.652 ++ 175, 181, 189, 197, 203, 210, 216, 226, 230, 235, 4.653 ++ 239, 249, 253, 257, 263, 266, 269, 273, 278, 282, 4.654 ++ 289, 294, 301, 306, 310, 313, 316, 319, 322, 325, 4.655 ++ 328, 331, 334, 337, 342, 345, 348, 353, 379, 390, 4.656 ++ 407, 410 4.657 ++}; 4.658 ++#endif 4.659 ++ 4.660 ++#if YYDEBUG || YYERROR_VERBOSE || 0 4.661 ++/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. 4.662 ++ First, the terminals, then, starting at YYNTOKENS, nonterminals. */ 4.663 ++static const char *const yytname[] = 4.664 ++{ 4.665 ++ "$end", "error", "$undefined", "tAGO", "tDAY", "tDAYZONE", "tID", 4.666 ++ "tMERIDIAN", "tMINUTE_UNIT", "tMONTH", "tMONTH_UNIT", "tSNUMBER", 4.667 ++ "tS4DIGITNUMBER", "tUNUMBER", "t4DIGITNUMBER", "t6DIGITNUMBER", 4.668 ++ "t8DIGITNUMBER", "tSEC_UNIT", "tZONE", "tMILZONE", "tRFC3339", "tDST", 4.669 ++ "':'", "','", "'/'", "$accept", "spec", "item", "time", "zone", "day", 4.670 ++ "date", "rel", "relunit", "unumber", "number", "o_merid", YY_NULL 4.671 ++}; 4.672 ++#endif 4.673 ++ 4.674 ++# ifdef YYPRINT 4.675 ++/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to 4.676 ++ token YYLEX-NUM. */ 4.677 ++static const yytype_uint16 yytoknum[] = 4.678 ++{ 4.679 ++ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 4.680 ++ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 4.681 ++ 275, 276, 58, 44, 47 4.682 ++}; 4.683 ++# endif 4.684 ++ 4.685 ++/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ 4.686 ++static const yytype_uint8 yyr1[] = 4.687 ++{ 4.688 ++ 0, 25, 26, 26, 27, 27, 27, 27, 27, 27, 4.689 ++ 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 4.690 ++ 29, 30, 30, 30, 31, 31, 31, 31, 31, 31, 4.691 ++ 31, 31, 31, 32, 32, 33, 33, 33, 33, 33, 4.692 ++ 33, 33, 33, 33, 34, 34, 34, 35, 35, 35, 4.693 ++ 36, 36 4.694 ++}; 4.695 ++ 4.696 ++/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ 4.697 ++static const yytype_uint8 yyr2[] = 4.698 ++{ 4.699 ++ 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 4.700 ++ 2, 2, 2, 4, 4, 6, 6, 1, 1, 2, 4.701 ++ 1, 1, 2, 2, 3, 5, 4, 1, 3, 2, 4.702 ++ 4, 2, 3, 2, 1, 2, 2, 1, 2, 2, 4.703 ++ 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 4.704 ++ 0, 1 4.705 ++}; 4.706 ++ 4.707 ++/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. 4.708 ++ Performed when YYTABLE doesn't specify something else to do. Zero 4.709 ++ means the default is an error. */ 4.710 ++static const yytype_uint8 yydefact[] = 4.711 ++{ 4.712 ++ 2, 0, 1, 21, 18, 37, 0, 43, 0, 44, 4.713 ++ 45, 46, 27, 40, 17, 20, 3, 4, 5, 7, 4.714 ++ 6, 8, 34, 0, 9, 22, 44, 45, 46, 29, 4.715 ++ 36, 41, 38, 10, 11, 12, 19, 33, 23, 35, 4.716 ++ 31, 42, 0, 39, 0, 0, 0, 28, 32, 0, 4.717 ++ 50, 24, 30, 26, 51, 14, 0, 13, 0, 50, 4.718 ++ 25, 16, 15 4.719 ++}; 4.720 ++ 4.721 ++/* YYDEFGOTO[NTERM-NUM]. */ 4.722 ++static const yytype_int8 yydefgoto[] = 4.723 ++{ 4.724 ++ -1, 1, 16, 17, 18, 19, 20, 21, 22, 23, 4.725 ++ 24, 57 4.726 ++}; 4.727 ++ 4.728 ++/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing 4.729 ++ STATE-NUM. */ 4.730 ++#define YYPACT_NINF -27 4.731 ++static const yytype_int8 yypact[] = 4.732 ++{ 4.733 ++ -27, 49, -27, -10, -27, -27, -11, -27, 1, 10, 4.734 ++ 69, 86, -27, -27, -9, -27, -27, -27, -27, -27, 4.735 ++ -27, -27, 13, -3, -27, -27, -27, -27, -27, 8, 4.736 ++ -27, -27, -27, -27, -27, -27, -27, -27, -27, -27, 4.737 ++ 30, -27, 9, -27, -11, -11, -11, -27, -27, 12, 4.738 ++ 15, 18, -27, -27, -27, -27, -11, -27, -11, 23, 4.739 ++ -27, -27, -27 4.740 ++}; 4.741 ++ 4.742 ++/* YYPGOTO[NTERM-NUM]. */ 4.743 ++static const yytype_int8 yypgoto[] = 4.744 ++{ 4.745 ++ -27, -27, -27, -27, -27, -27, -27, -27, -27, -6, 4.746 ++ -27, -26 4.747 ++}; 4.748 ++ 4.749 ++/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If 4.750 ++ positive, shift that token. If negative, reduce the rule which 4.751 ++ number is the opposite. If YYTABLE_NINF, syntax error. */ 4.752 ++#define YYTABLE_NINF -50 4.753 ++static const yytype_int8 yytable[] = 4.754 ++{ 4.755 ++ 29, 38, 26, 27, 28, 39, 40, 41, 42, 30, 4.756 ++ -47, 31, 36, 25, 43, -47, 37, 33, 32, 44, 4.757 ++ 49, 45, 54, -47, -47, -47, -47, 55, -47, -47, 4.758 ++ 54, 46, 53, 62, 48, 61, 0, 56, 50, 51, 4.759 ++ 52, 47, 58, 26, 27, 28, 0, 0, 0, 2, 4.760 ++ 59, 0, 60, 3, 4, 0, 0, 5, 6, 7, 4.761 ++ 8, 0, 9, 10, 11, 12, 13, 14, 15, -48, 4.762 ++ 0, 0, 0, 0, -48, 0, 0, 0, 0, 0, 4.763 ++ 0, 34, -48, -48, -48, -48, -49, -48, -48, 0, 4.764 ++ 0, -49, 0, 0, 0, 0, 0, 0, 35, -49, 4.765 ++ -49, -49, -49, 0, -49, -49 4.766 ++}; 4.767 ++ 4.768 ++#define yypact_value_is_default(Yystate) \ 4.769 ++ (!!((Yystate) == (-27))) 4.770 ++ 4.771 ++#define yytable_value_is_error(Yytable_value) \ 4.772 ++ YYID (0) 4.773 ++ 4.774 ++static const yytype_int8 yycheck[] = 4.775 ++{ 4.776 ++ 6, 4, 13, 14, 15, 8, 9, 10, 11, 8, 4.777 ++ 0, 10, 21, 23, 17, 5, 3, 7, 17, 22, 4.778 ++ 11, 24, 7, 13, 14, 15, 16, 12, 18, 19, 4.779 ++ 7, 23, 20, 59, 40, 12, -1, 22, 44, 45, 4.780 ++ 46, 11, 24, 13, 14, 15, -1, -1, -1, 0, 4.781 ++ 56, -1, 58, 4, 5, -1, -1, 8, 9, 10, 4.782 ++ 11, -1, 13, 14, 15, 16, 17, 18, 19, 0, 4.783 ++ -1, -1, -1, -1, 5, -1, -1, -1, -1, -1, 4.784 ++ -1, 12, 13, 14, 15, 16, 0, 18, 19, -1, 4.785 ++ -1, 5, -1, -1, -1, -1, -1, -1, 12, 13, 4.786 ++ 14, 15, 16, -1, 18, 19 4.787 ++}; 4.788 ++ 4.789 ++/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing 4.790 ++ symbol of state STATE-NUM. */ 4.791 ++static const yytype_uint8 yystos[] = 4.792 ++{ 4.793 ++ 0, 26, 0, 4, 5, 8, 9, 10, 11, 13, 4.794 ++ 14, 15, 16, 17, 18, 19, 27, 28, 29, 30, 4.795 ++ 31, 32, 33, 34, 35, 23, 13, 14, 15, 34, 4.796 ++ 8, 10, 17, 7, 12, 12, 21, 3, 4, 8, 4.797 ++ 9, 10, 11, 17, 22, 24, 23, 11, 34, 11, 4.798 ++ 34, 34, 34, 20, 7, 12, 22, 36, 24, 34, 4.799 ++ 34, 12, 36 4.800 ++}; 4.801 ++ 4.802 ++#define yyerrok (yyerrstatus = 0) 4.803 ++#define yyclearin (yychar = YYEMPTY) 4.804 ++#define YYEMPTY (-2) 4.805 ++#define YYEOF 0 4.806 ++ 4.807 ++#define YYACCEPT goto yyacceptlab 4.808 ++#define YYABORT goto yyabortlab 4.809 ++#define YYERROR goto yyerrorlab 4.810 ++ 4.811 ++ 4.812 ++/* Like YYERROR except do call yyerror. This remains here temporarily 4.813 ++ to ease the transition to the new meaning of YYERROR, for GCC. 4.814 ++ Once GCC version 2 has supplanted version 1, this can go. However, 4.815 ++ YYFAIL appears to be in use. Nevertheless, it is formally deprecated 4.816 ++ in Bison 2.4.2's NEWS entry, where a plan to phase it out is 4.817 ++ discussed. */ 4.818 ++ 4.819 ++#define YYFAIL goto yyerrlab 4.820 ++#if defined YYFAIL 4.821 ++ /* This is here to suppress warnings from the GCC cpp's 4.822 ++ -Wunused-macros. Normally we don't worry about that warning, but 4.823 ++ some users do, and we want to make it easy for users to remove 4.824 ++ YYFAIL uses, which will produce warnings from Bison 2.5. */ 4.825 ++#endif 4.826 ++ 4.827 ++#define YYRECOVERING() (!!yyerrstatus) 4.828 ++ 4.829 ++#define YYBACKUP(Token, Value) \ 4.830 ++do \ 4.831 ++ if (yychar == YYEMPTY) \ 4.832 ++ { \ 4.833 ++ yychar = (Token); \ 4.834 ++ yylval = (Value); \ 4.835 ++ YYPOPSTACK (yylen); \ 4.836 ++ yystate = *yyssp; \ 4.837 ++ goto yybackup; \ 4.838 ++ } \ 4.839 ++ else \ 4.840 ++ { \ 4.841 ++ yyerror (YY_("syntax error: cannot back up")); \ 4.842 ++ YYERROR; \ 4.843 ++ } \ 4.844 ++while (YYID (0)) 4.845 ++ 4.846 ++/* Error token number */ 4.847 ++#define YYTERROR 1 4.848 ++#define YYERRCODE 256 4.849 ++ 4.850 ++ 4.851 ++/* This macro is provided for backward compatibility. */ 4.852 ++#ifndef YY_LOCATION_PRINT 4.853 ++# define YY_LOCATION_PRINT(File, Loc) ((void) 0) 4.854 ++#endif 4.855 ++ 4.856 ++ 4.857 ++/* YYLEX -- calling `yylex' with the right arguments. */ 4.858 ++#ifdef YYLEX_PARAM 4.859 ++# define YYLEX yylex (&yylval, YYLEX_PARAM) 4.860 ++#else 4.861 ++# define YYLEX yylex (&yylval) 4.862 ++#endif 4.863 ++ 4.864 ++/* Enable debugging if requested. */ 4.865 ++#if YYDEBUG 4.866 ++ 4.867 ++# ifndef YYFPRINTF 4.868 ++# include <stdio.h> /* INFRINGES ON USER NAME SPACE */ 4.869 ++# define YYFPRINTF fprintf 4.870 ++# endif 4.871 ++ 4.872 ++# define YYDPRINTF(Args) \ 4.873 ++do { \ 4.874 ++ if (yydebug) \ 4.875 ++ YYFPRINTF Args; \ 4.876 ++} while (YYID (0)) 4.877 ++ 4.878 ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ 4.879 ++do { \ 4.880 ++ if (yydebug) \ 4.881 ++ { \ 4.882 ++ YYFPRINTF (stderr, "%s ", Title); \ 4.883 ++ yy_symbol_print (stderr, \ 4.884 ++ Type, Value); \ 4.885 ++ YYFPRINTF (stderr, "\n"); \ 4.886 ++ } \ 4.887 ++} while (YYID (0)) 4.888 ++ 4.889 ++ 4.890 ++/*--------------------------------. 4.891 ++| Print this symbol on YYOUTPUT. | 4.892 ++`--------------------------------*/ 4.893 ++ 4.894 ++/*ARGSUSED*/ 4.895 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.896 ++ || defined __cplusplus || defined _MSC_VER) 4.897 ++static void 4.898 ++yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 4.899 ++#else 4.900 ++static void 4.901 ++yy_symbol_value_print (yyoutput, yytype, yyvaluep) 4.902 ++ FILE *yyoutput; 4.903 ++ int yytype; 4.904 ++ YYSTYPE const * const yyvaluep; 4.905 ++#endif 4.906 ++{ 4.907 ++ FILE *yyo = yyoutput; 4.908 ++ YYUSE (yyo); 4.909 ++ if (!yyvaluep) 4.910 ++ return; 4.911 ++# ifdef YYPRINT 4.912 ++ if (yytype < YYNTOKENS) 4.913 ++ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); 4.914 ++# else 4.915 ++ YYUSE (yyoutput); 4.916 ++# endif 4.917 ++ YYUSE (yytype); 4.918 ++} 4.919 ++ 4.920 ++ 4.921 ++/*--------------------------------. 4.922 ++| Print this symbol on YYOUTPUT. | 4.923 ++`--------------------------------*/ 4.924 ++ 4.925 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.926 ++ || defined __cplusplus || defined _MSC_VER) 4.927 ++static void 4.928 ++yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) 4.929 ++#else 4.930 ++static void 4.931 ++yy_symbol_print (yyoutput, yytype, yyvaluep) 4.932 ++ FILE *yyoutput; 4.933 ++ int yytype; 4.934 ++ YYSTYPE const * const yyvaluep; 4.935 ++#endif 4.936 ++{ 4.937 ++ if (yytype < YYNTOKENS) 4.938 ++ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); 4.939 ++ else 4.940 ++ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); 4.941 ++ 4.942 ++ yy_symbol_value_print (yyoutput, yytype, yyvaluep); 4.943 ++ YYFPRINTF (yyoutput, ")"); 4.944 ++} 4.945 ++ 4.946 ++/*------------------------------------------------------------------. 4.947 ++| yy_stack_print -- Print the state stack from its BOTTOM up to its | 4.948 ++| TOP (included). | 4.949 ++`------------------------------------------------------------------*/ 4.950 ++ 4.951 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.952 ++ || defined __cplusplus || defined _MSC_VER) 4.953 ++static void 4.954 ++yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) 4.955 ++#else 4.956 ++static void 4.957 ++yy_stack_print (yybottom, yytop) 4.958 ++ yytype_int16 *yybottom; 4.959 ++ yytype_int16 *yytop; 4.960 ++#endif 4.961 ++{ 4.962 ++ YYFPRINTF (stderr, "Stack now"); 4.963 ++ for (; yybottom <= yytop; yybottom++) 4.964 ++ { 4.965 ++ int yybot = *yybottom; 4.966 ++ YYFPRINTF (stderr, " %d", yybot); 4.967 ++ } 4.968 ++ YYFPRINTF (stderr, "\n"); 4.969 ++} 4.970 ++ 4.971 ++# define YY_STACK_PRINT(Bottom, Top) \ 4.972 ++do { \ 4.973 ++ if (yydebug) \ 4.974 ++ yy_stack_print ((Bottom), (Top)); \ 4.975 ++} while (YYID (0)) 4.976 ++ 4.977 ++ 4.978 ++/*------------------------------------------------. 4.979 ++| Report that the YYRULE is going to be reduced. | 4.980 ++`------------------------------------------------*/ 4.981 ++ 4.982 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.983 ++ || defined __cplusplus || defined _MSC_VER) 4.984 ++static void 4.985 ++yy_reduce_print (YYSTYPE *yyvsp, int yyrule) 4.986 ++#else 4.987 ++static void 4.988 ++yy_reduce_print (yyvsp, yyrule) 4.989 ++ YYSTYPE *yyvsp; 4.990 ++ int yyrule; 4.991 ++#endif 4.992 ++{ 4.993 ++ int yynrhs = yyr2[yyrule]; 4.994 ++ int yyi; 4.995 ++ unsigned long int yylno = yyrline[yyrule]; 4.996 ++ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", 4.997 ++ yyrule - 1, yylno); 4.998 ++ /* The symbols being reduced. */ 4.999 ++ for (yyi = 0; yyi < yynrhs; yyi++) 4.1000 ++ { 4.1001 ++ YYFPRINTF (stderr, " $%d = ", yyi + 1); 4.1002 ++ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], 4.1003 ++ &(yyvsp[(yyi + 1) - (yynrhs)]) 4.1004 ++ ); 4.1005 ++ YYFPRINTF (stderr, "\n"); 4.1006 ++ } 4.1007 ++} 4.1008 ++ 4.1009 ++# define YY_REDUCE_PRINT(Rule) \ 4.1010 ++do { \ 4.1011 ++ if (yydebug) \ 4.1012 ++ yy_reduce_print (yyvsp, Rule); \ 4.1013 ++} while (YYID (0)) 4.1014 ++ 4.1015 ++/* Nonzero means print parse trace. It is left uninitialized so that 4.1016 ++ multiple parsers can coexist. */ 4.1017 ++int yydebug; 4.1018 ++#else /* !YYDEBUG */ 4.1019 ++# define YYDPRINTF(Args) 4.1020 ++# define YY_SYMBOL_PRINT(Title, Type, Value, Location) 4.1021 ++# define YY_STACK_PRINT(Bottom, Top) 4.1022 ++# define YY_REDUCE_PRINT(Rule) 4.1023 ++#endif /* !YYDEBUG */ 4.1024 ++ 4.1025 ++ 4.1026 ++/* YYINITDEPTH -- initial size of the parser's stacks. */ 4.1027 ++#ifndef YYINITDEPTH 4.1028 ++# define YYINITDEPTH 200 4.1029 ++#endif 4.1030 ++ 4.1031 ++/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only 4.1032 ++ if the built-in stack extension method is used). 4.1033 ++ 4.1034 ++ Do not make this value too large; the results are undefined if 4.1035 ++ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) 4.1036 ++ evaluated with infinite-precision integer arithmetic. */ 4.1037 ++ 4.1038 ++#ifndef YYMAXDEPTH 4.1039 ++# define YYMAXDEPTH 10000 4.1040 ++#endif 4.1041 ++ 4.1042 ++ 4.1043 ++#if YYERROR_VERBOSE 4.1044 ++ 4.1045 ++# ifndef yystrlen 4.1046 ++# if defined __GLIBC__ && defined _STRING_H 4.1047 ++# define yystrlen strlen 4.1048 ++# else 4.1049 ++/* Return the length of YYSTR. */ 4.1050 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1051 ++ || defined __cplusplus || defined _MSC_VER) 4.1052 ++static YYSIZE_T 4.1053 ++yystrlen (const char *yystr) 4.1054 ++#else 4.1055 ++static YYSIZE_T 4.1056 ++yystrlen (yystr) 4.1057 ++ const char *yystr; 4.1058 ++#endif 4.1059 ++{ 4.1060 ++ YYSIZE_T yylen; 4.1061 ++ for (yylen = 0; yystr[yylen]; yylen++) 4.1062 ++ continue; 4.1063 ++ return yylen; 4.1064 ++} 4.1065 ++# endif 4.1066 ++# endif 4.1067 ++ 4.1068 ++# ifndef yystpcpy 4.1069 ++# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE 4.1070 ++# define yystpcpy stpcpy 4.1071 ++# else 4.1072 ++/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in 4.1073 ++ YYDEST. */ 4.1074 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1075 ++ || defined __cplusplus || defined _MSC_VER) 4.1076 ++static char * 4.1077 ++yystpcpy (char *yydest, const char *yysrc) 4.1078 ++#else 4.1079 ++static char * 4.1080 ++yystpcpy (yydest, yysrc) 4.1081 ++ char *yydest; 4.1082 ++ const char *yysrc; 4.1083 ++#endif 4.1084 ++{ 4.1085 ++ char *yyd = yydest; 4.1086 ++ const char *yys = yysrc; 4.1087 ++ 4.1088 ++ while ((*yyd++ = *yys++) != '\0') 4.1089 ++ continue; 4.1090 ++ 4.1091 ++ return yyd - 1; 4.1092 ++} 4.1093 ++# endif 4.1094 ++# endif 4.1095 ++ 4.1096 ++# ifndef yytnamerr 4.1097 ++/* Copy to YYRES the contents of YYSTR after stripping away unnecessary 4.1098 ++ quotes and backslashes, so that it's suitable for yyerror. The 4.1099 ++ heuristic is that double-quoting is unnecessary unless the string 4.1100 ++ contains an apostrophe, a comma, or backslash (other than 4.1101 ++ backslash-backslash). YYSTR is taken from yytname. If YYRES is 4.1102 ++ null, do not copy; instead, return the length of what the result 4.1103 ++ would have been. */ 4.1104 ++static YYSIZE_T 4.1105 ++yytnamerr (char *yyres, const char *yystr) 4.1106 ++{ 4.1107 ++ if (*yystr == '"') 4.1108 ++ { 4.1109 ++ YYSIZE_T yyn = 0; 4.1110 ++ char const *yyp = yystr; 4.1111 ++ 4.1112 ++ for (;;) 4.1113 ++ switch (*++yyp) 4.1114 ++ { 4.1115 ++ case '\'': 4.1116 ++ case ',': 4.1117 ++ goto do_not_strip_quotes; 4.1118 ++ 4.1119 ++ case '\\': 4.1120 ++ if (*++yyp != '\\') 4.1121 ++ goto do_not_strip_quotes; 4.1122 ++ /* Fall through. */ 4.1123 ++ default: 4.1124 ++ if (yyres) 4.1125 ++ yyres[yyn] = *yyp; 4.1126 ++ yyn++; 4.1127 ++ break; 4.1128 ++ 4.1129 ++ case '"': 4.1130 ++ if (yyres) 4.1131 ++ yyres[yyn] = '\0'; 4.1132 ++ return yyn; 4.1133 ++ } 4.1134 ++ do_not_strip_quotes: ; 4.1135 ++ } 4.1136 ++ 4.1137 ++ if (! yyres) 4.1138 ++ return yystrlen (yystr); 4.1139 ++ 4.1140 ++ return yystpcpy (yyres, yystr) - yyres; 4.1141 ++} 4.1142 ++# endif 4.1143 ++ 4.1144 ++/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message 4.1145 ++ about the unexpected token YYTOKEN for the state stack whose top is 4.1146 ++ YYSSP. 4.1147 ++ 4.1148 ++ Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is 4.1149 ++ not large enough to hold the message. In that case, also set 4.1150 ++ *YYMSG_ALLOC to the required number of bytes. Return 2 if the 4.1151 ++ required number of bytes is too large to store. */ 4.1152 ++static int 4.1153 ++yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, 4.1154 ++ yytype_int16 *yyssp, int yytoken) 4.1155 ++{ 4.1156 ++ YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]); 4.1157 ++ YYSIZE_T yysize = yysize0; 4.1158 ++ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; 4.1159 ++ /* Internationalized format string. */ 4.1160 ++ const char *yyformat = YY_NULL; 4.1161 ++ /* Arguments of yyformat. */ 4.1162 ++ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; 4.1163 ++ /* Number of reported tokens (one for the "unexpected", one per 4.1164 ++ "expected"). */ 4.1165 ++ int yycount = 0; 4.1166 ++ 4.1167 ++ /* There are many possibilities here to consider: 4.1168 ++ - Assume YYFAIL is not used. It's too flawed to consider. See 4.1169 ++ <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html> 4.1170 ++ for details. YYERROR is fine as it does not invoke this 4.1171 ++ function. 4.1172 ++ - If this state is a consistent state with a default action, then 4.1173 ++ the only way this function was invoked is if the default action 4.1174 ++ is an error action. In that case, don't check for expected 4.1175 ++ tokens because there are none. 4.1176 ++ - The only way there can be no lookahead present (in yychar) is if 4.1177 ++ this state is a consistent state with a default action. Thus, 4.1178 ++ detecting the absence of a lookahead is sufficient to determine 4.1179 ++ that there is no unexpected or expected token to report. In that 4.1180 ++ case, just report a simple "syntax error". 4.1181 ++ - Don't assume there isn't a lookahead just because this state is a 4.1182 ++ consistent state with a default action. There might have been a 4.1183 ++ previous inconsistent state, consistent state with a non-default 4.1184 ++ action, or user semantic action that manipulated yychar. 4.1185 ++ - Of course, the expected token list depends on states to have 4.1186 ++ correct lookahead information, and it depends on the parser not 4.1187 ++ to perform extra reductions after fetching a lookahead from the 4.1188 ++ scanner and before detecting a syntax error. Thus, state merging 4.1189 ++ (from LALR or IELR) and default reductions corrupt the expected 4.1190 ++ token list. However, the list is correct for canonical LR with 4.1191 ++ one exception: it will still contain any token that will not be 4.1192 ++ accepted due to an error action in a later state. 4.1193 ++ */ 4.1194 ++ if (yytoken != YYEMPTY) 4.1195 ++ { 4.1196 ++ int yyn = yypact[*yyssp]; 4.1197 ++ yyarg[yycount++] = yytname[yytoken]; 4.1198 ++ if (!yypact_value_is_default (yyn)) 4.1199 ++ { 4.1200 ++ /* Start YYX at -YYN if negative to avoid negative indexes in 4.1201 ++ YYCHECK. In other words, skip the first -YYN actions for 4.1202 ++ this state because they are default actions. */ 4.1203 ++ int yyxbegin = yyn < 0 ? -yyn : 0; 4.1204 ++ /* Stay within bounds of both yycheck and yytname. */ 4.1205 ++ int yychecklim = YYLAST - yyn + 1; 4.1206 ++ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; 4.1207 ++ int yyx; 4.1208 ++ 4.1209 ++ for (yyx = yyxbegin; yyx < yyxend; ++yyx) 4.1210 ++ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR 4.1211 ++ && !yytable_value_is_error (yytable[yyx + yyn])) 4.1212 ++ { 4.1213 ++ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) 4.1214 ++ { 4.1215 ++ yycount = 1; 4.1216 ++ yysize = yysize0; 4.1217 ++ break; 4.1218 ++ } 4.1219 ++ yyarg[yycount++] = yytname[yyx]; 4.1220 ++ { 4.1221 ++ YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]); 4.1222 ++ if (! (yysize <= yysize1 4.1223 ++ && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 4.1224 ++ return 2; 4.1225 ++ yysize = yysize1; 4.1226 ++ } 4.1227 ++ } 4.1228 ++ } 4.1229 ++ } 4.1230 ++ 4.1231 ++ switch (yycount) 4.1232 ++ { 4.1233 ++# define YYCASE_(N, S) \ 4.1234 ++ case N: \ 4.1235 ++ yyformat = S; \ 4.1236 ++ break 4.1237 ++ YYCASE_(0, YY_("syntax error")); 4.1238 ++ YYCASE_(1, YY_("syntax error, unexpected %s")); 4.1239 ++ YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); 4.1240 ++ YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); 4.1241 ++ YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); 4.1242 ++ YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); 4.1243 ++# undef YYCASE_ 4.1244 ++ } 4.1245 ++ 4.1246 ++ { 4.1247 ++ YYSIZE_T yysize1 = yysize + yystrlen (yyformat); 4.1248 ++ if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) 4.1249 ++ return 2; 4.1250 ++ yysize = yysize1; 4.1251 ++ } 4.1252 ++ 4.1253 ++ if (*yymsg_alloc < yysize) 4.1254 ++ { 4.1255 ++ *yymsg_alloc = 2 * yysize; 4.1256 ++ if (! (yysize <= *yymsg_alloc 4.1257 ++ && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) 4.1258 ++ *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; 4.1259 ++ return 1; 4.1260 ++ } 4.1261 ++ 4.1262 ++ /* Avoid sprintf, as that infringes on the user's name space. 4.1263 ++ Don't have undefined behavior even if the translation 4.1264 ++ produced a string with the wrong number of "%s"s. */ 4.1265 ++ { 4.1266 ++ char *yyp = *yymsg; 4.1267 ++ int yyi = 0; 4.1268 ++ while ((*yyp = *yyformat) != '\0') 4.1269 ++ if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) 4.1270 ++ { 4.1271 ++ yyp += yytnamerr (yyp, yyarg[yyi++]); 4.1272 ++ yyformat += 2; 4.1273 ++ } 4.1274 ++ else 4.1275 ++ { 4.1276 ++ yyp++; 4.1277 ++ yyformat++; 4.1278 ++ } 4.1279 ++ } 4.1280 ++ return 0; 4.1281 ++} 4.1282 ++#endif /* YYERROR_VERBOSE */ 4.1283 ++ 4.1284 ++/*-----------------------------------------------. 4.1285 ++| Release the memory associated to this symbol. | 4.1286 ++`-----------------------------------------------*/ 4.1287 ++ 4.1288 ++/*ARGSUSED*/ 4.1289 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1290 ++ || defined __cplusplus || defined _MSC_VER) 4.1291 ++static void 4.1292 ++yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) 4.1293 ++#else 4.1294 ++static void 4.1295 ++yydestruct (yymsg, yytype, yyvaluep) 4.1296 ++ const char *yymsg; 4.1297 ++ int yytype; 4.1298 ++ YYSTYPE *yyvaluep; 4.1299 ++#endif 4.1300 ++{ 4.1301 ++ YYUSE (yyvaluep); 4.1302 ++ 4.1303 ++ if (!yymsg) 4.1304 ++ yymsg = "Deleting"; 4.1305 ++ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); 4.1306 ++ 4.1307 ++ YYUSE (yytype); 4.1308 ++} 4.1309 ++ 4.1310 ++ 4.1311 ++ 4.1312 ++ 4.1313 ++/*----------. 4.1314 ++| yyparse. | 4.1315 ++`----------*/ 4.1316 ++ 4.1317 ++#ifdef YYPARSE_PARAM 4.1318 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1319 ++ || defined __cplusplus || defined _MSC_VER) 4.1320 ++int 4.1321 ++yyparse (void *YYPARSE_PARAM) 4.1322 ++#else 4.1323 ++int 4.1324 ++yyparse (YYPARSE_PARAM) 4.1325 ++ void *YYPARSE_PARAM; 4.1326 ++#endif 4.1327 ++#else /* ! YYPARSE_PARAM */ 4.1328 ++#if (defined __STDC__ || defined __C99__FUNC__ \ 4.1329 ++ || defined __cplusplus || defined _MSC_VER) 4.1330 ++int 4.1331 ++yyparse (void) 4.1332 ++#else 4.1333 ++int 4.1334 ++yyparse () 4.1335 ++ 4.1336 ++#endif 4.1337 ++#endif 4.1338 ++{ 4.1339 ++/* The lookahead symbol. */ 4.1340 ++int yychar; 4.1341 ++ 4.1342 ++ 4.1343 ++#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ 4.1344 ++/* Suppress an incorrect diagnostic about yylval being uninitialized. */ 4.1345 ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ 4.1346 ++ _Pragma ("GCC diagnostic push") \ 4.1347 ++ _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ 4.1348 ++ _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 4.1349 ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ 4.1350 ++ _Pragma ("GCC diagnostic pop") 4.1351 ++#else 4.1352 ++/* Default value used for initialization, for pacifying older GCCs 4.1353 ++ or non-GCC compilers. */ 4.1354 ++static YYSTYPE yyval_default; 4.1355 ++# define YY_INITIAL_VALUE(Value) = Value 4.1356 ++#endif 4.1357 ++#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 4.1358 ++# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 4.1359 ++# define YY_IGNORE_MAYBE_UNINITIALIZED_END 4.1360 ++#endif 4.1361 ++#ifndef YY_INITIAL_VALUE 4.1362 ++# define YY_INITIAL_VALUE(Value) /* Nothing. */ 4.1363 ++#endif 4.1364 ++ 4.1365 ++/* The semantic value of the lookahead symbol. */ 4.1366 ++YYSTYPE yylval YY_INITIAL_VALUE(yyval_default); 4.1367 ++ 4.1368 ++ /* Number of syntax errors so far. */ 4.1369 ++ int yynerrs; 4.1370 ++ 4.1371 ++ int yystate; 4.1372 ++ /* Number of tokens to shift before error messages enabled. */ 4.1373 ++ int yyerrstatus; 4.1374 ++ 4.1375 ++ /* The stacks and their tools: 4.1376 ++ `yyss': related to states. 4.1377 ++ `yyvs': related to semantic values. 4.1378 ++ 4.1379 ++ Refer to the stacks through separate pointers, to allow yyoverflow 4.1380 ++ to reallocate them elsewhere. */ 4.1381 ++ 4.1382 ++ /* The state stack. */ 4.1383 ++ yytype_int16 yyssa[YYINITDEPTH]; 4.1384 ++ yytype_int16 *yyss; 4.1385 ++ yytype_int16 *yyssp; 4.1386 ++ 4.1387 ++ /* The semantic value stack. */ 4.1388 ++ YYSTYPE yyvsa[YYINITDEPTH]; 4.1389 ++ YYSTYPE *yyvs; 4.1390 ++ YYSTYPE *yyvsp; 4.1391 ++ 4.1392 ++ YYSIZE_T yystacksize; 4.1393 ++ 4.1394 ++ int yyn; 4.1395 ++ int yyresult; 4.1396 ++ /* Lookahead token as an internal (translated) token number. */ 4.1397 ++ int yytoken = 0; 4.1398 ++ /* The variables used to return semantic value and location from the 4.1399 ++ action routines. */ 4.1400 ++ YYSTYPE yyval; 4.1401 ++ 4.1402 ++#if YYERROR_VERBOSE 4.1403 ++ /* Buffer for error messages, and its allocated size. */ 4.1404 ++ char yymsgbuf[128]; 4.1405 ++ char *yymsg = yymsgbuf; 4.1406 ++ YYSIZE_T yymsg_alloc = sizeof yymsgbuf; 4.1407 ++#endif 4.1408 ++ 4.1409 ++#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) 4.1410 ++ 4.1411 ++ /* The number of symbols on the RHS of the reduced rule. 4.1412 ++ Keep to zero when no symbol should be popped. */ 4.1413 ++ int yylen = 0; 4.1414 ++ 4.1415 ++ yyssp = yyss = yyssa; 4.1416 ++ yyvsp = yyvs = yyvsa; 4.1417 ++ yystacksize = YYINITDEPTH; 4.1418 ++ 4.1419 ++ YYDPRINTF ((stderr, "Starting parse\n")); 4.1420 ++ 4.1421 ++ yystate = 0; 4.1422 ++ yyerrstatus = 0; 4.1423 ++ yynerrs = 0; 4.1424 ++ yychar = YYEMPTY; /* Cause a token to be read. */ 4.1425 ++ goto yysetstate; 4.1426 ++ 4.1427 ++/*------------------------------------------------------------. 4.1428 ++| yynewstate -- Push a new state, which is found in yystate. | 4.1429 ++`------------------------------------------------------------*/ 4.1430 ++ yynewstate: 4.1431 ++ /* In all cases, when you get here, the value and location stacks 4.1432 ++ have just been pushed. So pushing a state here evens the stacks. */ 4.1433 ++ yyssp++; 4.1434 ++ 4.1435 ++ yysetstate: 4.1436 ++ *yyssp = yystate; 4.1437 ++ 4.1438 ++ if (yyss + yystacksize - 1 <= yyssp) 4.1439 ++ { 4.1440 ++ /* Get the current used size of the three stacks, in elements. */ 4.1441 ++ YYSIZE_T yysize = yyssp - yyss + 1; 4.1442 ++ 4.1443 ++#ifdef yyoverflow 4.1444 ++ { 4.1445 ++ /* Give user a chance to reallocate the stack. Use copies of 4.1446 ++ these so that the &'s don't force the real ones into 4.1447 ++ memory. */ 4.1448 ++ YYSTYPE *yyvs1 = yyvs; 4.1449 ++ yytype_int16 *yyss1 = yyss; 4.1450 ++ 4.1451 ++ /* Each stack pointer address is followed by the size of the 4.1452 ++ data in use in that stack, in bytes. This used to be a 4.1453 ++ conditional around just the two extra args, but that might 4.1454 ++ be undefined if yyoverflow is a macro. */ 4.1455 ++ yyoverflow (YY_("memory exhausted"), 4.1456 ++ &yyss1, yysize * sizeof (*yyssp), 4.1457 ++ &yyvs1, yysize * sizeof (*yyvsp), 4.1458 ++ &yystacksize); 4.1459 ++ 4.1460 ++ yyss = yyss1; 4.1461 ++ yyvs = yyvs1; 4.1462 ++ } 4.1463 ++#else /* no yyoverflow */ 4.1464 ++# ifndef YYSTACK_RELOCATE 4.1465 ++ goto yyexhaustedlab; 4.1466 ++# else 4.1467 ++ /* Extend the stack our own way. */ 4.1468 ++ if (YYMAXDEPTH <= yystacksize) 4.1469 ++ goto yyexhaustedlab; 4.1470 ++ yystacksize *= 2; 4.1471 ++ if (YYMAXDEPTH < yystacksize) 4.1472 ++ yystacksize = YYMAXDEPTH; 4.1473 ++ 4.1474 ++ { 4.1475 ++ yytype_int16 *yyss1 = yyss; 4.1476 ++ union yyalloc *yyptr = 4.1477 ++ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); 4.1478 ++ if (! yyptr) 4.1479 ++ goto yyexhaustedlab; 4.1480 ++ YYSTACK_RELOCATE (yyss_alloc, yyss); 4.1481 ++ YYSTACK_RELOCATE (yyvs_alloc, yyvs); 4.1482 ++# undef YYSTACK_RELOCATE 4.1483 ++ if (yyss1 != yyssa) 4.1484 ++ YYSTACK_FREE (yyss1); 4.1485 ++ } 4.1486 ++# endif 4.1487 ++#endif /* no yyoverflow */ 4.1488 ++ 4.1489 ++ yyssp = yyss + yysize - 1; 4.1490 ++ yyvsp = yyvs + yysize - 1; 4.1491 ++ 4.1492 ++ YYDPRINTF ((stderr, "Stack size increased to %lu\n", 4.1493 ++ (unsigned long int) yystacksize)); 4.1494 ++ 4.1495 ++ if (yyss + yystacksize - 1 <= yyssp) 4.1496 ++ YYABORT; 4.1497 ++ } 4.1498 ++ 4.1499 ++ YYDPRINTF ((stderr, "Entering state %d\n", yystate)); 4.1500 ++ 4.1501 ++ if (yystate == YYFINAL) 4.1502 ++ YYACCEPT; 4.1503 ++ 4.1504 ++ goto yybackup; 4.1505 ++ 4.1506 ++/*-----------. 4.1507 ++| yybackup. | 4.1508 ++`-----------*/ 4.1509 ++yybackup: 4.1510 ++ 4.1511 ++ /* Do appropriate processing given the current state. Read a 4.1512 ++ lookahead token if we need one and don't already have one. */ 4.1513 ++ 4.1514 ++ /* First try to decide what to do without reference to lookahead token. */ 4.1515 ++ yyn = yypact[yystate]; 4.1516 ++ if (yypact_value_is_default (yyn)) 4.1517 ++ goto yydefault; 4.1518 ++ 4.1519 ++ /* Not known => get a lookahead token if don't already have one. */ 4.1520 ++ 4.1521 ++ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ 4.1522 ++ if (yychar == YYEMPTY) 4.1523 ++ { 4.1524 ++ YYDPRINTF ((stderr, "Reading a token: ")); 4.1525 ++ yychar = YYLEX; 4.1526 ++ } 4.1527 ++ 4.1528 ++ if (yychar <= YYEOF) 4.1529 ++ { 4.1530 ++ yychar = yytoken = YYEOF; 4.1531 ++ YYDPRINTF ((stderr, "Now at end of input.\n")); 4.1532 ++ } 4.1533 ++ else 4.1534 ++ { 4.1535 ++ yytoken = YYTRANSLATE (yychar); 4.1536 ++ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); 4.1537 ++ } 4.1538 ++ 4.1539 ++ /* If the proper action on seeing token YYTOKEN is to reduce or to 4.1540 ++ detect an error, take that action. */ 4.1541 ++ yyn += yytoken; 4.1542 ++ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) 4.1543 ++ goto yydefault; 4.1544 ++ yyn = yytable[yyn]; 4.1545 ++ if (yyn <= 0) 4.1546 ++ { 4.1547 ++ if (yytable_value_is_error (yyn)) 4.1548 ++ goto yyerrlab; 4.1549 ++ yyn = -yyn; 4.1550 ++ goto yyreduce; 4.1551 ++ } 4.1552 ++ 4.1553 ++ /* Count tokens shifted since error; after three, turn off error 4.1554 ++ status. */ 4.1555 ++ if (yyerrstatus) 4.1556 ++ yyerrstatus--; 4.1557 ++ 4.1558 ++ /* Shift the lookahead token. */ 4.1559 ++ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); 4.1560 ++ 4.1561 ++ /* Discard the shifted token. */ 4.1562 ++ yychar = YYEMPTY; 4.1563 ++ 4.1564 ++ yystate = yyn; 4.1565 ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 4.1566 ++ *++yyvsp = yylval; 4.1567 ++ YY_IGNORE_MAYBE_UNINITIALIZED_END 4.1568 ++ 4.1569 ++ goto yynewstate; 4.1570 ++ 4.1571 ++ 4.1572 ++/*-----------------------------------------------------------. 4.1573 ++| yydefault -- do the default action for the current state. | 4.1574 ++`-----------------------------------------------------------*/ 4.1575 ++yydefault: 4.1576 ++ yyn = yydefact[yystate]; 4.1577 ++ if (yyn == 0) 4.1578 ++ goto yyerrlab; 4.1579 ++ goto yyreduce; 4.1580 ++ 4.1581 ++ 4.1582 ++/*-----------------------------. 4.1583 ++| yyreduce -- Do a reduction. | 4.1584 ++`-----------------------------*/ 4.1585 ++yyreduce: 4.1586 ++ /* yyn is the number of a rule to reduce with. */ 4.1587 ++ yylen = yyr2[yyn]; 4.1588 ++ 4.1589 ++ /* If YYLEN is nonzero, implement the default value of the action: 4.1590 ++ `$$ = $1'. 4.1591 ++ 4.1592 ++ Otherwise, the following line sets YYVAL to garbage. 4.1593 ++ This behavior is undocumented and Bison 4.1594 ++ users should not rely upon it. Assigning to YYVAL 4.1595 ++ unconditionally makes the parser a bit smaller, and it avoids a 4.1596 ++ GCC warning that YYVAL may be used uninitialized. */ 4.1597 ++ yyval = yyvsp[1-yylen]; 4.1598 ++ 4.1599 ++ 4.1600 ++ YY_REDUCE_PRINT (yyn); 4.1601 ++ switch (yyn) 4.1602 ++ { 4.1603 ++ case 4: 4.1604 ++/* Line 1787 of yacc.c */ 4.1605 ++#line 157 "ptlib/common/getdate.y" 4.1606 ++ { 4.1607 ++ VARIABLE->yyHaveTime++; 4.1608 ++ } 4.1609 ++ break; 4.1610 ++ 4.1611 ++ case 5: 4.1612 ++/* Line 1787 of yacc.c */ 4.1613 ++#line 160 "ptlib/common/getdate.y" 4.1614 ++ { 4.1615 ++ VARIABLE->yyHaveZone++; 4.1616 ++ } 4.1617 ++ break; 4.1618 ++ 4.1619 ++ case 6: 4.1620 ++/* Line 1787 of yacc.c */ 4.1621 ++#line 163 "ptlib/common/getdate.y" 4.1622 ++ { 4.1623 ++ VARIABLE->yyHaveDate++; 4.1624 ++ } 4.1625 ++ break; 4.1626 ++ 4.1627 ++ case 7: 4.1628 ++/* Line 1787 of yacc.c */ 4.1629 ++#line 166 "ptlib/common/getdate.y" 4.1630 ++ { 4.1631 ++ VARIABLE->yyHaveDay++; 4.1632 ++ } 4.1633 ++ break; 4.1634 ++ 4.1635 ++ case 8: 4.1636 ++/* Line 1787 of yacc.c */ 4.1637 ++#line 169 "ptlib/common/getdate.y" 4.1638 ++ { 4.1639 ++ VARIABLE->yyHaveRel++; 4.1640 ++ } 4.1641 ++ break; 4.1642 ++ 4.1643 ++ case 10: 4.1644 ++/* Line 1787 of yacc.c */ 4.1645 ++#line 175 "ptlib/common/getdate.y" 4.1646 ++ { 4.1647 ++ VARIABLE->yyHour = (yyvsp[(1) - (2)].Number); 4.1648 ++ VARIABLE->yyMinutes = 0; 4.1649 ++ VARIABLE->yySeconds = 0; 4.1650 ++ VARIABLE->yyMeridian = (yyvsp[(2) - (2)].Meridian); 4.1651 ++ } 4.1652 ++ break; 4.1653 ++ 4.1654 ++ case 11: 4.1655 ++/* Line 1787 of yacc.c */ 4.1656 ++#line 181 "ptlib/common/getdate.y" 4.1657 ++ { 4.1658 ++ VARIABLE->yyHour = (yyvsp[(1) - (2)].Number)/100; 4.1659 ++ VARIABLE->yyMinutes = (yyvsp[(1) - (2)].Number)%100; 4.1660 ++ VARIABLE->yySeconds = 0; 4.1661 ++ VARIABLE->yyMeridian = MER24; 4.1662 ++ VARIABLE->yyDSTmode = DSToff; 4.1663 ++ VARIABLE->yyTimezone = - ((yyvsp[(2) - (2)].Number) % 100 + ((yyvsp[(2) - (2)].Number) / 100) * 60); 4.1664 ++ } 4.1665 ++ break; 4.1666 ++ 4.1667 ++ case 12: 4.1668 ++/* Line 1787 of yacc.c */ 4.1669 ++#line 189 "ptlib/common/getdate.y" 4.1670 ++ { 4.1671 ++ VARIABLE->yyHour = (yyvsp[(1) - (2)].Number)/10000; 4.1672 ++ VARIABLE->yyMinutes = ((yyvsp[(1) - (2)].Number)/100)%100; 4.1673 ++ VARIABLE->yySeconds = (yyvsp[(1) - (2)].Number) % 100; 4.1674 ++ VARIABLE->yyMeridian = MER24; 4.1675 ++ VARIABLE->yyDSTmode = DSToff; 4.1676 ++ VARIABLE->yyTimezone = - ((yyvsp[(2) - (2)].Number) % 100 + ((yyvsp[(2) - (2)].Number) / 100) * 60); 4.1677 ++ } 4.1678 ++ break; 4.1679 ++ 4.1680 ++ case 13: 4.1681 ++/* Line 1787 of yacc.c */ 4.1682 ++#line 197 "ptlib/common/getdate.y" 4.1683 ++ { 4.1684 ++ VARIABLE->yyHour = (yyvsp[(1) - (4)].Number); 4.1685 ++ VARIABLE->yyMinutes = (yyvsp[(3) - (4)].Number); 4.1686 ++ VARIABLE->yySeconds = 0; 4.1687 ++ VARIABLE->yyMeridian = (yyvsp[(4) - (4)].Meridian); 4.1688 ++ } 4.1689 ++ break; 4.1690 ++ 4.1691 ++ case 14: 4.1692 ++/* Line 1787 of yacc.c */ 4.1693 ++#line 203 "ptlib/common/getdate.y" 4.1694 ++ { 4.1695 ++ VARIABLE->yyHour = (yyvsp[(1) - (4)].Number); 4.1696 ++ VARIABLE->yyMinutes = (yyvsp[(3) - (4)].Number); 4.1697 ++ VARIABLE->yyMeridian = MER24; 4.1698 ++ VARIABLE->yyDSTmode = DSToff; 4.1699 ++ VARIABLE->yyTimezone = - ((yyvsp[(4) - (4)].Number) % 100 + ((yyvsp[(4) - (4)].Number) / 100) * 60); 4.1700 ++ } 4.1701 ++ break; 4.1702 ++ 4.1703 ++ case 15: 4.1704 ++/* Line 1787 of yacc.c */ 4.1705 ++#line 210 "ptlib/common/getdate.y" 4.1706 ++ { 4.1707 ++ VARIABLE->yyHour = (yyvsp[(1) - (6)].Number); 4.1708 ++ VARIABLE->yyMinutes = (yyvsp[(3) - (6)].Number); 4.1709 ++ VARIABLE->yySeconds = (yyvsp[(5) - (6)].Number); 4.1710 ++ VARIABLE->yyMeridian = (yyvsp[(6) - (6)].Meridian); 4.1711 ++ } 4.1712 ++ break; 4.1713 ++ 4.1714 ++ case 16: 4.1715 ++/* Line 1787 of yacc.c */ 4.1716 ++#line 216 "ptlib/common/getdate.y" 4.1717 ++ { 4.1718 ++ VARIABLE->yyHour = (yyvsp[(1) - (6)].Number); 4.1719 ++ VARIABLE->yyMinutes = (yyvsp[(3) - (6)].Number); 4.1720 ++ VARIABLE->yySeconds = (yyvsp[(5) - (6)].Number); 4.1721 ++ VARIABLE->yyMeridian = MER24; 4.1722 ++ VARIABLE->yyDSTmode = DSToff; 4.1723 ++ VARIABLE->yyTimezone = - ((yyvsp[(6) - (6)].Number) % 100 + ((yyvsp[(6) - (6)].Number) / 100) * 60); 4.1724 ++ } 4.1725 ++ break; 4.1726 ++ 4.1727 ++ case 17: 4.1728 ++/* Line 1787 of yacc.c */ 4.1729 ++#line 226 "ptlib/common/getdate.y" 4.1730 ++ { 4.1731 ++ VARIABLE->yyTimezone = (yyvsp[(1) - (1)].Number); 4.1732 ++ VARIABLE->yyDSTmode = DSToff; 4.1733 ++ } 4.1734 ++ break; 4.1735 ++ 4.1736 ++ case 18: 4.1737 ++/* Line 1787 of yacc.c */ 4.1738 ++#line 230 "ptlib/common/getdate.y" 4.1739 ++ { 4.1740 ++ VARIABLE->yyTimezone = (yyvsp[(1) - (1)].Number); 4.1741 ++ VARIABLE->yyDSTmode = DSTon; 4.1742 ++ } 4.1743 ++ break; 4.1744 ++ 4.1745 ++ case 19: 4.1746 ++/* Line 1787 of yacc.c */ 4.1747 ++#line 235 "ptlib/common/getdate.y" 4.1748 ++ { 4.1749 ++ VARIABLE->yyTimezone = (yyvsp[(1) - (2)].Number); 4.1750 ++ VARIABLE->yyDSTmode = DSTon; 4.1751 ++ } 4.1752 ++ break; 4.1753 ++ 4.1754 ++ case 20: 4.1755 ++/* Line 1787 of yacc.c */ 4.1756 ++#line 239 "ptlib/common/getdate.y" 4.1757 ++ { 4.1758 ++ if (VARIABLE->yyHaveTime > 0) { 4.1759 ++ VARIABLE->yyTimezone = (yyvsp[(1) - (1)].Number); 4.1760 ++ VARIABLE->yyDSTmode = DSToff; 4.1761 ++ } 4.1762 ++ else 4.1763 ++ VARIABLE->yyHaveZone--; 4.1764 ++ } 4.1765 ++ break; 4.1766 ++ 4.1767 ++ case 21: 4.1768 ++/* Line 1787 of yacc.c */ 4.1769 ++#line 249 "ptlib/common/getdate.y" 4.1770 ++ { 4.1771 ++ VARIABLE->yyDayOrdinal = 1; 4.1772 ++ VARIABLE->yyDayNumber = (yyvsp[(1) - (1)].Number); 4.1773 ++ } 4.1774 ++ break; 4.1775 ++ 4.1776 ++ case 22: 4.1777 ++/* Line 1787 of yacc.c */ 4.1778 ++#line 253 "ptlib/common/getdate.y" 4.1779 ++ { 4.1780 ++ VARIABLE->yyDayOrdinal = 1; 4.1781 ++ VARIABLE->yyDayNumber = (yyvsp[(1) - (2)].Number); 4.1782 ++ } 4.1783 ++ break; 4.1784 ++ 4.1785 ++ case 23: 4.1786 ++/* Line 1787 of yacc.c */ 4.1787 ++#line 257 "ptlib/common/getdate.y" 4.1788 ++ { 4.1789 ++ VARIABLE->yyDayOrdinal = (yyvsp[(1) - (2)].Number); 4.1790 ++ VARIABLE->yyDayNumber = (yyvsp[(2) - (2)].Number); 4.1791 ++ } 4.1792 ++ break; 4.1793 ++ 4.1794 ++ case 24: 4.1795 ++/* Line 1787 of yacc.c */ 4.1796 ++#line 263 "ptlib/common/getdate.y" 4.1797 ++ { 4.1798 ++ SetPossibleDate(VARIABLE, (yyvsp[(1) - (3)].Number), (yyvsp[(3) - (3)].Number), VARIABLE->yyYear); 4.1799 ++ } 4.1800 ++ break; 4.1801 ++ 4.1802 ++ case 25: 4.1803 ++/* Line 1787 of yacc.c */ 4.1804 ++#line 266 "ptlib/common/getdate.y" 4.1805 ++ { 4.1806 ++ SetPossibleDate(VARIABLE, (yyvsp[(1) - (5)].Number), (yyvsp[(3) - (5)].Number), (yyvsp[(5) - (5)].Number)); 4.1807 ++ } 4.1808 ++ break; 4.1809 ++ 4.1810 ++ case 26: 4.1811 ++/* Line 1787 of yacc.c */ 4.1812 ++#line 269 "ptlib/common/getdate.y" 4.1813 ++ { 4.1814 ++ /* ISO 8601 format. yyyy-mm-dd. */ 4.1815 ++ SetPossibleDate(VARIABLE, (yyvsp[(1) - (4)].Number), -(yyvsp[(2) - (4)].Number), -(yyvsp[(3) - (4)].Number)); 4.1816 ++ } 4.1817 ++ break; 4.1818 ++ 4.1819 ++ case 27: 4.1820 ++/* Line 1787 of yacc.c */ 4.1821 ++#line 273 "ptlib/common/getdate.y" 4.1822 ++ { 4.1823 ++ VARIABLE->yyDay= ((yyvsp[(1) - (1)].Number))%100; 4.1824 ++ VARIABLE->yyMonth= ((yyvsp[(1) - (1)].Number)/100)%100; 4.1825 ++ VARIABLE->yyYear = (yyvsp[(1) - (1)].Number)/10000; 4.1826 ++ } 4.1827 ++ break; 4.1828 ++ 4.1829 ++ case 28: 4.1830 ++/* Line 1787 of yacc.c */ 4.1831 ++#line 278 "ptlib/common/getdate.y" 4.1832 ++ { 4.1833 ++ /* e.g. 17-JUN-1992. */ 4.1834 ++ SetPossibleDate(VARIABLE, (yyvsp[(1) - (3)].Number), (yyvsp[(2) - (3)].Number), -(yyvsp[(3) - (3)].Number)); 4.1835 ++ } 4.1836 ++ break; 4.1837 ++ 4.1838 ++ case 29: 4.1839 ++/* Line 1787 of yacc.c */ 4.1840 ++#line 282 "ptlib/common/getdate.y" 4.1841 ++ { 4.1842 ++ VARIABLE->yyMonth = (yyvsp[(1) - (2)].Number); 4.1843 ++ if ((yyvsp[(2) - (2)].Number) > 31) 4.1844 ++ VARIABLE->yyYear = (yyvsp[(2) - (2)].Number); 4.1845 ++ else 4.1846 ++ VARIABLE->yyDay = (yyvsp[(2) - (2)].Number); 4.1847 ++ } 4.1848 ++ break; 4.1849 ++ 4.1850 ++ case 30: 4.1851 ++/* Line 1787 of yacc.c */ 4.1852 ++#line 289 "ptlib/common/getdate.y" 4.1853 ++ { 4.1854 ++ VARIABLE->yyMonth = (yyvsp[(1) - (4)].Number); 4.1855 ++ VARIABLE->yyDay = (yyvsp[(2) - (4)].Number); 4.1856 ++ VARIABLE->yyYear = (yyvsp[(4) - (4)].Number); 4.1857 ++ } 4.1858 ++ break; 4.1859 ++ 4.1860 ++ case 31: 4.1861 ++/* Line 1787 of yacc.c */ 4.1862 ++#line 294 "ptlib/common/getdate.y" 4.1863 ++ { 4.1864 ++ if ((yyvsp[(1) - (2)].Number) > 31) 4.1865 ++ VARIABLE->yyYear = (yyvsp[(1) - (2)].Number); 4.1866 ++ else 4.1867 ++ VARIABLE->yyDay = (yyvsp[(1) - (2)].Number); 4.1868 ++ VARIABLE->yyMonth = (yyvsp[(2) - (2)].Number); 4.1869 ++ } 4.1870 ++ break; 4.1871 ++ 4.1872 ++ case 32: 4.1873 ++/* Line 1787 of yacc.c */ 4.1874 ++#line 301 "ptlib/common/getdate.y" 4.1875 ++ { 4.1876 ++ SetPossibleDate(VARIABLE, (yyvsp[(1) - (3)].Number), (yyvsp[(2) - (3)].Number), (yyvsp[(3) - (3)].Number)); 4.1877 ++ } 4.1878 ++ break; 4.1879 ++ 4.1880 ++ case 33: 4.1881 ++/* Line 1787 of yacc.c */ 4.1882 ++#line 306 "ptlib/common/getdate.y" 4.1883 ++ { 4.1884 ++ VARIABLE->yyRelSeconds = -VARIABLE->yyRelSeconds; 4.1885 ++ VARIABLE->yyRelMonth = -VARIABLE->yyRelMonth; 4.1886 ++ } 4.1887 ++ break; 4.1888 ++ 4.1889 ++ case 35: 4.1890 ++/* Line 1787 of yacc.c */ 4.1891 ++#line 313 "ptlib/common/getdate.y" 4.1892 ++ { 4.1893 ++ VARIABLE->yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number) * 60L; 4.1894 ++ } 4.1895 ++ break; 4.1896 ++ 4.1897 ++ case 36: 4.1898 ++/* Line 1787 of yacc.c */ 4.1899 ++#line 316 "ptlib/common/getdate.y" 4.1900 ++ { 4.1901 ++ VARIABLE->yyRelSeconds += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number) * 60L; 4.1902 ++ } 4.1903 ++ break; 4.1904 ++ 4.1905 ++ case 37: 4.1906 ++/* Line 1787 of yacc.c */ 4.1907 ++#line 319 "ptlib/common/getdate.y" 4.1908 ++ { 4.1909 ++ VARIABLE->yyRelSeconds += (yyvsp[(1) - (1)].Number) * 60L; 4.1910 ++ } 4.1911 ++ break; 4.1912 ++ 4.1913 ++ case 38: 4.1914 ++/* Line 1787 of yacc.c */ 4.1915 ++#line 322 "ptlib/common/getdate.y" 4.1916 ++ { 4.1917 ++ VARIABLE->yyRelSeconds += (yyvsp[(1) - (2)].Number); 4.1918 ++ } 4.1919 ++ break; 4.1920 ++ 4.1921 ++ case 39: 4.1922 ++/* Line 1787 of yacc.c */ 4.1923 ++#line 325 "ptlib/common/getdate.y" 4.1924 ++ { 4.1925 ++ VARIABLE->yyRelSeconds += (yyvsp[(1) - (2)].Number); 4.1926 ++ } 4.1927 ++ break; 4.1928 ++ 4.1929 ++ case 40: 4.1930 ++/* Line 1787 of yacc.c */ 4.1931 ++#line 328 "ptlib/common/getdate.y" 4.1932 ++ { 4.1933 ++ VARIABLE->yyRelSeconds++; 4.1934 ++ } 4.1935 ++ break; 4.1936 ++ 4.1937 ++ case 41: 4.1938 ++/* Line 1787 of yacc.c */ 4.1939 ++#line 331 "ptlib/common/getdate.y" 4.1940 ++ { 4.1941 ++ VARIABLE->yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); 4.1942 ++ } 4.1943 ++ break; 4.1944 ++ 4.1945 ++ case 42: 4.1946 ++/* Line 1787 of yacc.c */ 4.1947 ++#line 334 "ptlib/common/getdate.y" 4.1948 ++ { 4.1949 ++ VARIABLE->yyRelMonth += (yyvsp[(1) - (2)].Number) * (yyvsp[(2) - (2)].Number); 4.1950 ++ } 4.1951 ++ break; 4.1952 ++ 4.1953 ++ case 43: 4.1954 ++/* Line 1787 of yacc.c */ 4.1955 ++#line 337 "ptlib/common/getdate.y" 4.1956 ++ { 4.1957 ++ VARIABLE->yyRelMonth += (yyvsp[(1) - (1)].Number); 4.1958 ++ } 4.1959 ++ break; 4.1960 ++ 4.1961 ++ case 44: 4.1962 ++/* Line 1787 of yacc.c */ 4.1963 ++#line 342 "ptlib/common/getdate.y" 4.1964 ++ { 4.1965 ++ (yyval.Number) = (yyvsp[(1) - (1)].Number); 4.1966 ++ } 4.1967 ++ break; 4.1968 ++ 4.1969 ++ case 45: 4.1970 ++/* Line 1787 of yacc.c */ 4.1971 ++#line 345 "ptlib/common/getdate.y" 4.1972 ++ { 4.1973 ++ (yyval.Number) = (yyvsp[(1) - (1)].Number); 4.1974 ++ } 4.1975 ++ break; 4.1976 ++ 4.1977 ++ case 46: 4.1978 ++/* Line 1787 of yacc.c */ 4.1979 ++#line 348 "ptlib/common/getdate.y" 4.1980 ++ { 4.1981 ++ (yyval.Number) = (yyvsp[(1) - (1)].Number); 4.1982 ++ } 4.1983 ++ break; 4.1984 ++ 4.1985 ++ case 47: 4.1986 ++/* Line 1787 of yacc.c */ 4.1987 ++#line 353 "ptlib/common/getdate.y" 4.1988 ++ { 4.1989 ++ if (VARIABLE->yyHaveTime && VARIABLE->yyHaveDate && !VARIABLE->yyHaveRel) 4.1990 ++ VARIABLE->yyYear = (yyvsp[(1) - (1)].Number); 4.1991 ++ else { 4.1992 ++ if((yyvsp[(1) - (1)].Number)>240000) { 4.1993 ++ VARIABLE->yyHaveDate++; 4.1994 ++ VARIABLE->yyDay= ((yyvsp[(1) - (1)].Number))%100; 4.1995 ++ VARIABLE->yyMonth= ((yyvsp[(1) - (1)].Number)/100)%100; 4.1996 ++ VARIABLE->yyYear = (yyvsp[(1) - (1)].Number)/10000; 4.1997 ++ } 4.1998 ++ else { 4.1999 ++ VARIABLE->yyHaveTime++; 4.2000 ++ if ((yyvsp[(1) - (1)].Number) < 10000) { 4.2001 ++ VARIABLE->yyHour = (yyvsp[(1) - (1)].Number) / 100; 4.2002 ++ VARIABLE->yyMinutes = (yyvsp[(1) - (1)].Number) % 100; 4.2003 ++ VARIABLE->yySeconds = 0; 4.2004 ++ } 4.2005 ++ else { 4.2006 ++ VARIABLE->yyHour = (yyvsp[(1) - (1)].Number)/10000; 4.2007 ++ VARIABLE->yyMinutes = ((yyvsp[(1) - (1)].Number)/100)%100; 4.2008 ++ VARIABLE->yySeconds = (yyvsp[(1) - (1)].Number) % 100; 4.2009 ++ } 4.2010 ++ VARIABLE->yyMeridian = MER24; 4.2011 ++ } 4.2012 ++ } 4.2013 ++ } 4.2014 ++ break; 4.2015 ++ 4.2016 ++ case 48: 4.2017 ++/* Line 1787 of yacc.c */ 4.2018 ++#line 379 "ptlib/common/getdate.y" 4.2019 ++ { 4.2020 ++ if (VARIABLE->yyHaveTime && VARIABLE->yyHaveDate && !VARIABLE->yyHaveRel) 4.2021 ++ VARIABLE->yyYear = (yyvsp[(1) - (1)].Number); 4.2022 ++ else { 4.2023 ++ VARIABLE->yyHaveTime++; 4.2024 ++ VARIABLE->yyHour = (yyvsp[(1) - (1)].Number)/100; 4.2025 ++ VARIABLE->yyMinutes = (yyvsp[(1) - (1)].Number)%100; 4.2026 ++ VARIABLE->yySeconds = 0; 4.2027 ++ VARIABLE->yyMeridian = MER24; 4.2028 ++ } 4.2029 ++ } 4.2030 ++ break; 4.2031 ++ 4.2032 ++ case 49: 4.2033 ++/* Line 1787 of yacc.c */ 4.2034 ++#line 390 "ptlib/common/getdate.y" 4.2035 ++ { 4.2036 ++ if (!VARIABLE->yyHaveDate && (yyvsp[(1) - (1)].Number)>240000) { 4.2037 ++ VARIABLE->yyHaveDate++; 4.2038 ++ VARIABLE->yyDay= ((yyvsp[(1) - (1)].Number))%100; 4.2039 ++ VARIABLE->yyMonth= ((yyvsp[(1) - (1)].Number)/100)%100; 4.2040 ++ VARIABLE->yyYear = (yyvsp[(1) - (1)].Number)/10000; 4.2041 ++ } 4.2042 ++ else if (!VARIABLE->yyHaveTime) { 4.2043 ++ VARIABLE->yyHaveTime++; 4.2044 ++ VARIABLE->yyHour = (yyvsp[(1) - (1)].Number)/10000; 4.2045 ++ VARIABLE->yyMinutes = ((yyvsp[(1) - (1)].Number)/100)%100; 4.2046 ++ VARIABLE->yySeconds = (yyvsp[(1) - (1)].Number) % 100; 4.2047 ++ VARIABLE->yyMeridian = MER24; 4.2048 ++ } 4.2049 ++ } 4.2050 ++ break; 4.2051 ++ 4.2052 ++ case 50: 4.2053 ++/* Line 1787 of yacc.c */ 4.2054 ++#line 407 "ptlib/common/getdate.y" 4.2055 ++ { 4.2056 ++ (yyval.Meridian) = MER24; 4.2057 ++ } 4.2058 ++ break; 4.2059 ++ 4.2060 ++ case 51: 4.2061 ++/* Line 1787 of yacc.c */ 4.2062 ++#line 410 "ptlib/common/getdate.y" 4.2063 ++ { 4.2064 ++ (yyval.Meridian) = (yyvsp[(1) - (1)].Meridian); 4.2065 ++ } 4.2066 ++ break; 4.2067 ++ 4.2068 ++ 4.2069 ++/* Line 1787 of yacc.c */ 4.2070 ++#line 2031 "ptlib/common/getdate.tab.c" 4.2071 ++ default: break; 4.2072 ++ } 4.2073 ++ /* User semantic actions sometimes alter yychar, and that requires 4.2074 ++ that yytoken be updated with the new translation. We take the 4.2075 ++ approach of translating immediately before every use of yytoken. 4.2076 ++ One alternative is translating here after every semantic action, 4.2077 ++ but that translation would be missed if the semantic action invokes 4.2078 ++ YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or 4.2079 ++ if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an 4.2080 ++ incorrect destructor might then be invoked immediately. In the 4.2081 ++ case of YYERROR or YYBACKUP, subsequent parser actions might lead 4.2082 ++ to an incorrect destructor call or verbose syntax error message 4.2083 ++ before the lookahead is translated. */ 4.2084 ++ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); 4.2085 ++ 4.2086 ++ YYPOPSTACK (yylen); 4.2087 ++ yylen = 0; 4.2088 ++ YY_STACK_PRINT (yyss, yyssp); 4.2089 ++ 4.2090 ++ *++yyvsp = yyval; 4.2091 ++ 4.2092 ++ /* Now `shift' the result of the reduction. Determine what state 4.2093 ++ that goes to, based on the state we popped back to and the rule 4.2094 ++ number reduced by. */ 4.2095 ++ 4.2096 ++ yyn = yyr1[yyn]; 4.2097 ++ 4.2098 ++ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; 4.2099 ++ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) 4.2100 ++ yystate = yytable[yystate]; 4.2101 ++ else 4.2102 ++ yystate = yydefgoto[yyn - YYNTOKENS]; 4.2103 ++ 4.2104 ++ goto yynewstate; 4.2105 ++ 4.2106 ++ 4.2107 ++/*------------------------------------. 4.2108 ++| yyerrlab -- here on detecting error | 4.2109 ++`------------------------------------*/ 4.2110 ++yyerrlab: 4.2111 ++ /* Make sure we have latest lookahead translation. See comments at 4.2112 ++ user semantic actions for why this is necessary. */ 4.2113 ++ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); 4.2114 ++ 4.2115 ++ /* If not already recovering from an error, report this error. */ 4.2116 ++ if (!yyerrstatus) 4.2117 ++ { 4.2118 ++ ++yynerrs; 4.2119 ++#if ! YYERROR_VERBOSE 4.2120 ++ yyerror (YY_("syntax error")); 4.2121 ++#else 4.2122 ++# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ 4.2123 ++ yyssp, yytoken) 4.2124 ++ { 4.2125 ++ char const *yymsgp = YY_("syntax error"); 4.2126 ++ int yysyntax_error_status; 4.2127 ++ yysyntax_error_status = YYSYNTAX_ERROR; 4.2128 ++ if (yysyntax_error_status == 0) 4.2129 ++ yymsgp = yymsg; 4.2130 ++ else if (yysyntax_error_status == 1) 4.2131 ++ { 4.2132 ++ if (yymsg != yymsgbuf) 4.2133 ++ YYSTACK_FREE (yymsg); 4.2134 ++ yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); 4.2135 ++ if (!yymsg) 4.2136 ++ { 4.2137 ++ yymsg = yymsgbuf; 4.2138 ++ yymsg_alloc = sizeof yymsgbuf; 4.2139 ++ yysyntax_error_status = 2; 4.2140 ++ } 4.2141 ++ else 4.2142 ++ { 4.2143 ++ yysyntax_error_status = YYSYNTAX_ERROR; 4.2144 ++ yymsgp = yymsg; 4.2145 ++ } 4.2146 ++ } 4.2147 ++ yyerror (yymsgp); 4.2148 ++ if (yysyntax_error_status == 2) 4.2149 ++ goto yyexhaustedlab; 4.2150 ++ } 4.2151 ++# undef YYSYNTAX_ERROR 4.2152 ++#endif 4.2153 ++ } 4.2154 ++ 4.2155 ++ 4.2156 ++ 4.2157 ++ if (yyerrstatus == 3) 4.2158 ++ { 4.2159 ++ /* If just tried and failed to reuse lookahead token after an 4.2160 ++ error, discard it. */ 4.2161 ++ 4.2162 ++ if (yychar <= YYEOF) 4.2163 ++ { 4.2164 ++ /* Return failure if at end of input. */ 4.2165 ++ if (yychar == YYEOF) 4.2166 ++ YYABORT; 4.2167 ++ } 4.2168 ++ else 4.2169 ++ { 4.2170 ++ yydestruct ("Error: discarding", 4.2171 ++ yytoken, &yylval); 4.2172 ++ yychar = YYEMPTY; 4.2173 ++ } 4.2174 ++ } 4.2175 ++ 4.2176 ++ /* Else will try to reuse lookahead token after shifting the error 4.2177 ++ token. */ 4.2178 ++ goto yyerrlab1; 4.2179 ++ 4.2180 ++ 4.2181 ++/*---------------------------------------------------. 4.2182 ++| yyerrorlab -- error raised explicitly by YYERROR. | 4.2183 ++`---------------------------------------------------*/ 4.2184 ++yyerrorlab: 4.2185 ++ 4.2186 ++ /* Pacify compilers like GCC when the user code never invokes 4.2187 ++ YYERROR and the label yyerrorlab therefore never appears in user 4.2188 ++ code. */ 4.2189 ++ if (/*CONSTCOND*/ 0) 4.2190 ++ goto yyerrorlab; 4.2191 ++ 4.2192 ++ /* Do not reclaim the symbols of the rule which action triggered 4.2193 ++ this YYERROR. */ 4.2194 ++ YYPOPSTACK (yylen); 4.2195 ++ yylen = 0; 4.2196 ++ YY_STACK_PRINT (yyss, yyssp); 4.2197 ++ yystate = *yyssp; 4.2198 ++ goto yyerrlab1; 4.2199 ++ 4.2200 ++ 4.2201 ++/*-------------------------------------------------------------. 4.2202 ++| yyerrlab1 -- common code for both syntax error and YYERROR. | 4.2203 ++`-------------------------------------------------------------*/ 4.2204 ++yyerrlab1: 4.2205 ++ yyerrstatus = 3; /* Each real token shifted decrements this. */ 4.2206 ++ 4.2207 ++ for (;;) 4.2208 ++ { 4.2209 ++ yyn = yypact[yystate]; 4.2210 ++ if (!yypact_value_is_default (yyn)) 4.2211 ++ { 4.2212 ++ yyn += YYTERROR; 4.2213 ++ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) 4.2214 ++ { 4.2215 ++ yyn = yytable[yyn]; 4.2216 ++ if (0 < yyn) 4.2217 ++ break; 4.2218 ++ } 4.2219 ++ } 4.2220 ++ 4.2221 ++ /* Pop the current state because it cannot handle the error token. */ 4.2222 ++ if (yyssp == yyss) 4.2223 ++ YYABORT; 4.2224 ++ 4.2225 ++ 4.2226 ++ yydestruct ("Error: popping", 4.2227 ++ yystos[yystate], yyvsp); 4.2228 ++ YYPOPSTACK (1); 4.2229 ++ yystate = *yyssp; 4.2230 ++ YY_STACK_PRINT (yyss, yyssp); 4.2231 ++ } 4.2232 ++ 4.2233 ++ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN 4.2234 ++ *++yyvsp = yylval; 4.2235 ++ YY_IGNORE_MAYBE_UNINITIALIZED_END 4.2236 ++ 4.2237 ++ 4.2238 ++ /* Shift the error token. */ 4.2239 ++ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); 4.2240 ++ 4.2241 ++ yystate = yyn; 4.2242 ++ goto yynewstate; 4.2243 ++ 4.2244 ++ 4.2245 ++/*-------------------------------------. 4.2246 ++| yyacceptlab -- YYACCEPT comes here. | 4.2247 ++`-------------------------------------*/ 4.2248 ++yyacceptlab: 4.2249 ++ yyresult = 0; 4.2250 ++ goto yyreturn; 4.2251 ++ 4.2252 ++/*-----------------------------------. 4.2253 ++| yyabortlab -- YYABORT comes here. | 4.2254 ++`-----------------------------------*/ 4.2255 ++yyabortlab: 4.2256 ++ yyresult = 1; 4.2257 ++ goto yyreturn; 4.2258 ++ 4.2259 ++#if !defined yyoverflow || YYERROR_VERBOSE 4.2260 ++/*-------------------------------------------------. 4.2261 ++| yyexhaustedlab -- memory exhaustion comes here. | 4.2262 ++`-------------------------------------------------*/ 4.2263 ++yyexhaustedlab: 4.2264 ++ yyerror (YY_("memory exhausted")); 4.2265 ++ yyresult = 2; 4.2266 ++ /* Fall through. */ 4.2267 ++#endif 4.2268 ++ 4.2269 ++yyreturn: 4.2270 ++ if (yychar != YYEMPTY) 4.2271 ++ { 4.2272 ++ /* Make sure we have latest lookahead translation. See comments at 4.2273 ++ user semantic actions for why this is necessary. */ 4.2274 ++ yytoken = YYTRANSLATE (yychar); 4.2275 ++ yydestruct ("Cleanup: discarding lookahead", 4.2276 ++ yytoken, &yylval); 4.2277 ++ } 4.2278 ++ /* Do not reclaim the symbols of the rule which action triggered 4.2279 ++ this YYABORT or YYACCEPT. */ 4.2280 ++ YYPOPSTACK (yylen); 4.2281 ++ YY_STACK_PRINT (yyss, yyssp); 4.2282 ++ while (yyssp != yyss) 4.2283 ++ { 4.2284 ++ yydestruct ("Cleanup: popping", 4.2285 ++ yystos[*yyssp], yyvsp); 4.2286 ++ YYPOPSTACK (1); 4.2287 ++ } 4.2288 ++#ifndef yyoverflow 4.2289 ++ if (yyss != yyssa) 4.2290 ++ YYSTACK_FREE (yyss); 4.2291 ++#endif 4.2292 ++#if YYERROR_VERBOSE 4.2293 ++ if (yymsg != yymsgbuf) 4.2294 ++ YYSTACK_FREE (yymsg); 4.2295 ++#endif 4.2296 ++ /* Make sure YYID is used. */ 4.2297 ++ return YYID (yyresult); 4.2298 ++} 4.2299 ++ 4.2300 ++ 4.2301 ++/* Line 2050 of yacc.c */ 4.2302 ++#line 415 "ptlib/common/getdate.y" 4.2303 ++ 4.2304 ++ 4.2305 ++/* Month and day table. */ 4.2306 ++static TABLE const MonthDayTable[] = { 4.2307 ++ { "january", tMONTH, 1 }, 4.2308 ++ { "february", tMONTH, 2 }, 4.2309 ++ { "march", tMONTH, 3 }, 4.2310 ++ { "april", tMONTH, 4 }, 4.2311 ++ { "may", tMONTH, 5 }, 4.2312 ++ { "june", tMONTH, 6 }, 4.2313 ++ { "july", tMONTH, 7 }, 4.2314 ++ { "august", tMONTH, 8 }, 4.2315 ++ { "september", tMONTH, 9 }, 4.2316 ++ { "sept", tMONTH, 9 }, 4.2317 ++ { "october", tMONTH, 10 }, 4.2318 ++ { "november", tMONTH, 11 }, 4.2319 ++ { "december", tMONTH, 12 }, 4.2320 ++ { "sunday", tDAY, 0 }, 4.2321 ++ { "monday", tDAY, 1 }, 4.2322 ++ { "tuesday", tDAY, 2 }, 4.2323 ++ { "tues", tDAY, 2 }, 4.2324 ++ { "wednesday", tDAY, 3 }, 4.2325 ++ { "wednes", tDAY, 3 }, 4.2326 ++ { "thursday", tDAY, 4 }, 4.2327 ++ { "thur", tDAY, 4 }, 4.2328 ++ { "thurs", tDAY, 4 }, 4.2329 ++ { "friday", tDAY, 5 }, 4.2330 ++ { "saturday", tDAY, 6 }, 4.2331 ++ { NULL } 4.2332 ++}; 4.2333 ++ 4.2334 ++/* Time units table. */ 4.2335 ++static TABLE const UnitsTable[] = { 4.2336 ++ { "year", tMONTH_UNIT, 12 }, 4.2337 ++ { "month", tMONTH_UNIT, 1 }, 4.2338 ++ { "fortnight", tMINUTE_UNIT, 14 * 24 * 60 }, 4.2339 ++ { "week", tMINUTE_UNIT, 7 * 24 * 60 }, 4.2340 ++ { "day", tMINUTE_UNIT, 1 * 24 * 60 }, 4.2341 ++ { "hour", tMINUTE_UNIT, 60 }, 4.2342 ++ { "minute", tMINUTE_UNIT, 1 }, 4.2343 ++ { "min", tMINUTE_UNIT, 1 }, 4.2344 ++ { "second", tSEC_UNIT, 1 }, 4.2345 ++ { "sec", tSEC_UNIT, 1 }, 4.2346 ++ { NULL } 4.2347 ++}; 4.2348 ++ 4.2349 ++/* Assorted relative-time words. */ 4.2350 ++static TABLE const OtherTable[] = { 4.2351 ++ { "tomorrow", tMINUTE_UNIT, 1 * 24 * 60 }, 4.2352 ++ { "yesterday", tMINUTE_UNIT, -1 * 24 * 60 }, 4.2353 ++ { "today", tMINUTE_UNIT, 0 }, 4.2354 ++ { "now", tMINUTE_UNIT, 0 }, 4.2355 ++ { "last", tUNUMBER, -1 }, 4.2356 ++ { "this", tMINUTE_UNIT, 0 }, 4.2357 ++ { "next", tUNUMBER, 2 }, 4.2358 ++ { "first", tUNUMBER, 1 }, 4.2359 ++/* { "second", tUNUMBER, 2 }, */ 4.2360 ++ { "third", tUNUMBER, 3 }, 4.2361 ++ { "fourth", tUNUMBER, 4 }, 4.2362 ++ { "fifth", tUNUMBER, 5 }, 4.2363 ++ { "sixth", tUNUMBER, 6 }, 4.2364 ++ { "seventh", tUNUMBER, 7 }, 4.2365 ++ { "eighth", tUNUMBER, 8 }, 4.2366 ++ { "ninth", tUNUMBER, 9 }, 4.2367 ++ { "tenth", tUNUMBER, 10 }, 4.2368 ++ { "eleventh", tUNUMBER, 11 }, 4.2369 ++ { "twelfth", tUNUMBER, 12 }, 4.2370 ++ { "ago", tAGO, 1 }, 4.2371 ++ { NULL } 4.2372 ++}; 4.2373 ++ 4.2374 ++/* The timezone table. */ 4.2375 ++/* Some of these are commented out because a time_t can't store a float. */ 4.2376 ++static TABLE const TimezoneTable[] = { 4.2377 ++ { "gmt", tZONE, HOUR( 0) }, /* Greenwich Mean */ 4.2378 ++ { "ut", tZONE, HOUR( 0) }, /* Universal (Coordinated) */ 4.2379 ++ { "utc", tZONE, HOUR( 0) }, 4.2380 ++ { "wet", tZONE, HOUR( 0) }, /* Western European */ 4.2381 ++ { "bst", tDAYZONE, HOUR( 0) }, /* British Summer */ 4.2382 ++ { "wat", tZONE, HOUR( 1) }, /* West Africa */ 4.2383 ++ { "at", tZONE, HOUR( 2) }, /* Azores */ 4.2384 ++#if 0 4.2385 ++ /* For completeness. BST is also British Summer, and GST is 4.2386 ++ * also Guam Standard. */ 4.2387 ++ { "bst", tZONE, HOUR( 3) }, /* Brazil Standard */ 4.2388 ++ { "gst", tZONE, HOUR( 3) }, /* Greenland Standard */ 4.2389 ++#endif 4.2390 ++#if 0 4.2391 ++ { "nft", tZONE, HOUR(3.5) }, /* Newfoundland */ 4.2392 ++ { "nst", tZONE, HOUR(3.5) }, /* Newfoundland Standard */ 4.2393 ++ { "ndt", tDAYZONE, HOUR(3.5) }, /* Newfoundland Daylight */ 4.2394 ++#endif 4.2395 ++ { "ast", tZONE, HOUR( 4) }, /* Atlantic Standard */ 4.2396 ++ { "adt", tDAYZONE, HOUR( 4) }, /* Atlantic Daylight */ 4.2397 ++ { "est", tZONE, HOUR( 5) }, /* Eastern Standard */ 4.2398 ++ { "edt", tDAYZONE, HOUR( 5) }, /* Eastern Daylight */ 4.2399 ++ { "cst", tZONE, HOUR( 6) }, /* Central Standard */ 4.2400 ++ { "cdt", tDAYZONE, HOUR( 6) }, /* Central Daylight */ 4.2401 ++ { "mst", tZONE, HOUR( 7) }, /* Mountain Standard */ 4.2402 ++ { "mdt", tDAYZONE, HOUR( 7) }, /* Mountain Daylight */ 4.2403 ++ { "pst", tZONE, HOUR( 8) }, /* Pacific Standard */ 4.2404 ++ { "pdt", tDAYZONE, HOUR( 8) }, /* Pacific Daylight */ 4.2405 ++ { "yst", tZONE, HOUR( 9) }, /* Yukon Standard */ 4.2406 ++ { "ydt", tDAYZONE, HOUR( 9) }, /* Yukon Daylight */ 4.2407 ++ { "hst", tZONE, HOUR(10) }, /* Hawaii Standard */ 4.2408 ++ { "hdt", tDAYZONE, HOUR(10) }, /* Hawaii Daylight */ 4.2409 ++ { "cat", tZONE, HOUR(10) }, /* Central Alaska */ 4.2410 ++ { "ahst", tZONE, HOUR(10) }, /* Alaska-Hawaii Standard */ 4.2411 ++ { "nt", tZONE, HOUR(11) }, /* Nome */ 4.2412 ++ { "idlw", tZONE, HOUR(12) }, /* International Date Line West */ 4.2413 ++ { "cet", tZONE, -HOUR(1) }, /* Central European */ 4.2414 ++ { "met", tZONE, -HOUR(1) }, /* Middle European */ 4.2415 ++ { "mewt", tZONE, -HOUR(1) }, /* Middle European Winter */ 4.2416 ++ { "mest", tDAYZONE, -HOUR(1) }, /* Middle European Summer */ 4.2417 ++ { "swt", tZONE, -HOUR(1) }, /* Swedish Winter */ 4.2418 ++ { "sst", tDAYZONE, -HOUR(1) }, /* Swedish Summer */ 4.2419 ++ { "fwt", tZONE, -HOUR(1) }, /* French Winter */ 4.2420 ++ { "fst", tDAYZONE, -HOUR(1) }, /* French Summer */ 4.2421 ++ { "eet", tZONE, -HOUR(2) }, /* Eastern Europe, USSR Zone 1 */ 4.2422 ++ { "bt", tZONE, -HOUR(3) }, /* Baghdad, USSR Zone 2 */ 4.2423 ++#if 0 4.2424 ++ { "it", tZONE, -HOUR(3.5) },/* Iran */ 4.2425 ++#endif 4.2426 ++ { "zp4", tZONE, -HOUR(4) }, /* USSR Zone 3 */ 4.2427 ++ { "zp5", tZONE, -HOUR(5) }, /* USSR Zone 4 */ 4.2428 ++#if 0 4.2429 ++ { "ist", tZONE, -HOUR(5.5) },/* Indian Standard */ 4.2430 ++#endif 4.2431 ++ { "zp6", tZONE, -HOUR(6) }, /* USSR Zone 5 */ 4.2432 ++#if 0 4.2433 ++ /* For completeness. NST is also Newfoundland Stanard, and SST is 4.2434 ++ * also Swedish Summer. */ 4.2435 ++ { "nst", tZONE, -HOUR(6.5) },/* North Sumatra */ 4.2436 ++ { "sst", tZONE, -HOUR(7) }, /* South Sumatra, USSR Zone 6 */ 4.2437 ++#endif /* 0 */ 4.2438 ++ { "wast", tZONE, -HOUR(7) }, /* West Australian Standard */ 4.2439 ++ { "wadt", tDAYZONE, -HOUR(7) }, /* West Australian Daylight */ 4.2440 ++#if 0 4.2441 ++ { "jt", tZONE, -HOUR(7.5) },/* Java (3pm in Cronusland!) */ 4.2442 ++#endif 4.2443 ++ { "cct", tZONE, -HOUR(8) }, /* China Coast, USSR Zone 7 */ 4.2444 ++ { "jst", tZONE, -HOUR(9) }, /* Japan Standard, USSR Zone 8 */ 4.2445 ++#if 0 4.2446 ++ { "cast", tZONE, -HOUR(9.5) },/* Central Australian Standard */ 4.2447 ++ { "cadt", tDAYZONE, -HOUR(9.5) },/* Central Australian Daylight */ 4.2448 ++#endif 4.2449 ++ { "east", tZONE, -HOUR(10) }, /* Eastern Australian Standard */ 4.2450 ++ { "eadt", tDAYZONE, -HOUR(10) }, /* Eastern Australian Daylight */ 4.2451 ++ { "gst", tZONE, -HOUR(10) }, /* Guam Standard, USSR Zone 9 */ 4.2452 ++ { "nzt", tZONE, -HOUR(12) }, /* New Zealand */ 4.2453 ++ { "nzst", tZONE, -HOUR(12) }, /* New Zealand Standard */ 4.2454 ++ { "nzdt", tDAYZONE, -HOUR(12) }, /* New Zealand Daylight */ 4.2455 ++ { "idle", tZONE, -HOUR(12) }, /* International Date Line East */ 4.2456 ++ { NULL } 4.2457 ++}; 4.2458 ++ 4.2459 ++/* Military timezone table. */ 4.2460 ++static TABLE const MilitaryTable[] = { 4.2461 ++ { "a", tMILZONE, HOUR( 1) }, 4.2462 ++ { "b", tMILZONE, HOUR( 2) }, 4.2463 ++ { "c", tMILZONE, HOUR( 3) }, 4.2464 ++ { "d", tMILZONE, HOUR( 4) }, 4.2465 ++ { "e", tMILZONE, HOUR( 5) }, 4.2466 ++ { "f", tMILZONE, HOUR( 6) }, 4.2467 ++ { "g", tMILZONE, HOUR( 7) }, 4.2468 ++ { "h", tMILZONE, HOUR( 8) }, 4.2469 ++ { "i", tMILZONE, HOUR( 9) }, 4.2470 ++ { "k", tMILZONE, HOUR( 10) }, 4.2471 ++ { "l", tMILZONE, HOUR( 11) }, 4.2472 ++ { "m", tMILZONE, HOUR( 12) }, 4.2473 ++ { "n", tMILZONE, HOUR(- 1) }, 4.2474 ++ { "o", tMILZONE, HOUR(- 2) }, 4.2475 ++ { "p", tMILZONE, HOUR(- 3) }, 4.2476 ++ { "q", tMILZONE, HOUR(- 4) }, 4.2477 ++ { "r", tMILZONE, HOUR(- 5) }, 4.2478 ++ { "s", tMILZONE, HOUR(- 6) }, 4.2479 ++ { "t", tMILZONE, HOUR(- 7) }, 4.2480 ++ { "u", tMILZONE, HOUR(- 8) }, 4.2481 ++ { "v", tMILZONE, HOUR(- 9) }, 4.2482 ++ { "w", tMILZONE, HOUR(-10) }, 4.2483 ++ { "x", tMILZONE, HOUR(-11) }, 4.2484 ++ { "y", tMILZONE, HOUR(-12) }, 4.2485 ++ { "z", tZONE, HOUR( 0) }, /* Deliberately tZONE */ 4.2486 ++ { NULL } 4.2487 ++}; 4.2488 ++ 4.2489 ++static int LookupWord(char * buff, YYSTYPE * yylval, struct Variables * vars) 4.2490 ++{ 4.2491 ++ register char *p; 4.2492 ++ register char *q; 4.2493 ++ register const TABLE *tp; 4.2494 ++ int i; 4.2495 ++ int abbrev; 4.2496 ++ 4.2497 ++ /* Make it lowercase. */ 4.2498 ++ for (p = buff; *p != '\0'; p++) 4.2499 ++ *p = (char)tolower(*p); 4.2500 ++ 4.2501 ++ if (strcmp(buff, "am") == 0 || strcmp(buff, "a.m.") == 0) { 4.2502 ++ yylval->Meridian = MERam; 4.2503 ++ return tMERIDIAN; 4.2504 ++ } 4.2505 ++ if (strcmp(buff, "pm") == 0 || strcmp(buff, "p.m.") == 0) { 4.2506 ++ yylval->Meridian = MERpm; 4.2507 ++ return tMERIDIAN; 4.2508 ++ } 4.2509 ++ 4.2510 ++ /* See if we have an abbreviation for a month. */ 4.2511 ++ if (strlen(buff) == 3) 4.2512 ++ abbrev = 1; 4.2513 ++ else if (strlen(buff) == 4 && buff[3] == '.') { 4.2514 ++ abbrev = 1; 4.2515 ++ buff[3] = '\0'; 4.2516 ++ } 4.2517 ++ else 4.2518 ++ abbrev = 0; 4.2519 ++ 4.2520 ++ for (tp = MonthDayTable; tp->name; tp++) { 4.2521 ++ if (abbrev) { 4.2522 ++ if (strncmp(buff, tp->name, 3) == 0) { 4.2523 ++ yylval->Number = tp->value; 4.2524 ++ return tp->type; 4.2525 ++ } 4.2526 ++ } 4.2527 ++ else if (strcmp(buff, tp->name) == 0) { 4.2528 ++ yylval->Number = tp->value; 4.2529 ++ return tp->type; 4.2530 ++ } 4.2531 ++ } 4.2532 ++ 4.2533 ++ for (tp = TimezoneTable; tp->name; tp++) 4.2534 ++ if (strcmp(buff, tp->name) == 0) { 4.2535 ++ yylval->Number = tp->value; 4.2536 ++ return tp->type; 4.2537 ++ } 4.2538 ++ 4.2539 ++ if (strcmp(buff, "dst") == 0) 4.2540 ++ return tDST; 4.2541 ++ 4.2542 ++ for (tp = UnitsTable; tp->name; tp++) 4.2543 ++ if (strcmp(buff, tp->name) == 0) { 4.2544 ++ yylval->Number = tp->value; 4.2545 ++ return tp->type; 4.2546 ++ } 4.2547 ++ 4.2548 ++ /* Strip off any plural and try the units table again. */ 4.2549 ++ i = strlen(buff) - 1; 4.2550 ++ if (buff[i] == 's') { 4.2551 ++ buff[i] = '\0'; 4.2552 ++ for (tp = UnitsTable; tp->name; tp++) 4.2553 ++ if (strcmp(buff, tp->name) == 0) { 4.2554 ++ yylval->Number = tp->value; 4.2555 ++ return tp->type; 4.2556 ++ } 4.2557 ++ buff[i] = 's'; /* Put back for "this" in OtherTable. */ 4.2558 ++ } 4.2559 ++ 4.2560 ++ for (tp = OtherTable; tp->name; tp++) 4.2561 ++ if (strcmp(buff, tp->name) == 0) { 4.2562 ++ yylval->Number = tp->value; 4.2563 ++ return tp->type; 4.2564 ++ } 4.2565 ++ 4.2566 ++ /* Avoid confusion with 'T' in RFC3339 and 't' in Military timezones */ 4.2567 ++ if (!vars->yyHaveTime && strcmp(buff, "t") == 0) 4.2568 ++ return tRFC3339; 4.2569 ++ 4.2570 ++ /* Military timezones. */ 4.2571 ++ if (buff[1] == '\0' && isalpha(*buff)) { 4.2572 ++ for (tp = MilitaryTable; tp->name; tp++) 4.2573 ++ if (strcmp(buff, tp->name) == 0) { 4.2574 ++ yylval->Number = tp->value; 4.2575 ++ return tp->type; 4.2576 ++ } 4.2577 ++ } 4.2578 ++ 4.2579 ++ /* Drop out any periods and try the timezone table again. */ 4.2580 ++ for (i = 0, p = q = buff; *q; q++) 4.2581 ++ if (*q != '.') 4.2582 ++ *p++ = *q; 4.2583 ++ else 4.2584 ++ i++; 4.2585 ++ *p = '\0'; 4.2586 ++ if (i) 4.2587 ++ for (tp = TimezoneTable; tp->name; tp++) 4.2588 ++ if (strcmp(buff, tp->name) == 0) { 4.2589 ++ yylval->Number = tp->value; 4.2590 ++ return tp->type; 4.2591 ++ } 4.2592 ++ 4.2593 ++ for (i = 1; i <= 12; i++) 4.2594 ++ for (abbrev = 0; abbrev < 2; abbrev++) 4.2595 ++ if (PTimeIsMonthName(buff, i, abbrev)) { 4.2596 ++ yylval->Number = i; 4.2597 ++ return tMONTH; 4.2598 ++ } 4.2599 ++ 4.2600 ++ for (i = 1; i <= 7; i++) 4.2601 ++ for (abbrev = 0; abbrev < 2; abbrev++) 4.2602 ++ if (PTimeIsDayName(buff, i, abbrev)) { 4.2603 ++ yylval->Number = i; 4.2604 ++ return tDAY; 4.2605 ++ } 4.2606 ++ 4.2607 ++ return tID; 4.2608 ++} 4.2609 ++ 4.2610 ++ 4.2611 ++#ifdef _MSC_VER 4.2612 ++#pragma warning(disable:4211) 4.2613 ++#endif 4.2614 ++ 4.2615 ++#ifndef __GNUC__ 4.2616 ++static 4.2617 ++#endif 4.2618 ++int yylex(YYSTYPE * yylval, struct Variables * vars) 4.2619 ++{ 4.2620 ++ register char *p; 4.2621 ++ char buff[20]; 4.2622 ++ int Count; 4.2623 ++ int sign; 4.2624 ++ register int c = PTimeGetChar(vars->yyInput); 4.2625 ++ 4.2626 ++ while (c != EOF && c != '\0' && c != '\n') { 4.2627 ++ while (isspace(c)) 4.2628 ++ c = PTimeGetChar(vars->yyInput); 4.2629 ++ 4.2630 ++ if (isdigit(c) || c == '-' || c == '+') { 4.2631 ++ if (c == '-' || c == '+') { 4.2632 ++ sign = c == '-' ? -1 : 1; 4.2633 ++ if (!isdigit(c = PTimeGetChar(vars->yyInput))) 4.2634 ++ /* skip the '-' sign */ 4.2635 ++ continue; 4.2636 ++ } 4.2637 ++ else 4.2638 ++ sign = 0; 4.2639 ++ yylval->Number = 0; 4.2640 ++ Count = 0; /* Count number of digits */ 4.2641 ++ while (isdigit(c)) { 4.2642 ++ yylval->Number = 10 * yylval->Number + c - '0'; 4.2643 ++ c = PTimeGetChar(vars->yyInput); 4.2644 ++ Count++; 4.2645 ++ } 4.2646 ++ PTimeUngetChar(vars->yyInput, c); 4.2647 ++ if (sign < 0) 4.2648 ++ yylval->Number = -yylval->Number; 4.2649 ++ if (Count == 4) 4.2650 ++ return sign ? tS4DIGITNUMBER : t4DIGITNUMBER; 4.2651 ++ if (sign) 4.2652 ++ return tSNUMBER; 4.2653 ++ if (Count == 6) 4.2654 ++ return t6DIGITNUMBER; 4.2655 ++ if (Count == 8) 4.2656 ++ return t8DIGITNUMBER; 4.2657 ++ return tUNUMBER; 4.2658 ++ } 4.2659 ++ 4.2660 ++ if (isalpha(c)) { 4.2661 ++ for (p = buff; isalpha(c) || c == '.'; c = PTimeGetChar(vars->yyInput)) { 4.2662 ++ if (p < &buff[sizeof(buff)-1]) 4.2663 ++ *p++ = (char)c; 4.2664 ++ } 4.2665 ++ *p = '\0'; 4.2666 ++ PTimeUngetChar(vars->yyInput, c); 4.2667 ++ return LookupWord(buff, yylval, vars); 4.2668 ++ } 4.2669 ++ 4.2670 ++ if (c != '(') 4.2671 ++ return c; 4.2672 ++ 4.2673 ++ Count = 0; 4.2674 ++ do { 4.2675 ++ c = PTimeGetChar(vars->yyInput); 4.2676 ++ if (c == '\0' || c == EOF) 4.2677 ++ return c; 4.2678 ++ if (c == '(') 4.2679 ++ Count++; 4.2680 ++ else if (c == ')') 4.2681 ++ Count--; 4.2682 ++ } while (Count > 0); 4.2683 ++ } 4.2684 ++ 4.2685 ++ if (c == '\n') 4.2686 ++ PTimeUngetChar(vars->yyInput, c); 4.2687 ++ 4.2688 ++ return EOF; 4.2689 ++} 4.2690 ++ 4.2691 ++#ifdef _MSC_VER 4.2692 ++#pragma warning(default:4211) 4.2693 ++#endif 4.2694 ++ 4.2695 ++ 4.2696 ++static time_t ToSeconds(time_t Hours, time_t Minutes, time_t Seconds, 4.2697 ++ MERIDIAN Meridian) 4.2698 ++{ 4.2699 ++ if (Minutes < 0 || Minutes > 59 || Seconds < 0 || Seconds > 59) 4.2700 ++ return -1; 4.2701 ++ switch (Meridian) { 4.2702 ++ case MER24: 4.2703 ++ if (Hours < 0 || Hours > 23) 4.2704 ++ return -1; 4.2705 ++ return (Hours * 60L + Minutes) * 60L + Seconds; 4.2706 ++ case MERam: 4.2707 ++ if (Hours < 1 || Hours > 12) 4.2708 ++ return -1; 4.2709 ++ if (Hours == 12) 4.2710 ++ Hours = 0; 4.2711 ++ return (Hours * 60L + Minutes) * 60L + Seconds; 4.2712 ++ case MERpm: 4.2713 ++ if (Hours < 1 || Hours > 12) 4.2714 ++ return -1; 4.2715 ++ if (Hours == 12) 4.2716 ++ Hours = 0; 4.2717 ++ return ((Hours + 12) * 60L + Minutes) * 60L + Seconds; 4.2718 ++ } 4.2719 ++ 4.2720 ++ return -1; 4.2721 ++} 4.2722 ++ 4.2723 ++ 4.2724 ++static time_t Convert(time_t Month, time_t Day, time_t Year, 4.2725 ++ time_t Hours, time_t Minutes, time_t Seconds, 4.2726 ++ MERIDIAN Meridian, DSTMODE DSTmode, time_t yyTimezone) 4.2727 ++{ 4.2728 ++ static int DaysInMonth[12] = { 4.2729 ++ 31, 0, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 4.2730 ++ }; 4.2731 ++ time_t tod; 4.2732 ++ time_t Julian; 4.2733 ++ int i; 4.2734 ++ 4.2735 ++ if (Year < 0) 4.2736 ++ Year = -Year; 4.2737 ++ if (Year < 70) 4.2738 ++ Year += 2000; 4.2739 ++ else if (Year < 100) 4.2740 ++ Year += 1900; 4.2741 ++ DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) 4.2742 ++ ? 29 : 28; 4.2743 ++ /* Checking for 2038 bogusly assumes that time_t is 32 bits. But 4.2744 ++ I'm too lazy to try to check for time_t overflow in another way. */ 4.2745 ++ if (Year < EPOCH || Year > 2038 4.2746 ++ || Month < 1 || Month > 12 4.2747 ++ /* Lint fluff: "conversion from long may lose accuracy" */ 4.2748 ++ || Day < 1 || Day > DaysInMonth[(int)--Month]) 4.2749 ++ return -1; 4.2750 ++ 4.2751 ++ for (Julian = Day - 1, i = 0; i < Month; i++) 4.2752 ++ Julian += DaysInMonth[i]; 4.2753 ++ for (i = EPOCH; i < Year; i++) 4.2754 ++ Julian += 365 + (i % 4 == 0); 4.2755 ++ Julian *= SECSPERDAY; 4.2756 ++ Julian += yyTimezone * 60L; 4.2757 ++ if ((tod = ToSeconds(Hours, Minutes, Seconds, Meridian)) < 0) 4.2758 ++ return -1; 4.2759 ++ Julian += tod; 4.2760 ++ if (DSTmode == DSTon 4.2761 ++ || (DSTmode == DSTmaybe && localtime(&Julian)->tm_isdst)) 4.2762 ++ Julian -= 60 * 60; 4.2763 ++ return Julian; 4.2764 ++} 4.2765 ++ 4.2766 ++ 4.2767 ++static time_t DSTcorrect(time_t Start, time_t Future) 4.2768 ++{ 4.2769 ++ time_t StartDay; 4.2770 ++ time_t FutureDay; 4.2771 ++ 4.2772 ++ StartDay = (localtime(&Start)->tm_hour + 1) % 24; 4.2773 ++ FutureDay = (localtime(&Future)->tm_hour + 1) % 24; 4.2774 ++ return (Future - Start) + (StartDay - FutureDay) * 60L * 60L; 4.2775 ++} 4.2776 ++ 4.2777 ++ 4.2778 ++static time_t RelativeDate(time_t Start, time_t DayOrdinal, time_t DayNumber) 4.2779 ++{ 4.2780 ++ struct tm *tm; 4.2781 ++ time_t now; 4.2782 ++ 4.2783 ++ now = Start; 4.2784 ++ tm = localtime(&now); 4.2785 ++ now += SECSPERDAY * ((DayNumber - tm->tm_wday + 7) % 7); 4.2786 ++ now += 7 * SECSPERDAY * (DayOrdinal <= 0 ? DayOrdinal : DayOrdinal - 1); 4.2787 ++ return DSTcorrect(Start, now); 4.2788 ++} 4.2789 ++ 4.2790 ++ 4.2791 ++static time_t RelativeMonth(time_t Start, time_t RelMonth, time_t yyTimezone) 4.2792 ++{ 4.2793 ++ struct tm *tm; 4.2794 ++ time_t Month; 4.2795 ++ time_t Year; 4.2796 ++ 4.2797 ++ if (RelMonth == 0) 4.2798 ++ return 0; 4.2799 ++ tm = localtime(&Start); 4.2800 ++ Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; 4.2801 ++ Year = Month / 12 + 1900; 4.2802 ++ Month = Month % 12 + 1; 4.2803 ++ return DSTcorrect(Start, 4.2804 ++ Convert(Month, (time_t)tm->tm_mday, Year, 4.2805 ++ (time_t)tm->tm_hour, (time_t)tm->tm_min, (time_t)tm->tm_sec, 4.2806 ++ MER24, DSTmaybe, yyTimezone)); 4.2807 ++} 4.2808 ++ 4.2809 ++ 4.2810 ++static void SetPossibleDate(struct Variables * var, 4.2811 ++ time_t possible_day, 4.2812 ++ time_t possible_month, 4.2813 ++ time_t possible_year) 4.2814 ++{ 4.2815 ++ int date_order; 4.2816 ++ 4.2817 ++ if (possible_day > 31) /* test for ymd */ 4.2818 ++ date_order = 2; 4.2819 ++ else if (possible_day > 12) /* test for dmy */ 4.2820 ++ date_order = 1; 4.2821 ++ else if (possible_month > 12) /* test for mdy */ 4.2822 ++ date_order = 0; 4.2823 ++ else 4.2824 ++ date_order = PTimeGetDateOrder(); 4.2825 ++ 4.2826 ++ switch (date_order) { 4.2827 ++ case 0 : 4.2828 ++ var->yyDay = possible_month; 4.2829 ++ var->yyMonth = possible_day; 4.2830 ++ var->yyYear = possible_year; 4.2831 ++ break; 4.2832 ++ case 1 : 4.2833 ++ var->yyDay = possible_day; 4.2834 ++ var->yyMonth = possible_month; 4.2835 ++ var->yyYear = possible_year; 4.2836 ++ break; 4.2837 ++ default : 4.2838 ++ var->yyDay = possible_year; 4.2839 ++ var->yyMonth = possible_month; 4.2840 ++ var->yyYear = possible_day; 4.2841 ++ } 4.2842 ++} 4.2843 ++ 4.2844 ++ 4.2845 ++time_t STDAPICALLTYPE PTimeParse(void * inputStream, struct tm * now, int timezone) 4.2846 ++{ 4.2847 ++ time_t Start; 4.2848 ++ struct Variables var; 4.2849 ++ 4.2850 ++ 4.2851 ++ var.yyInput = inputStream; 4.2852 ++ var.yyYear = now->tm_year + 1900; 4.2853 ++ var.yyMonth = now->tm_mon + 1; 4.2854 ++ var.yyDay = now->tm_mday; 4.2855 ++ var.yyTimezone = -timezone; 4.2856 ++ var.yyDSTmode = DSTmaybe; 4.2857 ++ var.yyHour = 0; 4.2858 ++ var.yyMinutes = 0; 4.2859 ++ var.yySeconds = 0; 4.2860 ++ var.yyMeridian = MER24; 4.2861 ++ var.yyRelSeconds = 0; 4.2862 ++ var.yyRelMonth = 0; 4.2863 ++ var.yyHaveDate = 0; 4.2864 ++ var.yyHaveDay = 0; 4.2865 ++ var.yyHaveRel = 0; 4.2866 ++ var.yyHaveTime = 0; 4.2867 ++ var.yyHaveZone = 0; 4.2868 ++ 4.2869 ++ yyparse(&var); 4.2870 ++ 4.2871 ++ if (var.yyHaveTime > 1 || var.yyHaveZone > 1 || 4.2872 ++ var.yyHaveDate > 1 || var.yyHaveDay > 1) 4.2873 ++ return -1; 4.2874 ++ 4.2875 ++ if (var.yyHaveTime == 0 && var.yyHaveZone == 0 && 4.2876 ++ var.yyHaveDate == 0 && var.yyHaveDay == 0 && var.yyHaveRel == 0) 4.2877 ++ return -1; 4.2878 ++ 4.2879 ++ if (var.yyHaveDate || var.yyHaveTime || var.yyHaveDay) { 4.2880 ++ Start = Convert(var.yyMonth, var.yyDay, var.yyYear, 4.2881 ++ var.yyHour, var.yyMinutes, var.yySeconds, 4.2882 ++ var.yyMeridian, var.yyDSTmode, var.yyTimezone); 4.2883 ++ if (Start < 0) 4.2884 ++ return -1; 4.2885 ++ } 4.2886 ++ else { 4.2887 ++ time(&Start); 4.2888 ++ if (!var.yyHaveRel) 4.2889 ++ Start -= ((now->tm_hour * 60L + now->tm_min) * 60L) + now->tm_sec; 4.2890 ++ } 4.2891 ++ 4.2892 ++ Start += var.yyRelSeconds; 4.2893 ++ Start += RelativeMonth(Start, var.yyRelMonth, var.yyTimezone); 4.2894 ++ 4.2895 ++ if (var.yyHaveDay && !var.yyHaveDate) 4.2896 ++ Start += RelativeDate(Start, var.yyDayOrdinal, var.yyDayNumber); 4.2897 ++ 4.2898 ++ /* Have to do *something* with a legitimate -1 so it's distinguishable 4.2899 ++ * from the error return value. (Alternately could set errno on error.) */ 4.2900 ++ return Start == -1 ? 0 : Start; 4.2901 ++} 4.2902 ++ 4.2903 ++ 4.2904 ++#ifdef _MSC_VER 4.2905 ++#pragma warning(disable:4028 4100 4211) 4.2906 ++#endif 4.2907 ++ 4.2908 ++#ifdef __GNUC__ 4.2909 ++int yyerror(const char * s) 4.2910 ++{ 4.2911 ++ return 0; 4.2912 ++} 4.2913 ++#else 4.2914 ++static void yyerror(const char * s) 4.2915 ++{ 4.2916 ++} 4.2917 ++#endif 4.2918 ++ 4.2919 ++#ifdef _MSC_VER 4.2920 ++#pragma warning(default:4028 4100 4211) 4.2921 ++#endif 4.2922 ++ 4.2923 ++ 4.2924 ++/* End of file ***************************************************************/ 4.2925 +diff -Naur ptlib-2.10.11.orig/src/ptlib/unix/svcproc.cxx ptlib-2.10.11/src/ptlib/unix/svcproc.cxx 4.2926 +--- ptlib-2.10.11.orig/src/ptlib/unix/svcproc.cxx 2013-08-14 18:20:26.000000000 -0500 4.2927 ++++ ptlib-2.10.11/src/ptlib/unix/svcproc.cxx 2016-05-04 19:42:20.526529457 -0500 4.2928 +@@ -217,7 +217,7 @@ 4.2929 + pid_t pid; 4.2930 + 4.2931 + { 4.2932 +- ifstream pidfile(pidfilename); 4.2933 ++ ifstream pidfile((std::string&)pidfilename); 4.2934 + if (!pidfile.is_open()) { 4.2935 + cout << "Could not open pid file: \"" << pidfilename << "\"" 4.2936 + " - " << strerror(errno) << endl; 4.2937 +@@ -384,7 +384,7 @@ 4.2938 + // Run as a daemon, ie fork 4.2939 + 4.2940 + if (!pidfilename) { 4.2941 +- ifstream pidfile(pidfilename); 4.2942 ++ ifstream pidfile((std::string&)pidfilename); 4.2943 + if (pidfile.is_open()) { 4.2944 + pid_t pid; 4.2945 + pidfile >> pid; 4.2946 +@@ -412,7 +412,7 @@ 4.2947 + cout << "Daemon started with pid " << pid << endl; 4.2948 + if (!pidfilename) { 4.2949 + // Write out the child pid to magic file in /var/run (at least for linux) 4.2950 +- ofstream pidfile(pidfilename); 4.2951 ++ ofstream pidfile((std::string&)pidfilename); 4.2952 + if (pidfile.is_open()) 4.2953 + pidfile << pid; 4.2954 + else