ref: 79b4ec29a16c728d1918db4c7aa75379ab66d19e
parent: e6bfbd0d33e45d80362b363adadeb4419e5bca27
author: Alex Musolino <[email protected]>
date: Tue Sep 1 18:25:06 EDT 2020
upas/fs: remove unused function date822tounix
--- a/sys/src/cmd/upas/fs/dat.h
+++ b/sys/src/cmd/upas/fs/dat.h
@@ -238,7 +238,6 @@
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*);
--- a/sys/src/cmd/upas/fs/mbox.c
+++ b/sys/src/cmd/upas/fs/mbox.c
@@ -1676,28 +1676,3 @@
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);
-}