typeahead.3x (2010 09)

t
typeahead(3X) typeahead(3X)
(CURSES)
NAME
typeahead control checking for typeahead
SYNOPSIS
#include <curses.h>
int typeahead(int fildes);
DESCRIPTION
The typeahead() function controls the detection of typeahead during a refresh, based on the value of
fildes:
If fildes is a valid file descriptor, typeahead is enabled during refresh; Curses periodically checks
fildes for input and aborts the refresh if any character is available. (This is the initial setting,
and the typeahead file descriptor corresponds to the input file associated with the screen created
by
initscr() or newterm().) The value of fildes need not be the file descriptor on which the
refresh is occurring.
If fildes is 1, Curses does not check for typeahead during refresh.
RETURN VALUE
Upon successful completion,
typeahead() returns OK. Otherwise, it returns ERR.
ERRORS
No errors are defined.
SEE ALSO
doupdate(3X), getch(3X), initscr(3X), curses_intro(3X), see section Input Processing, <curses.h>, X/Open
System Interface Definitions, Issue 4, Version 2 specification, Section 9.2, Parameters That Can Be Set .
CHANGE HISTORY
First released in X/Open Curses, Issue 2.
X/Open Curses, Issue 4
The entry is rewritten for clarity. The RETURN VALUE section now states that the function returns OK
on success and ERR on failure. No return values were defined in previous issues.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)