| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: REXX - Text Substitution |
Don{ald} O. Woodall wrote:
> Hello Text Manipulators
>
> Unable to sleep, I am fiddling with something I really
> should leave well enough alone until I am well rested and
> thinking clearly. Anyway......
>
>
> REM ------------------------------------------------------------------
> REM *** RAY GWINN's SERIAL PORT DEVICE DRIVERS installed by eCS1.1 4A5 REM
> ------------------------------------------------------------------
> REM Begin SIOECS
> REM Un-rem next DEVICE line if you experience traps in
> REM SIO2K.SYS when shutting down via Ctrl-Alt-Del
> REM DEVICE=G:\eCS\boot\unbhsio.sys
> DEVICE=G:\eCS\system\SIOeCS\UART.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\VSIO2K.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\SIO2K.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
> REM End SIOECS
>
> I want to change:
>
> DEVICE=G:\eCS\system\SIOeCS\UART.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\VSIO2K.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\SIO2K.SYS LOGFILE=G:\var\log\SIOeCS\SIO2K.log
>
> TO:
>
> DEVICE=G:\eCS\system\SIOeCS\UART.SYS LOGFILE=G:\LOGS\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\VSIO2K.SYS LOGFILE=G:\LOGS\SIOeCS\SIO2K.log
> DEVICE=G:\eCS\system\SIOeCS\SIO2K.SYS LOGFILE=G:\LOGS\SIOeCS\SIO2K.log
>
> Here is how I propose to start.
>
> /* 4A6 */ /*
> ---------------------------------------------------------------- */
> WHEN right(lineread,9) = 'SIO2K.log' THEN
> DO
>
> /* 4A7 */ /*
> ---------------------------------------------------------------- */
> WHEN right(lineread,9) = 'SIO2K.log' THEN
> DO
>
> /* 4A8 */ /*
> ---------------------------------------------------------------- */
> WHEN right(lineread,9) = 'SIO2K.log' THEN
> DO
>
> Night, night
>
> Thanks
UNTESTED!
+-+--+-+-+-+-+-+- start proc +-+-+-+-+-+-+-+-+-+-+-+
/* change SIOs log files to new location */
infile = "c:\config.sys" /* which file to change? */
outfile = "c:\config.new" /* where to store the changed file */
oldpath = "\var\log\SIOeCS" /* SIOs logs are yet */
newpath = "c:\logs\SIOeCS\" /* SIO should store its logs now */
/* in contrast to oldpath it must be
complete! */
/* we need some funcs from RexxUtil, so load thgem if not already done */
rc = RxFuncAdd('SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs')
if rc > 1 then do
say ''
say 'Unable to Add Function SysLoadFuncs from DLL RexxUtil (rc =
'rc')'
say 'Please insure that the REXXUTIL.DLL exists in a subdirectory
contained'
say 'in the LIBPATH statement in your CONFIG.SYS file.'
exit
end
else call SysLoadFuncs
/* copy the file to new name and change what need to be changed */
do while Lines(infile) 0
inline = linein(infile)
Parse value inline with leftv '=' midv 'LOGFILE=' rightv
if rightv = '' then do
/* there is no 'LOGFILE' in line */
rc = lineout(outfile, inline)
iterate
end
dr = filespec("DRIVE", rightv)
pa = filespec("PATH", rightv)
fil = filespec("FILE", rightv)
/* is it SIO? */
if pa = oldpath then do
rc = lineout(outfile, leftv'='midv'='newpath'fil)
else do
/* no, write original */
rc = lineout(outfile, inline)
end
end
call Stream infile, 'C', 'CLOSE'
call Stream outfile, 'C', 'CLOSE'
return 0 /* tell the caller "DONE" */
-+.+.+.+.+.+.+.+.+ end proc .+.+.+.+.+.+.
There is no error check. That is left to you!
It's NOT tested. That job is left to you.
--
Tschau/Bye
Herbert Rosenau eCS 1.2 Deutsch bestellen bei
EDV Beratung & Programmierung http://pc-rosenau.de
Eichelsdorfer Str. 15 http://ecomstation.de
97461 Hofheim i.UFr. kostenlos surfen/telefonieren:
http://pc-rosenau.profiseller.de
Tel: 49-9523-502834
Fax: 49-9523-502823 http://www.dv-rosenau.de/
------------------------ Yahoo! Groups Sponsor --------------------~-->
Fair play? Video games influencing politics. Click and talk back!
http://us.click.yahoo.com/2jUsvC/tzNLAA/TtwFAA/E8folB/TM
--------------------------------------------------------------------~->
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/os2user/
To unsubscribe from this group, send an email to:
os2user-unsubscribe{at}yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
---
* Origin: Waldo's Place USA Internet Gateway (1:3634/1000)SEEN-BY: 633/267 270 5030/786 @PATH: 3634/1000 12 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.