typeahead(3cur)
Name
typeahead − check for typeahead
Syntax
int typeahead(fd)
int fd;
Description
If typeahead is enabled, the curses program looks for typeahead input periodically while updating the screen. If input is found, the current update will be postponed until refresh or doupdate is called again. This allows faster response to commands typed in advance.
Normally, the input FILE pointer passed to the newterm routine, will be used to do this typeahead checking. If the routine initscr was called, the input FILE pointer is passed to stdin.
The typeahead routine specifies that the file descriptor fd is to be used to check for typeahead. If fd is −1, then typeahead is disabled.
Return Values
No return values are defined for this function.