aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail/cmd3.c
diff options
context:
space:
mode:
authorMike Heffner <mikeh@FreeBSD.org>2001-12-18 20:52:09 +0000
committerMike Heffner <mikeh@FreeBSD.org>2001-12-18 20:52:09 +0000
commit856f23ed359b1138dbb07532a81dc83328b85941 (patch)
tree89731abafbceb13b0e7b78a6e281339c99fbfef9 /usr.bin/mail/cmd3.c
parentfdb33f08efe33995182a98e5457530451f26a14b (diff)
downloadsrc-856f23ed359b1138dbb07532a81dc83328b85941.tar.gz
src-856f23ed359b1138dbb07532a81dc83328b85941.zip
Sync with most of NetBSD's changes, including:
*) Sync with 4.4BSD-Lite2 *) Set usecs for utimes() *) Add 'inc' command and 'autoinc' option that check for new mail manually and automatically, respectively *) Use POSIX signal handling and tty semantics *) Handle long lines correctly when paging messages *) Add ability to explicitly search 'To:' line *) Various manpage cleanups *) Support overriding '~/.mailrc' with $MAILRC *) Support 'askbcc' and 'asksub' options *) Fix various bugs Reviewed by: ru (mail.1) Obtained from: NetBSD
Notes
Notes: svn path=/head/; revision=88150
Diffstat (limited to 'usr.bin/mail/cmd3.c')
-rw-r--r--usr.bin/mail/cmd3.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.bin/mail/cmd3.c b/usr.bin/mail/cmd3.c
index 4ead96176770..8d21dd48ab68 100644
--- a/usr.bin/mail/cmd3.c
+++ b/usr.bin/mail/cmd3.c
@@ -33,7 +33,7 @@
#ifndef lint
#if 0
-static char sccsid[] = "@(#)cmd3.c 8.1 (Berkeley) 6/6/93";
+static char sccsid[] = "@(#)cmd3.c 8.2 (Berkeley) 4/20/95";
#endif
static const char rcsid[] =
"$FreeBSD$";
@@ -357,7 +357,7 @@ rexit(e)
{
if (sourcing)
return (1);
- exit(e);
+ exit(0);
/*NOTREACHED*/
}
@@ -423,7 +423,9 @@ unset(arglist)
errs = 0;
for (ap = arglist; *ap != NULL; ap++) {
if ((vp2 = lookup(*ap)) == NULL) {
- if (!sourcing) {
+ if (getenv(*ap))
+ unsetenv(*ap);
+ else if (!sourcing) {
printf("\"%s\": undefined variable\n", *ap);
errs++;
}
@@ -552,7 +554,7 @@ file(argv)
{
if (argv[0] == NULL) {
- newfileinfo();
+ newfileinfo(0);
return (0);
}
if (setfile(*argv) < 0)