[gforth] / gforth / blocks.fs  

gforth: gforth/blocks.fs

Diff for /gforth/blocks.fs between version 1.2 and 1.3

version 1.2, Wed Aug 31 19:42:43 1994 UTC version 1.3, Thu Feb 9 17:49:54 1995 UTC
Line 15 
Line 15 
 variable buffer-dirty buffer-dirty off  variable buffer-dirty buffer-dirty off
   
   
   \ the file is opened as binary file, since it either will contain text
   \ without newlines or binary data
 : get-block-fid ( -- fid )  : get-block-fid ( -- fid )
     block-fid @ 0=      block-fid @ 0=
     if      if
         s" blocks.fb" r/w open-file 0<>          s" blocks.fb" r/w bin open-file 0<>
         if          if
             s" blocks.fb" r/w create-file .s throw              s" blocks.fb" r/w bin create-file throw
         then          then
         block-fid !          block-fid !
     then      then
Line 28 
Line 30 
   
 : block-position ( u -- )  : block-position ( u -- )
     \ positions the block file to the start of block u      \ positions the block file to the start of block u
     1- chars/block chars um* get-block-fid reposition-file .s throw ;      1- chars/block chars um* get-block-fid reposition-file throw ;
   
 : update ( -- )  : update ( -- )
     buffer-dirty on ;      buffer-dirty on ;
Line 54 
Line 56 
     if      if
         save-buffers          save-buffers
         dup block-position          dup block-position
         block-buffer chars/block get-block-fid read-file .s throw          block-buffer chars/block get-block-fid read-file throw
         \ clear the rest of the buffer if the file is too short          \ clear the rest of the buffer if the file is too short
         block-buffer over chars + chars/block rot - blank          block-buffer over chars + chars/block rot - blank
         buffer-block !          buffer-block !


Generate output suitable for use with a patch program
Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help