--- gforth/blocks.fs 2000/08/17 12:46:57 1.30 +++ gforth/blocks.fs 2000/09/23 15:46:51 1.33 @@ -1,6 +1,6 @@ \ A less simple implementation of the blocks wordset. -\ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -16,7 +16,7 @@ \ You should have received a copy of the GNU General Public License \ along with this program; if not, write to the Free Software -\ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +\ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. \ A more efficient implementation would use mmap on OSs that @@ -216,9 +216,13 @@ User scr ( -- a-addr ) \ block-ext s-c-r \G Save the current input source specification. Store @i{n} in \G @code{BLK}, set @code{>IN} to 0 and interpret. When the parse \G area is exhausted, restore the input source specification. + loadfilename# @ >r + 2 loadfilename# ! \ "\a block/" push-file dup loadline ! blk ! >in off ['] interpret catch - pop-file throw ; + pop-file + r> loadfilename# ! + throw ; : thru ( i*x n1 n2 -- j*x ) \ block-ext \G @code{load} the blocks @i{n1} through @i{n2} in sequence.