derick          Wed Jun 15 03:23:27 2005 EDT

  Modified files:              
    /php-src/ext/date   php_date.c 
    /php-src/ext/date/lib       datetime.h parse_date.c timelib_structs.h 
    /php-src/ext/date/lib/resource      parse_date.re 
  Log:
  - Whitespace and regenerate the .c file with my re2c.
  
  
http://cvs.php.net/diff.php/php-src/ext/date/php_date.c?r1=1.4&r2=1.5&ty=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.4 php-src/ext/date/php_date.c:1.5
--- php-src/ext/date/php_date.c:1.4     Tue Jun 14 20:23:14 2005
+++ php-src/ext/date/php_date.c Wed Jun 15 03:23:27 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.4 2005/06/15 00:23:14 edink Exp $ */
+/* $Id: php_date.c,v 1.5 2005/06/15 07:23:27 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -132,7 +132,7 @@
                now = timelib_time_ctor();
                timelib_unixtime2local(now, (timelib_sll) time(NULL), tzi);
        } else {
-               timelib_tzinfo_ctor(tzi);
+               timelib_tzinfo_dtor(tzi);
                RETURN_FALSE;
        }
 
http://cvs.php.net/diff.php/php-src/ext/date/lib/datetime.h?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/date/lib/datetime.h
diff -u php-src/ext/date/lib/datetime.h:1.2 php-src/ext/date/lib/datetime.h:1.3
--- php-src/ext/date/lib/datetime.h:1.2 Tue Jun 14 20:11:29 2005
+++ php-src/ext/date/lib/datetime.h     Wed Jun 15 03:23:27 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: datetime.h,v 1.2 2005/06/15 00:11:29 edink Exp $ */
+/* $Id: datetime.h,v 1.3 2005/06/15 07:23:27 derick Exp $ */
 
 #include "timelib_structs.h"
 
@@ -44,7 +44,7 @@
 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);
http://cvs.php.net/diff.php/php-src/ext/date/lib/parse_date.c?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.2 
php-src/ext/date/lib/parse_date.c:1.3
--- php-src/ext/date/lib/parse_date.c:1.2       Tue Jun 14 20:17:41 2005
+++ php-src/ext/date/lib/parse_date.c   Wed Jun 15 03:23:27 2005
@@ -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"
 /*
    +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.c,v 1.2 2005/06/15 00:17:41 edink Exp $ */
+/* $Id: parse_date.c,v 1.3 2005/06/15 07:23:27 derick Exp $ */
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -120,14 +120,14 @@
 #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 @@
        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 @@
          0,   0,   0,   0,   0,   0,   0,   0, 
        };
 
-#line 40 "<stdout>"
+#line 783 "<stdout>"
 {
        YYCTYPE yych;
        unsigned int yyaccept;
@@ -864,7 +864,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_TIMEZONE;
        }
-#line 118 "<stdout>"
+#line 861 "<stdout>"
 yy4:
        YYDEBUG(4, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -938,7 +938,7 @@
                printf("unexpected character: #%d, %c\n", *s->tok, *s->tok);
                goto std;
        }
-#line 184 "<stdout>"
+#line 927 "<stdout>"
 yy8:
        YYDEBUG(8, *YYCURSOR);
        yyaccept = 0;
@@ -1676,7 +1676,7 @@
 {
                goto std;
        }
-#line 843 "<stdout>"
+#line 1586 "<stdout>"
 yy45:
        YYDEBUG(45, *YYCURSOR);
        ++YYCURSOR;
@@ -1689,7 +1689,7 @@
                s->pos = cursor; s->line++;
                goto std;
        }
-#line 852 "<stdout>"
+#line 1595 "<stdout>"
 yy47:
        YYDEBUG(47, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -2057,7 +2057,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 1149 "<stdout>"
+#line 1892 "<stdout>"
 yy82:
        YYDEBUG(82, *YYCURSOR);
        ++YYCURSOR;
@@ -2684,7 +2684,7 @@
 {
                goto std;
        }
-#line 1642 "<stdout>"
+#line 2385 "<stdout>"
 yy149:
        YYDEBUG(149, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -2741,7 +2741,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 1685 "<stdout>"
+#line 2428 "<stdout>"
 yy156:
        YYDEBUG(156, *YYCURSOR);
        yyaccept = 1;
@@ -3140,7 +3140,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 2016 "<stdout>"
+#line 2759 "<stdout>"
 yy189:
        YYDEBUG(189, *YYCURSOR);
        ++YYCURSOR;
@@ -5297,7 +5297,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_TEXT;
        }
-#line 3773 "<stdout>"
+#line 4516 "<stdout>"
 yy387:
        YYDEBUG(387, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -5378,7 +5378,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NO_DAY;
        }
-#line 3832 "<stdout>"
+#line 4575 "<stdout>"
 yy398:
        YYDEBUG(398, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -5432,7 +5432,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_PG_TEXT;
        }
-#line 3872 "<stdout>"
+#line 4615 "<stdout>"
 yy405:
        YYDEBUG(405, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -5592,7 +5592,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_SHORTDATE_WITH_TIME;
        }
-#line 3994 "<stdout>"
+#line 4737 "<stdout>"
 yy424:
        YYDEBUG(424, *YYCURSOR);
        yyaccept = 7;
@@ -7268,7 +7268,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_AGO;
        }
-#line 5398 "<stdout>"
+#line 6141 "<stdout>"
 yy560:
        YYDEBUG(560, *YYCURSOR);
        yyaccept = 1;
@@ -8923,7 +8923,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_TIME24_WITH_ZONE;
        }
-#line 6829 "<stdout>"
+#line 7572 "<stdout>"
 yy670:
        YYDEBUG(670, *YYCURSOR);
        yyaccept = 10;
