fix ioctl:set-cbreak and ioctl:set-lbreak
FossilOrigin-Name: 1d887d0b60e0d6f9455e2889c961288d3887f98f7c6b548a5cc5255d255463dd
This commit is contained in:
parent
3cbe04ce03
commit
9ed5d12c71
1 changed files with 2 additions and 1 deletions
|
@ -25,7 +25,7 @@ void ioctl_get_terminal_size(NgaState *vm) {
|
|||
void ioctl_set_character_breaking_mode(NgaState *vm) {
|
||||
struct termios term;
|
||||
tcgetattr(STDIN_FILENO, &term);
|
||||
term.c_iflag |= BRKINT;
|
||||
term.c_lflag &=(~ICANON & ECHO);
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &term);
|
||||
}
|
||||
|
||||
|
@ -33,6 +33,7 @@ void ioctl_set_line_buffered_mode(NgaState *vm) {
|
|||
struct termios term;
|
||||
tcgetattr(STDIN_FILENO, &term);
|
||||
term.c_lflag |= ICANON;
|
||||
term.c_lflag |= ECHO;
|
||||
tcsetattr(STDIN_FILENO, TCSANOW, &term);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue