DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

curs_getstr(S-osr5)


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-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.

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-osr5), and mvwgetstr(S-osr5).

Files


/usr/lib/libcurses.a
the library

See also

curses(S-osr5), curs_getch(S-osr5)

Standards conformance

getstr(S-osr5), wgetstr(S-osr5), wgetnstr(S-osr5), mvgetstr(S-osr5), and mvwgetstr(S-osr5) are not part of any currently supported standard; they were developed by UNIX System Laboratories, Inc. and are maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005