Diff for /gforth/history.fs between versions 1.13 and 1.15

version 1.13, 1996/09/30 13:16:11 version 1.15, 1997/09/01 23:07:07
Line 66  interpret/compile: ctrl  ( "<char>" -- c Line 66  interpret/compile: ctrl  ( "<char>" -- c
   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" os-class" environment? [IF] s" unix" compare 0= [ELSE] true [THEN] 
   [IF]
   : history-cold
       s" GFORTHHIST" getenv dup 0= IF
           2drop s" ~/.gforth-history"
       THEN  get-history ;
   [ELSE]
   
   : history-dir
     s" TMP" getenv ?dup ?EXIT drop
     s" TEMP" getenv ?dup ?EXIT drop
     s" c:/" ;
   
   : history-file
     s" GFORTHHIST" getenv ?dup ?EXIT
     drop
     history-dir pad place
     s" /ghist.txt" pad +place pad count ;
   
 : history-cold  : history-cold
     Defers 'cold          history-file
     s" ~/.gforth-history" get-history ;          get-history ;
   [THEN]
   
 ' history-cold IS 'cold  ' history-cold INIT8 chained
   history-cold
   
 \ moving in history file                               16oct94py  \ moving in history file                               16oct94py
   

Removed from v.1.13  
changed lines
  Added in v.1.15


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>