]>
git.cameronkatri.com Git - bsdgames-darwin.git/blob - hack/hack.ioctl.c
af62748fe563d4fa0c579810391d3ab80ea0f753
2 * Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
6 static char rcsid
[] = "$NetBSD: hack.ioctl.c,v 1.4 1995/03/23 08:30:29 cgd Exp $";
9 /* This cannot be part of hack.tty.c (as it was earlier) since on some
10 systems (e.g. MUNIX) the include files <termio.h> and <sgtty.h>
11 define the same constants, and the C preprocessor complains. */
16 struct ltchars ltchars
, ltchars0
;
18 #include <termio.h> /* also includes part of <sgtty.h> */
24 (void) ioctl(fileno(stdin
), (int) TIOCGLTC
, (char *) <chars
);
25 (void) ioctl(fileno(stdin
), (int) TIOCSLTC
, (char *) <chars0
);
27 (void) ioctl(fileno(stdin
), (int) TCGETA
, &termio
);
33 (void) ioctl(fileno(stdin
), (int) TIOCSLTC
, (char *) <chars
);
35 (void) ioctl(fileno(stdin
), (int) TCSETA
, &termio
);
39 #ifdef SUSPEND /* implies BSD */
43 if(signal(SIGTSTP
, SIG_IGN
) == SIG_DFL
) {
45 (void) signal(SIGTSTP
, SIG_DFL
);
46 (void) kill(0, SIGTSTP
);
51 pline("I don't think your shell has job control.");
54 pline("Sorry, it seems we have no SIGTSTP here. Try ! or S.");