Permalink
Browse files

Use cfmakeraw instead of messing with termios flags ourselves.

  • Loading branch information...
1 parent 20b3b40 commit 692b07933d02d82289dffc64af58d70e9521e3dd @nelhage committed Feb 12, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 reptyr.c
View
@@ -74,9 +74,7 @@ void setup_raw(struct termios *save) {
if (tcgetattr(0, save) < 0)
die("Unable to read terminal attributes: %m");
set = *save;
- set.c_iflag = 0;
- set.c_oflag = 0;
- set.c_lflag = 0;
+ cfmakeraw(&set);
if (tcsetattr(0, TCSANOW, &set) < 0)
die("Unable to set terminal attributes: %m");
}

0 comments on commit 692b079

Please sign in to comment.