Content-type: text/html Man page of curs_getstr

curs_getstr

Section: C Library Functions (3)
Index Return to Main Contents
 

NAME

curs_getstr, getstr, getnstr, wgetstr, wgetnstr, mvgetstr, mvgetnstr, mvwgetstr, mvwgetnstr - Get character strings from a Curses terminal keyboard  

SYNOPSIS

#include <curses.h>

int getstr( char *str ); int getnstr( char *str, int n ); int wgetstr( WINDOW *win, char *str ); int wgetnstr( WINDOW *win, char *str, int n ); int mvgetstr( int y, int x, char *str ); int mvgetnstr( int y, int x, char *str, int n ); int mvwgetstr( WINDOW *win, int y, int x, char *str ); int mvwgetnstr( WINDOW *win, int y, int x, char *str, int n );
 

LIBRARY

Curses Library (libcurses)
 

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows:

getstr, wgetstr, mvgetstr, mvwgetstr:  XPG4, XPG4-UNIX

getnstr, wgetnstr, mvgetnstr, mvwgetnstr:  XPG4-UNIX

Refer to the standards(5) reference page for more information about industry standards and associated tags.
 

DESCRIPTION

The effect of getstr is as though a series of calls to getch 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. The getnstr routine 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'' key, ``clear'' key, and so on).

The mvgetstr routine is identical to getstr except that it is as though it is a call to move and then a series of calls to getch. The mvwgetstr routine is identical to getstr except it is as though a call to wmove is made and then a series of call to wgetch. The mvgetnstr routine is identical to getnstr except that it is as though it is a call to move and then a series of calls to getch. The mvwgetnstr is identical to getnstr except it is a though a call to wmove is made and then a series of calls to wgetch.

The getnstr, wgetnstr, mvgetnstr, and mvwgetnstr routines return only the entire multibyte sequence associated with a character. If the array is large enough to contain at least one character, the routines fill the array with complete characters. If the array is not large enough to contain at least one complete character, the routines fail.
 

NOTES

The header file <curses.h> automatically includes the header file <stdio.h>.

Note that all routines except wgetstr and wgetnstr may be macros.
 

RETURN VALUES

All routines return the integer ERR upon failure and OK upon successful completion.
 

SEE ALSO

Functions: curses(3), curs_getch(3)

Others: standards(5)


 

Index

NAME
SYNOPSIS
LIBRARY
STANDARDS
DESCRIPTION
NOTES
RETURN VALUES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:41:31 GMT, October 02, 2010