Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > U

ungetch(3X)

ENHANCED CURSES
HP-UX 11i Version 3: February 2007
» 

Technical documentation

» Feedback
Content starts here

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

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2007 Hewlett-Packard Development Company, L.P.