summaryrefslogtreecommitdiffstats
path: root/robots/flush_in.c
diff options
context:
space:
mode:
authormycroft <mycroft@NetBSD.org>1995-04-28 23:01:45 +0000
committermycroft <mycroft@NetBSD.org>1995-04-28 23:01:45 +0000
commitf15d2e466a0d6dc3ec30e9de57fbe8f0fce52621 (patch)
treed439be2f469f92d33b080176a7448e48355ac1b0 /robots/flush_in.c
parent4bcf6f69bae8f6f73026d095d7f74903eda2c42c (diff)
downloadbsdgames-darwin-f15d2e466a0d6dc3ec30e9de57fbe8f0fce52621.tar.gz
bsdgames-darwin-f15d2e466a0d6dc3ec30e9de57fbe8f0fce52621.tar.zst
bsdgames-darwin-f15d2e466a0d6dc3ec30e9de57fbe8f0fce52621.zip
Use POSIX tty semantics.
Diffstat (limited to 'robots/flush_in.c')
-rw-r--r--robots/flush_in.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/robots/flush_in.c b/robots/flush_in.c
index efe088d2..fecc4838 100644
--- a/robots/flush_in.c
+++ b/robots/flush_in.c
@@ -1,4 +1,4 @@
-/* $NetBSD: flush_in.c,v 1.3 1995/04/22 10:08:51 cgd Exp $ */
+/* $NetBSD: flush_in.c,v 1.4 1995/04/28 23:09:08 mycroft Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -37,11 +37,12 @@
#if 0
static char sccsid[] = "@(#)flush_in.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: flush_in.c,v 1.3 1995/04/22 10:08:51 cgd Exp $";
+static char rcsid[] = "$NetBSD: flush_in.c,v 1.4 1995/04/28 23:09:08 mycroft Exp $";
#endif
#endif /* not lint */
-# include <curses.h>
+# include <stdio.h>
+# include <termios.h>
/*
* flush_in:
@@ -49,9 +50,5 @@ static char rcsid[] = "$NetBSD: flush_in.c,v 1.3 1995/04/22 10:08:51 cgd Exp $";
*/
flush_in()
{
-# ifdef TIOCFLUSH
- ioctl(fileno(stdin), TIOCFLUSH, NULL);
-# else TIOCFLUSH
- crmode();
-# endif TIOCFLUSH
+ tcflush(fileno(stdin), TCIFLUSH);
}