@@ -9064,7 +9064,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_TIME12;
        }
-#line 6940 "<stdout>"
+#line 7683 "<stdout>"
 yy685:
        YYDEBUG(685, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -9185,7 +9185,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_FULL;
        }
-#line 7035 "<stdout>"
+#line 7778 "<stdout>"
 yy698:
        YYDEBUG(698, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -9563,7 +9563,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_FULL_POINTED;
        }
-#line 7295 "<stdout>"
+#line 8038 "<stdout>"
 yy757:
        YYDEBUG(757, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -9946,7 +9946,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_ISO_DATE;
        }
-#line 7588 "<stdout>"
+#line 8331 "<stdout>"
 yy802:
        YYDEBUG(802, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -9981,7 +9981,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_AMERICAN;
        }
-#line 7615 "<stdout>"
+#line 8358 "<stdout>"
 yy806:
        YYDEBUG(806, *YYCURSOR);
        yyaccept = 11;
@@ -10218,7 +10218,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_CLF;
        }
-#line 7786 "<stdout>"
+#line 8529 "<stdout>"
 yy839:
        YYDEBUG(839, *YYCURSOR);
        yyaccept = 12;
@@ -10541,7 +10541,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_PG_TEXT;
        }
-#line 8028 "<stdout>"
+#line 8771 "<stdout>"
 yy879:
        YYDEBUG(879, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -10798,7 +10798,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NO_DAY;
        }
-#line 8241 "<stdout>"
+#line 8984 "<stdout>"
 yy899:
        YYDEBUG(899, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -10974,7 +10974,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_ISO_WEEK;
        }
-#line 8375 "<stdout>"
+#line 9118 "<stdout>"
 yy920:
        YYDEBUG(920, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -11018,7 +11018,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_PG_YEARDAY;
        }
-#line 8411 "<stdout>"
+#line 9154 "<stdout>"
 yy924:
        YYDEBUG(924, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -11104,7 +11104,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_DATE_NOCOLON;
        }
-#line 8483 "<stdout>"
+#line 9226 "<stdout>"
 yy931:
        YYDEBUG(931, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -11190,7 +11190,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_XMLRPC_SOAP;
        }
-#line 8547 "<stdout>"
+#line 9290 "<stdout>"
 yy942:
        YYDEBUG(942, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -11881,7 +11881,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_ISO_DATE;
        }
-#line 9050 "<stdout>"
+#line 9793 "<stdout>"
 yy1036:
        YYDEBUG(1036, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -12685,7 +12685,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_GNU_NOCOLON;
        }
-#line 9688 "<stdout>"
+#line 10431 "<stdout>"
 yy1117:
        YYDEBUG(1117, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -12773,7 +12773,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_ISO_NOCOLON;
        }
-#line 9760 "<stdout>"
+#line 10503 "<stdout>"
 yy1125:
        YYDEBUG(1125, *YYCURSOR);
        yyaccept = 19;
@@ -12973,7 +12973,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 9926 "<stdout>"
+#line 10669 "<stdout>"
 yy1141:
        YYDEBUG(1141, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13032,7 +13032,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 9967 "<stdout>"
+#line 10710 "<stdout>"
 yy1150:
        YYDEBUG(1150, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13058,7 +13058,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 9987 "<stdout>"
+#line 10730 "<stdout>"
 yy1153:
        YYDEBUG(1153, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13089,7 +13089,7 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 10012 "<stdout>"
+#line 10755 "<stdout>"
 yy1156:
        YYDEBUG(1156, *YYCURSOR);
        yych = *++YYCURSOR;
@@ -13147,10 +13147,10 @@
                TIMELIB_DEINIT;
                return TIMELIB_RELATIVE;
        }
-#line 10052 "<stdout>"
+#line 10795 "<stdout>"
 }
 #line 1326 "parse_date.re"
-}
+
 }
 
 #define YYMAXFILL 25
http://cvs.php.net/diff.php/php-src/ext/date/lib/timelib_structs.h?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/date/lib/timelib_structs.h
diff -u php-src/ext/date/lib/timelib_structs.h:1.2 
php-src/ext/date/lib/timelib_structs.h:1.3
--- php-src/ext/date/lib/timelib_structs.h:1.2  Tue Jun 14 20:11:29 2005
+++ php-src/ext/date/lib/timelib_structs.h      Wed Jun 15 03:23:27 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: timelib_structs.h,v 1.2 2005/06/15 00:11:29 edink Exp $ */
+/* $Id: timelib_structs.h,v 1.3 2005/06/15 07:23:27 derick Exp $ */
 
 #ifndef __TIMELIB_STRUCTS_H__
 #define __TIMELIB_STRUCTS_H__
@@ -86,32 +86,32 @@
 } 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
http://cvs.php.net/diff.php/php-src/ext/date/lib/resource/parse_date.re?r1=1.2&r2=1.3&ty=u
Index: php-src/ext/date/lib/resource/parse_date.re
diff -u php-src/ext/date/lib/resource/parse_date.re:1.2 
php-src/ext/date/lib/resource/parse_date.re:1.3
--- php-src/ext/date/lib/resource/parse_date.re:1.2     Tue Jun 14 20:11:29 2005
+++ php-src/ext/date/lib/resource/parse_date.re Wed Jun 15 03:23:27 2005
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.re,v 1.2 2005/06/15 00:11:29 edink Exp $ */
+/* $Id: parse_date.re,v 1.3 2005/06/15 07:23:27 derick Exp $ */
 
 #include <stdlib.h>
 #include <stdio.h>
@@ -118,14 +118,14 @@
 #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;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to