|
|
#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) is as though a series of calls to getch(S) 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) 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) for how it handles characters, especially ^D, differently from stdio routines.
The following can be macros: getstr( ), mvgetstr(S), and mvwgetstr(S).