aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-19 15:10:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-19 15:10:46 +0000
commit9a4d1bb76f454b09791b346367dc48d91993a014 (patch)
treebd9e6a6922db312b6e027d7c49bf00eb54e24b37
parentb6f6b7ee15f64b3ab129ecfa179af940f18a258d (diff)
downloadmandoc-9a4d1bb76f454b09791b346367dc48d91993a014.tar.gz
mandoc-9a4d1bb76f454b09791b346367dc48d91993a014.tar.zst
mandoc-9a4d1bb76f454b09791b346367dc48d91993a014.zip
If apropos(1) finds no match, print "nothing appropriate" to stderr
similar to what the old apropos did. Requested by and OK deraadt@.
-rw-r--r--main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/main.c b/main.c
index d7606d3c..1187e09e 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.235 2015/04/18 16:34:25 schwarze Exp $ */
+/* $Id: main.c,v 1.236 2015/04/19 15:10:46 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -357,6 +357,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;
}