summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-15 18:05:57 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-15 18:05:57 +0000
commit70909f4ac7106c3eb6cf3831b0923fce4e7714f9 (patch)
tree9dd34531368d48672e81bca1a4899aed463c1cd6 /main.c
parente6b080f3a27c56f233170a65580fb5d2f5a9841c (diff)
downloadmandoc-70909f4ac7106c3eb6cf3831b0923fce4e7714f9.tar.gz
Let "man n open" do the same as "man -s n open" again, that is,
show the open(n) Tcl manual, as documented in man(1). Issue reported by Svyatoslav Mishyn <juef at openmailbox dot org> (Crux Linux).
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.c b/main.c
index 32bead31..87afb45e 100644
--- a/main.c
+++ b/main.c
@@ -309,9 +309,10 @@ main(int argc, char *argv[])
argv = help_argv;
argc = 1;
}
- } else if (argv[0] != NULL &&
- isdigit((unsigned char)argv[0][0]) &&
- (argv[0][1] == '\0' || !strcmp(argv[0], "3p"))) {
+ } else if (argv[0] != NULL && (
+ (isdigit((unsigned char)argv[0][0]) &&
+ (argv[0][1] == '\0' || !strcmp(argv[0], "3p"))) ||
+ (argv[0][0] == 'n' && argv[0][1] == '\0'))) {
search.sec = argv[0];
argv++;
argc--;