[gforth] / gforth / history.fs  

gforth: gforth/history.fs

Diff for /gforth/history.fs between version 1.31 and 1.32

version 1.31, Sun Mar 9 15:16:50 2003 UTC version 1.32, Mon Sep 1 22:12:46 2003 UTC
Line 100 
Line 100 
 : clear-tib ( max span addr pos -- max 0 addr 0 false )  : clear-tib ( max span addr pos -- max 0 addr 0 false )
   clear-line 0 tuck dup ;    clear-line 0 tuck dup ;
   
 : hist-pos    ( -- ud )  history file-position throw ;  : hist-pos    ( -- ud )  history file-position drop ( throw ) ;
 : hist-setpos ( ud -- )  history reposition-file throw ;  : hist-setpos ( ud -- )  history reposition-file drop ( throw ) ;
   
 : get-line ( addr len -- len' flag )  : get-line ( addr len -- len' flag )
   swap history read-line throw ;    swap history read-line throw ;
Line 129 
Line 129 
   
 : (enter)  ( max span addr pos1 -- max span addr pos2 true )  : (enter)  ( max span addr pos1 -- max span addr pos2 true )
   >r end^ 2@ hist-setpos    >r end^ 2@ hist-setpos
   2dup swap history write-line throw    2dup swap history write-line drop ( throw ) \ don't worry about errors
   hist-pos 2dup backward^ 2! end^ 2!    hist-pos 2dup backward^ 2! end^ 2!
   r> (ret) ;    r> (ret) ;
   


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help