Next / Previous / Contents / TCC Help System / NM Tech homepage

3. Operation of the script

To view a man page on the Web, use a URL of this form:

http://www.nmt.edu/tcc/cgi/manweb.cgi?p=P&s=S&x=X

where P is the page name, S is the optional section name, and X is the optional suffix string, as described in Section 2, “The path names of man pages”.

Here are some examples. The first column shows the part of the URL after the “?”; the second column shows the resulting path name relative to /usr/share/man/. Note that all special characters must be escaped using the convention that a character with hexadecimal code xx is represented as “%xx”.

ArgumentsPath
p=ls man1/ls.1.gz
p=Magick%2B%2B%2Dconfig man1/Magick++-config.1.gz
p=math%2Eh&s=0p man0p/math.h.0p.gz
s=3&p=Thread%3A%3AQueue&x=pm man3/Thread::Queue.3pm.gz

If any of the supplied arguments are invalid, or if the specified man page does not exist, the script will display an error page. In the latter case, mail will also be sent to webmaster@nmt.edu so that broken links can be repaired.

One potential problem is that the set of man pages on the server will be different from the set of pages available on clients. Since this script is primarily for basic man pages that exist everywhere, we'll deal with that if and when it becomes a problem. One possible solution is to duplicate the set of client man pages on infohost, and add an option to select the client or server set.