home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / barfly / editor-support / barflyinced / basmnexterror.ced < prev    next >
Text File  |  1977-12-31  |  2KB  |  91 lines

  1. /*
  2. ** $VER: BasmNextError 1.6 (05.04.95)
  3. **       (c) 1995 by Christian Rattei
  4. */
  5.  
  6. options results
  7. LF = '0a'x
  8.  
  9. parse arg CEDport
  10. if CEDport = '' then CEDport = address()
  11.  
  12. address value CEDport
  13. status 84    /* windownumber */
  14. view = result
  15.  
  16. jump to file 'RAM:Basm_Errors'
  17. if result ~= 1 then do
  18.     okay1 'Error:'LF'File not loaded'LF'(RAM:Basm_Errors).'
  19.     exit 0
  20.     end
  21.  
  22. status 69    /* blocky */
  23. if result ~= -1 then mark block
  24.  
  25. status 17    /* numlines */
  26. lines = result
  27.  
  28. lastline = 0
  29. error = 0
  30. do while lastline + error = 0
  31.     status 55    /* linebuffer */
  32.     line = result
  33.  
  34.     if (left(line,6) == 'Error ' | left(line,8) == 'Warning ') then error = 1
  35.     if (left(line,6) == 'Error,' | left(line,8) == 'Warning,') then error = 1
  36.  
  37.     status 47    /* cursorline */
  38.     if result = lines then lastline = 1
  39.  
  40.     down
  41.     if error = 1 then do
  42.         status 55    /* linebuffer */
  43.         line2 = result
  44.  
  45.         if (left(line2,6) == 'Error ' | left(line2,8) == 'Warning ') then up
  46.  
  47.         down
  48.         end
  49.     end
  50.  
  51. if lastline = 1 & error = 0 then do
  52.     okay1 'Found no more Errors/Warnings.'
  53.     foundview = 0
  54.     do while foundview = 0
  55.         'previous view'
  56.         status 84    /* windownumber */
  57.         if result = view then foundview = 1
  58.         end
  59.     exit 0
  60.     end
  61.  
  62. up
  63. status 55    /* linebuffer */
  64. line = result
  65.  
  66. number = subword(line,find(line,'Line')+1,1)
  67.  
  68. down
  69. down
  70. 'end of line'
  71.  
  72. search for "^" 0 0 1 1
  73. status 46    /* cursorcolumn */
  74. coloumn = result + 1
  75.  
  76. up
  77. up
  78. 'beg of line'
  79.  
  80. mark block
  81. down
  82.  
  83. foundview = 0
  84. do while foundview = 0
  85.     'previous view'
  86.     status 84    /* windownumber */
  87.     if result = view then foundview = 1
  88.     end
  89.  
  90. jumpto number coloumn
  91.