1 /* 2 * Copyright (c) 1980, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * %sccs.include.redist.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)flush_in.c 8.1 (Berkeley) 05/31/93"; 10 #endif /* not lint */ 11 12 # include <curses.h> 13 14 /* 15 * flush_in: 16 * Flush all pending input. 17 */ 18 flush_in() 19 { 20 # ifdef TIOCFLUSH 21 ioctl(fileno(stdin), TIOCFLUSH, NULL); 22 # else TIOCFLUSH 23 crmode(); 24 # endif TIOCFLUSH 25 } 26