home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
clipper
/
nannws24.arc
/
MODCONF.PRG
< prev
next >
Wrap
Text File
|
1988-05-18
|
2KB
|
47 lines
* Program: MODCONFG.PRG
* Author: Gerry S. Braganza
* Version: Clipper Summer '87
* Notes: Modify CONFIG.SYS
* Copyright (c) 1988 Nantucket Corp.
*
b=0
f=0
@ 12,12 SAY "Enter the number of files " GET f PICT "999"
@ 13,12 SAY "Enter the number of buffers " GET b PICT "999"
READ
var=MEMOREAD("c:\config.sys") && store file to memory variable
fflag=.t. && set flags to true for FILES
bflag=.t. && and BUFFERS not present
FOR i = 1 TO MLCOUNT(var,80) && count number of lines in file
tmp=MEMOLINE(var,80,i) && extract each line from file
* if FILES is present change to specific value entered
IF "FILES" $UPPER(tmp)
var=STRTRAN(var,TRIM(tmp),"FILES="+LTRIM(str(f)))
fflag=.f. && set file flag to false
ENDIF
* if BUFFERS is present change specific value entered
IF "BUFFERS" $UPPER(tmp)
var=STRTRAN(var,TRIM(tmp),"BUFFERS="+LTRIM(str(b)))
bflag=.f. && set buffer flag to false
ENDIF
NEXT
IF fflag && if files not present
** add to CONFIG.SYS
var=var+CHR(13)+CHR(10)+"FILES="+LTRIM(STR(f))
ENDIF
IF bflag && if buffers not present
** add to CONFIG.SYS
var=var+CHR(13)+CHR(10)+"BUFFERS="+LTRIM(STR(b))
ENDIF
MEMOWRIT("c:\config.sys",var) && write new CONFIG.SYS to disk
* EOP: MODCONFG.PRG