--- gforth/kernel/require.fs 2003/01/20 22:16:04 1.25 +++ gforth/kernel/require.fs 2003/03/09 15:17:06 1.28 @@ -1,6 +1,6 @@ \ require.fs -\ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc. +\ Copyright (C) 1995,1996,1997,1998,2000,2003 Free Software Foundation, Inc. \ This file is part of Gforth. @@ -76,16 +76,14 @@ has? new-input [IF] : included1 ( i*x file-id c-addr u -- j*x ) \ gforth \G Include the file file-id with the name given by @var{c-addr u}. save-mem 2dup add-included-file ( file-id ) - ['] include-file2 catch - throw ; + ['] read-loop execute-parsing-named-file ; [ELSE] : included1 ( i*x file-id c-addr u -- j*x ) \ gforth \G Include the file file-id with the name given by @var{c-addr u}. - loadfilename 2@ 2>r - save-mem 2dup loadfilename 2! + save-mem 2dup loadfilename>r add-included-file ( file-id ) ['] include-file2 catch - 2r> loadfilename 2! + r>loadfilename throw ; [THEN]