- 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.
while here, do some whitespace/const cleanup, convert to use addentry(),
g/c section[] (now uses buf[] directly) - 10 character limit for section
name is gone
Also, fix the same core dump in the case where there are no `_build' lines.
These should probably both emit a warning, so the user knows what happened.
It require "_crunch" section in /etc/man.conf to re-compress the compressed man pages.
It handle symbolic links, but at this time no hard links.
config files are stolen from man with few changes to support "_crunch" section.
catman.8 miss the "full moon" joke, I can't remember it, if you can pleas add it :-)