ungetch.3x (2010 09)

u
ungetch(3X) ungetch(3X)
(ENHANCED CURSES)
NAME
ungetch, unget_wch — push a character onto the input queue
SYNOPSIS
#include <curses.h>
int ungetch(int ch);
int unget_wch(const wchar_t wch);
DESCRIPTION
The ungetch() function pushes the single-byte character ch onto the head of the input queue.
The
unget_wch() function pushes the wide character wch onto the head of the input queue.
One character of push-back is guaranteed. If these functions are called too many times without an inter-
vening call to
getch() or get_wch(), the operation may fail.
RETURN VALUE
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
SEE ALSO
Input Processing in curses_intro(3X), getch(3X), get_wch(3X), <curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 4.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)