From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (schwarze@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id s7NMQ70O004623 for ; Sat, 23 Aug 2014 18:26:07 -0400 (EDT) Received: (from schwarze@localhost) by krisdoz.my.domain (8.14.5/8.14.3/Submit) id s7NMQ6Wt031951; Sat, 23 Aug 2014 18:26:06 -0400 (EDT) Date: Sat, 23 Aug 2014 18:26:06 -0400 (EDT) Message-Id: <201408232226.s7NMQ6Wt031951@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: without search results, skip the processing loops and the parser X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- without search results, skip the processing loops and the parser Modified Files: -------------- mdocml: main.c Revision Data ------------- Index: main.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v retrieving revision 1.186 retrieving revision 1.187 diff -Lmain.c -Lmain.c -u -p -r1.186 -r1.187 --- main.c +++ main.c @@ -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 -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv