retroforth/interface/ioctl.retro
crc 3962c08662 down to 10 words w/o recorded stack comments
FossilOrigin-Name: 9a36cf9d0e7ddd0131df3867aa4285f0c26ccde64ef7c193729932647d8829a3
2024-09-09 18:07:02 +00:00

12 lines
398 B
Forth

~~~
:ioctl:operation (:n-)
DEVICE:IOCTL io:scan-for
dup n:negative? [ drop 'Error:_ioctl_device_not_found s:put nl ] if;
io:invoke ;
:ioctl:term-size (:-nn) #0 ioctl:operation ;
:ioctl:set-cbreak (:-) #1 ioctl:operation ;
:ioctl:set-lbreak (:-) #2 ioctl:operation ;
:ioctl:save-state (:-) #3 ioctl:operation ;
:ioctl:restore-state (:-) #4 ioctl:operation ;
~~~