diff options
author | mycroft <mycroft@NetBSD.org> | 1995-04-27 21:22:19 +0000 |
---|---|---|
committer | mycroft <mycroft@NetBSD.org> | 1995-04-27 21:22:19 +0000 |
commit | 3e95714e815457b8e2c95138f9242701e3c08434 (patch) | |
tree | c2402f388750a4900ace82a944c066039d54afa1 /atc/input.c | |
parent | a65a873e56c35780711e9f73872c4fe0254589b0 (diff) | |
download | bsdgames-darwin-3e95714e815457b8e2c95138f9242701e3c08434.tar.gz bsdgames-darwin-3e95714e815457b8e2c95138f9242701e3c08434.tar.zst bsdgames-darwin-3e95714e815457b8e2c95138f9242701e3c08434.zip |
Use POSIX signal and tty semantics.
Diffstat (limited to 'atc/input.c')
-rw-r--r-- | atc/input.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/atc/input.c b/atc/input.c index fa2d58e9..b932d47f 100644 --- a/atc/input.c +++ b/atc/input.c @@ -1,4 +1,4 @@ -/* $NetBSD: input.c,v 1.3 1995/03/21 15:04:12 cgd Exp $ */ +/* $NetBSD: input.c,v 1.4 1995/04/27 21:22:24 mycroft Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -49,7 +49,7 @@ #if 0 static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93"; #else -static char rcsid[] = "$NetBSD: input.c,v 1.3 1995/03/21 15:04:12 cgd Exp $"; +static char rcsid[] = "$NetBSD: input.c,v 1.4 1995/04/27 21:22:24 mycroft Exp $"; #endif #endif not lint @@ -253,10 +253,10 @@ getcommand() do { c = gettoken(); - if (c == tty_new.sg_erase) { + if (c == tty_new.c_cc[VERASE]) { if (pop() < 0) noise(); - } else if (c == tty_new.sg_kill) { + } else if (c == tty_new.c_cc[VKILL]) { while (pop() >= 0) ; } else { @@ -347,8 +347,8 @@ gettoken() } wait(0); + tcsetattr(fileno(stdin), TCSADRAIN, &tty_new); #ifdef BSD - ioctl(fileno(stdin), TIOCSETP, &tty_new); itv.it_value.tv_sec = 0; itv.it_value.tv_usec = 1; itv.it_interval.tv_sec = sp->update_secs; @@ -356,7 +356,6 @@ gettoken() setitimer(ITIMER_REAL, &itv, NULL); #endif #ifdef SYSV - ioctl(fileno(stdin), TCSETAW, &tty_new); alarm(aval); #endif } |