blob: 9ac5169d2dc57d136f9da62765ce4d02256912a6 [file] [log] [blame]
\ Introduce a dummy console that will eat away all chars and make all
\ the components dependent on stdout happy.
new-device
" devnull-console" device-name
: open true ;
: close ;
: write ( adr len -- actual )
nip
;
: read ( adr len -- actual )
2drop 0
;
: setup-alias
" devnull-console" find-alias 0= IF
" devnull-console" get-node node>path set-alias
ELSE
drop
THEN
;
: dummy-term-emit drop ;
: dummy-term-key 0 ;
: dummy-term-key? FALSE ;
' dummy-term-emit to emit
' dummy-term-key to key
' dummy-term-key? to key?
setup-alias
finish-device