version 1.35, 2010/05/13 09:48:45
|
version 1.39, 2012/12/31 15:25:19
|
Line 1
|
Line 1
|
\ require.fs |
\ require.fs |
|
|
\ Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007 Free Software Foundation, Inc. |
\ Copyright (C) 1995,1996,1997,1998,2000,2003,2006,2007,2010,2012 Free Software Foundation, Inc. |
|
|
\ This file is part of Gforth. |
\ This file is part of Gforth. |
|
|
Line 22
|
Line 22
|
create included-files 0 , 0 , ( pointer to and count of included files ) |
create included-files 0 , 0 , ( pointer to and count of included files ) |
\ note: these names must not contain a "/" or "\"; otherwise a part of |
\ note: these names must not contain a "/" or "\"; otherwise a part of |
\ that name might be used when expanding "./" (see expandtopic). |
\ that name might be used when expanding "./" (see expandtopic). |
here ," *somewhere*" dup c@ swap 1 + swap |
here ," string.fs" dup c@ swap 1 + swap , A, |
, A, here 2 cells - |
here 2 cells - |
create image-included-files 1 , A, ( pointer to and count of included files ) |
create image-included-files 1 , A, ( pointer to and count of included files ) |
\ included-files points to ALLOCATEd space, while image-included-files |
\ included-files points to ALLOCATEd space, while image-included-files |
\ points to ALLOTed objects, so it survives a save-system |
\ points to ALLOTed objects, so it survives a save-system |
Line 68 create image-included-files 1 , A, ( poi
|
Line 68 create image-included-files 1 , A, ( poi
|
: add-included-file ( c-addr u -- ) \ gforth |
: add-included-file ( c-addr u -- ) \ gforth |
\G add name c-addr u to included-files |
\G add name c-addr u to included-files |
included-files 2@ 2* cells 2 cells extend-mem |
included-files 2@ 2* cells 2 cells extend-mem |
2/ cell / included-files 2! |
2/ cell/ included-files 2! |
2! ; |
2! ; |
|
|
: included1 ( i*x file-id c-addr u -- j*x ) \ gforth |
: included1 ( i*x file-id c-addr u -- j*x ) \ gforth |
Line 137 create image-included-files 1 , A, ( poi
|
Line 137 create image-included-files 1 , A, ( poi
|
|
|
: .included ( -- ) \ gforth |
: .included ( -- ) \ gforth |
\G list the names of the files that have been @code{included} |
\G list the names of the files that have been @code{included} |
included-files 2@ 2 cells under+ 1- .strings ; |
included-files 2@ .strings ; |