]> granicus.if.org Git - apache/commitdiff
Use the day and month names exported from APR, rather than duplicating them
authorBrian Pane <brianp@apache.org>
Sun, 21 Apr 2002 08:41:01 +0000 (08:41 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 21 Apr 2002 08:41:01 +0000 (08:41 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94736 13f79535-47bb-0310-9956-ffa450edef68

server/util_time.c

index ec9400de40fc286d0632e976684ace3f80dcf34d..48683a35c83c7d974bdcf1a67901cd5f795b8fe8 100644 (file)
@@ -219,15 +219,6 @@ AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t)
     return APR_SUCCESS;
 }
 
-static const char month_snames[12][4] =
-{
-    "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
-};
-static const char day_snames[7][4] =
-{
-    "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
-};
-
 AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
 {
     /* ### This code is a clone of apr_rfc822_date(), except that it
@@ -242,7 +233,7 @@ AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
     /* example: "Sat, 08 Jan 2000 18:31:41 GMT" */
     /*           12345678901234567890123456789  */
 
-    s = &day_snames[xt.tm_wday][0];
+    s = &apr_day_snames[xt.tm_wday][0];
     *date_str++ = *s++;
     *date_str++ = *s++;
     *date_str++ = *s++;
@@ -251,7 +242,7 @@ AP_DECLARE(apr_status_t) ap_recent_rfc822_date(char *date_str, apr_time_t t)
     *date_str++ = xt.tm_mday / 10 + '0';
     *date_str++ = xt.tm_mday % 10 + '0';
     *date_str++ = ' ';
-    s = &month_snames[xt.tm_mon][0];
+    s = &apr_month_snames[xt.tm_mon][0];
     *date_str++ = *s++;
     *date_str++ = *s++;
     *date_str++ = *s++;