home *** CD-ROM | disk | FTP | other *** search
- /* ------------------------------------------------------------------------
- :Program. OberonErr.aed
- :Contents. Show Oberon error with AmokEd 1.20
- :Author. Hartmut Goebel [hG]
- :Address. Snail-Mail: E-Mail:
- :Address. Aufseßplatz 5 UUCP: hartmut@oberon.nbg.sub.org
- :Address. D-8500 Nürnberg 40 FIDO: 2:246/81.1
- :History. v1.0 [hG] 21 Apr 1992 from kai's Err.ced
- :History. v1.1 [hG] 23 Apr 1992 optimized for speedup
- :History. v1.2 [hG] 26 Apr 1992 tests if errorfile exists
- :Copyright. Public Domain
- :Language. ARexx
- ------------------------------------------------------------------------ */
-
- options results
-
- libname = "oberonsupport.library"
- if ~show("L", libname) then do
- if ~addlib(libname, 0, -30, 1) then do
- 'title ('|| libname 'not found!)'
- exit
- end
- end
-
- arg what upper
- if (what ~= "FIRST") & (what ~= "NEXT") & (what ~= "CURRENT") & (what ~= "PREV") then do
- 'title (Fehler: Falscher Aufruf!)'
- exit
- end
-
- 'getval $filename' /* Nur Filenamen (ohne Pfad) holen */
- filename = result
-
- 'getval $path' /* Pfad holen */
- path = result
- if (right(path,1) ~= "/") & (right(path,1) ~= ":") & (path ~= "") then
- filename = path || "/" || filename || "E"
- else
- filename = path || filename || "E"
-
-
- if right(filename,5) ~= ".modE" then do
- 'title (Fehler: Filename endet nicht auf '.mod')'
- exit
- end
-
- if ~ exists(filename) then do
- 'title (Keine Fehler - wie schön)'
- exit
- end
-
- count = GetErrCount(filename)
- if count < 0 then do
- 'title (Fehler: Kann Fehleranzahl nicht bestimmen)'
- exit
- end
-
- if what = "FIRST" then do
- cnt = 0
- end; else do
- cnt = getclip("CurrentError")
- if cnt = "" then do
- 'title (Fehler: Kann mir aktuellen Fehler nicht holen)'
- exit
- end
-
- if what = "NEXT" then do
- cnt = cnt+1
- end; else
- if what = "PREV" then do
- cnt = cnt-1
- end
- end
-
- if cnt >= count then do
- 'title (Keine weiteren Fehler)'
- exit
- end; else
- if cnt < 0 then do
- 'title (Erster Fehler bereits erreicht)'
- exit
- end
-
- if ~GetError(filename, cnt, Error.) then do
- 'title (Fehler: Kann Fehlerdatei nicht laden)'
- exit
- end
-
- goto Error.line
- gotocol Error.column-1
-
- 'title (' cnt+1 ||"/"|| count":" GetErrorText(Error.num) || ')'
-
- if ~setclip("CurrentError",cnt) then do
- 'title (Fehler: Kann mir aktuellen Fehler nicht merken)'
- exit
- end
-
-