--- gforth/blocks.fs 2006/05/01 09:45:56 1.43 +++ gforth/blocks.fs 2007/12/31 17:34:58 1.52 @@ -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,2007 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -79,10 +79,10 @@ Defer flush-blocks ( -- ) \ gforth 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 ) + endtry-iferror ( 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 @@ -151,7 +151,7 @@ Defer flush-blocks ( -- ) \ gforth : get-buffer ( u -- a-addr ) \ gforth 0 buffers um/mod drop buffer-struct %size * block-buffers @ + ; -: block ( u -- a-addr ) \ gforthman- block +: block ( u -- a-addr ) \ block \G If a block buffer is assigned for block @i{u}, return its \G start address, @i{a-addr}. Otherwise, assign a block buffer \G for block @i{u} (if the assigned block buffer has been @@ -292,7 +292,7 @@ Create block-input A, A, A, A, A, \ 0= IF block-included ELSE included THEN ; get-current environment-wordlist set-current -true constant block +true constant block \ environment- environment true constant block-ext set-current