]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
fix strftime() to use RFC1123 format
authorwessels <>
Fri, 25 Oct 1996 23:35:22 +0000 (23:35 +0000)
committerwessels <>
Fri, 25 Oct 1996 23:35:22 +0000 (23:35 +0000)
remove register varaibles.

lib/rfc1123.c
lib/uudecode.c

index 5b5c9bd231834d8d441492848d1a0d3e8471ffb4..8bb729f6e3bcaa303420baa957b61f497400608b 100644 (file)
@@ -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
 #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;
index 0a0008c14951de6d37ec3dfcdc8b3b608389af0f..73f573bc5d42ef8808c29af5ebbda23f3ada5d70 100644 (file)
@@ -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. */