apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r562890 - /apr/apr-util/trunk/test/testdate.c
Date Sun, 05 Aug 2007 15:29:59 GMT
Author: davi
Date: Sun Aug  5 08:29:58 2007
New Revision: 562890

URL: http://svn.apache.org/viewvc?view=rev&rev=562890
Log:
Remove unused functions in testdate

Modified:
    apr/apr-util/trunk/test/testdate.c

Modified: apr/apr-util/trunk/test/testdate.c
URL: http://svn.apache.org/viewvc/apr/apr-util/trunk/test/testdate.c?view=diff&rev=562890&r1=562889&r2=562890
==============================================================================
--- apr/apr-util/trunk/test/testdate.c (original)
+++ apr/apr-util/trunk/test/testdate.c Sun Aug  5 08:29:58 2007
@@ -17,10 +17,6 @@
 #include "apr_date.h"
 #include "apr_general.h"
 
-void gm_timestr_822(char *ts, apr_time_t sec);
-void gm_timestr_850(char *ts, apr_time_t sec);
-void gm_timestr_ccc(char *ts, apr_time_t sec);
-
 static const apr_time_t year2secs[] = {
              APR_INT64_C(0),    /* 1970 */
       APR_INT64_C(31536000),    /* 1971 */
@@ -97,7 +93,8 @@
     "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"
 };
 
-void gm_timestr_822(char *ts, apr_time_t sec)
+/* XXX: non-portable */
+static void gm_timestr_822(char *ts, apr_time_t sec)
 {
     static const char *const days[7]=
         {"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
@@ -105,43 +102,10 @@
     time_t ls = (time_t)sec;
 
     tms = gmtime(&ls);
- 
+
     sprintf(ts, "%s, %.2d %s %d %.2d:%.2d:%.2d GMT", days[tms->tm_wday],
             tms->tm_mday, month_snames[tms->tm_mon], tms->tm_year + 1900,
             tms->tm_hour, tms->tm_min, tms->tm_sec);
-}
-
-void gm_timestr_850(char *ts, apr_time_t sec)
-{
-    static const char *const days[7]=
-           {"Sunday","Monday", "Tuesday", "Wednesday", "Thursday", "Friday", 
-            "Saturday"};
-    struct tm *tms;
-    int year;
-    time_t ls = (time_t)sec;
- 
-    tms = gmtime(&ls);
-
-    year = tms->tm_year;
-    if (year >= 100) year -= 100;
- 
-    sprintf(ts, "%s, %.2d-%s-%.2d %.2d:%.2d:%.2d GMT", days[tms->tm_wday],
-            tms->tm_mday, month_snames[tms->tm_mon], year,
-            tms->tm_hour, tms->tm_min, tms->tm_sec);
-}
-
-void gm_timestr_ccc(char *ts, apr_time_t sec)
-{
-    static const char *const days[7]=
-       {"Sun","Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
-    struct tm *tms;
-    time_t ls = (time_t)sec;
- 
-    tms = gmtime(&ls);
- 
-    sprintf(ts, "%s %s %2d %.2d:%.2d:%.2d %d", days[tms->tm_wday],
-            month_snames[tms->tm_mon], tms->tm_mday, 
-            tms->tm_hour, tms->tm_min, tms->tm_sec, tms->tm_year + 1900);
 }
 
 /* Linear congruential generator */



Mime
View raw message