home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
pibterm
/
pibt41e3.arc
/
READCONF.SCR
< prev
next >
Wrap
Text File
|
1988-02-26
|
3KB
|
54 lines
***************************************************************************
* R E A D C O N F . S C R --- Read configuration file *
***************************************************************************
*
* Name of configuration file to be read
Import ConfName String
*
***************************************************************************
* *
* Script: ReadConf.Scr *
* *
* Purpose: Reads a configuration file and resets PibTerm parameters. *
* *
* Invocation: *
* *
* Execute "ReadConf" ConfName *
* *
* ConfName --- Configuration file to read *
* *
* Example: Execute "ReadConf" "Bogusco.Cnf" *
* *
***************************************************************************
*
* Configuration line
Declare ConfLine String
* Configuration parameter name
Declare ConfName String
* Configuration parameter value
Declare ConfValue String
* Open configuration file.
*
Open 1 ConfName "Input"
*
* Check that open went OK -- if not,
* return to caller.
IF ( IOResult <> 0 ) THEN
EXIT
ENDIF
* Begin loop over configuration file.
REPEAT
* Read line from configuration file.
Readln 1 ConfLine
* Parse into parameter name and value.
*
ConfName = Substr( ConfLine, 1, 2 )
ConfValue = Substr( ConfLine, 4, 255 )
*
* Set parameter value.
SetParam ConfName ConfValue
*
UNTIL ( EOF( 1 ) )
* Close configuration file
Close 1