upas/fs: remove unused function date822tounix

front
Alex Musolino 2020-09-01 22:25:06 +09:30
parent e6bfbd0d33
commit 79b4ec29a1
2 changed files with 0 additions and 26 deletions

View 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*);

View 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);
}