[w]getstr

Get a string from the terminal screen, store it in the variable str, and echo it on the specified window. The getstr function works on the stdscr window.

Format

#include  <curses.h>

int getstr  (char *str);

int wgetstr  (WINDOW *win, char *str);

Arguments

win
A pointer to the window.
str
Must be large enough to hold the character string fetched from the window.

Description

The getstr and wgetstr functions refresh the specified window before fetching a string. The new-line terminator is stripped from the fetched string. For more information, see the scrollok function in this section.

Return Values
OK  Indicates success. 
ERR  Indicates that the function makes the screen scroll illegally. 


Previous Page | Next Page | Table of Contents | Index