diff options
author | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-12-30 13:14:42 +0000 |
---|---|---|
committer | Jason McIntyre <jmc@cvs.openbsd.org> | 2008-12-30 13:14:42 +0000 |
commit | 47d705387e883a90365323507c392c96e413a1b6 (patch) | |
tree | 955b2c674884b86417a494e2c395a1c255411610 | |
parent | 340eef1c04a2766fb9022ffe7c1d7b88b40991b9 (diff) |
make -S case insensitive; this avoids any confusion over the fact
that MD page headers use mixed case; tidy up the man page regarding this;
diff from Ingo Schwarze
ok sobrado millert krw
-rw-r--r-- | usr.bin/man/man.1 | 22 | ||||
-rw-r--r-- | usr.bin/man/man.c | 9 |
2 files changed, 20 insertions, 11 deletions
diff --git a/usr.bin/man/man.1 b/usr.bin/man/man.1 index d51de2550e9..a3d3d0c4ac2 100644 --- a/usr.bin/man/man.1 +++ b/usr.bin/man/man.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: man.1,v 1.40 2008/04/27 15:10:58 deanna Exp $ +.\" $OpenBSD: man.1,v 1.41 2008/12/30 13:14:41 jmc Exp $ .\" .\" Copyright (c) 1989, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)man.1 8.2 (Berkeley) 1/2/94 .\" -.Dd $Mdocdate: April 27 2008 $ +.Dd $Mdocdate: December 30 2008 $ .Dt MAN 1 .Os .Sh NAME @@ -91,6 +91,8 @@ A synonym for .Xr whatis 1 . It looks up a given command and gives the header line from the manual page. +.Ar command +is case insensitive. .It Fl h Display only the .Dq SYNOPSIS @@ -176,17 +178,19 @@ configuration file. .It Fl S Ar subsection Restricts the directories that .Nm -will search to those of a specific machine architecture. +will search to those of a specific +.Xr machine 1 +architecture. +.Ar subsection +is case insensitive. +.Pp By default manual pages for all architectures are installed. Therefore this option can be used to view pages for one architecture whilst using another. .Pp -Overrides the +This option overrides the .Ev MACHINE -environment variable; -see also the -.Sx ENVIRONMENT -section below. +environment variable. .It Xo .Op Fl s .Ar section @@ -272,6 +276,8 @@ to the name of a specific architecture, or with the .Fl S option. +.Ev MACHINE +is case insensitive. .It Ev MANPAGER Any non-null value of the environment variable .Ev MANPAGER diff --git a/usr.bin/man/man.c b/usr.bin/man/man.c index 04ee82022c2..2192cf8134e 100644 --- a/usr.bin/man/man.c +++ b/usr.bin/man/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.36 2008/01/04 22:37:54 jmc Exp $ */ +/* $OpenBSD: man.c,v 1.37 2008/12/30 13:14:41 jmc Exp $ */ /* $NetBSD: man.c,v 1.7 1995/09/28 06:05:34 tls Exp $ */ /* @@ -40,7 +40,7 @@ static char copyright[] = #if 0 static char sccsid[] = "@(#)man.c 8.17 (Berkeley) 1/31/95"; #else -static char rcsid[] = "$OpenBSD: man.c,v 1.36 2008/01/04 22:37:54 jmc Exp $"; +static char rcsid[] = "$OpenBSD: man.c,v 1.37 2008/12/30 13:14:41 jmc Exp $"; #endif #endif /* not lint */ @@ -172,7 +172,10 @@ main(int argc, char *argv[]) config(conffile); /* Get the machine type unless specified by -S. */ - if (machine == NULL && (machine = getenv("MACHINE")) == NULL) + if (machine || (machine = getenv("MACHINE"))) + for (p = machine; *p; ++p) + *p = tolower(*p); + else machine = MACHINE; /* If there's no _default list, create an empty one. */ |