ungetch(3curses)


ungetch -- push a character onto the input queue

Synopsis

cc [options] file -lcurses
#include <curses.h>

int ungetch(int ch);

int unget_wch(const wchar_t wch);

Description

The ungetch(3curses) function pushes the single-byte character ch onto the head of the input queue.

The unget_wch(3curses) 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(3curses) or get_wch(3curses) are unspecified.

Return value

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

Errors

No errors are defined.

Standards Conformance

The Single UNIX Specification, Version 2; The Open Group.

References

``Input Processing'', getch(3curses), get_wch(3curses), curses(4)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004