From: Kurt A. Shoens Date: Sun, 13 Sep 1981 01:44:52 +0000 (-0800) Subject: now if you type more than 25 eofs in a row, it assumes you really X-Git-Tag: BSD-4_1_snap-Snapshot-Development~856 X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/commitdiff_plain/853e9d55523d6b805b8e08046a97b1e01fcaf0e1 now if you type more than 25 eofs in a row, it assumes you really mean it. this is to combat a strange dialup problem that makes your program read eofs forever. SCCS-vsn: usr.bin/mail/lex.c 2.3 --- diff --git a/usr/src/usr.bin/mail/lex.c b/usr/src/usr.bin/mail/lex.c index 63a711fdd6..e3e9056dfb 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 2.2 %G%"; +static char *SccsId = "@(#)lex.c 2.3 %G%"; /* * Set up editing on the given file name. @@ -97,7 +97,7 @@ int *msgvec; commands() { - int prompt, firstsw, stop(); + int eofloop, prompt, firstsw, stop(); register int n; char linebuf[LINESIZE]; int hangup(), contin(); @@ -143,6 +143,7 @@ commands() if (!rcvmode && !sourcing) return; + eofloop = 0; top: if (prompt && !sourcing) { sigrelse(SIGCONT); @@ -166,8 +167,10 @@ top: goto more; } if (value("ignoreeof") != NOSTR && prompt) { - printf("Use \"quit\" to quit.\n"); - goto top; + if (++eofloop < 25) { + printf("Use \"quit\" to quit.\n"); + goto top; + } } if (!edit) return;