From ef5c6a6edaf3dcf2cddd46841dc0dd8fce2bf967 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 3 Sep 2010 10:21:16 -0400 Subject: 9term, win: better echo cancellation Also just drop \r from output. It's a losing battle to keep turning it off. R=rsc http://codereview.appspot.com/2128042 --- src/cmd/9term/bsdpty.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/cmd/9term/bsdpty.c') diff --git a/src/cmd/9term/bsdpty.c b/src/cmd/9term/bsdpty.c index 52b9bb8a..4836d24d 100644 --- a/src/cmd/9term/bsdpty.c +++ b/src/cmd/9term/bsdpty.c @@ -96,29 +96,6 @@ isecho(int fd) return ttmode.c_lflag&ECHO; } -int -setecho(int fd, int newe) -{ - int old; - - if(tcgetattr(fd, &ttmode) < 0) - fprint(2, "tcgetattr: %r\n"); - old = ttmode.c_lflag & ECHO; - if(old != newe){ - ttmode.c_lflag &= ~ECHO; - ttmode.c_lflag |= newe; - /* - * I tried using TCSADRAIN here, but that causes - * hangs if there is any output waiting for us. - * I guess TCSADRAIN is intended for use by our - * clients, not by us. - */ - if(tcsetattr(fd, 0, &ttmode) < 0) - fprint(2, "tcsetattr: %r\n"); - } - return old; -} - int getintr(int fd) { -- cgit v1.2.3