home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fonts 1
/
freshfonts1.bin
/
programs
/
amiga
/
pastex
/
rexx
/
golded
/
tex-edit.ged
< prev
next >
Wrap
Text File
|
1994-03-22
|
2KB
|
102 lines
/*
$VER: TeX-Edit.ged V0.96 (19.3.94) Axel Burghardt
Rufe den Editor, wenn bei der Übersetzung ein Fehler gefunden
wurde. Der Cursor wird auf den ersten Fehler positioniert.
*/
Title = "TeX-Edit V0.96"
OPTIONS RESULTS
SIGNAL ON SYNTAX
PARSE ARG Filename Number .
/* ---------------------- Bibliothek öffnen ----------------------- */
IF ~SHOW('L','rexxsupport.library') THEN
IF ~ADDLIB('rexxsupport.library',0,-30,0) THEN DO
say "Konnte 'rexxsupport.library' nicht öffnen!"
EXIT 20
END
CALL SETCLIP("TEXTIME",TIME('s'))
PARSE VALUE namestruc(Filename) WITH ivol idirs ibase .
Texdir = pragma('d')
IF RIGHT(texdir,1)~=':' & RIGHT(texdir,1)~='/' THEN texdir = texdir || '/'
IF 0 = ivol THEN DO
Errnfile = Texdir || SUBSTR(Filename,1+ivol)
Logfile = Texdir || SUBSTR(Filename,1+ivol+idirs,ibase) || ".log"
END
ELSE DO
Errnfile = Filename
IF 0 = idirs THEN
Logfile = LEFT(Filename,ivol+idirs+ibase)||".log"
ELSE
Logfile = Texdir || SUBSTR(Filename,1+ivol+idirs,ibase)||".log"
END
/* ----------------------- Rufe nun GoldEd ------------------------ */
IF SHOW('P','GOLDED.1') THEN DO
ADDRESS "GOLDED.1"
'LOCK CURRENT'
'REQUEST BODY="Fehler gefunden! Logfile laden?" BUTTON="_Laden|_Abbrechen" TITLE="'Title'"'
IF Result = 0 THEN DO
'UNLOCK'
EXIT 0
END
/* ------------------- Altes Logfile schließen -------------------- */
IF "" ~= Logfile THEN DO
'WINDOW USE="'Logfile'"'
IF 0 = RC THEN 'QUIT'
'OPEN NEW NAME="'Logfile'"'
'WINDOW ARRANGE 0'
'WINDOW USE="'Logfile'"'
'FIRST'
IF 0 ~= Number THEN DO
'FIND CASE=TRUE NEXT STRING="l.'Number'"'
'MARK SET'
END
ELSE DO
'FIND CASE=TRUE NEXT STRING="l."'
'MARK SET'
'QUERY BUFFER VAR BUFFER'
PARSE VAR Buffer "l." Number .
END
END
ELSE
'REQUEST STRING="Logfile von TeX nicht gefunden!" TITLE="'Title'"'
'WINDOW USE="'Errnfile'"'
IF 0 ~= RC THEN
'OPEN NEW NAME="'Errnfile'"'
IF 0~= number THEN
'GOTO LINE="'Number'"'
'FIRST'
'UNLOCK'
EXIT 0
END
/* ---------------------- Editor läuft nicht ---------------------- */
EXIT 5
/* ----------------------- Fehlerbehandlung ----------------------- */
SYNTAX:
'REQUEST BODY="Fehler in Zeile' SIGL ':' ERRORTEXT(RC) '"'
'MARK HIDE'
'GOTO LINE='SIGL
'MARK SET'
'UNLOCK'
EXIT 5