]> git.lizzy.rs Git - plan9front.git/commitdiff
upas/fs: remove unused function date822tounix
authorAlex Musolino <alex@musolino.id.au>
Tue, 1 Sep 2020 12:55:06 +0000 (22:25 +0930)
committerAlex Musolino <alex@musolino.id.au>
Tue, 1 Sep 2020 12:55:06 +0000 (22:25 +0930)
sys/src/cmd/upas/fs/dat.h
sys/src/cmd/upas/fs/mbox.c

index 27e84baf8563d4f7d6ed6cc72a5ccd06db5f2273..85958d638a8485bb4b1f36cb7dc5367b961babfa 100644 (file)
@@ -238,7 +238,6 @@ ulong               countlines(Message*);
 void           parse(Mailbox*, Message*, int, int);
 void           parseheaders(Mailbox*, Message*, int, int);
 void           parsebody(Message*, Mailbox*);
-char*          date822tounix(Message*, char*);
 int            strtotm(char*, Tm*);
 char*          lowercase(char*);
 
index 1ae11300faecd1889171cea87e38a0c55e884289..7bb58b5552b3163ca2cd61e91fdf5c7cb1979c79 100644 (file)
@@ -1676,28 +1676,3 @@ eprint(char *fmt, ...)
        syslog(Sflag, logf, "%s", buf);
        fprint(2, "%s", buf2);
 }
-
-/*
- *  convert an RFC822 date into a Unix style date
- *  for when the Unix From line isn't there (e.g. POP3).
- *  enough client programs depend on having a Unix date
- *  that it's easiest to write this conversion code once, right here.
- *
- *  people don't follow RFC822 particularly closely,
- *  so we use strtotm, which is a bunch of heuristics.
- */
-
-char*
-date822tounix(Message *, char *s)
-{
-       char *p, *q;
-       Tm tm;
-
-       if(strtotm(s, &tm) < 0)
-               return nil;
-
-       p = asctime(&tm);
-       if(q = strchr(p, '\n'))
-               *q = '\0';
-       return strdup(p);
-}