Subject: Re: linux-doc: Missing man page references
From: [email-masked]
To: [email-masked], [email-masked]
Date: Sat, 29 Jul 1995 14:23:25 +0200

: > Lars Wirzenius ([email-masked])
: > Sun, 23 Jul 1995 13:53:49 +0300 (EET DST)
: > 
: > I don't have any ideas for missing manual pages, but the request reminded
: > me of one thing that has occasionally annoyed me:
: > 
: > It is sometimes somewhat difficult to find the correct page. Sometimes
: > this is because the names by which man(1) searches the page do not
: > include the "intuitive" name by which I'm searching it. Many pages are
: > known by many names (e.g., if open(2) and close(2) were combined to one
: > page, the page could be known by both names). I sometimes stumble upon
: > pages where one or more of the potential alternate names are missing.

: There is an alternative.

: I noticed the problem of missing whatis references a while back and
: introduced the concept of `whatis referenced' man page pointers into
: mandb-2.3.x.

: However, it would be relatively trivial to extract a list of the whatis
: referred pages found in man-pages-x.y from the man page database. These
: could then be turned into symbolic, hard or ROFF `.so' links to the
: real pages...

: Wilf> whatis -M /usr/man -w '*' | grep '([234579]) \[.*\]'
: alphasort (3) [scandir] - scan a directory for matching entries
: endutent (3) [getutent] - access utmp file entries
...

I am not sure I understand what you are saying or showing here.

: > Another thing that would be nice is a mechanism by which it would be
: > possible to find a page via other than the explicitly listed names.
: > This, however, needs to be done in the browser. Something like a "man
: > -k" that searches through the whole page, not just the NAME section.

My own version of man does this (with `man -K').

: Ouch.  The reason that `man -k' is relatively fast is that it searches
: a prebuilt text file (database in the case of mandb) filled with a
: parsed version of the NAME section of each manual page.  To search as
: suggested would require either

: (a) a prebuilt file containing all of the relevant parts of the man
:     page (with references to the name of the actual man page)

: (b) a realtime search through 1000s of possibly compressed manual
:     pages! 

: Neither is practical.

Not so pessimistic. I just timed the searching of 1000 compressed pages,
and it took 131 seconds. Maybe not blindingly fast, but not impractical.

Andries