From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id d8276b59 for ; Thu, 9 Aug 2018 12:31:07 -0500 (EST) Date: Thu, 9 Aug 2018 12:31:07 -0500 (EST) X-Mailinglist: mandoc-source Reply-To: source@mandoc.bsd.lv MIME-Version: 1.0 From: schwarze@mandoc.bsd.lv To: source@mandoc.bsd.lv Subject: mandoc: If somebody asks "man 3 chmod", don't respond with the lie: "No X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Message-Id: Log Message: ----------- If somebody asks "man 3 chmod", don't respond with the lie: "No entry for chmod in the manual." Instead, say "No entry for chmod in section 3 of the manual." Came up after a question from kn@; OK kn@. Modified Files: -------------- mandoc: main.c Revision Data ------------- Index: main.c =================================================================== RCS file: /home/cvs/mandoc/mandoc/main.c,v retrieving revision 1.306 retrieving revision 1.307 diff -Lmain.c -Lmain.c -u -p -r1.306 -r1.307 --- main.c +++ main.c @@ -790,8 +790,14 @@ fs_search(const struct mansearch *cfg, c return 1; } if (res != NULL && *ressz == lastsz && - strchr(*argv, '/') == NULL) - warnx("No entry for %s in the manual.", *argv); + strchr(*argv, '/') == NULL) { + if (cfg->sec == NULL) + warnx("No entry for %s in the manual.", + *argv); + else + warnx("No entry for %s in section %s " + "of the manual.", *argv, cfg->sec); + } lastsz = *ressz; argv++; argc--; -- To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv