From 73f94fab501fcce223d5351b84956557f5eb8594 Mon Sep 17 00:00:00 2001 From: "Kurt A. Schoens" Date: Thu, 9 Oct 1980 02:56:15 -0800 Subject: [PATCH] Added ignoreeof flag which requires explicit quit instead of End of File from terminal to leave Mail. SCCS-vsn: usr.bin/mail/lex.c 1.2 --- usr/src/usr.bin/mail/lex.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr/src/usr.bin/mail/lex.c b/usr/src/usr.bin/mail/lex.c index 73a25dfb62..132895042b 100644 --- a/usr/src/usr.bin/mail/lex.c +++ b/usr/src/usr.bin/mail/lex.c @@ -8,7 +8,7 @@ * Lexical processing of commands. */ -static char *SccsId = "@(#)lex.c 1.1 %G%"; +static char *SccsId = "@(#)lex.c 1.2 %G%"; /* * Interpret user commands one by one. If standard input is not a tty, @@ -60,6 +60,7 @@ commands() if (!rcvmode && !sourcing) return; +top: if (prompt && !sourcing) printf("_\r"); flush(); @@ -79,6 +80,10 @@ commands() unstack(); goto more; } + if (value("ignoreeof") != NOSTR && prompt) { + printf("Use \"quit\" to quit.\n"); + goto top; + } if (!edit) { signal(SIGINT, SIG_IGN); return; -- 2.20.1