|
|
#include <curses.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);
The effect of getstr(S-osr5) is as though a series of calls to getch(S-osr5) were made, until a newline or carriage return is received. The resulting value is placed in the area pointed to by the character pointer str.
wgetnstr(S-osr5) reads at most n characters, thus preventing a possible overflow of the input buffer.
The user's erase and kill characters are interpreted, as well as any special keys (such as function keys, <Home>, <Clear>, and so on).
See wgetch(S-osr5) for how it handles characters, especially ^D, differently from stdio routines.
The following can be macros: getstr( ), mvgetstr(S-osr5), and mvwgetstr(S-osr5).