Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/curses-v3]: src/lib/libcurses Use fpurge() in flushinp().
details: https://anonhg.NetBSD.org/src/rev/a8127bb2fcba
branches: curses-v3
changeset: 479962:a8127bb2fcba
user: jdc <jdc%NetBSD.org@localhost>
date: Sun Mar 05 23:21:38 2000 +0000
description:
Use fpurge() in flushinp().
diffstat:
lib/libcurses/tty.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (34 lines):
diff -r 50cd7936db5a -r a8127bb2fcba lib/libcurses/tty.c
--- a/lib/libcurses/tty.c Sun Mar 05 23:21:21 2000 +0000
+++ b/lib/libcurses/tty.c Sun Mar 05 23:21:38 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tty.c,v 1.12.6.1 2000/01/09 20:43:23 jdc Exp $ */
+/* $NetBSD: tty.c,v 1.12.6.2 2000/03/05 23:21:38 jdc Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -38,13 +38,11 @@
#if 0
static char sccsid[] = "@(#)tty.c 8.6 (Berkeley) 1/10/95";
#else
-__RCSID("$NetBSD: tty.c,v 1.12.6.1 2000/01/09 20:43:23 jdc Exp $");
+__RCSID("$NetBSD: tty.c,v 1.12.6.2 2000/03/05 23:21:38 jdc Exp $");
#endif
#endif /* not lint */
#include <sys/types.h>
-#include <sys/fcntl.h>
-#include <sys/ioctl.h>
#include <stdlib.h>
#include <termios.h>
@@ -430,8 +428,7 @@
int
flushinp()
{
- int what = FREAD;
- (void) ioctl(STDIN_FILENO, TIOCFLUSH, &what);
+ (void) fpurge(stdin);
return (OK);
}
Home |
Main Index |
Thread Index |
Old Index