You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Thom May <th...@planetarytramp.net> on 2002/04/01 18:58:40 UTC
[PATCH] Rename apr_explode_localtime to apr_time_exp_lt
As the subject. compiled and tested.
--
Thom May -> thom@planetarytramp.net
* liiwi starts planning breakfast
<aj> "And then, squadron A will attempt to extract the cereal from quadrant 34,
while teams F and Q ensure the lactic fluid remains chilled and readily
available..."
? autom4te.cache
? docs/docroot/error/include/public_html
? srclib/apr
Index: modules/mappers/mod_rewrite.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/mappers/mod_rewrite.c,v
retrieving revision 1.104
diff -u -u -r1.104 mod_rewrite.c
--- modules/mappers/mod_rewrite.c 20 Mar 2002 17:41:55 -0000 1.104
+++ modules/mappers/mod_rewrite.c 1 Apr 2002 14:44:46 -0000
@@ -3244,7 +3244,7 @@
char tstr[80];
apr_size_t len;
- apr_explode_localtime(&t, apr_time_now());
+ apr_time_exp_lt(&t, apr_time_now());
apr_strftime(tstr, &len, 80, "[%d/%b/%Y:%H:%M:%S ", &t);
apr_snprintf(tstr + strlen(tstr), 80-strlen(tstr), "%c%.2d%.2d]",
@@ -3527,12 +3527,12 @@
/* XXX: wow this has gotta be slow if you actually use it for a lot, recalculates exploded time for each variable */
/* underlaying Unix system stuff */
else if (strcasecmp(var, "TIME_YEAR") == 0) {
- apr_explode_localtime(&tm, apr_time_now());
+ apr_time_exp_lt(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf), "%04d", tm.tm_year + 1900);
result = resultbuf;
}
#define MKTIMESTR(format, tmfield) \
- apr_explode_localtime(&tm, apr_time_now()); \
+ apr_time_exp_lt(&tm, apr_time_now()); \
apr_snprintf(resultbuf, sizeof(resultbuf), format, tm.tmfield); \
result = resultbuf;
else if (strcasecmp(var, "TIME_MON") == 0) {
@@ -3554,7 +3554,7 @@
MKTIMESTR("%d", tm_wday)
}
else if (strcasecmp(var, "TIME") == 0) {
- apr_explode_localtime(&tm, apr_time_now());
+ apr_time_exp_lt(&tm, apr_time_now());
apr_snprintf(resultbuf, sizeof(resultbuf),
"%04d%02d%02d%02d%02d%02d", tm.tm_year + 1900,
tm.tm_mon+1, tm.tm_mday,
Index: modules/ssl/ssl_engine_log.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/ssl/ssl_engine_log.c,v
retrieving revision 1.16
diff -u -u -r1.16 ssl_engine_log.c
--- modules/ssl/ssl_engine_log.c 28 Mar 2002 17:11:12 -0000 1.16
+++ modules/ssl/ssl_engine_log.c 1 Apr 2002 14:44:48 -0000
@@ -212,7 +212,7 @@
if (add & SSL_NO_TIMESTAMP)
tstr[0] = NUL;
else {
- apr_explode_localtime(&t, apr_time_now());
+ apr_time_exp_lt(&t, apr_time_now());
apr_strftime(tstr, &len, 80, "[%d/%b/%Y %H:%M:%S", &t);
apr_snprintf(tstr + strlen(tstr), 80 - strlen(tstr), " %05d] ",
(unsigned int)getpid());
Index: server/util.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/util.c,v
retrieving revision 1.123
diff -u -u -r1.123 util.c
--- server/util.c 21 Mar 2002 10:10:40 -0000 1.123
+++ server/util.c 1 Apr 2002 14:44:58 -0000
@@ -180,7 +180,7 @@
fmt = tf;
}
else {
- apr_explode_localtime(&xt, t);
+ apr_time_exp_lt(&xt, t);
}
/* check return code? */
Index: server/util_time.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/server/util_time.c,v
retrieving revision 1.6
diff -u -u -r1.6 util_time.c
--- server/util_time.c 21 Mar 2002 10:10:41 -0000 1.6
+++ server/util_time.c 1 Apr 2002 14:44:59 -0000
@@ -133,7 +133,7 @@
return apr_time_exp_gmt(xt, t);
}
else {
- return apr_explode_localtime(xt, t);
+ return apr_time_exp_lt(xt, t);
}
}
else {
@@ -148,7 +148,7 @@
r = apr_time_exp_gmt(xt, t);
}
else {
- r = apr_explode_localtime(xt, t);
+ r = apr_time_exp_lt(xt, t);
}
if (!APR_STATUS_IS_SUCCESS(r)) {
return r;
@@ -177,7 +177,7 @@
AP_DECLARE(apr_status_t) ap_recent_ctime(char *date_str, apr_time_t t)
{
/* ### This code is a clone of apr_ctime(), except that it
- * uses ap_explode_recent_localtime() instead of apr_explode_localtime().
+ * uses ap_explode_recent_localtime() instead of apr_time_exp_lt().
*/
apr_time_exp_t xt;
const char *s;