home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / OB3.2D2.DMS / in.adf / ObSup_Scripts / CygnusEd / Err.ced < prev    next >
Encoding:
Text File  |  1992-08-01  |  2.1 KB  |  100 lines

  1. /* ------------------------------------------------------------------------
  2.   :Program.       Err.ced
  3.   :Contents.      Show Oberon error with CygnusEd Professional
  4.   :Author.        Kai Bolay [kai]
  5.   :Address.       Snail-Mail:              E-Mail:
  6.   :Address.       Hoffmannstraße 168       UUCP: kai@amokle.tynet.sub.org
  7.   :Address.       D-7250 Leonberg 1        FIDO: 2:247/706.3
  8.   :History.       v1.0 [kai] 12-Mar-92
  9.   :Version.       $VER: Err 1.0 (12-Mar-92)
  10.   :Copyright.     FD
  11.   :Language.      ARexx
  12.   :Translator.    RexxMast
  13. ------------------------------------------------------------------------ */
  14.  
  15. /*** Open oberonsupport.library ***/
  16.  
  17. options results
  18.  
  19. arg what
  20. if (what ~= "FIRST") & (what ~= "NEXT") & (what ~= "PREV") then do
  21.   Okay1 "Fehler: Falscher Aufruf!"
  22.   exit
  23. end
  24.  
  25. libname = "oberonsupport.library"
  26.  
  27. if ~show("L", libname) then do
  28.   if ~addlib(libname, 0, -30, 1) then do
  29.     text = libname "not found!"
  30.     Okay1 text
  31.   end
  32. end
  33.  
  34. status 21 /* Nur Filnamen (ohne Pfad) holen */
  35. filename = result
  36.  
  37. if filename = "" then do
  38.   Okay1 "Fehler: Kein Filename"
  39.   exit
  40. end
  41.  
  42. status 19 /* Kompletten Filenamen (mit Pfad) holen */
  43. filename = result
  44.  
  45. if right(filename,4) ~= ".mod" then do
  46.   Okay1 "Fehler: Filename endet nicht auf '.mod'"
  47.   exit
  48. end
  49.  
  50. filename = filename || 'E'
  51.  
  52. count = GetErrCount(filename)
  53. if count < 0 then do
  54.   Okay1 "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.  
  63.   if cnt = "" then do
  64.     Okay1 "Fehler: Kann mir aktuellen Fehler nicht holen"
  65.     exit
  66.   end
  67.  
  68.   if what = "NEXT" then do
  69.     cnt = cnt+1
  70.   end; else do
  71.     cnt = cnt-1
  72.   end
  73. end
  74.  
  75. if cnt >= count then do
  76.   Okay1 "Letzer Fehler bereits erreicht"
  77.   exit
  78. end
  79.  
  80. if cnt < 0 then do
  81.   Okay1 "Erster Fehler bereits erreicht"
  82.   exit
  83. end
  84.  
  85. if ~GetError(filename, cnt, Error.) then do
  86.   Okay1 "Fehler: Kann Fehlerdatei nicht laden"
  87.   exit
  88. end
  89.  
  90. jumpto Error.line Error.column-1
  91.  
  92. text = "Fehler Nr." cnt+1 "von" count || ":" || '0A'X || GetErrorText(Error.num)
  93.  
  94. Okay1 text
  95.  
  96. if ~setclip("CurrentError",cnt) then do
  97.   Okay1 "Fehler: Kann mir aktuellen Fehler nicht merken"
  98.   exit
  99. end
  100.