summaryrefslogtreecommitdiff
path: root/tty.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-09-06 19:19:06 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-09-06 19:19:14 -0700
commitef404f718a6daec1be80f47dd35ea526e3631902 (patch)
tree9dad709545a625db04ae1084f9f535ed07761936 /tty.c
parenta31d966a8a2f48e420ca311106ffc7e4dc0fc277 (diff)
Document termios flags used
Diffstat (limited to 'tty.c')
-rw-r--r--tty.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tty.c b/tty.c
index 67f85d0..288a5b8 100644
--- a/tty.c
+++ b/tty.c
@@ -19,6 +19,11 @@ void tty_init(tty_t *tty){
struct termios new_termios = tty->original_termios;
+ /*
+ * Disable both of
+ * ICANON Canonical input (erase and kill processing).
+ * ECHO Enable echo.
+ */
new_termios.c_lflag &= ~(ICANON | ECHO);
tcsetattr(tty->fdin, TCSANOW, &new_termios);