PFE - Portable Forth Environment - pfe Forth Wordsets

  PFE 0.33.71 Homepage SourceForge Download Documentation -Overview -The PFE Manual old manual / (book) -ChangeLog -Authors -License (LGPL) -Wordsets / (book) -Functions .. (book) -Dp of ANS Forth -The 4thTutor -Forthprimer.pdf - Old Wordsets - Old Words List Forth Links * Forth Repository * Taygeta Compilation * TinyBoot FirmWare * FiCL, Free Forth * Research Vienna * Research Bournemouth * zForth WebRing Other Links * Tektronix/MPT * Forth Org. (FIG) * Forth Inc. * MPE Ltd. Forths * SF Win32Forth * PD Win32Forth * Neil Bawd generated (C) Guido U. Draheim guidod@gmx.de | ## BLOCK-Misc Compatibility words `CLOSE-BLOCKFILE``( -- )``[FTH] w32for` => `[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 ;
  primitive code = [p4_close_blockfile] `OPEN-BLOCKFILE``( "filename" -- )``[FTH] w32for` => `[FORTH]` w32for-implementation:
          close-blockfile
          parse-word r/w open-file abort" failed to open block-file"
          set-blockfile
          empty-buffers
  primitive code = [p4_open_blockfile] `CREATE-BLOCKFILE``( blocks-count "filename" -- )``[FTH] w32for` => `[FORTH]` 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 primitive code = [p4_create_blockfile] `SET-BLOCKFILE``( block-file* -- )``[EXT] win32for` => `"EXTENSIONS"` 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. primitive code = [p4_set_blockfile] `0 CREATE-BLOCKFILE``` => `"EXTENSIONS"` (no description) primitive code = [p4_zero_create_blockfile]