From: wessels <> Date: Fri, 25 Oct 1996 23:35:22 +0000 (+0000) Subject: fix strftime() to use RFC1123 format X-Git-Tag: SQUID_3_0_PRE1~5579 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2a8a7464c51034a399ef8ca9d37de4c690fec2d3;p=thirdparty%2Fsquid.git fix strftime() to use RFC1123 format remove register varaibles. --- diff --git a/lib/rfc1123.c b/lib/rfc1123.c index 5b5c9bd231..8bb729f6e3 100644 --- a/lib/rfc1123.c +++ b/lib/rfc1123.c @@ -1,5 +1,5 @@ /* - * $Id: rfc1123.c,v 1.1 1996/10/25 02:15:15 wessels Exp $ + * $Id: rfc1123.c,v 1.2 1996/10/25 17:35:22 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -132,6 +132,9 @@ #include "ansiproto.h" #include "util.h" +#define RFC850_STRFTIME "%A, %d-%b-%y %H:%M:%S GMT" +#define RFC1123_STRFTIME "%a, %d %b %Y %H:%M:%S GMT" + static int make_month _PARAMS((char *s)); static int make_num _PARAMS((char *s)); @@ -259,7 +262,7 @@ mkrfc1123(time_t t) struct tm *gmt = gmtime(&t); buf[0] = '\0'; - (void) strftime(buf, 127, "%A, %d-%b-%y %H:%M:%S GMT", gmt); + strftime(buf, 127, RFC1123_STRFTIME, gmt); return buf; } @@ -293,12 +296,12 @@ mkhttpdlogtime(time_t * t) day_offset = 1; len = strftime(buf, 127 - 5, "%d/%b/%Y:%H:%M:%S ", lt); - (void) sprintf(buf + len, "%+03d%02d", + sprintf(buf + len, "%+03d%02d", (min_offset / 60) % 24, min_offset % 60); #else /* USE_GMT */ buf[0] = '\0'; - (void) strftime(buf, 127, "%d/%b/%Y:%H:%M:%S -000", gmt); + strftime(buf, 127, "%d/%b/%Y:%H:%M:%S -000", gmt); #endif /* USE_GMT */ return buf; diff --git a/lib/uudecode.c b/lib/uudecode.c index 0a0008c149..73f573bc5d 100644 --- a/lib/uudecode.c +++ b/lib/uudecode.c @@ -24,10 +24,10 @@ char * uudecode(char *bufcoded) { int nbytesdecoded; - register unsigned char *bufin; - register char *bufplain; - register unsigned char *bufout; - register int nprbytes; + unsigned char *bufin; + char *bufplain; + unsigned char *bufout; + int nprbytes; /* Strip leading whitespace. */