home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D2.DMS / in.adf / ObSup_Scripts / AmokEd / OberonErr.aed < prev    next >
Encoding:
Text File  |  1992-08-01  |  2.3 KB  |  99 lines

  1. /* ------------------------------------------------------------------------
  2. :Program.    OberonErr.aed
  3. :Contents.   Show Oberon error with AmokEd 1.20
  4. :Author.     Hartmut Goebel [hG]
  5. :Address.    Snail-Mail:            E-Mail:
  6. :Address.    Aufseßplatz 5          UUCP: hartmut@oberon.nbg.sub.org
  7. :Address.    D-8500 Nürnberg 40     FIDO: 2:246/81.1
  8. :History.    v1.0 [hG] 21 Apr 1992  from kai's Err.ced
  9. :History.    v1.1 [hG] 23 Apr 1992  optimized for speedup
  10. :History.    v1.2 [hG] 26 Apr 1992  tests if errorfile exists
  11. :Copyright.  Public Domain
  12. :Language.   ARexx
  13. ------------------------------------------------------------------------ */
  14.  
  15. options results
  16.  
  17. libname = "oberonsupport.library"
  18. if ~show("L", libname) then do
  19.   if ~addlib(libname, 0, -30, 1) then do
  20.     'title ('|| libname 'not found!)'
  21.     exit
  22.   end
  23. end
  24.  
  25. arg what upper
  26. if (what ~= "FIRST") & (what ~= "NEXT") & (what ~= "CURRENT") & (what ~= "PREV") then do
  27.   'title (Fehler: Falscher Aufruf!)'
  28.   exit
  29. end
  30.  
  31. 'getval $filename' /* Nur Filenamen (ohne Pfad) holen */
  32. filename = result
  33.  
  34. 'getval $path' /* Pfad holen */
  35. path = result
  36. if (right(path,1) ~= "/") & (right(path,1) ~= ":") & (path ~= "") then
  37.   filename = path || "/" || filename || "E"
  38. else
  39.   filename = path || filename || "E"
  40.  
  41.  
  42. if right(filename,5) ~= ".modE" then do
  43.   'title (Fehler: Filename endet nicht auf '.mod')'
  44.   exit
  45. end
  46.  
  47. if ~ exists(filename) then do
  48.   'title (Keine Fehler - wie schön)'
  49.   exit
  50. end
  51.  
  52. count = GetErrCount(filename)
  53. if count < 0 then do
  54.   'title (Fehler: Kann Fehleranzahl nicht bestimmen)'
  55.   exit
  56. end
  57.  
  58. if what = "FIRST" then do
  59.   cnt = 0
  60. end; else do
  61.   cnt = getclip("CurrentError")
  62.   if cnt = "" then do
  63.     'title (Fehler: Kann mir aktuellen Fehler nicht holen)'
  64.     exit
  65.   end
  66.  
  67.   if what = "NEXT" then do
  68.     cnt = cnt+1
  69.   end; else
  70.   if what = "PREV" then do
  71.     cnt = cnt-1
  72.   end
  73. end
  74.  
  75. if cnt >= count then do
  76.   'title (Keine weiteren Fehler)'
  77.   exit
  78. end; else
  79. if cnt < 0 then do
  80.   'title (Erster Fehler bereits erreicht)'
  81.   exit
  82. end
  83.  
  84. if ~GetError(filename, cnt, Error.) then do
  85.   'title (Fehler: Kann Fehlerdatei nicht laden)'
  86.   exit
  87. end
  88.  
  89. goto Error.line
  90. gotocol Error.column-1
  91.  
  92. 'title (' cnt+1 ||"/"|| count":" GetErrorText(Error.num) || ')'
  93.  
  94. if ~setclip("CurrentError",cnt) then do
  95.   'title (Fehler: Kann mir aktuellen Fehler nicht merken)'
  96.   exit
  97. end
  98.  
  99.