summaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tty.c b/tty.c
index 5293627..11c6de4 100644
--- a/tty.c
+++ b/tty.c
@@ -30,11 +30,13 @@ void tty_init(tty_t *tty, const char *tty_filename) {
struct termios new_termios = tty->original_termios;
/*
- * Disable both of
+ * Disable all of
* ICANON Canonical input (erase and kill processing).
- * ECHO Enable echo.
- * ISIG Enable signals from control characters
+ * ECHO Echo.
+ * ISIG Signals from control characters
+ * ICRNL Conversion of CR characters into NL
*/
+ new_termios.c_iflag &= ~(ICRNL);
new_termios.c_lflag &= ~(ICANON | ECHO | ISIG);
if (tcsetattr(tty->fdin, TCSANOW, &new_termios))