summaryrefslogtreecommitdiff
path: root/usr.bin/vi/common/options.c
diff options
context:
space:
mode:
authorJason Downs <downsj@cvs.openbsd.org>1997-07-27 22:28:26 +0000
committerJason Downs <downsj@cvs.openbsd.org>1997-07-27 22:28:26 +0000
commit4b78d53e662bebcd37bfe64c34ee64da5e5ca0f1 (patch)
tree4072a414806b098bf4aca70cea37e6063a2d3f3e /usr.bin/vi/common/options.c
parentd3cd71e47815755c43ebd011e6c53f532e581239 (diff)
Update to 1.79 and install as vi/ex/view.
Diffstat (limited to 'usr.bin/vi/common/options.c')
-rw-r--r--usr.bin/vi/common/options.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/usr.bin/vi/common/options.c b/usr.bin/vi/common/options.c
index a285dc1869b..973778c78bb 100644
--- a/usr.bin/vi/common/options.c
+++ b/usr.bin/vi/common/options.c
@@ -10,7 +10,7 @@
#include "config.h"
#ifndef lint
-static const char sccsid[] = "@(#)options.c 10.50 (Berkeley) 10/1/96";
+static const char sccsid[] = "@(#)options.c 10.51 (Berkeley) 10/14/96";
#endif /* not lint */
#include <sys/types.h>
@@ -494,10 +494,8 @@ opts_set(sp, argv, usage)
name += 2;
op = opts_search(name);
}
-
if (op == NULL) {
- msgq_str(sp, M_ERR, name,
- "033|set: no %s option: 'set all' gives all option values");
+ opts_nomatch(sp, name);
rval = 1;
continue;
}
@@ -1043,6 +1041,21 @@ opts_search(name)
return (found);
}
+/*
+ * opts_nomatch --
+ * Standard nomatch error message for options.
+ *
+ * PUBLIC: void opts_nomatch __P((SCR *, char *));
+ */
+void
+opts_nomatch(sp, name)
+ SCR *sp;
+ char *name;
+{
+ msgq_str(sp, M_ERR, name,
+ "033|set: no %s option: 'set all' gives all option values");
+}
+
static int
opts_abbcmp(a, b)
const void *a, *b;