nodelay Subroutine
Purpose
Enables or disables block during read.
Library
Curses Library (libcurses.a)
Syntax
#include <curses.h>
int nodelay(WINDOW *win,
bool bf);
Description
The nodelay subroutine specifies whether Delay Mode or No Delay Mode is in effect for the screen associated with the specified window. If bf is TRUE, this screen is set to No Delay Mode. If bf is FALSE, this screen is set to Delay Mode. The initial state is FALSE.
Parameters
Item | Description |
---|---|
bf | |
*win |
Return Values
Upon successful completion, the nodelay subroutine returns OK. Otherwise, it returns ERR.
Examples
- To cause the wgetch subroutine to return an error message,
if no input is ready in the user-defined window my_window,
use:
nodelay(my_window, TRUE);
- To allow for a delay when retrieving a character in the user-defined
window my_window, use:
WINDOW *my_window; nodelay(my_window, FALSE);