]> granicus.if.org Git - php/commitdiff
Rename timelib_get_zone to timelib_parse_zone and export.
authorDerick Rethans <github@derickrethans.nl>
Thu, 6 Feb 2014 01:59:10 +0000 (20:59 -0500)
committerDerick Rethans <github@derickrethans.nl>
Sun, 9 Feb 2014 20:47:48 +0000 (15:47 -0500)
ext/date/lib/parse_date.c
ext/date/lib/parse_date.re
ext/date/lib/timelib.h

index bb4c700d3951e8ec144924bba10b65f5e8db87fb..fd67d8bf52a0b90c7c7fc64a48c66ff5fdcd149a 100644 (file)
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.5 on Sat Jan 25 16:16:11 2014 */
+/* Generated by re2c 0.13.5 on Thu Feb  6 07:35:53 2014 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -751,7 +751,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
        return value;
 }
 
-static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper)
+long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper)
 {
        timelib_tzinfo *res;
        long            retval = 0;
@@ -1006,7 +1006,7 @@ yy4:
                DEBUG_OUTPUT("tzcorrection | tz");
                TIMELIB_INIT;
                TIMELIB_HAVE_TZ();
-               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                if (tz_not_found) {
                        add_error(s, "The timezone could not be found in the database");
                }
@@ -4468,7 +4468,7 @@ yy223:
                }
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -9798,7 +9798,7 @@ yy491:
                }
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -12073,7 +12073,7 @@ yy701:
                s->time->h = timelib_get_nr((char **) &ptr, 2);
                s->time->i = timelib_get_nr((char **) &ptr, 2);
                s->time->s = timelib_get_nr((char **) &ptr, 2);
-               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                if (tz_not_found) {
                        add_error(s, "The timezone could not be found in the database");
                }
@@ -13464,7 +13464,7 @@ yy843:
                if (*ptr == '.') {
                        s->time->f = timelib_get_frac_nr((char **) &ptr, 9);
                        if (*ptr) { /* timezone is optional */
-                               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                                if (tz_not_found) {
                                        add_error(s, "The timezone could not be found in the database");
                                }
@@ -15813,7 +15813,7 @@ yy1076:
                s->time->s = timelib_get_nr((char **) &ptr, 2);
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -25047,7 +25047,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
                        case 'O': /* timezone */
                                {
                                        int tz_not_found;
-                                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                                        if (tz_not_found) {
                                                add_pbf_error(s, "The timezone could not be found in the database", string, begin);
                                        }
index 0bb8fe68b3aa2dc909bf1f5bae24ab537f67e345..e01e292e10230d86b30c1b3eb9c14374bdeb36a0 100644 (file)
@@ -749,7 +749,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found
        return value;
 }
 
-static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper)
+long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper)
 {
        timelib_tzinfo *res;
        long            retval = 0;
@@ -1161,7 +1161,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                }
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -1202,7 +1202,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                                s->time->h = timelib_get_nr((char **) &ptr, 2);
                                s->time->i = timelib_get_nr((char **) &ptr, 2);
                                s->time->s = 0;
-                               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, s->tzdb, tz_get_wrapper);
+                               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, s->tzdb, tz_get_wrapper);
                                break;
                        case 1:
                                s->time->y = timelib_get_nr((char **) &ptr, 4);
@@ -1227,7 +1227,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                s->time->s = timelib_get_nr((char **) &ptr, 2);
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -1429,7 +1429,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                if (*ptr == '.') {
                        s->time->f = timelib_get_frac_nr((char **) &ptr, 9);
                        if (*ptr) { /* timezone is optional */
-                               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                                if (tz_not_found) {
                                        add_error(s, "The timezone could not be found in the database");
                                }
@@ -1532,7 +1532,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                s->time->h = timelib_get_nr((char **) &ptr, 2);
                s->time->i = timelib_get_nr((char **) &ptr, 2);
                s->time->s = timelib_get_nr((char **) &ptr, 2);
-               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                if (tz_not_found) {
                        add_error(s, "The timezone could not be found in the database");
                }
@@ -1645,7 +1645,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                DEBUG_OUTPUT("tzcorrection | tz");
                TIMELIB_INIT;
                TIMELIB_HAVE_TZ();
-               s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+               s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                if (tz_not_found) {
                        add_error(s, "The timezone could not be found in the database");
                }
@@ -1698,7 +1698,7 @@ weekdayof        = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of
                }
 
                if (*ptr != '\0') {
-                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                        if (tz_not_found) {
                                add_error(s, "The timezone could not be found in the database");
                        }
@@ -2054,7 +2054,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim
                        case 'O': /* timezone */
                                {
                                        int tz_not_found;
-                                       s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
+                                       s->time->z = timelib_parse_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper);
                                        if (tz_not_found) {
                                                add_pbf_error(s, "The timezone could not be found in the database", string, begin);
                                        }
index 866eaf3dd23ec02830aefbae2ed8b9fedd28cd18..08484fbec1047a939e5f70ad495eddaa4800c381 100644 (file)
@@ -105,6 +105,7 @@ timelib_sll timelib_get_current_offset(timelib_time *t);
 void timelib_dump_tzinfo(timelib_tzinfo *tz);
 const timelib_tzdb *timelib_builtin_db(void);
 const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count);
+long timelib_parse_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper);
 
 /* From timelib.c */
 timelib_tzinfo* timelib_tzinfo_ctor(char *name);