HPlogo HP-UX Reference Volume 4 of 5 > u

ungetch(3X)

ENHANCED CURSES
» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

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 intervening 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.

© Hewlett-Packard Development Company, L.P.