ungetch, unget_wch - push a character onto the input queue
#include <curses.h> int ungetch(int ch); int unget_wch(const wchar_t wch);
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. The result of successive calls without an intervening call to getch() or get_wch() are unspecified.
Upon successful completion, these functions return OK. Otherwise, they return ERR.
No errors are defined.
Input Processing , getch(), get_wch(), <curses.h>.