home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / TextEditors&Viewers / Ced / CYGNUSED3,5.DMS / in.adf / CEDScripts / DelError.ced < prev    next >
Encoding:
Text File  |  1993-07-07  |  1.6 KB  |  96 lines

  1. /*
  2. ** DelError.ced
  3. **
  4. ** $VER: DelError.ced 1.0.1 (07.07.93)
  5. **
  6. ** This script deletes the current error entry from scmsg's error
  7. ** buffer, thus moving on to the next error entry if there is one.
  8. ** Then it loads in the file(s) related to that entry and moves the
  9. ** cursor to the line number(s) relevant to the error, also
  10. ** displaying the error message in CygnusEd's message title bar.
  11. **
  12. ** This script requires CygnusEd Professional v3.5 (or later) to run.
  13. **
  14. ** SAS/C is a registered trademark of SAS Institute, Inc.
  15. **
  16. ** Copyright © 1993 ASDG, Incorporated  All Rights Reserved
  17. */
  18.  
  19. /* If scmsg is not running, I guess there are no errors, so reset the title bar. */
  20.  
  21. IF ~SHOW('P', 'SC_SCMSG') THEN DO
  22.     ADDRESS 'rexx_ced' DM
  23.     EXIT 0
  24. END
  25.  
  26.  
  27. ADDRESS 'SC_SCMSG'
  28.  
  29. OPTIONS RESULTS
  30.  
  31. /*
  32. ** See if the message file is already empty.
  33. */
  34.  
  35. 'FILE'
  36. OLDFILE = RESULT
  37. IF OLDFILE = "" THEN DO
  38.     /*
  39.     ** If the message file is empty, clear Ced's message bar and terminate scmsg.
  40.     */
  41.  
  42.     ADDRESS 'rexx_ced' DM
  43.     ADDRESS 'SC_SCMSG' QUIT
  44.     EXIT 0
  45. END
  46.  
  47.  
  48. /*
  49. ** Delete the current message in scmsg.
  50. */
  51.  
  52. DELETE
  53.  
  54.  
  55. /*
  56. ** Grab the file name, line number, error message etc. associated with the current error.
  57. */
  58.  
  59. 'FILE'
  60. FILE = RESULT
  61.  
  62. 'LINE'
  63. LINE = RESULT
  64.  
  65. 'TEXT'
  66. TEXT = RESULT
  67.  
  68. 'ALTFILE'
  69. ALTFILE = RESULT
  70.  
  71. 'ALTLINE'
  72. ALTLINE = RESULT
  73.  
  74. OPTIONS
  75.  
  76. ADDRESS 'rexx_ced'
  77.  
  78. IF FILE = "" THEN
  79.     DM 'No more errors'
  80. ELSE DO
  81.     /*
  82.     ** If there is an alternate file, load it in first, so that
  83.     ** the cursor ends up in the main error file.
  84.     */
  85.  
  86.     IF ALTFILE ~= "" THEN DO
  87.         OW ALTFILE
  88.         LL ALTLINE
  89.     END
  90.     OW FILE
  91.     LL LINE
  92.     DM TEXT
  93. END
  94.  
  95. EXIT 0
  96.