summaryrefslogtreecommitdiff
path: root/usr.bin/mg/help.c
diff options
context:
space:
mode:
authorKjell Wooding <kjell@cvs.openbsd.org>2005-08-09 00:53:49 +0000
committerKjell Wooding <kjell@cvs.openbsd.org>2005-08-09 00:53:49 +0000
commit4eb0925bb60444898b6f1128f225265056cba493 (patch)
tree3ec53231b1f94ee702addb34b93c61049c48d3d8 /usr.bin/mg/help.c
parent00ce1e5a9f30584652a80b25b75ae622e9f4acdb (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/help.c')
-rw-r--r--usr.bin/mg/help.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mg/help.c b/usr.bin/mg/help.c
index bfafa34c286..d94ce06c7b6 100644
--- a/usr.bin/mg/help.c
+++ b/usr.bin/mg/help.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: help.c,v 1.24 2005/06/14 18:14:40 kjell Exp $ */
+/* $OpenBSD: help.c,v 1.25 2005/08/09 00:53:48 kjell Exp $ */
/* This file is in the public domain. */
@@ -181,7 +181,8 @@ apropos_command(int f, int n)
LIST *fnames, *el;
char string[32], *bufp;
- if ((bufp = eread("apropos: ", string, sizeof(string), EFNEW)) == NULL)
+ if ((bufp = eread("apropos: ", string, sizeof(string),
+ EFNUL | EFNEW)) == NULL)
return (ABORT);
/* FALSE means we got a 0 character string, which is fine */
bp = bfind("*help*", TRUE);