Skip to content

Commit

Permalink
Use cfmakeraw instead of messing with termios flags ourselves.
Browse files Browse the repository at this point in the history
  • Loading branch information
nelhage committed Feb 12, 2011
1 parent 20b3b40 commit 692b079
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions reptyr.c
Expand Up @@ -74,9 +74,7 @@ void setup_raw(struct termios *save) {
if (tcgetattr(0, save) < 0) if (tcgetattr(0, save) < 0)
die("Unable to read terminal attributes: %m"); die("Unable to read terminal attributes: %m");
set = *save; set = *save;
set.c_iflag = 0; cfmakeraw(&set);
set.c_oflag = 0;
set.c_lflag = 0;
if (tcsetattr(0, TCSANOW, &set) < 0) if (tcsetattr(0, TCSANOW, &set) < 0)
die("Unable to set terminal attributes: %m"); die("Unable to set terminal attributes: %m");
} }
Expand Down

0 comments on commit 692b079

Please sign in to comment.