A patch to man to handle "man.1"...
Chuck Swiger
cswiger at mac.com
Mon Jul 21 13:21:04 PDT 2003
Chris Doherty wrote:
[ ... ]
> seems pretty simple:
>
> 1) first check to see if there's a manpage for the literal argument
> (e.g. "ld-elf.so.1")
>
> 2) if that fails, treat the trailing digit as a section
> specifier--i.e. look for "ld-elf.so" in section 1.
>
> 3) if that also fails, report that not only was there a "ld-elf.so.1" in
> any section, but there was also no "ld-elf.so" in section 1.
>
> does that cover all cases? seems like this is a useful syntax to add
> on--anything to make man(7) more usable is a good thing IMO. :-)
Thanks for the vote in favor of the proposed syntax, as well as for your
thoughts about an implementation that would remain backwards compatible.
The only difficulty is that I would probably choose to re-write 'man' from
scratch rather than try to make non-localized/extensive changes to the existing
code. This can be explained simply, even: the function is_section() has side
effects and changes some global variable named 'longsec' which relates to the
'shortsec' variable seen in my patch in ways that I don't want to understand
further. :-)
On the other hand, are there any other implementations of 'man' around? I seem
to recall something called 'polaris' which implemented browsable links between
manpages (similar to GNU info pages, come to think of it)...?
--
-Chuck
More information about the freebsd-stable
mailing list