diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-23 22:26:06 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-08-23 22:26:06 +0000 |
commit | 6fa89d30426089ab004ea00e810f29e4760da0f1 (patch) | |
tree | f18fc417278563c61c4f8b0fa568525b3a54be79 | |
parent | 0c2d768cbe4570b38ac18d2408449604fab0186b (diff) | |
download | mandoc-6fa89d30426089ab004ea00e810f29e4760da0f1.tar.gz |
without search results, skip the processing loops and the parser
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -283,6 +283,14 @@ main(int argc, char *argv[]) manpath_free(&paths); resp = res; + if (sz == 0) { + if (search.argmode == ARG_NAME) + fprintf(stderr, "%s: No entry for %s " + "in the manual.\n", progname, argv[0]); + rc = MANDOCLEVEL_BADARG; + goto out; + } + /* * For standard man(1) and -a output mode, * prepare for copying filename pointers |