/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* hack.ioctl.c - version 1.0.2 */ /* KLUDGE -- vars s/ltchars/ltc/ -- our C doesn't distinguish past 7 chars */ /* 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 ltc, ltc0; #else #include /* also includes part of */ struct termio termio; #endif BSD getioctls() { #ifdef BSD (void) ioctl(fileno(stdin), TIOCGLTC, (char *) <c); (void) ioctl(fileno(stdin), TIOCSLTC, (char *) <c0); #else (void) ioctl(fileno(stdin), TCGETA, &termio); #endif BSD } setioctls() { #ifdef BSD (void) ioctl(fileno(stdin), TIOCSLTC, (char *) <c); #else (void) ioctl(fileno(stdin), 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