home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR13
/
ECHOBLOK.ZIP
/
ECHOBLOK.DOC
< prev
next >
Wrap
Text File
|
1993-08-01
|
3KB
|
62 lines
________ECHOBLOK Ver. 1.00
Purpose: EchoBlock is made to be used with DOS 6's CONFIG.SYS menu system.
It prints on screen just the parts of a CONFIG.SYS file that would
be operative under a given menu choice. You might use it in a DOS
boot-up screen, and it may be useful in debugging a complex
CONFIG.SYS.
Format: ECHOBLOK [filespec] header
________ filespec is optional. It defaults to CONFIG.SYS (in the current
directory).
______ You must specify the block header, and you may but needn't put
[brackets] around it.
DOS puts the name of the header chosen at the CONFIG.SYS menu into
an environment variable, CONFIG. Therefore, you can cover most of
the ground in an AUTOEXEC.BAT line that runs:
ECHOBLOK C:\CONFIG.SYS %CONFIG%
Remarks: My AUTOEXEC.BAT leaves me in DOS, with a screen showing informa-
tion about what's running, what TSR's are loaded, etc. In the
past, I've kept a small stable of CONFIG.SYS files, and swapped
them in as wanted, rebooting to give them effect. So, usually, it
was convenient to simply type the whole CONFIG.SYS file onto the
boot-up screen to show what's going on.
DOS 6 gives us a nice menu system in CONFIG.SYS, now, so all my
little CONFIG.xxx files are collected into one, and I get to
choose from the menu which to operate. Convenient, but that
CONFIG.SYS is much too big to fit on a screen, even at 43 to 60
lines. Anyway, most of it's irrelevant, because only the block my
menu choice called for was operative. Hence, EchoBlock. It reads
from CONFIG.SYS and puts on the screen the text of the header
block called for.
There are a few complications. If there are several blocks in
CONFIG.SYS with the same name (it would be a bungle), only the
first one will be used. The exception is [COMMON]. There may be
several blocks with this label, and DOS will execute them all.
Further, an INCLUDE statement in one block will activate another.
INCLUDEs are recursive, so blocks INCLUDEd in an INCLUDEd block
will also be executed.
EchoBlock reads the file just the way DOS 6 does. Since DOS exe-
cutes all [COMMON] blocks, EchoBlock displays them all. For all
other labels, only the first matching block will be displayed.
That holds for the block called in the command line parameter, and
also for a block called in an INCLUDE line. REM lines and blank
lines are skipped, and lines of more than 78 columns will be brok-
en as neatly as possible.
Since EchoBlock writes to standard output, you can redirect its
output to a printer or a file.
fecit R. N. Wisan, August, 1993
37 Clinton St., Oneonta, NY 13820
internet: WISANR@hartwick.edu