diff options
Diffstat (limited to 'lib/libc/gen/termios.c')
-rw-r--r-- | lib/libc/gen/termios.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/libc/gen/termios.c b/lib/libc/gen/termios.c index a99d86f..5264a2d 100644 --- a/lib/libc/gen/termios.c +++ b/lib/libc/gen/termios.c @@ -36,15 +36,11 @@ static char sccsid[] = "@(#)termios.c 8.2 (Berkeley) 2/21/94"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> +#include <sys/fcntl.h> #include <sys/ioctl.h> -#include <sys/tty.h> #include <sys/time.h> -#define KERNEL /* XXX - FREAD and FWRITE ifdef'd KERNEL*/ -#include <sys/fcntl.h> -#undef KERNEL #include <errno.h> -#include <stdio.h> #include <termios.h> #include <unistd.h> @@ -99,6 +95,7 @@ tcsetpgrp(fd, pgrp) pid_t tcgetpgrp(fd) + int fd; { int s; @@ -163,14 +160,17 @@ cfmakeraw(t) struct termios *t; { - t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); + t->c_iflag &= ~(IMAXBEL|IXOFF|INPCK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON|IGNPAR); + t->c_iflag |= IGNBRK; t->c_oflag &= ~OPOST; - t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); + t->c_lflag &= ~(ECHO|ECHOE|ECHOK|ECHONL|ICANON|ISIG|IEXTEN|NOFLSH|TOSTOP|PENDIN); t->c_cflag &= ~(CSIZE|PARENB); - t->c_cflag |= CS8; - /* XXX set MIN/TIME */ + t->c_cflag |= CS8|CREAD; + t->c_cc[VMIN] = 1; + t->c_cc[VTIME] = 0; } +int tcsendbreak(fd, len) int fd, len; { @@ -186,6 +186,7 @@ tcsendbreak(fd, len) return (0); } +int tcdrain(fd) int fd; { @@ -193,6 +194,7 @@ tcdrain(fd) return (ioctl(fd, TIOCDRAIN, 0)); } +int tcflush(fd, which) int fd, which; { @@ -215,6 +217,7 @@ tcflush(fd, which) return (ioctl(fd, TIOCFLUSH, &com)); } +int tcflow(fd, action) int fd, action; { |