version 1.14, 1997/03/04 22:09:53
|
version 1.15, 1997/09/01 23:07:07
|
Line 71 interpret/compile: ctrl ( "<char>" -- c
|
Line 71 interpret/compile: ctrl ( "<char>" -- c
|
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" GFORTHHIST" getenv dup 0= [IF] |
s" os-class" environment? [IF] s" unix" compare 0= [ELSE] true [THEN] |
2drop s" ~/.gforth-history" |
[IF] |
[THEN] get-history |
|
|
|
: history-cold |
: history-cold |
Defers 'cold |
|
s" GFORTHHIST" getenv dup 0= IF |
s" GFORTHHIST" getenv dup 0= IF |
2drop s" ~/.gforth-history" |
2drop s" ~/.gforth-history" |
THEN get-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-file |
|
get-history ; |
|
[THEN] |
|
|
' history-cold IS 'cold |
' history-cold INIT8 chained |
|
history-cold |
|
|
\ moving in history file 16oct94py |
\ moving in history file 16oct94py |
|
|