cursgetwstr(3X) cursgetwstr(3X)
NAME
getwstr, getnwstr, wgetwstr, wgetnwstr, mvgetwstr, mvgetnwstr,
mvwgetwstr, mvwgetnwstr - get an array of wide characters from a
curses terminal keyboard
SYNOPSIS
##include <>
int getwstr(wintt **wstr);;
int getnwstr(wintt **wstr,, int n);;
int wgetwstr(WINDOW **win,, wintt **wstr);;
int wgetnwstr(WINDOW **win,, wintt **wstr,, int n);;
int mvgetwstr(int y,, int x,, wintt **wstr);;
int mvgetnwstr(int y,, int x,, wintt **wstr,, int n);;
int mvwgetwstr(WINDOW **win,, int y,, int x,, wintt **wstr);;
int mvwgetnwstr(WINDOW **win,, int y,, int x,, wintt **wstr,, int n);;
DESCRIPTION
The effect of getwstr is as though a series of calls to getwch were
made, until a newline, other end-of-line, or end-of-file condition is
processed. An end-of-file condition is represented by WEOF, as defined
in <>. The newline and end-of-line conditions are represented
by the \\n wchart value. In all instances, the end of the string is
terminated by a null wchart. The routine places resulting values in
the area pointed to by wstr.
The user's erase and kill characters are interpreted. If keypad mode
is on for the window, KEYLEFT and KEYBACKSPACE are both considered
equivalent to the user's kill character.
Characters input are echoed only if echo is currently on. In that
case, backspace is echoed as deletion of the previous character (typi-
cally a left motion).
The effect of wgetwstr is as though a series of calls to wgetwch were
made.
The effect of mvgetwstr is as though a call to move and then a series
of calls to getwch were made.
The effect of mvwgetwstr is as though a call to wmove and then a
series of calls to wgetwch were made.
The getnwstr, mvgetnwstr, mvwgetnwstr, and wgetnwstr functions are
identical to the getwstr, mvgetwstr, mvwgetwstr, and wgetwstr func-
tions, respectively, except that the **n** versions read at most n char-
acters, letting the application prevent overflow of the input buffer.
NOTES
Using getwstr, mvgetwstr, mvwgetwstr, or wgetwstr to read a line
that overflows the array pointed to by wstr causes undefined results.
The use of getnwstr, mvgetnwstr, mvwgetnwstr, or wgetnwstr, respec-
tively, is recommended.
These functions cannot return KEY values because there is no way to
distinguish a KEY value from a valid wchart value.
All of these routines except wgetnwstr may be macros.
RETURN VALUES
All of these functions return OK upon successful completion. Other-
wise, they return ER.
PORTABILITY
These functions are described in The Single Unix Specification, Version
2. No error conditions are defined. This implementation returns ER
if the window pointer is null, or if the lower-level wgetwch call
returns an ER. In the latter case, an ER return without other data
is treated as an end-of-file condition, and the returned array contains
a WEOF followed by a null wchart.
X/Open curses documents these functions to pass an array of wchart,
but all of the vendors implement this using wintt.
SEE ALSO
Functions: curses(3X), cursgetwch(3X), cursgetstr(3X).
cursgetwstr(3X)
|