curs_getstr(3X)

NAME
curs_getstr: getstr, wgetstr, mvgetstr, mvwgetstr, wgetnstr - accept character strings from ncurses terminal keyboard

SYNOPSIS
#include <ncurses.h> int getstr(char *str);
int wgetstr(WINDOW *win, char *str);
int mvgetstr(int y, int x, char *str);
int mvwgetstr(WINDOW *win, int y, int x, char *str);
int wgetnstr(WINDOW *win, char *str, int n);

DESCRIPTION
The function getstr is equivalent to a series of calls to getch, until a newline or carriage return is received (the terminating character is not included in the returned string). The resulting value is placed in the area pointed to by the character pointer str. wgetnstr reads at most n characters, thus preventing a possible overflow of the input buffer. Any attempt to enter more characters (other than the terminating newline or carriage return) causes a beep. The user's erase and kill characters are interpreted. If keypad mode is on for the window, KEY_LEFT and KEY_BACKSPACE are both considered equivalent to the user's kill character.

RETURN VALUE
All routines return the integer ERR upon failure and an integer value other than ERR upon successful completion.

BUGS
When the window is in keypad mode and the user types any special key other than those named above, the `character' value appended to the string by the ncurses implementation is predictable but not useful (being, in fact, the low-order eight bits of the key's KEY_ value). The SVr4.0 documentation claims that "special keys (such as function keys, "home" key, "clear" key, etc.) are interpreted" without giving details. It lies. The actual behavior is like that of ncurses.

NOTES
Note that getstr, mvgetstr, and mvwgetstr may be macros.

SEE ALSO
ncurses(3X), curs_getch(3X).