--- gforth/blocks.fs 2006/10/08 11:30:55 1.44 +++ gforth/blocks.fs 2007/02/18 18:59:40 1.49 @@ -1,6 +1,6 @@ \ A less simple implementation of the blocks wordset. -\ Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,2000,2003,2006 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -78,11 +78,12 @@ Defer flush-blocks ( -- ) \ gforth try ( c-addr u ) 2dup open-fpath-file throw rot close-file throw 2dup file-status throw bin open-file throw - >r 2drop r> - recover ( c-addr u ior ) + >r 2drop r> 0 + restore endtry + ?dup-if ( c-addr u ior ) >r 2dup file-status nip 0= r> and throw \ does it really not exist? r/w bin create-file throw - endtry + then block-fid @ IF flush-blocks block-fid @ close-file throw THEN @@ -229,7 +230,7 @@ Create block-input A, A, A, A, A, \G @code{BLK}, set @code{>IN} to 0 and interpret. When the parse \G area is exhausted, restore the input source specification. block-input 0 new-tib dup loadline ! blk ! s" * a block*" loadfilename 2! - ['] interpret catch pop-file rethrow ; + ['] interpret catch pop-file throw ; [ELSE] : (source) ( -- c-addr u ) blk @ ?dup @@ -250,7 +251,7 @@ Create block-input A, A, A, A, A, dup loadline ! blk ! >in off ['] interpret catch pop-file r>loadfilename - rethrow ; + throw ; [THEN] : thru ( i*x n1 n2 -- j*x ) \ block-ext