man -t to lpr (man flamed)

Dave Ciemiewicz ciemo at bananapc.wpd.sgi.com
Sat Oct 13 11:07:39 AEST 1990


In article <9010121941.AA00328 at mcirps2.med.nyu.edu>, karron at MCIRPS2.MED.NYU.EDU writes:
|> Jim Simms (sims at enh.nist.gov) writes:
|> 
|> >I have recently discovered the -t option to man, for typesetting
|> >man pages and sending to a printer. I am running 3.3.1 and using
|> >lpr rather than lp, hence the problem. man -t sends to lp; I
|> >want to be able to send to lpr. Anyone know how to do this?
|> >According to the man page, *.z files are unpacked using pcat
|> >and then sent to the named printer. Presumably there is more
|> >processing than that going on. If I knew exactly what man does,
|> >I could write a small script to do the job.
|> 
|> I don't know how to fix the man binary.
|> 
|> I also don't know why sgi (or ATT) made the man program into a compiled
|> binary, leaving us without the source.  In the old days the man command was a
|> script that could be fixed/hacked to local taste.

The old man command was a very slow AT&T shell script which could take up to
12 seconds to find a manual page (or no man page).  Customers and internal
users alike complained that this was way too slow.  We replaced the shell
script with binary modelled on the features of the AT&T, Sun and BSD man
commands. (BTW, the Sun and BSD man commands are also binaries, not shell
scripts.) Performance increased to a typical 2 seconds to lookup a man page
(or tell you none were found).  From the perspective of browsing online
manual pages, you could browse many more manual pages with the new command
than the old script, especially if you mistyped the name of the manual page
you wanted.

The reason for the significant speed up is that the man script was based
on find(1) which is rather slow at finding files.  The man command uses
a more sophisticated algorithm for scanning directories for manual pages.

In case of NFS mounted manual page directories, the new binary man command
far exceeds the capabilities of the old man script.  In some situations,
the man script could take minutes to find a manual page or exhaustively
search the directories to inform you that none were found.  The new man
executable takes much less time because of the search algorithm.

New executable programs like xman can provide even faster browsing of
manual pages as they can cache lookup information and provide pretty
display of the manual pages.  Of course, it's not a shell script either
though sources may be available.

With large libraries of online documentation like X man pages, GL man pages,
and libc man pages, not to mention all of the add on user level man pages,
I personally appreciate being able to rapidly browse online manual pages.

						--- Ciemo



More information about the Comp.sys.sgi mailing list