- 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.
- 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.
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.
compiling, or building a fat (multi-architecture) binary. Our compiler
defines __ARCHITECTURE__ for this use.
Fixed an off-by-one error that may occasionally cause man to seg fault. Found
by using a special strict malloc() implementation.
it broke the -M option on relative paths (the chdir works as it should,
but the relative man page path is still used whole in nroff). This
repairs the situation by chopping the full pathname in half--one part
for the chdir, one part for the filename.