From 6229023e78640519c987273558a8649eac1816ca Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Mon, 8 Aug 2016 14:03:29 +0200 Subject: msed: drop date generation (use mdate) --- msed.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'msed.c') diff --git a/msed.c b/msed.c index 0817ed9..20a720b 100644 --- a/msed.c +++ b/msed.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "blaze822.h" @@ -129,7 +128,7 @@ sed(char *file) while (*e && *e != '/') e++; snprintf(headersel, sizeof headersel, - "^(%.*s)*:", e-s, s); + "^(%.*s)*:", (int)(e-s), s); for (s = headersel; *s && *(s+1); s++) if (*s == ':') *s = '|'; @@ -243,7 +242,6 @@ sed(char *file) char *s; char *h = 0; char *v = 0; - char buf[255]; switch (*e) { case 'a': if (he != hs) { @@ -255,16 +253,8 @@ sed(char *file) e++; if (*e == ' ' || *e == '\t' || *e == '\n' || *e == ';' || !*e) { - if (strcasecmp(h, "date") == 0) { - time_t now = time(0); - strftime(buf, sizeof buf, - "%a, %d %b %Y %T %z", - localtime(&now)); - v = buf; - } else { - fprintf(stderr, "no header value for %s\n", h); - exit(1); - } + fprintf(stderr, "no header value for %s\n", h); + exit(1); } else { sep = *e; if (!sep) { -- cgit 1.4.1