ref: 8032d2f13dd0f219b70c49cc0a590053083b5831
parent: a1adaa52705b4765849715276687df31ca25fbbb
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Nov 3 17:22:32 EST 2024
terminal: set VMIN to 1, clear INPCK and ISTRIP
--- a/terminal_posix.c
+++ b/terminal_posix.c
@@ -21,10 +21,10 @@
return -1;
struct termios t;
memcpy(&t, &tios, sizeof(t));
- t.c_iflag &= ~(BRKINT | ICRNL | IXON);
+ t.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
t.c_lflag &= ~(ISIG | ICANON | ECHO | IEXTEN);
t.c_oflag &= ~(OPOST);
- t.c_cc[VMIN] = 0;
+ t.c_cc[VMIN] = 1;
if(tcsetattr(STDIN_FILENO, TCSAFLUSH, &t) < 0)
return -1;
inraw = true;