From 057afceb86e030ad65b0130436860d9a18066186 Mon Sep 17 00:00:00 2001 From: jkh Date: Sun, 4 Sep 1994 04:03:31 +0000 Subject: Bring in the 4.4 Lite games directory, modulo man page changes and segregation of the x11 based games. I'm not going to tag the originals with bsd_44_lite and do this in two stages since it's just not worth it for this collection, and I've got directory renames to deal with that way. Bleah. Submitted by: jkh --- games/hack/hack.ioctl.c | 53 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 games/hack/hack.ioctl.c (limited to 'games/hack/hack.ioctl.c') diff --git a/games/hack/hack.ioctl.c b/games/hack/hack.ioctl.c new file mode 100644 index 0000000..6669cea --- /dev/null +++ b/games/hack/hack.ioctl.c @@ -0,0 +1,53 @@ +/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ +/* hack.ioctl.c - version 1.0.2 */ + +/* 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 "config.h" +#ifdef BSD +#include +struct ltchars ltchars, ltchars0; +#else +#include /* also includes part of */ +struct termio termio; +#endif BSD + +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 +} + +setioctls() { +#ifdef BSD + (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars); +#else + (void) ioctl(fileno(stdin), (int) TCSETA, &termio); +#endif BSD +} + +#ifdef SUSPEND /* implies BSD */ +dosuspend() { +#include +#ifdef SIGTSTP + if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) { + settty((char *) 0); + (void) signal(SIGTSTP, SIG_DFL); + (void) kill(0, SIGTSTP); + gettty(); + setftty(); + docrt(); + } else { + pline("I don't think your shell has job control."); + } +#else SIGTSTP + pline("Sorry, it seems we have no SIGTSTP here. Try ! or S."); +#endif SIGTSTP + return(0); +} +#endif SUSPEND -- cgit v1.1