From f15d2e466a0d6dc3ec30e9de57fbe8f0fce52621 Mon Sep 17 00:00:00 2001 From: mycroft Date: Fri, 28 Apr 1995 23:01:45 +0000 Subject: Use POSIX tty semantics. --- hack/hack.ioctl.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'hack/hack.ioctl.c') diff --git a/hack/hack.ioctl.c b/hack/hack.ioctl.c index af62748f..fccd359f 100644 --- a/hack/hack.ioctl.c +++ b/hack/hack.ioctl.c @@ -3,37 +3,23 @@ */ #ifndef lint -static char rcsid[] = "$NetBSD: hack.ioctl.c,v 1.4 1995/03/23 08:30:29 cgd Exp $"; +static char rcsid[] = "$NetBSD: hack.ioctl.c,v 1.5 1995/04/28 23:01:45 mycroft Exp $"; #endif /* not lint */ /* This cannot be part of hack.tty.c (as it was earlier) since on some systems (e.g. MUNIX) the include files and define the same constants, and the C preprocessor complains. */ #include +#include #include "config.h" -#ifdef BSD -#include -struct ltchars ltchars, ltchars0; -#else -#include /* also includes part of */ -struct termio termio; -#endif BSD +struct termios termios; getioctls() { -#ifdef BSD - (void) ioctl(fileno(stdin), (int) TIOCGLTC, (char *) <chars); - (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars0); -#else - (void) ioctl(fileno(stdin), (int) TCGETA, &termio); -#endif BSD + (void) tcgetattr(fileno(stdin), &termios); } setioctls() { -#ifdef BSD - (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars); -#else - (void) ioctl(fileno(stdin), (int) TCSETA, &termio); -#endif BSD + (void) tcsetattr(fileno(stdin), TCSADRAIN, &termios); } #ifdef SUSPEND /* implies BSD */ -- cgit v1.2.3-56-ge451