mirror of
https://github.com/forth-ev/VolksForth.git
synced 2024-10-31 19:04:43 +00:00
Fix log2file.fb logopen so that it restores isfile after opening the logfile
This commit is contained in:
parent
eb8a218bf1
commit
6616904fbb
@ -1 +1 @@
|
||||
\ logging to a text file phz 03jan22 \ load screen phz 04jan22 1 2 +thru \ log-type log-emit log-cr alsologtofile phz 04jan22 context @ dos also context ! \ vocabulary log dos also log definitions file logfile variable logfcb : log-type 2dup (type ds@ -rot logfcb @ lfputs ; : log-emit dup (emit logfcb @ fputc ; : log-cr (cr #cr logfcb @ fputc #lf logfcb @ fputc ; Output: alsologtofile log-emit log-cr log-type (del (page (at (at? ; \ logopen logclose phz 04jan22 : logopen ( -- ) logfile make isfile@ dup freset logfcb ! alsologtofile ; : logclose ( -- ) display logfcb @ fclose ;
|
||||
\ logging to a text file phz 03jan22 \ load screen phz 04jan22 1 2 +thru \ log-type log-emit log-cr alsologtofile phz 04jan22 context @ dos also context ! \ vocabulary log dos also log definitions file logfile variable logfcb : log-type 2dup (type ds@ -rot logfcb @ lfputs ; : log-emit dup (emit logfcb @ fputc ; : log-cr (cr #cr logfcb @ fputc #lf logfcb @ fputc ; Output: alsologtofile log-emit log-cr log-type (del (page (at (at? ; \ logopen logclose phz 11jan22 : logopen ( -- ) isfile push logfile make isfile@ dup freset logfcb ! alsologtofile ; : logclose ( -- ) display logfcb @ fclose ;
|
@ -58,9 +58,10 @@ Output: alsologtofile
|
||||
|
||||
\ *** Block No. 3, Hexblock 3
|
||||
|
||||
\ logopen logclose phz 04jan22
|
||||
\ logopen logclose phz 11jan22
|
||||
|
||||
: logopen ( -- )
|
||||
isfile push
|
||||
logfile make isfile@ dup freset logfcb !
|
||||
alsologtofile ;
|
||||
|
||||
@ -73,4 +74,3 @@ Output: alsologtofile
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user