home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
txtutl
/
man.arc
/
MAN.DOC
next >
Wrap
Text File
|
1986-12-31
|
5KB
|
114 lines
MAN usage:
MAN [d:][path]progname
Man lists the .doc file for progname (located in the current search
path or in MANPATH), using the list program specified in the
environment variable, MANLIST. If MANLIST is not specified, MAN uses
MORE or TYPE, in that order.
About MAN:
My hard disk is full of public domain and shareware software which I
can never remember how to use. Fortunately, most of it has some sort
of documentation, which I keep on disk since bits grow faster than
trees. A given program, say WHATSUP.EXE, will generally have a
corresponding manual file, say WHATSUP.DOC. So if I want to remember
how to use WHATSUP, all I have to do is look at the .DOC file. Well,
actually, first I have to FIND the .DOC file. Probably it's in the
same directory as WHATSUP.EXE, but I don't know where that is either.
And I shouldn't have to know! After all, the directory containing
WHATSUP.EXE is surely listed in my DOS search path. Why not let the
computer check all the directories in my search path until it finds
WHATSUP.DOC, and then list WHATSUP.DOC on the screen? So I wrote MAN
to do that.
Using MAN:
A computer user named Sam is using Carrot-Calc to calculate the
expected yield of small plastic explosive charge. Suddenly, a bug in
the BIOS of his CloneCorp computer causes Carrot-Calc to crash. Sam
is REALLY mad, but he remembers downloading a piece of software
called DONBUGME that is supposed to fix the BIOS bug. He can't
remember the syntax for DONBUGME, so he types
MAN DONBUGME ,
and the computer responds by listing DONBUGME.DOC on the screen.
After reading the documentation, Sam is able to fix his BIOS bug, and
he finishes his yield calculation just in time for Saturday morning
cartoons.
How MAN works:
In the example above, MAN started by looking in Sam's default
directory (on the default drive) for DONBUGME.DOC. If it didn't find
DONBUGME.DOC there, MAN checked each directory in Sam's search path
until it was successful. Then it attempted to list DONBUGME.DOC to
the screen using DOS's MORE command. If MAN couldn't locate MORE.COM
in any of Sam's search path directories, it used the DOS TYPE command
to list the file. MAN only finds files with the .DOC extension, and
it only finds those that are in the current directory, or in a search
path directory. To list .DOC files that aren't in one of these
places, one must tell MAN where to look for them. For example, if
COSTLY.DOC is in A:\HOSPITAL, and A:\HOSPITAL is neither the default
directory, nor one of the directories in the search path, then one
must type
MAN A:\HOSPITAL\COSTLY ,
if MAN is to find COSTLY.DOC. The A: could be omitted, if A: is the
default drive.
Changing the way MAN works:
Some people are more organized than I am, and keep most of their .DOC
files in one directory, say C:\DOCFILES. They want MAN to look there
first. The way to accomplish this is to add the line
SET MANPATH=C:\DOCFILES
to the AUTOEXEC.BAT file. The environmental variable MANPATH can
contain a list of directories where MAN should look before it checks
the ones in search path (but after it checks the default directory).
The directory list in MANPATH has the same form as a directory list
for the DOS search path, but MANPATH is initialized with the SET
command instead of the PATH command. Here is another example of
initializing MANPATH:
SET MANPATH=\EYEDOC;\SLYDOC;\YOURDOC;\MYDOC; .
Some people might like to use something other than MORE to list .DOC
files. For instance, many people prefer Vernon D. Buerg's LIST
utility. Convincing MAN to use LIST instead of MORE is simple --
just add the following line to AUTOEXEC.BAT:
SET MANLIST=LIST .
This works if LIST is in the DOS search path. If not, MAN needs to
know where to find LIST, e.g.
SET MANLIST=C:\SHOPPING\LIST .
Other programs could be used in place of MORE. MAN assumes that any
program specified in MANLIST should be invoked with the syntax
LISTER DOCFILE .
The law and MAN:
MAN and this document are Copyright 1986 by David L. Rick (the
author). Both may be freely distributed for noncommercial use.
Commercial users must obtain a license from the author. Write to him
in care of 4000 Ingersoll, Des Moines, IA 50312. Modification of
MAN.EXE is expressly prohibited.
NOTICE: THOSE WHO USE THIS SOFTWARE DO SO AT THEIR OWN RISK. IN NO
EVENT WILL THE AUTHOR BE LIABLE FOR DAMAGES ARISING FROM THE USE OR
MISUSE OF THIS SOFTWARE AND/OR ITS DOCUMENTATION.