derick          Tue Jul  8 17:56:36 2008 UTC

  Modified files:              
    /php-src/ext/date   php_date.c 
    /php-src/ext/date/lib       parse_date.c parse_date.re 
                                parse_iso_intervals.c tm2unixtime.c 
  Log:
  - Replaced // by /* .. */ comments.
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/date/php_date.c?r1=1.190&r2=1.191&diff_format=u
Index: php-src/ext/date/php_date.c
diff -u php-src/ext/date/php_date.c:1.190 php-src/ext/date/php_date.c:1.191
--- php-src/ext/date/php_date.c:1.190   Tue Jul  8 17:40:34 2008
+++ php-src/ext/date/php_date.c Tue Jul  8 17:56:35 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_date.c,v 1.190 2008/07/08 17:40:34 derick Exp $ */
+/* $Id: php_date.c,v 1.191 2008/07/08 17:56:35 derick Exp $ */
 
 #include "php.h"
 #include "php_streams.h"
@@ -310,9 +310,9 @@
        int             initialized;
        int             type;
        union {
-               timelib_tzinfo *tz; // TIMELIB_ZONETYPE_ID;
-               timelib_sll     utc_offset; // TIMELIB_ZONETYPE_OFFSET
-               struct                      // TIMELIB_ZONETYPE_ABBR
+               timelib_tzinfo *tz; /* TIMELIB_ZONETYPE_ID; */
+               timelib_sll     utc_offset; /* TIMELIB_ZONETYPE_OFFSET */
+               struct                      /* TIMELIB_ZONETYPE_ABBR */
                {
                        timelib_sll  utc_offset;
                        char        *abbr;
@@ -2001,7 +2001,7 @@
                return props;
        }
 
-       // first we add the date and time in ISO format
+       /* first we add the date and time in ISO format */
        str = date_format("Y-m-d H:i:s", 12, &return_len, dateobj->time, 1, 0 
TSRMLS_CC);
        MAKE_STD_ZVAL(zv);
        if (UG(unicode)) {
@@ -2011,7 +2011,7 @@
        }
        zend_hash_update(props, "date", 5, &zv, sizeof(zval), NULL);
 
-       // then we add the timezone name (or similar)
+       /* then we add the timezone name (or similar) */
        if (dateobj->time->is_localtime) {
                MAKE_STD_ZVAL(zv);
                ZVAL_LONG(zv, dateobj->time->zone_type);
@@ -2264,7 +2264,7 @@
                dateobj->time = timelib_strtotime(time_str_len ? time_str : 
"now", time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB);
        }
 
-       // update last errors and warnings
+       /* update last errors and warnings */
        update_errors_warnings(err TSRMLS_CC);
 
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.c?r1=1.88&r2=1.89&diff_format=u
Index: php-src/ext/date/lib/parse_date.c
diff -u php-src/ext/date/lib/parse_date.c:1.88 
php-src/ext/date/lib/parse_date.c:1.89
--- php-src/ext/date/lib/parse_date.c:1.88      Sun May  4 20:50:46 2008
+++ php-src/ext/date/lib/parse_date.c   Tue Jul  8 17:56:35 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Sun May  4 22:48:05 2008 */
+/* Generated by re2c 0.13.4 on Tue Jul  8 19:51:01 2008 */
 #line 1 "ext/date/lib/parse_date.re"
 /*
    +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.c,v 1.88 2008/05/04 20:50:46 derick Exp $ */
+/* $Id: parse_date.c,v 1.89 2008/07/08 17:56:35 derick Exp $ */
 
 #include "timelib.h"
 
@@ -19051,7 +19051,7 @@
                TIMELIB_INIT;
                TIMELIB_HAVE_RELATIVE();
 
-               // skip "last day of" or "first day of"
+               /* skip "last day of" or "first day of" */
                if (*ptr == 'l') {
                        s->time->relative.first_last_day_of = 2;
                } else {
@@ -23398,17 +23398,17 @@
        while (*fptr && *ptr) {
                begin = ptr;
                switch (*fptr) {
-                       case 'd': // two digit day, with leading zero
-                       case 'j': // two digit day, without leading zero
+                       case 'd': /* two digit day, with leading zero */
+                       case 'j': /* two digit day, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->d = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit day could 
not be found", string, begin);
                                }
                                break;
-                       case 'S': // day suffix, ignored, nor checked
+                       case 'S': /* day suffix, ignored, nor checked */
                                timelib_skip_day_suffix((char **) &ptr);
                                break;
-                       case 'z': // day of year - resets month (0 based)
+                       case 'z': /* day of year - resets month (0 based) */
                                TIMELIB_CHECK_NUMBER;
                                if ((tmp = timelib_get_nr((char **) &ptr, 3)) 
== TIMELIB_UNSET) {
                                        add_pbf_error(s, "A three digit 
day-of-year could not be found", string, begin);
@@ -23418,15 +23418,15 @@
                                }
                                break;
 
-                       case 'm': // two digit month, with leading zero
-                       case 'n': // two digit month, without leading zero
+                       case 'm': /* two digit month, with leading zero */
+                       case 'n': /* two digit month, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->m = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit month 
could not be found", string, begin);
                                }
                                break;
-                       case 'M': // three letter month
-                       case 'F': // full month
+                       case 'M': /* three letter month */
+                       case 'F': /* full month */
                                tmp = timelib_lookup_month((char **) &ptr);
                                if (!tmp) {
                                        add_pbf_error(s, "A textual month could 
not be found", string, begin);
@@ -23434,21 +23434,21 @@
                                        s->time->m = tmp;
                                }
                                break;
-                       case 'y': // two digit year
+                       case 'y': /* two digit year */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->y = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit year 
could not be found", string, begin);
                                }
                                TIMELIB_PROCESS_YEAR(s->time->y);
                                break;
-                       case 'Y': // four digit year
+                       case 'Y': /* four digit year */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->y = timelib_get_nr((char **) 
&ptr, 4)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A four digit year 
could not be found", string, begin);
                                }
                                break;
-                       case 'g': // two digit hour, with leading zero
-                       case 'h': // two digit hour, without leading zero
+                       case 'g': /* two digit hour, with leading zero */
+                       case 'h': /* two digit hour, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->h = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit hour 
could not be found", string, begin);
@@ -23457,15 +23457,15 @@
                                        add_pbf_error(s, "Hour can not be 
higher than 12", string, begin);
                                }
                                break;
-                       case 'G': // two digit hour, with leading zero
-                       case 'H': // two digit hour, without leading zero
+                       case 'G': /* two digit hour, with leading zero */
+                       case 'H': /* two digit hour, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->h = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit hour 
could not be found", string, begin);
                                }
                                break;
-                       case 'a': // am/pm/a.m./p.m.
-                       case 'A': // AM/PM/A.M./P.M.
+                       case 'a': /* am/pm/a.m./p.m. */
+                       case 'A': /* AM/PM/A.M./P.M. */
                                if (s->time->h == TIMELIB_UNSET) {
                                        add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
                                } else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
@@ -23474,28 +23474,28 @@
                                        s->time->h += tmp;
                                }
                                break;
-                       case 'i': // two digit minute, with leading zero
+                       case 'i': /* two digit minute, with leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->i = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit minute 
could not be found", string, begin);
                                }
                                break;
-                       case 's': // two digit second, with leading zero
+                       case 's': /* two digit second, with leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->s = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit second 
could not be found", string, begin);
                                }
                                break;
-                       case 'u': // five digit millisecond, with leading zero
+                       case 'u': /* five digit millisecond, with leading zero 
*/
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->f = timelib_get_nr((char **) 
&ptr, 5)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A five digit 
millisecond could not be found", string, begin);
                                }
                                break;
-                       case ' ': // any sort of whitespace (' ' and \t)
+                       case ' ': /* any sort of whitespace (' ' and \t) */
                                timelib_eat_spaces((char **) &ptr);
                                break;
-                       case 'U': // epoch seconds
+                       case 'U': /* epoch seconds */
                                TIMELIB_CHECK_NUMBER;
                                TIMELIB_HAVE_RELATIVE();
                                tmp = timelib_get_unsigned_nr((char **) &ptr, 
24);
@@ -23510,7 +23510,7 @@
                                s->time->z = 0;
                                break;
 
-                       case 'e': // timezone
+                       case 'e': /* timezone */
                                {
                                        int tz_not_found;
                                        s->time->z = timelib_get_zone((char **) 
&ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb);
@@ -23520,7 +23520,7 @@
                                }
                                break;
 
-                       case '#': // separation symbol
+                       case '#': /* separation symbol */
                                if (*ptr == ';' || *ptr == ':' || *ptr == '/' 
|| *ptr == '.' || *ptr == ',' || *ptr == '-') {
                                        ++ptr;
                                } else {
@@ -23541,16 +23541,16 @@
                                }
                                break;
 
-                       case '!': // reset all fields to default
+                       case '!': /* reset all fields to default */
                                s->time->y = 1970;
                                s->time->m = 1;
                                s->time->d = 1;
                                s->time->h = s->time->i = s->time->s = 0;
                                s->time->f = 0.0;
                                s->time->tz_info = NULL;
-                               break; // break intentionally not missing
+                               break; /* break intentionally not missing */
 
-                       case '|': // reset all fields to default when not set
+                       case '|': /* reset all fields to default when not set */
                                if (s->time->y == TIMELIB_UNSET ) s->time->y = 
1970;
                                if (s->time->m == TIMELIB_UNSET ) s->time->m = 
1;
                                if (s->time->d == TIMELIB_UNSET ) s->time->d = 
1;
@@ -23559,13 +23559,13 @@
                                if (s->time->s == TIMELIB_UNSET ) s->time->s = 
0;
                                if (s->time->f == TIMELIB_UNSET ) s->time->f = 
0.0;
                                
-                               break; // break intentionally not missing
+                               break; /* break intentionally not missing */
 
-                       case '?': // random char
+                       case '?': /* random char */
                                ++ptr;
                                break;
 
-                       case '*': // random chars until a separator or number 
([ \t.,:;/-0123456789])
+                       case '*': /* random chars until a separator or number 
([ \t.,:;/-0123456789]) */
                                timelib_eat_until_separator((char **) &ptr);
                                break;
 
@@ -23584,7 +23584,7 @@
                add_pbf_error(s, "Data missing", string, ptr);
        }
 
-       // clean up a bit
+       /* clean up a bit */
        if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || 
s->time->s != TIMELIB_UNSET) {
                if (s->time->h == TIMELIB_UNSET ) {
                        s->time->h = 0;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_date.re?r1=1.79&r2=1.80&diff_format=u
Index: php-src/ext/date/lib/parse_date.re
diff -u php-src/ext/date/lib/parse_date.re:1.79 
php-src/ext/date/lib/parse_date.re:1.80
--- php-src/ext/date/lib/parse_date.re:1.79     Sun May  4 20:50:46 2008
+++ php-src/ext/date/lib/parse_date.re  Tue Jul  8 17:56:36 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_date.re,v 1.79 2008/05/04 20:50:46 derick Exp $ */
+/* $Id: parse_date.re,v 1.80 2008/07/08 17:56:36 derick Exp $ */
 
 #include "timelib.h"
 
@@ -1049,7 +1049,7 @@
                TIMELIB_INIT;
                TIMELIB_HAVE_RELATIVE();
 
-               // skip "last day of" or "first day of"
+               /* skip "last day of" or "first day of" */
                if (*ptr == 'l') {
                        s->time->relative.first_last_day_of = 2;
                } else {
@@ -1818,17 +1818,17 @@
        while (*fptr && *ptr) {
                begin = ptr;
                switch (*fptr) {
-                       case 'd': // two digit day, with leading zero
-                       case 'j': // two digit day, without leading zero
+                       case 'd': /* two digit day, with leading zero */
+                       case 'j': /* two digit day, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->d = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit day could 
not be found", string, begin);
                                }
                                break;
-                       case 'S': // day suffix, ignored, nor checked
+                       case 'S': /* day suffix, ignored, nor checked */
                                timelib_skip_day_suffix((char **) &ptr);
                                break;
-                       case 'z': // day of year - resets month (0 based)
+                       case 'z': /* day of year - resets month (0 based) */
                                TIMELIB_CHECK_NUMBER;
                                if ((tmp = timelib_get_nr((char **) &ptr, 3)) 
== TIMELIB_UNSET) {
                                        add_pbf_error(s, "A three digit 
day-of-year could not be found", string, begin);
@@ -1838,15 +1838,15 @@
                                }
                                break;
 
-                       case 'm': // two digit month, with leading zero
-                       case 'n': // two digit month, without leading zero
+                       case 'm': /* two digit month, with leading zero */
+                       case 'n': /* two digit month, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->m = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit month 
could not be found", string, begin);
                                }
                                break;
-                       case 'M': // three letter month
-                       case 'F': // full month
+                       case 'M': /* three letter month */
+                       case 'F': /* full month */
                                tmp = timelib_lookup_month((char **) &ptr);
                                if (!tmp) {
                                        add_pbf_error(s, "A textual month could 
not be found", string, begin);
@@ -1854,21 +1854,21 @@
                                        s->time->m = tmp;
                                }
                                break;
-                       case 'y': // two digit year
+                       case 'y': /* two digit year */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->y = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit year 
could not be found", string, begin);
                                }
                                TIMELIB_PROCESS_YEAR(s->time->y);
                                break;
-                       case 'Y': // four digit year
+                       case 'Y': /* four digit year */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->y = timelib_get_nr((char **) 
&ptr, 4)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A four digit year 
could not be found", string, begin);
                                }
                                break;
-                       case 'g': // two digit hour, with leading zero
-                       case 'h': // two digit hour, without leading zero
+                       case 'g': /* two digit hour, with leading zero */
+                       case 'h': /* two digit hour, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->h = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit hour 
could not be found", string, begin);
@@ -1877,15 +1877,15 @@
                                        add_pbf_error(s, "Hour can not be 
higher than 12", string, begin);
                                }
                                break;
-                       case 'G': // two digit hour, with leading zero
-                       case 'H': // two digit hour, without leading zero
+                       case 'G': /* two digit hour, with leading zero */
+                       case 'H': /* two digit hour, without leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->h = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit hour 
could not be found", string, begin);
                                }
                                break;
-                       case 'a': // am/pm/a.m./p.m.
-                       case 'A': // AM/PM/A.M./P.M.
+                       case 'a': /* am/pm/a.m./p.m. */
+                       case 'A': /* AM/PM/A.M./P.M. */
                                if (s->time->h == TIMELIB_UNSET) {
                                        add_pbf_error(s, "Meridian can only 
come after an hour has been found", string, begin);
                                } else if ((tmp = 
timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) {
@@ -1894,28 +1894,28 @@
                                        s->time->h += tmp;
                                }
                                break;
-                       case 'i': // two digit minute, with leading zero
+                       case 'i': /* two digit minute, with leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->i = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit minute 
could not be found", string, begin);
                                }
                                break;
-                       case 's': // two digit second, with leading zero
+                       case 's': /* two digit second, with leading zero */
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->s = timelib_get_nr((char **) 
&ptr, 2)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A two digit second 
could not be found", string, begin);
                                }
                                break;
-                       case 'u': // five digit millisecond, with leading zero
+                       case 'u': /* five digit millisecond, with leading zero 
*/
                                TIMELIB_CHECK_NUMBER;
                                if ((s->time->f = timelib_get_nr((char **) 
&ptr, 5)) == TIMELIB_UNSET) {
                                        add_pbf_error(s, "A five digit 
millisecond could not be found", string, begin);
                                }
                                break;
-                       case ' ': // any sort of whitespace (' ' and \t)
+                       case ' ': /* any sort of whitespace (' ' and \t) */
                                timelib_eat_spaces((char **) &ptr);
                                break;
-                       case 'U': // epoch seconds
+                       case 'U': /* epoch seconds */
                                TIMELIB_CHECK_NUMBER;
                                TIMELIB_HAVE_RELATIVE();
                                tmp = timelib_get_unsigned_nr((char **) &ptr, 
24);
@@ -1930,7 +1930,7 @@
                                s->time->z = 0;
                                break;
 
-                       case 'e': // timezone
+                       case 'e': /* timezone */
                                {
                                        int tz_not_found;
                                        s->time->z = timelib_get_zone((char **) 
&ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb);
@@ -1940,7 +1940,7 @@
                                }
                                break;
 
-                       case '#': // separation symbol
+                       case '#': /* separation symbol */
                                if (*ptr == ';' || *ptr == ':' || *ptr == '/' 
|| *ptr == '.' || *ptr == ',' || *ptr == '-') {
                                        ++ptr;
                                } else {
@@ -1961,16 +1961,16 @@
                                }
                                break;
 
-                       case '!': // reset all fields to default
+                       case '!': /* reset all fields to default */
                                s->time->y = 1970;
                                s->time->m = 1;
                                s->time->d = 1;
                                s->time->h = s->time->i = s->time->s = 0;
                                s->time->f = 0.0;
                                s->time->tz_info = NULL;
-                               break; // break intentionally not missing
+                               break; /* break intentionally not missing */
 
-                       case '|': // reset all fields to default when not set
+                       case '|': /* reset all fields to default when not set */
                                if (s->time->y == TIMELIB_UNSET ) s->time->y = 
1970;
                                if (s->time->m == TIMELIB_UNSET ) s->time->m = 
1;
                                if (s->time->d == TIMELIB_UNSET ) s->time->d = 
1;
@@ -1979,13 +1979,13 @@
                                if (s->time->s == TIMELIB_UNSET ) s->time->s = 
0;
                                if (s->time->f == TIMELIB_UNSET ) s->time->f = 
0.0;
                                
-                               break; // break intentionally not missing
+                               break; /* break intentionally not missing */
 
-                       case '?': // random char
+                       case '?': /* random char */
                                ++ptr;
                                break;
 
-                       case '*': // random chars until a separator or number 
([ \t.,:;/-0123456789])
+                       case '*': /* random chars until a separator or number 
([ \t.,:;/-0123456789]) */
                                timelib_eat_until_separator((char **) &ptr);
                                break;
 
@@ -2004,7 +2004,7 @@
                add_pbf_error(s, "Data missing", string, ptr);
        }
 
-       // clean up a bit
+       /* clean up a bit */
        if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || 
s->time->s != TIMELIB_UNSET) {
                if (s->time->h == TIMELIB_UNSET ) {
                        s->time->h = 0;
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/parse_iso_intervals.c?r1=1.3&r2=1.4&diff_format=u
Index: php-src/ext/date/lib/parse_iso_intervals.c
diff -u php-src/ext/date/lib/parse_iso_intervals.c:1.3 
php-src/ext/date/lib/parse_iso_intervals.c:1.4
--- php-src/ext/date/lib/parse_iso_intervals.c:1.3      Sun May  4 09:59:42 2008
+++ php-src/ext/date/lib/parse_iso_intervals.c  Tue Jul  8 17:56:36 2008
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.13.4 on Sun May  4 11:58:27 2008 */
+/* Generated by re2c 0.13.4 on Tue Jul  8 19:51:01 2008 */
 #line 1 "ext/date/lib/parse_iso_intervals.re"
 /*
    +----------------------------------------------------------------------+
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: parse_iso_intervals.c,v 1.3 2008/05/04 09:59:42 derick Exp $ */
+/* $Id: parse_iso_intervals.c,v 1.4 2008/07/08 17:56:36 derick Exp $ */
 
 #include "timelib.h"
 
http://cvs.php.net/viewvc.cgi/php-src/ext/date/lib/tm2unixtime.c?r1=1.27&r2=1.28&diff_format=u
Index: php-src/ext/date/lib/tm2unixtime.c
diff -u php-src/ext/date/lib/tm2unixtime.c:1.27 
php-src/ext/date/lib/tm2unixtime.c:1.28
--- php-src/ext/date/lib/tm2unixtime.c:1.27     Sun May  4 20:50:46 2008
+++ php-src/ext/date/lib/tm2unixtime.c  Tue Jul  8 17:56:36 2008
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: tm2unixtime.c,v 1.27 2008/05/04 20:50:46 derick Exp $ */
+/* $Id: tm2unixtime.c,v 1.28 2008/07/08 17:56:36 derick Exp $ */
 
 #include "timelib.h"
 
@@ -184,10 +184,10 @@
                time->y += time->relative.y;
        }
        switch (time->relative.first_last_day_of) {
-               case 1: // first
+               case 1: /* first */
                        time->d = 1;
                        break;
-               case 2: // last
+               case 2: /* last */
                        time->d = 0;
                        time->m++;
                        break;
@@ -203,43 +203,43 @@
 
        current_dow = timelib_day_of_week(time->y, time->m, time->d);
        if (count == 0) {
-               // skip over saturday and sunday
+               /* skip over saturday and sunday */
                if (current_dow == 6) {
                        time->d += 2;
                }
-               // skip over sunday
+               /* skip over sunday */
                if (current_dow == 0) {
                        time->d += 1;
                }
        } else if (count > 0) {
-               // skip over saturday and sunday
+               /* skip over saturday and sunday */
                if (current_dow == 5) {
                        time->d += 2;
                }
-               // skip over sunday
+               /* skip over sunday */
                if (current_dow == 6) {
                        time->d += 1;
                }
-               // add increments of 5 weekdays as a week
+               /* add increments of 5 weekdays as a week */
                time->d += (count / 5) * 7;
-               // if current DOW plus the remainder > 5, add two days
+               /* if current DOW plus the remainder > 5, add two days */
                current_dow = timelib_day_of_week(time->y, time->m, time->d);
                time->d += (count % 5);
                if ((count % 5) + current_dow > 5) {
                        time->d += 2;
                }
        } else if (count < 0) {
-               // skip over sunday and saturday
+               /* skip over sunday and saturday */
                if (current_dow == 1) {
                        time->d -= 2;
                }
-               // skip over satruday
+               /* skip over satruday */
                if (current_dow == 0 ) {
                        time->d -= 1;
                }
-               // subtract increments of 5 weekdays as a week
+               /* subtract increments of 5 weekdays as a week */
                time->d += (count / 5) * 7;
-               // if current DOW minus the remainder < 0, subtract two days
+               /* if current DOW minus the remainder < 0, subtract two days */
                current_dow = timelib_day_of_week(time->y, time->m, time->d);
                time->d += (count % 5);
                if ((count % 5) + current_dow < 1) {
@@ -285,10 +285,10 @@
        timelib_sll res = 0;
        timelib_sll eras;
 
-       eras = (year - 1970) / 400;
+       eras = (year - 1970) / 40000;
        if (eras != 0) {
-               year = year - (eras * 400);
-               res += (SECS_PER_ERA * eras);
+               year = year - (eras * 40000);
+               res += (SECS_PER_ERA * eras * 100);
        }
 
        if (year >= 1970) {

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

Reply via email to