diff options
author | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-08-09 00:53:49 +0000 |
---|---|---|
committer | Kjell Wooding <kjell@cvs.openbsd.org> | 2005-08-09 00:53:49 +0000 |
commit | 4eb0925bb60444898b6f1128f225265056cba493 (patch) | |
tree | 3ec53231b1f94ee702addb34b93c61049c48d3d8 /usr.bin/mg/mail.c | |
parent | 00ce1e5a9f30584652a80b25b75ae622e9f4acdb (diff) |
Clean up eread handling in mg. (basically, fallout from the 'enter often
means abort' behaviour added during the hackathon). Eliminates
redundant ereply function, fixes miscellaneous cores when aborting,
and move a number of assumed pathnames into the prompt text, since
they are used there anyway. All changes consistent with emacs behavior
ok beck@ many, many moons ago.
Diffstat (limited to 'usr.bin/mg/mail.c')
-rw-r--r-- | usr.bin/mg/mail.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/mg/mail.c b/usr.bin/mg/mail.c index 8f046a61f70..0ddfa6fcfab 100644 --- a/usr.bin/mg/mail.c +++ b/usr.bin/mg/mail.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mail.c,v 1.5 2005/04/03 02:09:28 db Exp $ */ +/* $OpenBSD: mail.c,v 1.6 2005/08/09 00:53:48 kjell Exp $ */ /* * This file is in the public domain. * @@ -60,9 +60,10 @@ mail_set_limit(int f, int n) if ((f & FFARG) != 0) { limit = n; } else { - if ((rep = ereply("Margin: ", buf, sizeof(buf))) == NULL) + if ((rep = eread("Margin: ", buf, sizeof(buf), + EFNEW | EFCR)) == NULL) return (ABORT); - else if (*rep == '\0') + else if (rep[0] == '\0') return (FALSE); limit = atoi(rep); } |