=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/from/from.c,v retrieving revision 1.6 retrieving revision 1.7 diff -c -r1.6 -r1.7 *** src/usr.bin/from/from.c 2000/01/18 04:57:55 1.6 --- src/usr.bin/from/from.c 2001/07/12 05:17:06 1.7 *************** *** 1,4 **** ! /* $OpenBSD: from.c,v 1.6 2000/01/18 04:57:55 millert Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* --- 1,4 ---- ! /* $OpenBSD: from.c,v 1.7 2001/07/12 05:17:06 deraadt Exp $ */ /* $NetBSD: from.c,v 1.6 1995/09/01 01:39:10 jtc Exp $ */ /* *************** *** 44,50 **** #if 0 static char sccsid[] = "@(#)from.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: from.c,v 1.6 2000/01/18 04:57:55 millert Exp $"; #endif /* not lint */ #include --- 44,50 ---- #if 0 static char sccsid[] = "@(#)from.c 8.1 (Berkeley) 6/6/93"; #endif ! static char rcsid[] = "$OpenBSD: from.c,v 1.7 2001/07/12 05:17:06 deraadt Exp $"; #endif /* not lint */ #include *************** *** 54,61 **** --- 54,65 ---- #include #include #include + #include #include + int match(char *, char *); + + int main(argc, argv) int argc; char **argv; *************** *** 102,108 **** if (!(file = getenv("MAIL"))) { if (!(pwd = getpwuid(getuid()))) errx(1, "no password file entry for you"); ! if (file = getenv("USER")) { (void)snprintf(buf, sizeof(buf), "%s/%s", _PATH_MAILDIR, file); file = buf; --- 106,112 ---- if (!(file = getenv("MAIL"))) { if (!(pwd = getpwuid(getuid()))) errx(1, "no password file entry for you"); ! if ((file = getenv("USER"))) { (void)snprintf(buf, sizeof(buf), "%s/%s", _PATH_MAILDIR, file); file = buf; *************** *** 132,139 **** exit(0); } match(line, sender) ! register char *line, *sender; { register char ch, pch, first, *p, *t; --- 136,144 ---- exit(0); } + int match(line, sender) ! char *line, *sender; { register char ch, pch, first, *p, *t;