[gforth] / gforth / history.fs  

gforth: gforth/history.fs

Diff for /gforth/history.fs between version 1.13 and 1.14

version 1.13, Mon Sep 30 13:16:11 1996 UTC version 1.14, Tue Mar 4 22:09:53 1997 UTC
Line 66 
Line 66 
   2dup r/w open-file 0<    2dup r/w open-file 0<
   IF  drop r/w create-file throw  ELSE  nip nip  THEN ;    IF  drop r/w create-file throw  ELSE  nip nip  THEN ;
   
 : get-history ( addr len -- wid )  : get-history ( addr len -- )
   force-open to history    force-open to history
   history file-size throw    history file-size throw
   2dup forward^ 2! 2dup backward^ 2! end^ 2! ;    2dup forward^ 2! 2dup backward^ 2! end^ 2! ;
   
 s" ~/.gforth-history" get-history  s" GFORTHHIST" getenv dup 0= [IF]
       2drop s" ~/.gforth-history"
   [THEN] get-history
   
 : history-cold  : history-cold
     Defers 'cold      Defers 'cold
     s" ~/.gforth-history" get-history ;      s" GFORTHHIST" getenv dup 0= IF
           2drop s" ~/.gforth-history"
       THEN  get-history ;
   
 ' history-cold IS 'cold  ' history-cold IS 'cold
   


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help