| 9 | #include "cmdline_private.h" |
| 10 | |
| 11 | void |
| 12 | terminal_adjust(struct cmdline *cl) |
| 13 | { |
| 14 | struct termios term; |
| 15 | |
| 16 | tcgetattr(0, &cl->oldterm); |
| 17 | |
| 18 | memcpy(&term, &cl->oldterm, sizeof(term)); |
| 19 | term.c_lflag &= ~(ICANON | ECHO | ISIG); |
| 20 | tcsetattr(0, TCSANOW, &term); |
| 21 | |
| 22 | setbuf(stdin, NULL); |
| 23 | } |
| 24 | |
| 25 | void |
| 26 | terminal_restore(const struct cmdline *cl) |
no test coverage detected