summaryrefslogtreecommitdiffstats
path: root/mbbsd/term.c
diff options
context:
space:
mode:
authorkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-25 11:16:28 +0800
committerkcwu <kcwu@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2009-05-25 11:16:28 +0800
commitafaef9bc9b8d29e8d2526882750408d8e41913c5 (patch)
treedd82b494a7a4e13bb9ac1030689098197e05be9c /mbbsd/term.c
parenta3594e6c51c8e969bf96e35f5fd02113032a0126 (diff)
downloadpttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar.gz
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar.bz2
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar.lz
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar.xz
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.tar.zst
pttbbs-afaef9bc9b8d29e8d2526882750408d8e41913c5.zip
- avoid call external program "stty".
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4477 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/term.c')
-rw-r--r--mbbsd/term.c7
1 files changed, 7 insertions, 0 deletions
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
}
/* ----------------------------------------------------- */