HPlogo MPE/iX Developer's Kit Reference Manual Volume 2: HP 3000 MPE/iX Computer Systems > Chapter 4 CURSES

typeahead

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The typeahead routine is used to check for type-ahead characters.

Syntax

   #include <curses.h>



   int typeahead (int fd);

Parameters

fd

The file descriptor that is used to check for type-ahead characters.

Return Values

OK

Successful completion.

ERR

An error occurred.

Description

The typeahead() routine specifies the file descriptor (fd) to use to check for type-ahead characters (characters typed by the user but not yet processed by CURSES).

CURSES checks for type-ahead characters periodically while updating the screen. If characters are found, the current update is postponed until the next wrefresh() or doupdate(). This speeds up response to commands that have been typed ahead. Normally, the input FILE passed to newterm(), or stdin in the case of initscr(), is used for type-ahead checking.

If fd is -1, no type-ahead checking is done.

Implementation Considerations

Identical to XPG/3

See Also

wgetch(), wrefresh()

Portability

HP-UX, UNIX System V, XPG/3

Feedback to webmaster