mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-12-22 21:29:32 +00:00
Move streamfile-smart include into sfileint.fth, removing the need for
include.fb in test
This commit is contained in:
parent
c4cf299819
commit
5877b0e3e2
@ -211,17 +211,13 @@ test-blk.log: \
|
||||
|
||||
test3.log: \
|
||||
$(patsubst %, $(cpmfilesdir)/%, v4th3.com sfileint.fth \
|
||||
include.fb log2file.fb core.fr) \
|
||||
log2file.fb core.fr) \
|
||||
$(patsubst tests/%, $(cpmfilesdir)/%, $(wildcard tests/*.fth) \
|
||||
tests/empty.fb) | emu
|
||||
./emulator/run-in-runcpm.sh \
|
||||
"v4th3 sfileint.fth" \
|
||||
"include-inner" \
|
||||
"onlyforth" \
|
||||
"use include.fb" \
|
||||
"onlyforth dos also forth definitions" \
|
||||
"\ ' read-seq alias iread-seq" \
|
||||
"7 8 thru" \
|
||||
"include test-blk.fth" \
|
||||
"bye" \
|
||||
"exit"
|
||||
|
@ -370,7 +370,14 @@ Forth definitions
|
||||
: from isfile push use ;
|
||||
: loadfrom ( n -- )
|
||||
isfile push fromfile push use load close ;
|
||||
: include 1 loadfrom ;
|
||||
: include ( -- )
|
||||
rec-offset push isfile push fromfile push
|
||||
use cr file?
|
||||
include-inner
|
||||
incfile @
|
||||
IF increc @ incfile @ cr+ex!
|
||||
incfile @ readrec Abort" error re-reading after include"
|
||||
THEN ;
|
||||
|
||||
: eof ( -- f ) isfile@ dup filesize @ swap record @ = ;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user