From d4348a83d4e90a8f1a7a26c930bbbb9a30ebdd58 Mon Sep 17 00:00:00 2001 From: dm Date: Mon, 29 Jan 1996 01:45:07 +0000 Subject: Sendmail 8.7.3 from NetBSD --- usr.sbin/sendmail/mailstats/mailstats.c | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'usr.sbin/sendmail/mailstats/mailstats.c') 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 @@ -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; -- cgit v1.2.3