mblaze

Unix utilities to deal with Maildir - my mirror
git clone https://pi.duncano.de/git/mblaze.git
Log | Files | Refs | README | COPYING

commit 6229023e78640519c987273558a8649eac1816ca
parent 45176425e3c11657ce3abb02dcc4162e190990b2
Author: Christian Neukirchen <chneukirchen@gmail.com>
Date:   Mon,  8 Aug 2016 14:03:29 +0200

msed: drop date generation (use mdate)

Diffstat:
msed.c | 16+++-------------
1 file changed, 3 insertions(+), 13 deletions(-)

diff --git a/msed.c b/msed.c @@ -8,7 +8,6 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <time.h> #include <unistd.h> #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) {