cursetree/src/termio.c

22 lines
500 B
C
Raw Normal View History

2025-09-28 00:06:02 +10:00
#include "termio.h"
int termmode_raw(struct ct_term *restrict t) {
t->termios.c_lflag &= ~(ISIG);
}
/* Set ncurses terminal mode (buffering, character processing,
* Key->SIG handling, and other termios(3) functionality).
*/
int termmode(struct ct_term *restrict t, const enum crs_termmode mode) {
switch (mode) {
case TMODE_RAW:
return raw();
case TMODE_CANON:
return canon(); /* ITS A CANON EVENT OHMAHGOH */
default:
/* defaulting is not possible. */
return 1;
}
}