ref: ad2da48df5d11cc7b31f01a507cdc61a3ed80070
parent: fc7d6470a2c308ac8265515703be2b657aac67e0
author: Sigrid Solveig Haflínudóttir <[email protected]>
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;