diff options
| author | kitty <nepeta@canaglie.net> | 2026-03-08 23:21:57 +1100 |
|---|---|---|
| committer | kitty <nepeta@canaglie.net> | 2026-03-08 23:21:57 +1100 |
| commit | 08fdcc7461a968b931cfd3dbb2fbcc7dc805a02e (patch) | |
| tree | 95e767573f22233966f372e7c5f4e5570b073cba | |
| parent | 4b8a988fb0e663eb178882900ecf29d35485aba6 (diff) | |
raw and cooked mode
currently useless but it's there
| -rw-r--r-- | jefs.fs | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -430,12 +430,17 @@ make old-termios old-termios# allot : cooked restore-termios ; \ SETTING RAW MODE FLAGS {{{ \ see termios(3) -: raw-iflag termios termios.c_iflag @ ; -: raw-oflag ; -: raw-lflag ; -: raw-cflag ; +: raw-iflag ( tios -- ) termios.c_iflag dup @ + IGNBRK BRKINT or PARMRK or ISTRIP or INLCR or IGNCR or ICRNL or IXON or + negate and swap ! ; +: raw-oflag ( tios -- ) termios.c_oflag dup @ OPOST negate and swap ! ; +: raw-lflag ( tios -- ) termios.c_lflag dup @ + ECHO ECHONL or ICANON or ISIG or IEXTEN or negate and swap ! ; +: raw-cflag ( tios -- ) termios.c_cflag dup @ + CSIZE PARENB or negate and CS8 or swap ! ; \ }}} -: raw backup-termios ; +: raw backup-termios termios dup raw-iflag dup raw-oflag dup raw-lflag + dup raw-cflag TCSETSF stdin ioctl ; \ }}} \ DUMP {{{ |
