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

Technical Reference: Base Operating System and Extensions, Volume 2

notimeout, timeout, wtimeout Subroutine

Purpose

Controls blocking on input.

Library

Curses Library (libcurses.a)

Curses Syntax

#include <curses.h>

int notimeout
(WINDOW *win,
bool bf);

void timeout
(int delay);

void wtimeout
(WINDOW *win,
int delay);

Description

The notimeout subroutine specifies whether Timeout Mode or No Timeout Mode is in effect for the screen associated with the specified window. If bf is TRUE, this screen is set to No Timeout Mode. If bf is FALSE, this screen is set to Timeout Mode. The initial state is FALSE.

The timeout and wtimeout subroutines set blocking or non-blocking read for the current or specified window based on the value of delay:

delay < 0 One or more blocking reads (indefinite waits for input) are used.
delay = 0 One or more non-blocking reads are used. Any Curses input subroutine will fail if every character of the requested string is not immediately available.
delay > 0 Any Curses input subroutine blocks for delay milliseconds and fails if there is still no input.

Parameters

*win  
bf  

Return Values

Upon successful completion, the notimeout subroutine returns OK. Otherwise, it returns ERR.

The timeout and wtimeout subroutines do not return a value.

Examples

To set the flag so that the wgetch subroutine does not set the timer when getting characters from the my_win window, use:

WINDOW *my_win;
notimeout(my_win, TRUE);

Related Information

The getch (getch, mvgetch, mvwgetch, or wgetch Subroutine), halfdelay (halfdelay Subroutine), nodelay (nodelay Subroutine), and notimeout (notimeout, timeout, wtimeout Subroutine) subroutines.

Curses Overview for Programming in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

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

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

Getting Characters in AIX 5L Version 5.2 General Programming Concepts: Writing and Debugging Programs.

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