getstr, wgetstr, wgetnstr, mvgetstr, mvwgetstr [ MPE/iX Developer's Kit Reference Manual Volume II ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume II
getstr, wgetstr, wgetnstr, mvgetstr, mvwgetstr
The getstr set of routines is used to get a character string from
keyboard.
Syntax
#include <curses.h>
int getstr(char *str);
int wgetstr(WINDOW *win, char *str);
int wgetnstr(WINDOW *win, char *str, int n);
int mvgetstr(int y, int x, char *str);
int mvwgetch(WINDOW *win, int y, int x, char *str);
Parameters
n The maximum number of characters to read from
input.
str A pointer to the area where the character string is
to be placed.
x The x (column) coordinate of starting position of
character string to be read.
y The y (row) coordinate of starting position of
character string to be read.
win A pointer to the window associated with the
terminal from which the character is to be read.
Return Values
OK Successful completion.
ERR An error occurred.
Description
The getstr() and wgetstr() routines get a character string from the
terminal associated with the window stdscr or window win, respectively.
The mvgetch() and mvwgetch() routines move the cursor to the position
specified in stdscr or win, respectively, then get a character.
These routines call getch() for each character until a newline or
carriage return is received, at which time, the string is placed in str.
The erase and kill characters set by the user are interpreted.
The wgetnstr() routine reads at most n characters. This routine is used
to prevent overflowing the input buffer.
NOTE The getstr(), mvgetstr(), mvwgetstr() and wgetstr() routines are
macros.
Implementation Considerations
The getstr(), mvgetstr(), mvwgetstr(), and wgetstr() routines are
identical to XPG/3. The wgetnstr() routine is a UNIX System V
implementation.
See Also
wgetch()
Portability
The getstr(), mvgetstr(), mvwgetstr(), and wgetstr() routines conform to
HP-UX, UNIX System V, and XPG/3. The wgetnstr() routine conforms to UNIX
System V.
MPE/iX 5.0 Documentation