FORTH
w32for-implementation:
blockhandle -1 <> if flush close-file drop then
-1 set-blockfile
in pfe:
: CLOSE-BLOCKFILE
BLOCK-FILE ?DUP IF FLUSH CLOSE-FILE DROP THEN
OFF> BLOCK-FILE ;
|
block_misc ordinary primitive
w32for-implementation:
close-blockfile
parse-word r/w open-file abort" failed to open block-file"
set-blockfile
empty-buffers
|
block_misc ordinary primitive
w32for-implementation:
close-blockfile
parse-word r/w create-file abort" failed to create block-file"
set-blockfile
dup b/buf m* blockhandle resize-file
abort" unable to create a file of that size"
empty-buffers
0 do i wipe loop
flush
pfe does not wipe the buffers
|
block_misc ordinary primitive
EXTENSIONS
EXTENSIONS BLOCK-FILE
no special info, see general notes
block_misc loader code P4_DVaL
win32forth uses a system-filedescriptor where -1 means unused
in the BLOCKHANDLE, but we use a "FILE*"-like structure, so NULL
means NOT-IN-USE. Here we set it.
|
block_misc ordinary primitive
block_misc ordinary primitive
block_misc ordinary primitive
EXTENSIONS B/BUF
no special info, see general notes
block_misc ordinary constant