From ad6820fb04d5ed9ade265a7c5813e26c4fb762d5 Mon Sep 17 00:00:00 2001 From: Igor Pashev Date: Sat, 21 Jan 2012 03:08:39 +0300 Subject: Use static cfmakeraw() if not system --- misc-utils/script.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'misc-utils') diff --git a/misc-utils/script.c b/misc-utils/script.c index 9367fafb..2c734c97 100644 --- a/misc-utils/script.c +++ b/misc-utils/script.c @@ -67,6 +67,18 @@ #include #endif +#ifndef HAVE_CFMAKERAW +static void cfmakeraw(struct termios *t) { + if (t != NULL) { + t->c_iflag &= ~(IMAXBEL|IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + t->c_oflag &= ~OPOST; + t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + t->c_cflag &= ~(CSIZE|PARENB); + t->c_cflag |= CS8; + } +} +#endif + void finish(int); void done(void); void fail(void); -- cgit v1.2.3