home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / MISC / FPC355_2.ZIP / FPCSRC.ZIP / MLOAD.SEQ < prev    next >
Encoding:
Text File  |  1990-11-12  |  2.3 KB  |  64 lines

  1. \ Partial LOAD between Editor MARKs     ( AMR 16.04.90 11:06)
  2.  
  3. \ Minor modifications by T. Zimmer, to install MLOAD as Function key F9.
  4. \
  5. \ Now you just mark some lines, leave the editor, and press F9 to load
  6. \ the lines. This is I must say pretty nifty!!
  7.  
  8. \ 11/10/90 TJZ
  9. \ Also modified F-PC systems <LOAD> word to add OTHER.CHECK to avoid
  10. \ having to redefine <LOAD>. Saved some space, but not much, due to the
  11. \ additional error handling needed to make sure OTHER.CHECK gets reset
  12. \ in the event of a compile error.
  13. \ This file is now part of the F-PC system.
  14.  
  15.  
  16. defer efsave
  17.  
  18. : MERRFIX       ( -- )          \ handle memory load errors
  19.                 ['] noop is other.check         \ unlink OTHER.CHECK
  20.                 @> efsave is errfix             \ restore previous ERRFIX
  21.                 errfix ;                        \ perform old ERRFIX
  22.  
  23. : ?MARKEND.LINE ( - f )
  24.                 [ EDITOR ] MARKEND 2+ [ FORTH ] LOADLINE @ U> AND ;
  25.  
  26. : MLOAD         ( --- )      \ loads between Marks from the Editor
  27.                 [ EDITOR ] MARKSTRT  MARKEND  OVER + 1
  28.                 < IF   DROP seqhandle >hndle @ 0>=
  29.                         if      ?leave_set
  30.                                 .NOMARK <ED>
  31.                         then
  32.                   ELSE 1+
  33.                        ?fileopen
  34.                         ['] ?markend.line is other.check
  35.                                                 \ check for at load range end
  36.                         @> errfix   is efsave   \ save current ERRFIX
  37.                         ['] merrfix is errfix   \ handle errors
  38.                         dup>r >line             \ move to first marked-line
  39.                         cr ." Loading.."
  40.                         <LOAD>                  \ Load to last marked-line
  41.                         cr
  42.                         r> =: loadline
  43.                         ['] noop is other.check \ release special check
  44.                         @> efsave is errfix     \ restore previous ERRFIX
  45.                         MARK-CLEAR
  46.                   THEN  0 rows 1- at cr ;
  47.  
  48. hidden also
  49.  
  50. >keys1  \ select first key set
  51.  
  52. ' mload 195 lkey!       \ make MLOAD be invoked by pressing F9
  53.  
  54. only forth also
  55.  
  56. COMMENT:   Test lines to MARK and load with MLOAD
  57. .( THIS )
  58. .( IS )
  59. .( A )  ( QWZ )
  60. .( TEST )
  61. COMMENT;
  62.  
  63.  
  64.