3 \fBcurs_getstr\fR: \fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR,
4 \fBmvwgetstr\fR, \fBwgetnstr\fR - accept character strings from
5 \fBncurses\fR terminal keyboard
7 \fB#include <ncurses.h>\fR
9 \fBint getstr(char *str);\fR
11 \fBint wgetstr(WINDOW *win, char *str);\fR
13 \fBint mvgetstr(int y, int x, char *str);\fR
15 \fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR
17 \fBint wgetnstr(WINDOW *win, char *str, int n);\fR
20 The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR,
21 until a newline or carriage return is received (the terminating character is
22 not included in the returned string). The resulting value is placed in the
23 area pointed to by the character pointer \fIstr\fR.
25 \fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible
26 overflow of the input buffer. Any attempt to enter more characters (other
27 than the terminating newline or carriage return) causes a beep.
29 The user's erase and kill characters are interpreted. If keypad
30 mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
31 are both considered equivalent to the user's kill character.
33 All routines return the integer \fBERR\fR upon failure and an integer value
34 other than \fBERR\fR upon successful completion.
36 When the window is in keypad mode and the user types any special key
37 other than those named above, the `character' value appended to the
38 string by the ncurses implementation is predictable but not useful
39 (being, in fact, the low-order eight bits of the key's KEY_ value).
41 The SVr4.0 documentation claims that "special keys (such as function
42 keys, "home" key, "clear" key, \fIetc\fR.) are interpreted" without
43 giving details. It lies. The actual behavior is like that of ncurses.
45 Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros.
47 \fBncurses\fR(3X), \fBcurs_getch\fR(3X).
49 .\"# The following sets edit modes for GNU EMACS