version 1.1.1.1, 2012/02/21 16:23:02
|
version 1.1.1.3, 2013/07/22 10:46:12
|
Line 122 typedef union {
|
Line 122 typedef union {
|
enum _MERIDIAN Meridian; |
enum _MERIDIAN Meridian; |
} YYSTYPE; |
} YYSTYPE; |
#endif /* YYSTYPE_DEFINED */ |
#endif /* YYSTYPE_DEFINED */ |
#line 125 "y.tab.c" | #line 125 "getdate.c" |
#define tAGO 257 |
#define tAGO 257 |
#define tDAY 258 |
#define tDAY 258 |
#define tDAYZONE 259 |
#define tDAYZONE 259 |
Line 654 Convert(Month, Day, Year, Hours, Minutes, Seconds, Mer
|
Line 654 Convert(Month, Day, Year, Hours, Minutes, Seconds, Mer
|
} |
} |
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) |
DaysInMonth[1] = Year % 4 == 0 && (Year % 100 != 0 || Year % 400 == 0) |
? 29 : 28; |
? 29 : 28; |
/* Checking for 2038 bogusly assumes that time_t is 32 bits. But | /* 32-bit time_t cannot represent years past 2038 */ |
I'm too lazy to try to check for time_t overflow in another way. */ | if (Year < EPOCH || (sizeof(time_t) == sizeof(int) && Year > 2038) |
if (Year < EPOCH || Year > 2038 | |
|| Month < 1 || Month > 12 |
|| Month < 1 || Month > 12 |
/* Lint fluff: "conversion from long may lose accuracy" */ |
/* Lint fluff: "conversion from long may lose accuracy" */ |
|| Day < 1 || Day > DaysInMonth[(int)--Month]) |
|| Day < 1 || Day > DaysInMonth[(int)--Month]) |
Line 1028 main(ac, av)
|
Line 1027 main(ac, av)
|
/* NOTREACHED */ |
/* NOTREACHED */ |
} |
} |
#endif /* defined(TEST) */ |
#endif /* defined(TEST) */ |
#line 979 "y.tab.c" | #line 978 "getdate.c" |
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ |
/* allocate initial stack or double stack size, up to YYMAXDEPTH */ |
#if defined(__cplusplus) || defined(__STDC__) |
#if defined(__cplusplus) || defined(__STDC__) |
static int yygrowstack(void) |
static int yygrowstack(void) |
Line 1040 static int yygrowstack()
|
Line 1039 static int yygrowstack()
|
short *newss; |
short *newss; |
YYSTYPE *newvs; |
YYSTYPE *newvs; |
|
|
if ((newsize = yystacksize) == 0) | newsize = yystacksize ? yystacksize : YYINITSTACKSIZE; |
newsize = YYINITSTACKSIZE; | if (newsize >= YYMAXDEPTH) |
else if (newsize >= YYMAXDEPTH) | |
return -1; |
return -1; |
else if ((newsize *= 2) > YYMAXDEPTH) |
else if ((newsize *= 2) > YYMAXDEPTH) |
newsize = YYMAXDEPTH; |
newsize = YYMAXDEPTH; |
i = yyssp - yyss; |
|
#ifdef SIZE_MAX |
#ifdef SIZE_MAX |
#define YY_SIZE_MAX SIZE_MAX |
#define YY_SIZE_MAX SIZE_MAX |
#else |
#else |
#define YY_SIZE_MAX 0x7fffffff |
#define YY_SIZE_MAX 0x7fffffff |
#endif |
#endif |
if (newsize && YY_SIZE_MAX / newsize < sizeof *newss) | if (YY_SIZE_MAX / newsize < sizeof *newss) |
goto bail; |
goto bail; |
|
i = yyssp - yyss; |
newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : |
newss = yyss ? (short *)realloc(yyss, newsize * sizeof *newss) : |
(short *)malloc(newsize * sizeof *newss); /* overflow check above */ |
(short *)malloc(newsize * sizeof *newss); /* overflow check above */ |
if (newss == NULL) |
if (newss == NULL) |
goto bail; |
goto bail; |
yyss = newss; |
yyss = newss; |
yyssp = newss + i; |
yyssp = newss + i; |
if (newsize && YY_SIZE_MAX / newsize < sizeof *newvs) |
|
goto bail; |
|
newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : |
newvs = yyvs ? (YYSTYPE *)realloc(yyvs, newsize * sizeof *newvs) : |
(YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */ |
(YYSTYPE *)malloc(newsize * sizeof *newvs); /* overflow check above */ |
if (newvs == NULL) |
if (newvs == NULL) |
Line 1523 case 41:
|
Line 1519 case 41:
|
yyval.Meridian = yyvsp[0].Meridian; |
yyval.Meridian = yyvsp[0].Meridian; |
} |
} |
break; |
break; |
#line 1474 "y.tab.c" | #line 1470 "getdate.c" |
} |
} |
yyssp -= yym; |
yyssp -= yym; |
yystate = *yyssp; |
yystate = *yyssp; |