home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Merciful 3
/
Merciful_Release_3.bin
/
software
/
m
/
magiccxv1.2+keyfile.lha
/
MagicCX
/
Rexx
/
Scripts.lzx
/
PASRevision.ged
< prev
next >
Wrap
Text File
|
1995-12-24
|
3KB
|
119 lines
/* $VER: 0.9, ©1993 Dietmar Eilert. Empty GoldED macro */
OPTIONS RESULTS /* enable return codes */
if (LEFT(ADDRESS(), 6) ~= "GOLDED") then /* not started by GoldEd ? */
address 'GOLDED.1'
'LOCK CURRENT' /* lock GUI, gain access */
OPTIONS FAILAT 6 /* ignore warnings */
SIGNAL ON SYNTAX /* ensure clean exit */
/* ------------------------- INSERT YOUR CODE HERE: -------------------- */
/*
$VER: PASRevision.ged 1.0 (12.8.94)
Revises an Pascal/Modula source code
The default Port of MagicCX is assumed to be MCX.
This script was written for GoldED, but I think it can
be easily ported to other editors having an ARexx-Port.
Written by : Michael Bergmann
(Kai`s note: Please excuse the German comments
I added the PUBSCREEN Entry, hope it works!)
*/
/*
Standard defines for INITIALVER INITIALREV INSERTBEFORE AND INSERTAFTER
(Please add complete paths for the files!)
*/
INITVER = 1
INITREV = 0
INSBEFORE = PASInsertBeforeHeader
INSAFTER = PASInsertAfterHeader
'QUERY ANYTEXT'
if (result = 'TRUE') then
DO
'QUERY DOC VAR OLDNAME'
filename = oldname
RevName = filename
'SAVE ALL'
'QUERY MODIFY'
RevDone = RESULT
IF RevDone = 'FALSE' then
DO
QUOTE = '22'X
OPTIONS RESULTS
ADDRESS 'MCX' REVISE 'FILE='QUOTE''RevName''QUOTE 'MODE=PAS' 'PUBSCREEN=GOLDED' 'INITIALVER='INITVER 'INITIALREV='INITREV 'INSERTBEFORE='INSBEFORE 'INSERTAFTER='INSAFTER
RevDone = RESULT
if RevDone = 'TRUE' then
open filename
'UNLOCK'
exit
end
end
else
DO
'UJUMP' /* Cursor in NULL-Position */
'TEXT STAY T "/** °°°°°° °°°°°° **/ "' /* ;-) Bug umgangen: Es werden unter Arexx keine LEEREN Fenster gespeichert */
'SAVE ALL ASK' /* File anlegen, sonst meckert KCX ! */
end
DO
QUERY DOC VAR NEWNAME /* Filename u. Pfad besorgen */
SAVE
filename = newname
RevName = filename
QUOTE = '22'X
OPTIONS RESULTS
ADDRESS 'MCX' REVISE 'FILE='QUOTE''RevName''QUOTE 'MODE=PAS' 'PUBSCREEN=GOLDED' 'INITIALVER='INITVER 'INITIALREV='INITREV 'INSERTBEFORE='INSBEFORE 'INSERTAFTER='INSAFTER
RevDone = RESULT
IF RevDone = 'TRUE' THEN
open filename
'GOTO BOF'
'SMARTCR' /* Cursor bei EOF+2 plazieren */
'SMARTCR'
end
/* ---------------------------- END OF YOUR CODE ----------------------- */
'UNLOCK' /* VERY important: unlock GUI */
EXIT
SYNTAX:
SAY "Sorry, error line" SIGL ":" ERRORTEXT(RC) ":-("
'UNLOCK'
EXIT