Commit Graph

100 Commits

Author SHA1 Message Date
cegger
656e85b2f1 Mimic OSX behaviour:
On OS X it is possible to specify the manpage filename
with a full or relative path like this:

   man ./foo.5

or

   man /cd/foo/bar.1.gz

This is really helpful to view the manpage quickly while editing it.

patch presented on current-users@ and tech-userlevel@:
http://mail-index.netbsd.org/current-users/2009/10/06/msg010767.html
http://mail-index.netbsd.org/tech-userlevel/2009/10/06/msg002675.html

No objections
2009-10-07 08:30:31 +00:00
cegger
58b5db465d - use EXIT_FAILURE/EXIT_SUCCESS
- whitespace nits
- ansify cleanup()/usage()
- remove pointless parenthesis on return
2009-10-06 06:43:15 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
lukem
98e5374ccb Remove the \n and tabs from the __COPYRIGHT() strings.
Tweak to use a consistent format.
2008-07-21 14:19:20 +00:00
christos
6f6f89d28a pass lint, from anon ymous 2008-03-08 15:48:27 +00:00
lukem
c9c455bf1d Convert to using raise_default_signal(3). 2007-10-05 07:36:45 +00:00
reed
a87b66bd95 Add "catman" to the SEE ALSO. 2007-02-10 19:27:39 +00:00
jwise
b6bad2e5f2 Since MAN_DEBUG is constant, go from if (MAN_DEBUG) to #if MAN_DEBUG 2007-02-05 19:46:24 +00:00
peter
e263dfd62f WFORMAT is no more... 2006-10-08 17:52:28 +00:00
christos
83d63c0a25 Coverity CID 2996: Don't return without closing fp. 2006-05-01 23:22:48 +00:00
wiz
3aec927b7b Bump date for previous.
New sentence, new line.
Remove trailing whitespace.
2006-04-13 21:15:50 +00:00
wiz
afd4fdef89 Bump date for previous, slightly reword a sentencen. 2006-04-13 21:10:44 +00:00
chuck
02ff9e80b9 fix .Xr to invalid man page that i put in by mistake 2006-04-10 16:20:46 +00:00
chuck
d09fe2c467 modified man(1):
- avoid double slashes when displaying man pages (got tired
   of '/usr/share/man//cat1/man.0').
 - got rid of __P() while working on it.
 - incorporate some of my old notes explaining how manpath works into the
   comments of the code itself.
 - renamed some of the vars so that the code is consistent throughout
   (and hopefully clearer and easier to understand)
 - fixed relative man paths for multiple man pages (man did a chdir()
   on the first man page it had to format --- this broke any remaining
   relative path man pages left to process).   save old directory and
   fchdir() back to it after formatting.
 - improved doc on "man -h" which does more than just whatis(1) [e.g.
   "man -h fopen" prints the required include files and the prototypes
   rather than just the one-liner you get with whatis(1)]
 - manconf.c now fills in the "len" length field in the TAG/ENTRY
   structures (man now uses len).

