Commit Graph

128 Commits

Author SHA1 Message Date
christos 8818316ba3 add more compression suffixes and local suffixes. 2013-10-06 17:14:49 +00:00
christos b496a26a9d Recognize .gz and .bz2 suffixes so $ man ./man.1.gz works. From Franco Fichter
via dfly.
2013-10-06 16:43:41 +00:00
christos 7d79a7ccd9 Be more permissive in interpreting man pages as filenames, from Franco
Fichter via dfly. fixes:
	$ man usr.bin/man/man.1
2013-10-06 16:29:26 +00:00
joerg 349a581e92 Mark the dead. 2013-07-30 15:10:04 +00:00
uwe 2a44517182 Constify some more. 2013-07-19 05:05:59 +00:00
uwe 4e29a793cc Spell "keywords" without space. Fix couple of typos. 2013-07-19 04:59:46 +00:00
uwe 6a118683e9 manual_find_buildkeyword() - now that we control the format string, we
may use asterisk precision specification instead of temporary
modifying the _build string itself.
2013-07-19 04:55:05 +00:00
uwe 6fed3e8105 Fix manual_find_buildkeyword() to not use non-literal printf format. 2013-07-19 04:18:10 +00:00
uwe fd25be260e Use -Wno-format-nonliteral instead of blanket -Wno-format. 2013-07-19 04:17:02 +00:00
uwe 887d84a8cf Don't access memory outside the array if tmpdirlen == 0. 2013-07-18 16:33:31 +00:00
christos f75400a6b8 use -Wno-format and revert "fixstring" 2013-07-18 16:28:52 +00:00
christos 532207c739 Set the string to NUL instread of providing an new empty string (from uwe) 2013-07-18 16:01:25 +00:00
christos ef965bff9b WARNS=6
- fix cast qual issues
- don't use snprintf on a user-provided buffer
2013-07-18 15:39:08 +00:00
uwe a2ec5e5863 Revert previous; other errors from WARNS=3 obscured the error in jump(). 2013-07-18 04:05:32 +00:00
uwe d7a42acd68 Constify jump() arguments appropriately. 2013-07-18 04:02:31 +00:00
uwe e0d6c9b51f Move manstate::pagerlen so that its "length of the above" comment makes sense. 2013-07-18 03:48:22 +00:00
uwe 3403b722b4 whatis.db is no more, so don't mention its location in FILES. 2013-07-18 03:40:31 +00:00
uwe db23d137fa Remove unnecessary line wrap. 2013-07-18 03:38:25 +00:00
wiz a87a4e005d Prefer Aq to \*[Lt] etc. 2013-06-28 10:13:18 +00:00
jdf eb2a9790dd * adjust indentation of list block
* fix capitalization
 * remove superfluous word ('The')

Patch supplied by Bug Hunting.
2013-06-27 21:55:10 +00:00
christos 6d6339ce42 document _machine 2012-04-29 03:46:43 +00:00
joerg c09f2f1d25 If the default path doesn't result in a match, bail out early instead of
running into a segmentation fault. Based on patch by Abhinav Upadhyay.
2012-01-03 17:49:57 +00:00
apb 25998b2e56 Document the reality that the _build and _crunch commands should each
contain exactly one "%s".  The previous description allowed any number
of "%s" in the _build command, but that does not match the actual
behaviour of either man(1) or catman(8).
2011-12-27 13:15:55 +00:00
mbalmer 947c965b88 Refer to X11R7. 2011-10-07 10:52:31 +00:00
wiz 6d765c9977 Fix usage in man page and sync usage in executable with it. 2011-06-14 20:08:45 +00:00
joerg 2d9f8bf04f Add support for man -p to print the search path for manual pages (not
including cat page directories).

From Abhinav Upadhyay as part of Google's Summer of Code 2011
2011-06-14 18:53:48 +00:00
christos e2d47bd7fa get the value of the entry for the class not the key. 2010-07-07 21:24:34 +00:00
christos cbc22ad229 - centralize the snprintf code.
- use err where appropriate.
- add machclass which should be x86 when i386 and amd64 and can be specified
  in man.conf as:
	_i386	x86
	_amd64	x86
  so that we can support merged pages. Nothing uses this yet.
2010-05-23 22:04:36 +00:00
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