diff options
author | dm <dm@cvs.openbsd.org> | 1996-01-29 01:45:07 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1996-01-29 01:45:07 +0000 |
commit | d4348a83d4e90a8f1a7a26c930bbbb9a30ebdd58 (patch) | |
tree | b8c6ba8362f38fb511f05eb04e0e221d7685c866 /usr.sbin/sendmail/mailstats | |
parent | a402471fd01805e5aa531735d5fd71e70f6741ab (diff) |
Sendmail 8.7.3 from NetBSD
Diffstat (limited to 'usr.sbin/sendmail/mailstats')
-rw-r--r-- | usr.sbin/sendmail/mailstats/mailstats.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/usr.sbin/sendmail/mailstats/mailstats.c b/usr.sbin/sendmail/mailstats/mailstats.c index 1e11b014cd0..97ec33be7e9 100644 --- a/usr.sbin/sendmail/mailstats/mailstats.c +++ b/usr.sbin/sendmail/mailstats/mailstats.c @@ -40,7 +40,7 @@ static char copyright[] = #endif /* not lint */ #ifndef lint -static char sccsid[] = "@(#)mailstats.c 8.3 (Berkeley) 12/27/93"; +static char sccsid[] = "@(#)mailstats.c 8.4 (Berkeley) 8/14/94"; #endif /* not lint */ #include <sendmail.h> @@ -126,14 +126,32 @@ main(argc, argv) break; case 'O': /* option -- see if .st file */ - if (*b++ != 'S') + if (strncasecmp(b, " StatusFile", 11) == 0 && + !isalnum(b[11])) + { + /* new form -- find value */ + b = strchr(b, '='); + if (b == NULL) + continue; + while (isspace(*++b)) + continue; + } + else if (*b++ != 'S') + { + /* something else boring */ continue; + } - /* yep -- save this */ + /* this is the S or StatusFile option -- save it */ strcpy(sfilebuf, b); - b = strchr(sfilebuf, '\n'); - if (b != NULL) - *b = '\0'; + b = strchr(sfilebuf, '#'); + if (b == NULL) + b = strchr(sfilebuf, '\n'); + if (b == NULL) + b = &sfilebuf[strlen(sfilebuf)]; + while (isspace(*--b)) + continue; + *++b = '\0'; if (sfile == NULL) sfile = sfilebuf; |