X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/83be1edb99d591f1ffee9a3241f50b51611f7845..80974fe4933ab511841c13598506f6190912dade:/usr/src/usr.bin/mail/lex.c diff --git a/usr/src/usr.bin/mail/lex.c b/usr/src/usr.bin/mail/lex.c index aaf427b875..3081a4d19e 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.9 %G%"; +static char *SccsId = "@(#)lex.c 2.13 %G%"; char *prompt = "& "; @@ -28,13 +28,8 @@ setfile(name, isedit) static char efile[128]; extern char tempMesg[]; - if ((ibuf = fopen(name, "r")) == NULL) { - if (isedit) - perror(name); - else - printf("No mail for %s\n", myname); + if ((ibuf = fopen(name, "r")) == NULL) return(-1); - } /* * Looks like all will be well. We must now relinquish our @@ -126,12 +121,13 @@ commands() eofloop = 0; top: if (shudprompt) { + printf(prompt); + flush(); # ifdef VMUNIX sigset(SIGCONT, contin); # endif VMUNIX - printf(prompt); - } - flush(); + } else + flush(); sreset(); /* @@ -527,9 +523,7 @@ stop(s) } clrbuf(stdout); printf("Interrupt\n"); -# ifdef VMUNIX - sigrelse(s); -# else +# ifndef VMUNIX signal(s, stop); # endif reset(0); @@ -547,11 +541,11 @@ announce(pr) int vec[2], mdot; extern char *version; + if (pr && value("quiet") == NOSTR) + printf(greeting, version); mdot = newfileinfo(); vec[0] = mdot; vec[1] = 0; - if (pr && value("quiet") == NOSTR) - printf(greeting, version); dot = &message[mdot - 1]; if (msgCount > 0 && !noheader) { inithdr++;