- 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.
* 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).
databases specified there. By default, the individual databases
are actually generated by forked children in this case, for
performance reasons. This feature can be switched off by new -f flag.
If the configuration file can't be parsed or doesn't contain any
_whatdb entries, the code falls back to /usr/share/man as before.
Added -C, which allows to specify alternate configuration file. This
is compatible with apropos(1) and whatis(1) flag of same name.
Update manpage accordingly and document behaviour a bit better.
Also add a HISTORY section, hopefully correct (done using CVS logs).
This solves toolchain/5231 by Tim Rightnour and bin/7696 by Allen Briggs.
appears in, as commonly used for architecture-specific manpages.
The subdirectory is deliberately printed such that the entry is suitable
for cut&paste for man(1).
Fixes bin/9744 by John Hawkinson and misc/14997 by Hiramatsu Yoshifumi.
round has been tested on Solaris/x86 and Linux hosts.
* Add host tools cap_mkdb, ctags, m4, uudecode.
* Protect __RCSID() and __COPYRIGHT() better.
* Reduce the number of places that need to include "config.h", to keep
sources closer to their "vanilla" versions.
* Add more compat #defines and autoconf-checked functions.
- change error checking philosophy: instead of returning errors to the
upper layer only to fail silently and exit there, or die of unexpected
NULL pointers bail out and print an error immediately. Add emalloc/estrdup
to simplify. This change removed a bunch of code.
- fix size_t/int confusion
- cast argument to isspace(3) to unsigned char
- ? : statement is not an lvalue, so don't take its address.
- unlink the file before we open it, because we chmod it to readonly.
- misc KNF
description section of an unformatted manual page. While this makes the
"makewhatis" two times slower in avoids creation of several incorrect
entries in the "whatis.db" database. This fixes PR bin/12535 by
Thomas Klausner.
- Redirect standard error to "/dev/null" because "nroff" error messages
for temporary files aren't really useful.
- Don't let "nroff" open temporary file. Use its file descriptor as
standard input.