From afaef9bc9b8d29e8d2526882750408d8e41913c5 Mon Sep 17 00:00:00 2001 From: kcwu Date: Mon, 25 May 2009 03:16:28 +0000 Subject: - avoid call external program "stty". git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4477 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/term.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mbbsd/term.c') diff --git a/mbbsd/term.c b/mbbsd/term.c index 8cac2583..33cb4947 100644 --- a/mbbsd/term.c +++ b/mbbsd/term.c @@ -18,8 +18,15 @@ init_tty(void) /* * tty_new.c_cc[VTIME] = 0; tty_new.c_cc[VMIN] = 1; */ +#if 1 + cfmakeraw(&tty_new); + tty_new.c_cflag &= ~(CSIZE|PARENB); + tty_new.c_cflag |= CS8; + tcsetattr(1, TCSANOW, &tty_new); +#else tcsetattr(1, TCSANOW, &tty_new); system("stty raw -echo"); +#endif } /* ----------------------------------------------------- */ -- cgit v1.2.3