diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index d27511cad35..12fde37ec9a 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 1.0.3 on Mon Sep 15 10:38:03 2025 */ +/* Generated by re2c 1.0.3 on Wed Jan 14 14:20:50 2026 */ #line 1 "ext/date/lib/parse_date.re" /* * The MIT License (MIT) @@ -171,7 +171,14 @@ static const timelib_tz_lookup_table timelib_timezone_utc[] = { }; #if defined(_POSIX_TZNAME_MAX) -# define MAX_ABBR_LEN _POSIX_TZNAME_MAX +/* Solaris exposes _POSIX_TZNAME_MAX = 3 unless _XPG6 is defined. + * That is too small for real-world timezone abbreviations ("EDT", "CEST", ...). + */ +# if defined(__sun__) && _POSIX_TZNAME_MAX < 6 +# define MAX_ABBR_LEN 6 +# else +# define MAX_ABBR_LEN _POSIX_TZNAME_MAX +# endif #elif defined(TZNAME_MAX) # define MAX_ABBR_LEN TZNAME_MAX #else @@ -1021,11 +1028,11 @@ static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) std: s->tok = cursor; s->len = 0; -#line 1154 "ext/date/lib/parse_date.re" +#line 1161 "ext/date/lib/parse_date.re" -#line 1029 "ext/date/lib/parse_date.c" +#line 1036 "ext/date/lib/parse_date.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1206,23 +1213,23 @@ yy2: YYDEBUG(2, *YYCURSOR); ++YYCURSOR; YYDEBUG(3, *YYCURSOR); -#line 1987 "ext/date/lib/parse_date.re" +#line 1994 "ext/date/lib/parse_date.re" { s->pos = cursor; s->line++; goto std; } -#line 1215 "ext/date/lib/parse_date.c" +#line 1222 "ext/date/lib/parse_date.c" yy4: YYDEBUG(4, *YYCURSOR); ++YYCURSOR; yy5: YYDEBUG(5, *YYCURSOR); -#line 1993 "ext/date/lib/parse_date.re" +#line 2000 "ext/date/lib/parse_date.re" { add_error(s, TIMELIB_ERR_UNEXPECTED_CHARACTER, "Unexpected character"); goto std; } -#line 1226 "ext/date/lib/parse_date.c" +#line 1233 "ext/date/lib/parse_date.c" yy6: YYDEBUG(6, *YYCURSOR); yyaccept = 0; @@ -1237,11 +1244,11 @@ yy6: if (yych <= '9') goto yy58; yy8: YYDEBUG(8, *YYCURSOR); -#line 1982 "ext/date/lib/parse_date.re" +#line 1989 "ext/date/lib/parse_date.re" { goto std; } -#line 1245 "ext/date/lib/parse_date.c" +#line 1252 "ext/date/lib/parse_date.c" yy9: YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; @@ -1275,11 +1282,11 @@ yy11: YYDEBUG(11, *YYCURSOR); ++YYCURSOR; YYDEBUG(12, *YYCURSOR); -#line 1977 "ext/date/lib/parse_date.re" +#line 1984 "ext/date/lib/parse_date.re" { goto std; } -#line 1283 "ext/date/lib/parse_date.c" +#line 1290 "ext/date/lib/parse_date.c" yy13: YYDEBUG(13, *YYCURSOR); yyaccept = 1; @@ -1780,7 +1787,7 @@ yy19: } yy20: YYDEBUG(20, *YYCURSOR); -#line 1892 "ext/date/lib/parse_date.re" +#line 1899 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -1794,7 +1801,7 @@ yy20: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 1798 "ext/date/lib/parse_date.c" +#line 1805 "ext/date/lib/parse_date.c" yy21: YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; @@ -3599,7 +3606,7 @@ yy80: } yy81: YYDEBUG(81, *YYCURSOR); -#line 1639 "ext/date/lib/parse_date.re" +#line 1646 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -3610,7 +3617,7 @@ yy81: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 3614 "ext/date/lib/parse_date.c" +#line 3621 "ext/date/lib/parse_date.c" yy82: YYDEBUG(82, *YYCURSOR); yych = *++YYCURSOR; @@ -4125,7 +4132,7 @@ yy112: } if (yych == '.') goto yy289; YYDEBUG(114, *YYCURSOR); -#line 1214 "ext/date/lib/parse_date.re" +#line 1221 "ext/date/lib/parse_date.re" { timelib_ull i; @@ -4150,7 +4157,7 @@ yy112: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 4154 "ext/date/lib/parse_date.c" +#line 4161 "ext/date/lib/parse_date.c" yy115: YYDEBUG(115, *YYCURSOR); ++YYCURSOR; @@ -5876,7 +5883,7 @@ yy176: } yy177: YYDEBUG(177, *YYCURSOR); -#line 1380 "ext/date/lib/parse_date.re" +#line 1387 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("timetiny24 | timeshort24 | timelong24 | iso8601long"); @@ -5903,7 +5910,7 @@ yy177: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 5907 "ext/date/lib/parse_date.c" +#line 5914 "ext/date/lib/parse_date.c" yy178: YYDEBUG(178, *YYCURSOR); yyaccept = 4; @@ -6932,7 +6939,7 @@ yy223: } yy224: YYDEBUG(224, *YYCURSOR); -#line 1474 "ext/date/lib/parse_date.re" +#line 1481 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("americanshort | american"); @@ -6947,7 +6954,7 @@ yy224: TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 6951 "ext/date/lib/parse_date.c" +#line 6958 "ext/date/lib/parse_date.c" yy225: YYDEBUG(225, *YYCURSOR); yyaccept = 5; @@ -7190,7 +7197,7 @@ yy250: if (yych <= '9') goto yy431; yy251: YYDEBUG(251, *YYCURSOR); -#line 1556 "ext/date/lib/parse_date.re" +#line 1563 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datefull"); @@ -7204,7 +7211,7 @@ yy251: TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 7208 "ext/date/lib/parse_date.c" +#line 7215 "ext/date/lib/parse_date.c" yy252: YYDEBUG(252, *YYCURSOR); yyaccept = 3; @@ -7318,7 +7325,7 @@ yy259: if (yych == 'e') goto yy440; yy260: YYDEBUG(260, *YYCURSOR); -#line 1961 "ext/date/lib/parse_date.re" +#line 1968 "ext/date/lib/parse_date.re" { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -7333,7 +7340,7 @@ yy260: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 7337 "ext/date/lib/parse_date.c" +#line 7344 "ext/date/lib/parse_date.c" yy261: YYDEBUG(261, *YYCURSOR); yych = *++YYCURSOR; @@ -7779,7 +7786,7 @@ yy289: if (yych <= '9') goto yy471; yy290: YYDEBUG(290, *YYCURSOR); -#line 1240 "ext/date/lib/parse_date.re" +#line 1247 "ext/date/lib/parse_date.re" { timelib_sll i; timelib_ull us; @@ -7818,7 +7825,7 @@ yy290: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 7822 "ext/date/lib/parse_date.c" +#line 7829 "ext/date/lib/parse_date.c" yy291: YYDEBUG(291, *YYCURSOR); yych = *++YYCURSOR; @@ -7843,7 +7850,7 @@ yy292: } yy293: YYDEBUG(293, *YYCURSOR); -#line 1802 "ext/date/lib/parse_date.re" +#line 1809 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7863,7 +7870,7 @@ yy293: TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 7867 "ext/date/lib/parse_date.c" +#line 7874 "ext/date/lib/parse_date.c" yy294: YYDEBUG(294, *YYCURSOR); yyaccept = 7; @@ -7902,7 +7909,7 @@ yy294: } yy295: YYDEBUG(295, *YYCURSOR); -#line 1882 "ext/date/lib/parse_date.re" +#line 1889 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("monthtext"); TIMELIB_INIT; @@ -7911,7 +7918,7 @@ yy295: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 7915 "ext/date/lib/parse_date.c" +#line 7922 "ext/date/lib/parse_date.c" yy296: YYDEBUG(296, *YYCURSOR); yyaccept = 7; @@ -8486,7 +8493,7 @@ yy314: } yy315: YYDEBUG(315, *YYCURSOR); -#line 1823 "ext/date/lib/parse_date.re" +#line 1830 "ext/date/lib/parse_date.re" { const timelib_relunit* relunit; DEBUG_OUTPUT("daytext"); @@ -8503,7 +8510,7 @@ yy315: TIMELIB_DEINIT; return TIMELIB_WEEKDAY; } -#line 8507 "ext/date/lib/parse_date.c" +#line 8514 "ext/date/lib/parse_date.c" yy316: YYDEBUG(316, *YYCURSOR); yych = *++YYCURSOR; @@ -8771,7 +8778,7 @@ yy324: } yy325: YYDEBUG(325, *YYCURSOR); -#line 1625 "ext/date/lib/parse_date.re" +#line 1632 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); @@ -8784,7 +8791,7 @@ yy325: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 8788 "ext/date/lib/parse_date.c" +#line 8795 "ext/date/lib/parse_date.c" yy326: YYDEBUG(326, *YYCURSOR); yyaccept = 10; @@ -9478,7 +9485,7 @@ yy350: } yy351: YYDEBUG(351, *YYCURSOR); -#line 1171 "ext/date/lib/parse_date.re" +#line 1178 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -9486,7 +9493,7 @@ yy351: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 9490 "ext/date/lib/parse_date.c" +#line 9497 "ext/date/lib/parse_date.c" yy352: YYDEBUG(352, *YYCURSOR); yyaccept = 2; @@ -10989,7 +10996,7 @@ yy419: } yy420: YYDEBUG(420, *YYCURSOR); -#line 1408 "ext/date/lib/parse_date.re" +#line 1415 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -11011,7 +11018,7 @@ yy420: TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 11015 "ext/date/lib/parse_date.c" +#line 11022 "ext/date/lib/parse_date.c" yy421: YYDEBUG(421, *YYCURSOR); yyaccept = 13; @@ -11092,7 +11099,7 @@ yy421: } yy422: YYDEBUG(422, *YYCURSOR); -#line 1793 "ext/date/lib/parse_date.re" +#line 1800 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -11100,7 +11107,7 @@ yy422: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 11104 "ext/date/lib/parse_date.c" +#line 11111 "ext/date/lib/parse_date.c" yy423: YYDEBUG(423, *YYCURSOR); yyaccept = 3; @@ -11707,7 +11714,7 @@ yy456: YYDEBUG(456, *YYCURSOR); ++YYCURSOR; YYDEBUG(457, *YYCURSOR); -#line 1342 "ext/date/lib/parse_date.re" +#line 1349 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -11724,7 +11731,7 @@ yy456: TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 11728 "ext/date/lib/parse_date.c" +#line 11735 "ext/date/lib/parse_date.c" yy458: YYDEBUG(458, *YYCURSOR); yych = *++YYCURSOR; @@ -13051,7 +13058,7 @@ yy525: } yy526: YYDEBUG(526, *YYCURSOR); -#line 1180 "ext/date/lib/parse_date.re" +#line 1187 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -13062,7 +13069,7 @@ yy526: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 13066 "ext/date/lib/parse_date.c" +#line 13073 "ext/date/lib/parse_date.c" yy527: YYDEBUG(527, *YYCURSOR); yyaccept = 2; @@ -14108,7 +14115,7 @@ yy566: } yy567: YYDEBUG(567, *YYCURSOR); -#line 1542 "ext/date/lib/parse_date.re" +#line 1549 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshort"); @@ -14121,7 +14128,7 @@ yy567: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 14125 "ext/date/lib/parse_date.c" +#line 14132 "ext/date/lib/parse_date.c" yy568: YYDEBUG(568, *YYCURSOR); yyaccept = 15; @@ -14572,7 +14579,7 @@ yy599: } yy600: YYDEBUG(600, *YYCURSOR); -#line 1611 "ext/date/lib/parse_date.re" +#line 1618 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenodayrev"); @@ -14585,7 +14592,7 @@ yy600: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 14589 "ext/date/lib/parse_date.c" +#line 14596 "ext/date/lib/parse_date.c" yy601: YYDEBUG(601, *YYCURSOR); yych = *++YYCURSOR; @@ -15960,7 +15967,7 @@ yy696: YYDEBUG(696, *YYCURSOR); ++YYCURSOR; YYDEBUG(697, *YYCURSOR); -#line 1597 "ext/date/lib/parse_date.re" +#line 1604 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("datenoday"); @@ -15973,7 +15980,7 @@ yy696: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 15977 "ext/date/lib/parse_date.c" +#line 15984 "ext/date/lib/parse_date.c" yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; @@ -16534,7 +16541,7 @@ yy721: } yy722: YYDEBUG(722, *YYCURSOR); -#line 1192 "ext/date/lib/parse_date.re" +#line 1199 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -16543,7 +16550,7 @@ yy722: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16547 "ext/date/lib/parse_date.c" +#line 16554 "ext/date/lib/parse_date.c" yy723: YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; @@ -16853,7 +16860,7 @@ yy738: if (yych <= '9') goto yy897; yy739: YYDEBUG(739, *YYCURSOR); -#line 1583 "ext/date/lib/parse_date.re" +#line 1590 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pointed date YY"); @@ -16866,7 +16873,7 @@ yy739: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 16870 "ext/date/lib/parse_date.c" +#line 16877 "ext/date/lib/parse_date.c" yy740: YYDEBUG(740, *YYCURSOR); yyaccept = 15; @@ -16978,7 +16985,7 @@ yy751: } yy752: YYDEBUG(752, *YYCURSOR); -#line 1528 "ext/date/lib/parse_date.re" +#line 1535 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("gnudateshorter"); @@ -16991,7 +16998,7 @@ yy752: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 16995 "ext/date/lib/parse_date.c" +#line 17002 "ext/date/lib/parse_date.c" yy753: YYDEBUG(753, *YYCURSOR); yyaccept = 18; @@ -17240,7 +17247,7 @@ yy776: } yy777: YYDEBUG(777, *YYCURSOR); -#line 1454 "ext/date/lib/parse_date.re" +#line 1461 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -17259,7 +17266,7 @@ yy777: TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 17263 "ext/date/lib/parse_date.c" +#line 17270 "ext/date/lib/parse_date.c" yy778: YYDEBUG(778, *YYCURSOR); yyaccept = 19; @@ -18487,7 +18494,7 @@ yy848: } yy849: YYDEBUG(849, *YYCURSOR); -#line 1931 "ext/date/lib/parse_date.re" +#line 1938 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); @@ -18516,7 +18523,7 @@ yy849: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 18520 "ext/date/lib/parse_date.c" +#line 18527 "ext/date/lib/parse_date.c" yy850: YYDEBUG(850, *YYCURSOR); yyaccept = 20; @@ -19560,7 +19567,7 @@ yy925: } yy926: YYDEBUG(926, *YYCURSOR); -#line 1689 "ext/date/lib/parse_date.re" +#line 1696 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgydotd"); @@ -19573,7 +19580,7 @@ yy926: TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 19577 "ext/date/lib/parse_date.c" +#line 19584 "ext/date/lib/parse_date.c" yy927: YYDEBUG(927, *YYCURSOR); yyaccept = 21; @@ -19827,7 +19834,7 @@ yy941: if (yych <= '7') goto yy1059; yy942: YYDEBUG(942, *YYCURSOR); -#line 1722 "ext/date/lib/parse_date.re" +#line 1729 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -19845,7 +19852,7 @@ yy942: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 19849 "ext/date/lib/parse_date.c" +#line 19856 "ext/date/lib/parse_date.c" yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; @@ -20321,7 +20328,7 @@ yy981: if (yych == 'e') goto yy1094; yy982: YYDEBUG(982, *YYCURSOR); -#line 1865 "ext/date/lib/parse_date.re" +#line 1872 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -20337,7 +20344,7 @@ yy982: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 20341 "ext/date/lib/parse_date.c" +#line 20348 "ext/date/lib/parse_date.c" yy983: YYDEBUG(983, *YYCURSOR); yych = *++YYCURSOR; @@ -20684,7 +20691,7 @@ yy1020: YYDEBUG(1020, *YYCURSOR); ++YYCURSOR; YYDEBUG(1021, *YYCURSOR); -#line 1571 "ext/date/lib/parse_date.re" +#line 1578 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -20695,7 +20702,7 @@ yy1020: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 20699 "ext/date/lib/parse_date.c" +#line 20706 "ext/date/lib/parse_date.c" yy1022: YYDEBUG(1022, *YYCURSOR); ++YYCURSOR; @@ -20724,7 +20731,7 @@ yy1024: } yy1025: YYDEBUG(1025, *YYCURSOR); -#line 1502 "ext/date/lib/parse_date.re" +#line 1509 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("iso8601date2"); @@ -20737,7 +20744,7 @@ yy1025: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 20741 "ext/date/lib/parse_date.c" +#line 20748 "ext/date/lib/parse_date.c" yy1026: YYDEBUG(1026, *YYCURSOR); yyaccept = 15; @@ -20957,7 +20964,7 @@ yy1042: } yy1043: YYDEBUG(1043, *YYCURSOR); -#line 1490 "ext/date/lib/parse_date.re" +#line 1497 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -20968,7 +20975,7 @@ yy1043: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 20972 "ext/date/lib/parse_date.c" +#line 20979 "ext/date/lib/parse_date.c" yy1044: YYDEBUG(1044, *YYCURSOR); yyaccept = 26; @@ -21083,7 +21090,7 @@ yy1047: } yy1048: YYDEBUG(1048, *YYCURSOR); -#line 1651 "ext/date/lib/parse_date.re" +#line 1658 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -21094,7 +21101,7 @@ yy1048: TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 21098 "ext/date/lib/parse_date.c" +#line 21105 "ext/date/lib/parse_date.c" yy1049: YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; @@ -21164,7 +21171,7 @@ yy1059: YYDEBUG(1059, *YYCURSOR); ++YYCURSOR; YYDEBUG(1060, *YYCURSOR); -#line 1703 "ext/date/lib/parse_date.re" +#line 1710 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -21182,7 +21189,7 @@ yy1059: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 21186 "ext/date/lib/parse_date.c" +#line 21193 "ext/date/lib/parse_date.c" yy1061: YYDEBUG(1061, *YYCURSOR); yych = *++YYCURSOR; @@ -21245,7 +21252,7 @@ yy1069: if (yych <= '9') goto yy1143; yy1070: YYDEBUG(1070, *YYCURSOR); -#line 1741 "ext/date/lib/parse_date.re" +#line 1748 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextshort"); @@ -21258,7 +21265,7 @@ yy1070: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 21262 "ext/date/lib/parse_date.c" +#line 21269 "ext/date/lib/parse_date.c" yy1071: YYDEBUG(1071, *YYCURSOR); yych = *++YYCURSOR; @@ -21731,7 +21738,7 @@ yy1106: ++YYCURSOR; yy1107: YYDEBUG(1107, *YYCURSOR); -#line 1202 "ext/date/lib/parse_date.re" +#line 1209 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -21742,7 +21749,7 @@ yy1107: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21746 "ext/date/lib/parse_date.c" +#line 21753 "ext/date/lib/parse_date.c" yy1108: YYDEBUG(1108, *YYCURSOR); yyaccept = 28; @@ -22079,7 +22086,7 @@ yy1140: YYDEBUG(1140, *YYCURSOR); ++YYCURSOR; YYDEBUG(1141, *YYCURSOR); -#line 1755 "ext/date/lib/parse_date.re" +#line 1762 "ext/date/lib/parse_date.re" { int length = 0; DEBUG_OUTPUT("pgtextreverse"); @@ -22092,7 +22099,7 @@ yy1140: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 22096 "ext/date/lib/parse_date.c" +#line 22103 "ext/date/lib/parse_date.c" yy1142: YYDEBUG(1142, *YYCURSOR); ++YYCURSOR; @@ -22136,7 +22143,7 @@ yy1144: } yy1145: YYDEBUG(1145, *YYCURSOR); -#line 1297 "ext/date/lib/parse_date.re" +#line 1304 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -22158,7 +22165,7 @@ yy1145: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 22162 "ext/date/lib/parse_date.c" +#line 22169 "ext/date/lib/parse_date.c" yy1146: YYDEBUG(1146, *YYCURSOR); yyaccept = 29; @@ -22482,7 +22489,7 @@ yy1171: } yy1172: YYDEBUG(1172, *YYCURSOR); -#line 1841 "ext/date/lib/parse_date.re" +#line 1848 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -22505,7 +22512,7 @@ yy1172: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22509 "ext/date/lib/parse_date.c" +#line 22516 "ext/date/lib/parse_date.c" yy1173: YYDEBUG(1173, *YYCURSOR); yych = *++YYCURSOR; @@ -22517,7 +22524,7 @@ yy1174: ++YYCURSOR; yy1175: YYDEBUG(1175, *YYCURSOR); -#line 1159 "ext/date/lib/parse_date.re" +#line 1166 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -22528,7 +22535,7 @@ yy1175: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 22532 "ext/date/lib/parse_date.c" +#line 22539 "ext/date/lib/parse_date.c" yy1176: YYDEBUG(1176, *YYCURSOR); yyaccept = 31; @@ -23021,7 +23028,7 @@ yy1222: YYDEBUG(1222, *YYCURSOR); ++YYCURSOR; YYDEBUG(1223, *YYCURSOR); -#line 1907 "ext/date/lib/parse_date.re" +#line 1914 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -23044,7 +23051,7 @@ yy1222: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 23048 "ext/date/lib/parse_date.c" +#line 23055 "ext/date/lib/parse_date.c" yy1224: YYDEBUG(1224, *YYCURSOR); yych = *++YYCURSOR; @@ -23546,7 +23553,7 @@ yy1268: YYDEBUG(1268, *YYCURSOR); ++YYCURSOR; YYDEBUG(1269, *YYCURSOR); -#line 1320 "ext/date/lib/parse_date.re" +#line 1327 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -23567,7 +23574,7 @@ yy1268: TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -#line 23571 "ext/date/lib/parse_date.c" +#line 23578 "ext/date/lib/parse_date.c" yy1270: YYDEBUG(1270, *YYCURSOR); yyaccept = 24; @@ -23614,7 +23621,7 @@ yy1273: YYDEBUG(1273, *YYCURSOR); ++YYCURSOR; YYDEBUG(1274, *YYCURSOR); -#line 1280 "ext/date/lib/parse_date.re" +#line 1287 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("firstdayof | lastdayof"); TIMELIB_INIT; @@ -23630,12 +23637,12 @@ yy1273: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 23634 "ext/date/lib/parse_date.c" +#line 23641 "ext/date/lib/parse_date.c" yy1275: YYDEBUG(1275, *YYCURSOR); ++YYCURSOR; YYDEBUG(1276, *YYCURSOR); -#line 1516 "ext/date/lib/parse_date.re" +#line 1523 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601datex"); TIMELIB_INIT; @@ -23646,7 +23653,7 @@ yy1275: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 23650 "ext/date/lib/parse_date.c" +#line 23657 "ext/date/lib/parse_date.c" yy1277: YYDEBUG(1277, *YYCURSOR); yych = *++YYCURSOR; @@ -23749,7 +23756,7 @@ yy1290: YYDEBUG(1290, *YYCURSOR); ++YYCURSOR; YYDEBUG(1291, *YYCURSOR); -#line 1360 "ext/date/lib/parse_date.re" +#line 1367 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -23768,7 +23775,7 @@ yy1290: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 23772 "ext/date/lib/parse_date.c" +#line 23779 "ext/date/lib/parse_date.c" yy1292: YYDEBUG(1292, *YYCURSOR); yych = *++YYCURSOR; @@ -24192,7 +24199,7 @@ yy1328: if (yych <= '9') goto yy1331; yy1329: YYDEBUG(1329, *YYCURSOR); -#line 1663 "ext/date/lib/parse_date.re" +#line 1670 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -24217,7 +24224,7 @@ yy1329: TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 24221 "ext/date/lib/parse_date.c" +#line 24228 "ext/date/lib/parse_date.c" yy1330: YYDEBUG(1330, *YYCURSOR); yych = *++YYCURSOR; @@ -24587,7 +24594,7 @@ yy1374: if (yych <= ':') goto yy1383; yy1375: YYDEBUG(1375, *YYCURSOR); -#line 1769 "ext/date/lib/parse_date.re" +#line 1776 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -24610,7 +24617,7 @@ yy1375: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 24614 "ext/date/lib/parse_date.c" +#line 24621 "ext/date/lib/parse_date.c" yy1376: YYDEBUG(1376, *YYCURSOR); yyaccept = 33; @@ -24842,7 +24849,7 @@ yy1406: if (yych == ':') goto yy1286; goto yy1329; } -#line 1997 "ext/date/lib/parse_date.re" +#line 2004 "ext/date/lib/parse_date.re" } @@ -24863,10 +24870,10 @@ timelib_time *timelib_strtotime(const char *s, size_t len, timelib_error_contain in.errors->error_messages = NULL; if (len > 0) { - while (isspace(*s) && s < e) { + while (isspace((unsigned char)*s) && s < e) { s++; } - while (isspace(*e) && e > s) { + while (isspace((unsigned char)*e) && e > s) { e--; } }