From 17b95b5bd7016dba669eca4049a6fd5f5f2ab048 Mon Sep 17 00:00:00 2001 From: schwarze Date: Mon, 15 Dec 2014 18:04:32 +0000 Subject: [PATCH] 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 (Crux Linux). --- usr.bin/mandoc/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/usr.bin/mandoc/main.c b/usr.bin/mandoc/main.c index b68f5dd3a0c..28b305f1f57 100644 --- a/usr.bin/mandoc/main.c +++ b/usr.bin/mandoc/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.111 2014/12/11 19:50:04 schwarze Exp $ */ +/* $OpenBSD: main.c,v 1.112 2014/12/15 18:04:32 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2011, 2012, 2014 Ingo Schwarze @@ -283,9 +283,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--; -- 2.20.1