[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2


ungetch, unget_wch Subroutine

Purpose

Pushes a character onto the input queue.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>

int ungetch
(int ch);

int unget_wch
(const wchar_t wch);

Description

The ungetch subroutine pushes the single-byte character ch onto the head of the input queue.

The unget_wch subroutine 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 the getch or get_wch subroutine are unspecified.

Parameters


ch  
wch  

Examples

To force the key KEY_ENTER back into the queue, use:

ungetch(KEY_ENTER);

Implementation Specifics

This subroutine is part of Base Operation System (BOS) Runtime.

Related Information

The getch or wgetch (getch, mvgetch, mvwgetch, or wgetch Subroutine) subroutine.

Curses Overview for Programming and List of Curses Subroutines in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]