Diff for /gforth/kernel/require.fs between versions 1.5 and 1.6

version 1.5, 1998/12/08 22:03:13 version 1.6, 1999/03/23 20:24:26
Line 49  create image-included-files  1 , A, ( po Line 49  create image-included-files  1 , A, ( po
     image-included-files 2@ nip included-files 2! ;      image-included-files 2@ nip included-files 2! ;
   
 : included? ( c-addr u -- f ) \ gforth  : included? ( c-addr u -- f ) \ gforth
     \G true, iff filename c-addr u is in included-files      \G True, iff filename c-addr u is in included-files
     included-files 2@ 0      included-files 2@ 0
     ?do ( c-addr u addr )      ?do ( c-addr u addr )
         dup >r 2@ 2over compare 0=          dup >r 2@ 2over compare 0=
Line 82  create image-included-files  1 , A, ( po Line 82  create image-included-files  1 , A, ( po
     open-fpath-file throw included1 ;      open-fpath-file throw included1 ;
   
 : required ( i*x addr u -- j*x ) \ gforth  : required ( i*x addr u -- j*x ) \ gforth
     \G include the file with the name given by @var{addr u}, if it is not      \G @code{include-file} the file with the name given by @var{addr u}, if it is not
     \G @code{included} (or @code{required}) already. Currently this      \G @code{included} (or @code{required}) already. Currently this
     \G works by comparing the name of the file (with path) against the      \G works by comparing the name of the file (with path) against the
     \G names of earlier included files.      \G names of earlier included files.
Line 101  create image-included-files  1 , A, ( po Line 101  create image-included-files  1 , A, ( po
 \ INCLUDE                                               9may93jaw  \ INCLUDE                                               9may93jaw
   
 : include  ( ... "file" -- ... ) \ gforth  : include  ( ... "file" -- ... ) \ gforth
 \G includes @var{file}  \G @code{include-file} the file @var{file}.
   name included ;    name included ;
   
 : require  ( ... "file" -- ... ) \ gforth  : require  ( ... "file" -- ... ) \ gforth
 \G includes @var{file} only if it is not included already  \G @code{include-file} @var{file} only if it is not included already.
   name required ;    name required ;
   
 0 [IF]  0 [IF]

Removed from v.1.5  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>