home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
High Voltage Shareware
/
high1.zip
/
high1
/
DIR36
/
KEXX.ZIP
/
PRGLINES.KEX
< prev
next >
Wrap
Text File
|
1992-12-29
|
2KB
|
72 lines
************************************************
* PRGLINES.KEX
*
* Function: Remove EDITV and POINT settings set during a call to RUNCMD
* Requires: KEDIT 5.0
* Version: 1.1 (December, 1992)
*
* Parameters:
* Tail - The EDITV Suffix specified during the RUNCMD call
*
************************************************
TRUE = 1
FALSE = 0
Parse Arg Tail
'Macro Push TEMP'
Call ErrorCheck 'Editv Get Total.'Tail
If Total.Tail = '' | Total.Tail <= 0 Then Return 1
Call ErrorCheck 'Editv Set Total.'Tail
Call ErrorCheck 'Editv Set Current.'Tail
'Extract /RING/'
Do I = 1 To Total.Tail
Call ErrorCheck 'Editv Get Line.'I'.'Tail
Call ErrorCheck 'Editv Set Line.'I'.'Tail
Parse Var Line.I.Tail Fid .
If EditIfInRing(Fid) Then 'Set Point .'Tail'.'I 'Off'
End
'Macro POP TEMP'
Return 0
************************************************
* Execute command and check for zero return code
* If RC is not 0, then bail out with FatalErr
************************************************
ErrorCheck:
Parse Arg CmdString
"NoMsg" CmdString
If RC \= 0 Then
Call FatalErr RC "From <"Word(CmdString, 1)">" LastMsg.1()
Return
************************************************
* Subroutine to bail out with error message in alert box
* Note: This subroutine never returns to it's caller
************************************************
FatalErr:
Parse Arg ReturnCode ErrorMessage
'Alert' Delimit(ErrorMessage) 'Title $PRGLINES$'
'Macro POP TEMP'
Exit ReturnCode
************************************************
* Subroutine to check and see if a file is currently in the ring
************************************************
EditIfInRing:
Parse Arg CheckFid .
'Kedit' CheckFid '(New'
If Size.1() \= 0 Then Return TRUE
'QQuit'
Return FALSE