* mandoc: If somebody asks "man 3 chmod", don't respond with the lie: "No
@ 2018-08-09 17:31 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2018-08-09 17:31 UTC (permalink / raw)
To: source
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2018-08-09 17:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-09 17:31 mandoc: If somebody asks "man 3 chmod", don't respond with the lie: "No schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).