From 93c4e97dd44b48233e26a5a5dd4329f99ede4a1d Mon Sep 17 00:00:00 2001 From: schwarze Date: Sun, 19 Apr 2015 15:10:04 +0000 Subject: [PATCH] If apropos(1) finds no match, print "nothing appropriate" to stderr similar to what the old apropos did. Requested by and OK deraadt@. --- usr.bin/mandoc/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 * Copyright (c) 2010-2012, 2014, 2015 Ingo Schwarze @@ -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; } -- 2.20.1