From: Derick Rethans Date: Wed, 15 Jun 2005 07:23:27 +0000 (+0000) Subject: - Whitespace and regenerate the .c file with my re2c. X-Git-Tag: php-5.1.0b2~184 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=952a2c8234601cc13c6805b420410f64d389e2dc;p=php - Whitespace and regenerate the .c file with my re2c. --- diff --git a/ext/date/lib/datetime.h b/ext/date/lib/datetime.h index 553a2d0941..3cc4f2d11b 100644 --- a/ext/date/lib/datetime.h +++ b/ext/date/lib/datetime.h @@ -44,7 +44,7 @@ void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options); void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi); /* From unixtime2tm.c */ -int timelib_apply_localtime(timelib_time *t, unsigned int localtime); +int timelib_apply_localtime(timelib_time *t, unsigned int localtime); void timelib_unixtime2gmt(timelib_time* tm, timelib_sll ts); void timelib_unixtime2local(timelib_time *tm, timelib_sll ts, timelib_tzinfo* tz); void timelib_set_timezone(timelib_time *t, timelib_tzinfo *tz); diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 9cd5a8d754..a416c5a97f 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.9.7 on Wed Jun 15 02:15:30 2005 */ +/* Generated by re2c 0.9.7.dev on Wed Jun 15 09:20:28 2005 */ #line 1 "parse_date.re" /* +----------------------------------------------------------------------+ @@ -120,14 +120,14 @@ typedef unsigned char uchar; #include "timelib_structs.h" typedef struct timelib_elems { - unsigned int c; /* Number of elements */ - char **v; /* Values */ + unsigned int c; /* Number of elements */ + char **v; /* Values */ } timelib_elems; typedef struct Scanner { - int fd; - uchar *lim, *str, *ptr, *cur, *tok, *pos; - unsigned int line, len; + int fd; + uchar *lim, *str, *ptr, *cur, *tok, *pos; + unsigned int line, len; struct timelib_time *time; } Scanner; @@ -742,7 +742,7 @@ std: s->tok = cursor; s->len = 0; #line 844 "parse_date.re" -{ + static unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, @@ -779,7 +779,7 @@ std: 0, 0, 0, 0, 0, 0, 0, 0, }; -#line 40 "" +#line 783 "" { YYCTYPE yych; unsigned int yyaccept; @@ -864,7 +864,7 @@ yy3: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 118 "" +#line 861 "" yy4: YYDEBUG(4, *YYCURSOR); yych = *++YYCURSOR; @@ -938,7 +938,7 @@ yy7: printf("unexpected character: #%d, %c\n", *s->tok, *s->tok); goto std; } -#line 184 "" +#line 927 "" yy8: YYDEBUG(8, *YYCURSOR); yyaccept = 0; @@ -1676,7 +1676,7 @@ yy44: { goto std; } -#line 843 "" +#line 1586 "" yy45: YYDEBUG(45, *YYCURSOR); ++YYCURSOR; @@ -1689,7 +1689,7 @@ yy46: s->pos = cursor; s->line++; goto std; } -#line 852 "" +#line 1595 "" yy47: YYDEBUG(47, *YYCURSOR); yych = *++YYCURSOR; @@ -2057,7 +2057,7 @@ yy81: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 1149 "" +#line 1892 "" yy82: YYDEBUG(82, *YYCURSOR); ++YYCURSOR; @@ -2684,7 +2684,7 @@ yy148: { goto std; } -#line 1642 "" +#line 2385 "" yy149: YYDEBUG(149, *YYCURSOR); yych = *++YYCURSOR; @@ -2741,7 +2741,7 @@ yy155: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 1685 "" +#line 2428 "" yy156: YYDEBUG(156, *YYCURSOR); yyaccept = 1; @@ -3140,7 +3140,7 @@ yy188: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 2016 "" +#line 2759 "" yy189: YYDEBUG(189, *YYCURSOR); ++YYCURSOR; @@ -5297,7 +5297,7 @@ yy386: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 3773 "" +#line 4516 "" yy387: YYDEBUG(387, *YYCURSOR); yych = *++YYCURSOR; @@ -5378,7 +5378,7 @@ yy397: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 3832 "" +#line 4575 "" yy398: YYDEBUG(398, *YYCURSOR); yych = *++YYCURSOR; @@ -5432,7 +5432,7 @@ yy404: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 3872 "" +#line 4615 "" yy405: YYDEBUG(405, *YYCURSOR); yych = *++YYCURSOR; @@ -5592,7 +5592,7 @@ yy423: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 3994 "" +#line 4737 "" yy424: YYDEBUG(424, *YYCURSOR); yyaccept = 7; @@ -7268,7 +7268,7 @@ yy559: TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 5398 "" +#line 6141 "" yy560: YYDEBUG(560, *YYCURSOR); yyaccept = 1; @@ -8923,7 +8923,7 @@ yy669: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 6829 "" +#line 7572 "" yy670: YYDEBUG(670, *YYCURSOR); yyaccept = 10; @@ -9064,7 +9064,7 @@ yy684: TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 6940 "" +#line 7683 "" yy685: YYDEBUG(685, *YYCURSOR); yych = *++YYCURSOR; @@ -9185,7 +9185,7 @@ yy697: TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 7035 "" +#line 7778 "" yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; @@ -9563,7 +9563,7 @@ yy756: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 7295 "" +#line 8038 "" yy757: YYDEBUG(757, *YYCURSOR); yych = *++YYCURSOR; @@ -9946,7 +9946,7 @@ yy801: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 7588 "" +#line 8331 "" yy802: YYDEBUG(802, *YYCURSOR); yych = *++YYCURSOR; @@ -9981,7 +9981,7 @@ yy805: TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 7615 "" +#line 8358 "" yy806: YYDEBUG(806, *YYCURSOR); yyaccept = 11; @@ -10218,7 +10218,7 @@ yy838: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 7786 "" +#line 8529 "" yy839: YYDEBUG(839, *YYCURSOR); yyaccept = 12; @@ -10541,7 +10541,7 @@ yy878: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 8028 "" +#line 8771 "" yy879: YYDEBUG(879, *YYCURSOR); yych = *++YYCURSOR; @@ -10798,7 +10798,7 @@ yy898: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 8241 "" +#line 8984 "" yy899: YYDEBUG(899, *YYCURSOR); yych = *++YYCURSOR; @@ -10974,7 +10974,7 @@ yy919: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 8375 "" +#line 9118 "" yy920: YYDEBUG(920, *YYCURSOR); yych = *++YYCURSOR; @@ -11018,7 +11018,7 @@ yy923: TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 8411 "" +#line 9154 "" yy924: YYDEBUG(924, *YYCURSOR); yych = *++YYCURSOR; @@ -11104,7 +11104,7 @@ yy930: TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 8483 "" +#line 9226 "" yy931: YYDEBUG(931, *YYCURSOR); yych = *++YYCURSOR; @@ -11190,7 +11190,7 @@ yy941: TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 8547 "" +#line 9290 "" yy942: YYDEBUG(942, *YYCURSOR); yych = *++YYCURSOR; @@ -11881,7 +11881,7 @@ yy1035: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 9050 "" +#line 9793 "" yy1036: YYDEBUG(1036, *YYCURSOR); yych = *++YYCURSOR; @@ -12685,7 +12685,7 @@ yy1116: TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 9688 "" +#line 10431 "" yy1117: YYDEBUG(1117, *YYCURSOR); yych = *++YYCURSOR; @@ -12773,7 +12773,7 @@ yy1124: TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 9760 "" +#line 10503 "" yy1125: YYDEBUG(1125, *YYCURSOR); yyaccept = 19; @@ -12973,7 +12973,7 @@ yy1140: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 9926 "" +#line 10669 "" yy1141: YYDEBUG(1141, *YYCURSOR); yych = *++YYCURSOR; @@ -13032,7 +13032,7 @@ yy1149: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 9967 "" +#line 10710 "" yy1150: YYDEBUG(1150, *YYCURSOR); yych = *++YYCURSOR; @@ -13058,7 +13058,7 @@ yy1152: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 9987 "" +#line 10730 "" yy1153: YYDEBUG(1153, *YYCURSOR); yych = *++YYCURSOR; @@ -13089,7 +13089,7 @@ yy1155: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 10012 "" +#line 10755 "" yy1156: YYDEBUG(1156, *YYCURSOR); yych = *++YYCURSOR; @@ -13147,10 +13147,10 @@ yy1164: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 10052 "" +#line 10795 "" } #line 1326 "parse_date.re" -} + } #define YYMAXFILL 25 diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 93de7af8d1..3b29682bd8 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -118,14 +118,14 @@ typedef unsigned char uchar; #include "timelib_structs.h" typedef struct timelib_elems { - unsigned int c; /* Number of elements */ - char **v; /* Values */ + unsigned int c; /* Number of elements */ + char **v; /* Values */ } timelib_elems; typedef struct Scanner { - int fd; - uchar *lim, *str, *ptr, *cur, *tok, *pos; - unsigned int line, len; + int fd; + uchar *lim, *str, *ptr, *cur, *tok, *pos; + unsigned int line, len; struct timelib_time *time; } Scanner; diff --git a/ext/date/lib/resource/parse_date.re b/ext/date/lib/resource/parse_date.re index 93de7af8d1..3b29682bd8 100644 --- a/ext/date/lib/resource/parse_date.re +++ b/ext/date/lib/resource/parse_date.re @@ -118,14 +118,14 @@ typedef unsigned char uchar; #include "timelib_structs.h" typedef struct timelib_elems { - unsigned int c; /* Number of elements */ - char **v; /* Values */ + unsigned int c; /* Number of elements */ + char **v; /* Values */ } timelib_elems; typedef struct Scanner { - int fd; - uchar *lim, *str, *ptr, *cur, *tok, *pos; - unsigned int line, len; + int fd; + uchar *lim, *str, *ptr, *cur, *tok, *pos; + unsigned int line, len; struct timelib_time *time; } Scanner; diff --git a/ext/date/lib/timelib_structs.h b/ext/date/lib/timelib_structs.h index eb49ad487b..f3bf325091 100644 --- a/ext/date/lib/timelib_structs.h +++ b/ext/date/lib/timelib_structs.h @@ -86,32 +86,32 @@ typedef struct timelib_rel_time { } timelib_rel_time; typedef struct timelib_time_offset { - int32_t offset; + int32_t offset; unsigned int leap_secs; unsigned int is_dst; - char *abbr; + char *abbr; } timelib_time_offset; typedef struct timelib_time { - timelib_sll y, m, d; /* Year, Month, Day */ - timelib_sll h, i, s; /* Hour, mInute, Second */ - float f; /* Fraction */ - int z; /* GMT offset in minutes */ - char *tz_abbr; /* Timezone abbreviation (display only) */ - timelib_tzinfo *tz_info; /* Timezone structure */ - unsigned int dst; /* Flag if we were parsing a DST zone */ + timelib_sll y, m, d; /* Year, Month, Day */ + timelib_sll h, i, s; /* Hour, mInute, Second */ + float f; /* Fraction */ + int z; /* GMT offset in minutes */ + char *tz_abbr; /* Timezone abbreviation (display only) */ + timelib_tzinfo *tz_info; /* Timezone structure */ + unsigned int dst; /* Flag if we were parsing a DST zone */ timelib_rel_time relative; - timelib_sll sse; /* Seconds since epoch */ + timelib_sll sse; /* Seconds since epoch */ unsigned int have_time, have_date, have_zone, have_relative, have_weekday_relative, have_weeknr_day; - unsigned int sse_uptodate; /* !0 if the sse member is up to date with the date/time members */ - unsigned int tim_uptodate; /* !0 if the date/time members are up to date with the sse member */ - unsigned int is_localtime; /* 1 if the current struct represents localtime, 0 if it is in GMT */ - unsigned int zone_type; /* 1 time offset, - * 3 TimeZone identifier, - * 2 TimeZone abbreviation */ + unsigned int sse_uptodate; /* !0 if the sse member is up to date with the date/time members */ + unsigned int tim_uptodate; /* !0 if the date/time members are up to date with the sse member */ + unsigned int is_localtime; /* 1 if the current struct represents localtime, 0 if it is in GMT */ + unsigned int zone_type; /* 1 time offset, + * 3 TimeZone identifier, + * 2 TimeZone abbreviation */ } timelib_time; #define TIMELIB_ZONETYPE_OFFSET 1 diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 40ff4a9a03..fae5f5556d 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -132,7 +132,7 @@ PHP_FUNCTION(strtotime) now = timelib_time_ctor(); timelib_unixtime2local(now, (timelib_sll) time(NULL), tzi); } else { - timelib_tzinfo_ctor(tzi); + timelib_tzinfo_dtor(tzi); RETURN_FALSE; }