summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-19 15:10:05 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2015-04-19 15:10:05 +0000
commit50b1bf00e4d8e8c674a76a5431d42bb37b1153e3 (patch)
tree5ce567889a8164ee7979bc359e32bbbb8fec4333 /usr.bin/mandoc
parent008e08cc72669850e93c0a2ee2212c8d680ca9ff (diff)
If apropos(1) finds no match, print "nothing appropriate" to stderr
similar to what the old apropos did. Requested by and OK deraadt@.
Diffstat (limited to 'usr.bin/mandoc')
-rw-r--r--usr.bin/mandoc/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c
index d5e561c0b13..80d0feeba45 100644
--- a/usr.bin/mandoc/main.c
+++ b/usr.bin/mandoc/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.140 2015/04/18 16:34:03 schwarze Exp $ */
+/* $OpenBSD: main.c,v 1.141 2015/04/19 15:10:04 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -336,6 +336,8 @@ main(int argc, char *argv[])
argc, argv, &res, &sz);
if (sz == 0) {
+ fprintf(stderr, "%s: nothing appropriate\n",
+ progname);
rc = MANDOCLEVEL_BADARG;
goto out;
}