DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH
 

curs_getstr(S)


curs_getstr: getstr, wgetstr, mvgetstr, mvwgetstr, wgetnstr -- get character strings from curses terminal keyboard

Syntax

cc ... -lcurses

#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);

Description

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.

Return values

All routines return the integer ERR on failure and an integer value other than ERR on successful completion.

Warning

The header file curses.h automatically includes the header files stdio.h and unctrl.h.

The following can be macros: getstr( ), mvgetstr(S), and mvwgetstr(S).

Files


/usr/lib/libcurses.a
the library

See also

curses(S), curs_getch(S)

Standards conformance

getstr(S), wgetstr(S), wgetnstr(S), mvgetstr(S), and mvwgetstr(S) are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003