The Single UNIX ® Specification, Version 2
Copyright © 1997 The Open Group

 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. The result of successive calls without an intervening call to getch() or get_wch() are unspecified.

 RETURN VALUE

Upon successful completion, these functions return OK. Otherwise, they return ERR.

 ERRORS

No errors are defined.

 SEE ALSO

Input Processing , getch(), get_wch(), <curses.h>.

UNIX ® is a registered Trademark of The Open Group.
Copyright © 1997 The Open Group
[ Main Index | XSH | XCU | XBD | XCURSES | XNS ]