summaryrefslogtreecommitdiffstats
path: root/usr.bin/mail/head.c
diff options
context:
space:
mode:
authormikeh <mikeh@FreeBSD.org>2001-03-25 04:57:05 +0000
committermikeh <mikeh@FreeBSD.org>2001-03-25 04:57:05 +0000
commite51e7e067d9cfc20e2881f888c5f45046c153df8 (patch)
treeb1ac3afa472ab794d2a7118bc10ebee16c55812f /usr.bin/mail/head.c
parentafd190c2240ce9ef47e8180f3d48af53f636952f (diff)
downloadFreeBSD-src-e51e7e067d9cfc20e2881f888c5f45046c153df8.zip
FreeBSD-src-e51e7e067d9cfc20e2881f888c5f45046c153df8.tar.gz
Merge various changes from OpenBSD and NetBSD.
o remove panic() in favor of err(3) and use err(3) functions consistently throughout o use stat(2)'s S_IS* macros rather than S_IF* o [r]index -> str[r]chr o convert some static buffers to dynamic ones o use real tempfiles rather than reopening the same templates o rename some functions that clash with libc o convert wait_status from union to int and use wait(2) status macros o fix multiple potential buffer overflows o fix a few comments o add $FreeBSD$ Reviewed by: nra, nectar (earlier version)
Diffstat (limited to 'usr.bin/mail/head.c')
-rw-r--r--usr.bin/mail/head.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mail/head.c b/usr.bin/mail/head.c
index ca31ae1..41b0e23 100644
--- a/usr.bin/mail/head.c
+++ b/usr.bin/mail/head.c
@@ -32,7 +32,11 @@
*/
#ifndef lint
+#if 0
static char sccsid[] = "@(#)head.c 8.1 (Berkeley) 6/6/93";
+#endif
+static const char rcsid[] =
+ "$FreeBSD$";
#endif /* not lint */
#include "rcv.h"
@@ -53,13 +57,10 @@ int
ishead(linebuf)
char linebuf[];
{
- register char *cp;
struct headline hl;
char parbuf[BUFSIZ];
- cp = linebuf;
- if (*cp++ != 'F' || *cp++ != 'r' || *cp++ != 'o' || *cp++ != 'm' ||
- *cp++ != ' ')
+ if (strncmp(linebuf, "From ", 5))
return (0);
parse(linebuf, &hl, parbuf);
if (hl.l_from == NOSTR || hl.l_date == NOSTR) {
OpenPOWER on IntegriCloud