X-Git-Url: https://git.cameronkatri.com/bsdgames-darwin.git/blobdiff_plain/3a8ae6ef56183c759d78de97fb015529bc6b005f..b4bb83fd34ab5386afa1b8af8e0956ff7953d0e0:/hack/hack.ioctl.c?ds=sidebyside diff --git a/hack/hack.ioctl.c b/hack/hack.ioctl.c index 714dcc51..fccd359f 100644 --- a/hack/hack.ioctl.c +++ b/hack/hack.ioctl.c @@ -3,37 +3,23 @@ */ #ifndef lint -static char rcsid[] = "$Id: hack.ioctl.c,v 1.3 1995/01/07 04:36:41 mycroft 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 */