From 79b4ec29a16c728d1918db4c7aa75379ab66d19e Mon Sep 17 00:00:00 2001 From: Alex Musolino Date: Tue, 1 Sep 2020 22:25:06 +0930 Subject: [PATCH] upas/fs: remove unused function date822tounix --- sys/src/cmd/upas/fs/dat.h | 1 - sys/src/cmd/upas/fs/mbox.c | 25 ------------------------- 2 files changed, 26 deletions(-) diff --git a/sys/src/cmd/upas/fs/dat.h b/sys/src/cmd/upas/fs/dat.h index 27e84baf8..85958d638 100644 --- a/sys/src/cmd/upas/fs/dat.h +++ b/sys/src/cmd/upas/fs/dat.h @@ -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*); diff --git a/sys/src/cmd/upas/fs/mbox.c b/sys/src/cmd/upas/fs/mbox.c index 1ae11300f..7bb58b555 100644 --- a/sys/src/cmd/upas/fs/mbox.c +++ b/sys/src/cmd/upas/fs/mbox.c @@ -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); -}