revise man.conf file reading stuff to return error on failure in
addentry/gettag (fka getlist) rather than just err()ing out.   this
allows man(1) to call cleanup and delete its tmp files rather than
just leave them floating.  revise other apps using this code
(makewhatis, apropos, catman, whatis) to expect this.  also remove
__P on updated files.
2006-04-10 14:39:06 +00:00
chuck
82ad9348f2 rework the wording in these man pages (mainly in man.conf.5) based on
some old notes I found to make it clearer and easier to understand
how the man stuff works (hopefully!).
2006-04-10 14:02:57 +00:00
christos
03c0fd3fc6 change an int to size_t 2006-04-08 23:27:03 +00:00
jmmv
b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
lukem
171d653219 Overhaul how `build.sh tools' are used:
*	Rename "config.h" to "nbtool_config.h" and
	HAVE_CONFIG_H to HAVE_NBTOOL_CONFIG_H.
	This makes in more obvious in the source when we're using
	tools/compat/config.h versus "standard autoconf" config.h

    *	Consistently move the inclusion of nbtool_config.h to before
    	<sys/cdefs.h> so that the former can provide __RCSID() (et al),
    	and there's no need to protect those macros any more.

These changes should make it easier to "tool-ify" a program by adding:
	#if HAVE_NBTOOL_CONFIG_H
	#include "nbtool_config.h"
	#endif
to the top of the source files (for the general case).
2003-10-27 00:12:41 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
wiz
990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
grant
48b31946b5 New sentence, new line. Some mdoc cleanup. 2002-09-30 10:32:16 +00:00
grant
13162890c3 New sentence, new line. Some mdoc cleanup. 2002-09-30 10:21:14 +00:00
thorpej
b6f409ee2e Pull in config.h when building has a host tool. 2002-09-13 16:34:56 +00:00
thorpej
7c96dd1581 Rename man/config.{c,h} to man/manconf.{c,h}, so we don't have to
worry about problems including "config.h" when building as a host
tool.
2002-09-13 15:56:37 +00:00
wiz
4051fecb2c Remove unneeded Ns. 2002-08-20 15:20:33 +00:00
lukem
334bc46aa5 - getlist(): add "int create" arg, which creates list if it's not present
(using guts of now defunct addlist())
- use TAILQ_*() macros appropriately when manipulating tailqs
2002-06-11 04:39:52 +00:00
bouyer
cbfb5548f9 Wrap RCSID in #ifdef/#endif, for build.sh -t on non-NetBSD system. 2002-03-22 18:20:58 +00:00
groo
004beaa10c Fix longstanding misuse of glob(3) and fnmatch(3) in man page search.
glob(3)-special characters are now escaped in the supplied man page names.

Makes ``man ['' work without mysterious quoting.
2002-03-14 05:24:14 +00:00
wiz
e76f885fb8 Xr makewhatis 8, not 1. 2002-03-08 22:18:04 +00:00
jdolecek
626d582bcc xref makewhatis(8), it now uses man.conf too 2002-03-08 22:12:22 +00:00
ross
2a76afae02 Generate <>& symbolically. I'm avoiding .../dist/... directories for now. 2002-02-08 01:36:18 +00:00
wiz
b35695c778 Sort sections. 2001-12-01 20:35:54 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
lukem
0668bf9a80 _whatdb has supported glob(3)ing pathnames for over 3 years ... 2001-06-25 21:37:24 +00:00
pooka
2eb8dafad8 Remove /usr/X11/man/whatis.db from path list, as it can no longer found
in /etc/man.conf
2001-04-20 11:45:37 +00:00
cgd
a8ec668ddf convert to use getprogname() 2001-02-19 23:03:42 +00:00
is
135600f947 More format string cleanup by sommerfeld. 2000-10-11 14:46:00 +00:00
fredb
0b2cf3e7f9 Supply missing "as". 2000-08-13 06:30:14 +00:00
simonb
a097e35162 Allow "-s" to specify a section name, ala the SysV man command.
Unlike the SysV man command, this doesn't allow for the -s argument
to be a list.
2000-06-12 14:53:48 +00:00
thorpej
c57ef7446d check_pager() was using an uninitialized variable; fix it. 2000-06-07 18:52:31 +00:00
jdolecek
ebd1202e64 g/c removelist()/renamelist(), the only user (catman(8)) was modified to not use them 2000-05-29 21:10:42 +00:00
dante
9c7cc2f669 Add a comment to note that removelist() and renamelist() are used by catman(8) 2000-05-28 19:30:19 +00:00
he
e1e867b2a6 Well, the removelist and renamelist functions were not unused;
they are still used by catman.  Add them back.
2000-05-28 16:23:55 +00:00
jdolecek
c1f28b097c allow to specify relative paths for sections in man.conf - they are used
similarily to _subdir, but only when appropriate
fix -m handling, so that e.g. "man -m . 3 printf" works as it should
add new -S flag, to specify a string the result path has to contain
g/c some unused stuff

Written by Chuck Cranor, with only cosmetic changes & const poisoning by me.
2000-05-27 21:33:26 +00:00
tsutsui
5cb06e6456 Use uname(3) to determine MACHINE type. 2000-01-09 04:54:53 +00:00
kristerw
e71aea426d Typos (from OpenBSD) 1999-11-19 22:29:24 +00:00
lukem
3f8c4dac86 revert previous 1999-11-02 10:55:47 +00:00
lukem
0895d2339e remove superfluous '-' in getopt string 1999-11-02 10:52:49 +00:00
fredb
66635b21d1 Doc previously undocumented `-k' option, correctly note mutually exclusive
options, various stylistic changes.
Closes PR bin/8325.
1999-09-08 20:32:03 +00:00
kleink
6546b1feed Try $TMPDIR first, then fall back to _PATH_TMP. 1999-07-22 15:09:45 +00:00