The
typeahead(3curses)
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(3curses)
or
newterm(3curses).)
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(3curses)
returns OK. Otherwise, it returns ERR.
Errors
No errors are defined.
Standards Conformance
The Single UNIX Specification, Version 2; The Open Group.