1 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
2 /* hack.ioctl.c - version 1.0.2 */
3 /* $FreeBSD: src/games/hack/hack.ioctl.c,v 1.2 1999/09/12 07:01:23 marcel Exp $
5 /* This cannot be part of hack.tty.c (as it was earlier) since on some
6 systems (e.g. MUNIX) the include files <termio.h> and <sgtty.h>
7 define the same constants, and the C preprocessor complains. */
12 struct ltchars ltchars, ltchars0;
14 #include <termio.h> /* also includes part of <sgtty.h> */
20 (void) ioctl(fileno(stdin), (int) TIOCGLTC, (char *) <chars);
21 (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars0);
23 (void) ioctl(fileno(stdin), (int) TCGETA, &termio);
29 (void) ioctl(fileno(stdin), (int) TIOCSLTC, (char *) <chars);
31 (void) ioctl(fileno(stdin), (int) TCSETA, &termio);
35 #ifdef SUSPEND /* implies BSD */
39 if(signal(SIGTSTP, SIG_IGN) == SIG_DFL) {
41 (void) signal(SIGTSTP, SIG_DFL);
42 (void) kill(0, SIGTSTP);
47 pline("I don't think your shell has job control.");
50 pline("Sorry, it seems we have no SIGTSTP here. Try ! or S.");