home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / LASER / FPC35_5.ZIP / FPCSRC.ZIP / EDITERR.SEQ < prev    next >
Encoding:
Text File  |  1989-05-26  |  991 b   |  31 lines

  1. \ EDITERR.SEQ   Automatically enter editor on compile error
  2.  
  3. defined ed nip 0= #if \s  #endif        \ if ED not defined, stop loading
  4.  
  5. only forth also definitions editor also
  6.  
  7. create msgsave  32 allot
  8. create wordsave 32 allot
  9.  
  10. : (EDITERR)     ( a1 n1 --- )
  11.                 31 min dup msgsave c! msgsave 1+ swap cmove
  12.                 >in @ 1- here c@ - 0MAX =: screenchar
  13.                 tib screenchar + wordsave dup>r 1+
  14.                 here c@ 31 min dup>r cmove r> r> c!
  15.                 0 rows 1- at
  16.                 30 here c@ msgsave c@ + 2/ - spaces ." █████>  "
  17.                 wordsave count type 2 spaces
  18.                 msgsave count type ."   <█████  "
  19.                 edinit
  20.                 rows 3 - save!> last.textline
  21.                 <ed>
  22.                 restore> last.textline
  23.                 done quit    ;
  24.  
  25. : autoediton    ( --- )
  26.                 ['] (editerr) is doerror ;
  27.  
  28. : autoeditoff   ( --- )
  29.                 ['] (doerror) is doerror ;
  30.  
  31.