+/* $NetBSD: input.c,v 1.4 1995/04/27 21:22:24 mycroft Exp $ */
+
/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1990, 1993
+ * The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Ed James.
*/
#ifndef lint
-static char sccsid[] = "@(#)input.c 5.4 (Berkeley) 4/30/90";
+#if 0
+static char sccsid[] = "@(#)input.c 8.1 (Berkeley) 5/31/93";
+#else
+static char rcsid[] = "$NetBSD: input.c,v 1.4 1995/04/27 21:22:24 mycroft Exp $";
+#endif
#endif not lint
#include "include.h"
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 {
}
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;
setitimer(ITIMER_REAL, &itv, NULL);
#endif
#ifdef SYSV
- ioctl(fileno(stdin), TCSETAW, &tty_new);
alarm(aval);
#endif
}