]> granicus.if.org Git - php/commitdiff
revert per Derick request
authorNuno Lopes <nlopess@php.net>
Tue, 27 Jun 2006 21:00:03 +0000 (21:00 +0000)
committerNuno Lopes <nlopess@php.net>
Tue, 27 Jun 2006 21:00:03 +0000 (21:00 +0000)
ext/date/lib/dow.c
ext/date/lib/parse_tz.c
ext/date/lib/timezonedb.h
ext/date/php_date.c

index ca66313a552baf3e767ee54c1439497c0206b810..af0353fdbf2a9103fdfa1d2a97f78588ed3672b3 100644 (file)
@@ -20,8 +20,8 @@
 
 #include "timelib.h"
 
-static const int m_table_common[13] = { -1, 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */
-static const int m_table_leap[13] =   { -1, 6, 2, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */
+static int m_table_common[13] = { -1, 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */
+static int m_table_leap[13] =   { -1, 6, 2, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; /* 1 = jan */
 
 static timelib_sll century_value(timelib_sll j)
 {
@@ -62,10 +62,10 @@ timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d)
 }
 
                                 /*     jan  feb  mar  apr  may  jun  jul  aug  sep  oct  nov  dec */
-static const int d_table_common[13]  = {  0,   0,  31,  59,  90, 120, 151, 181, 212, 243, 273, 304, 334 };
-static const int d_table_leap[13]    = {  0,   0,  31,  60,  91, 121, 152, 182, 213, 244, 274, 305, 335 };
-static const int ml_table_common[13] = {  0,  31,  28,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31 };
-static const int ml_table_leap[13]   = {  0,  31,  29,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31 };
+static int d_table_common[13]  = {  0,   0,  31,  59,  90, 120, 151, 181, 212, 243, 273, 304, 334 };
+static int d_table_leap[13]    = {  0,   0,  31,  60,  91, 121, 152, 182, 213, 244, 274, 305, 335 };
+static int ml_table_common[13] = {  0,  31,  28,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31 };
+static int ml_table_leap[13]   = {  0,  31,  29,  31,  30,  31,  30,  31,  31,  30,  31,  30,  31 };
 
 timelib_sll timelib_day_of_year(timelib_sll y, timelib_sll m, timelib_sll d)
 {
index 46ddb9786da97d24de7a685662fe5d114814c345..d4e6014b179683d167aefcdc760124b79fe71288 100644 (file)
@@ -240,8 +240,8 @@ const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *c
 
 int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb)
 {
-       const unsigned char *tzf;
-       return (seek_to_tz_position(&tzf, timezone, tzdb));
+       unsigned char *tzf;
+       return (seek_to_tz_position((unsigned char**) &tzf, timezone, tzdb));
 }
 
 timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
@@ -249,7 +249,7 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb)
        const unsigned char *tzf;
        timelib_tzinfo *tmp;
 
-       if (seek_to_tz_position(&tzf, timezone, tzdb)) {
+       if (seek_to_tz_position((unsigned char**) &tzf, timezone, tzdb)) {
                tmp = timelib_tzinfo_ctor(timezone);
 
                read_header((char**) &tzf, tmp);
index 4dbe789ed9df2933da72cffa8bcdf61a5506a4e3..ce06e9ea13d9548d930863d9edf942ec76bfe680 100644 (file)
@@ -1,4 +1,4 @@
-static const timelib_tzdb_index_entry timezonedb_idx_builtin[538] = {
+const timelib_tzdb_index_entry timezonedb_idx_builtin[538] = {
        { "Africa/Abidjan"                    , 0x000000 },
        { "Africa/Accra"                      , 0x000049 },
        { "Africa/Addis_Ababa"                , 0x0000E5 },
@@ -539,7 +539,7 @@ static const timelib_tzdb_index_entry timezonedb_idx_builtin[538] = {
        { "Zulu"                              , 0x03904E },
 };
 /* This is a generated file, do not modify */
-static const unsigned char timelib_timezone_db_data_builtin[233606] = {
+const unsigned char timelib_timezone_db_data_builtin[233606] = {
 
 
 /* Africa/Abidjan */
@@ -16492,4 +16492,4 @@ static const unsigned char timelib_timezone_db_data_builtin[233606] = {
 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 
 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, };
 
-static const timelib_tzdb timezonedb_builtin = { "2006.1", 538, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
+const timelib_tzdb timezonedb_builtin = { "2006.1", 538, timezonedb_idx_builtin, timelib_timezone_db_data_builtin };
index 39074111d9dbfea00085258cad30039d3918bc20..1184a10bc61800601bd0e3e7b2faad55d573daae 100644 (file)
@@ -230,8 +230,8 @@ ZEND_DECLARE_MODULE_GLOBALS(date)
 static PHP_GINIT_FUNCTION(date);
 
 /* True global */
-static timelib_tzdb *php_date_global_timezone_db;
-static int php_date_global_timezone_db_enabled;
+timelib_tzdb *php_date_global_timezone_db;
+int php_date_global_timezone_db_enabled;
 
 #define DATE_DEFAULT_LATITUDE "31.7667"
 #define DATE_DEFAULT_LONGITUDE "35.2333"
@@ -637,25 +637,25 @@ PHPAPI timelib_tzinfo *get_timezone_info(TSRMLS_D)
 /* {{{ date() and gmdate() data */
 #include "ext/standard/php_smart_str.h"
 
-static const char *mon_full_names[] = {
+static char *mon_full_names[] = {
        "January", "February", "March", "April",
        "May", "June", "July", "August",
        "September", "October", "November", "December"
 };
 
-static const char *mon_short_names[] = {
+static char *mon_short_names[] = {
        "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
 };
 
-static const char *day_full_names[] = {
+static char *day_full_names[] = {
        "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"
 };
 
-static const char *day_short_names[] = {
+static char *day_short_names[] = {
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
 };
 
-static const char *english_suffix(timelib_sll number)
+static char *english_suffix(timelib_sll number)
 {
        if (number >= 10 && number <= 19) {
                return "th";
@@ -671,16 +671,16 @@ static const char *english_suffix(timelib_sll number)
 /* }}} */
 
 /* {{{ day of week helpers */
-static const char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
+char *php_date_full_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
 {
        timelib_sll day_of_week = timelib_day_of_week(y, m, d);
        if (day_of_week < 0) {
                return "Unknown";
        } 
-       return day_full_names[day_of_week];
+       return day_full_names[day_of_week];     
 }
 
-static const char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
+char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
 {
        timelib_sll day_of_week = timelib_day_of_week(y, m, d);
        if (day_of_week < 0) {