diff options
author | ache <ache@FreeBSD.org> | 1994-10-07 08:58:58 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-10-07 08:58:58 +0000 |
commit | a80c0624fbd8bd1c784b0b5b7a0fd20b09d317b9 (patch) | |
tree | 4a94ca97fb2fc2fdc1fcdd522a66e39c6e763138 /lib/libncurses/curs_getstr.3 | |
download | FreeBSD-src-a80c0624fbd8bd1c784b0b5b7a0fd20b09d317b9.zip FreeBSD-src-a80c0624fbd8bd1c784b0b5b7a0fd20b09d317b9.tar.gz |
Moved from ports with several enhancements
Diffstat (limited to 'lib/libncurses/curs_getstr.3')
-rw-r--r-- | lib/libncurses/curs_getstr.3 | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/libncurses/curs_getstr.3 b/lib/libncurses/curs_getstr.3 new file mode 100644 index 0000000..1151ae0 --- /dev/null +++ b/lib/libncurses/curs_getstr.3 @@ -0,0 +1,53 @@ +.TH curs_getstr 3X "" +.SH NAME +\fBcurs_getstr\fR: \fBgetstr\fR, \fBwgetstr\fR, \fBmvgetstr\fR, +\fBmvwgetstr\fR, \fBwgetnstr\fR - accept character strings from +\fBncurses\fR terminal keyboard +.SH SYNOPSIS +\fB#include <ncurses.h>\fR + +\fBint getstr(char *str);\fR +.br +\fBint wgetstr(WINDOW *win, char *str);\fR +.br +\fBint mvgetstr(int y, int x, char *str);\fR +.br +\fBint mvwgetstr(WINDOW *win, int y, int x, char *str);\fR +.br +\fBint wgetnstr(WINDOW *win, char *str, int n);\fR +.br +.SH DESCRIPTION +The function \fBgetstr\fR is equivalent to a series of calls to \fBgetch\fR, +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 \fIstr\fR. + +\fBwgetnstr\fR reads at most \fIn\fR 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, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR +are both considered equivalent to the user's kill character. +.SH RETURN VALUE +All routines return the integer \fBERR\fR upon failure and an integer value +other than \fBERR\fR upon successful completion. +.SH 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, \fIetc\fR.) are interpreted" without +giving details. It lies. The actual behavior is like that of ncurses. +.SH NOTES +Note that \fBgetstr\fR, \fBmvgetstr\fR, and \fBmvwgetstr\fR may be macros. +.SH SEE ALSO +\fBncurses\fR(3X), \fBcurs_getch\fR(3X). +.\"# +.\"# The following sets edit modes for GNU EMACS +.\"# Local Variables: +.\"# mode:nroff +.\"# fill-column:79 +.\"# End: |