DESCRIPTION

The effect ofget_wstr
is as though a series of calls
toget_wch
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 <wchar.h>.
The newline and end-of-line conditions are represented by the nwchar_t value.
In all instances, the end of the string is terminated by a null wchar_t.
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, KEY_LEFT and KEY_BACKSPACE
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 (typically a left
motion).

The effect ofwget_wstr
is as though a series of
calls towget_wch
were made.

The effect ofmvget_wstr
is as though a call tomove
and then a series of calls toget_wch
were
made.

The effect ofmvwget_wstr
is as though a call towmove
and then a series of calls towget_wch
were made.

NOTES

Usingget_wstr,mvget_wstr,mvwget_wstr, orwget_wstr
to read a line that
overflows the array pointed to bywstr
causes undefined
results.
The use ofgetn_wstr,mvgetn_wstr,mvwgetn_wstr, orwgetn_wstr, respectively, is recommended.

These functions cannot return KEY_ values because there
is no way to distinguish a KEY_ value from a valid wchar_t value.

All of these routines except wgetn_wstr may be macros.

RETURN VALUES

All of these functions return OK upon successful completion.
Otherwise, they return ERR.

Functions using a window parameter return an error if it is null.

wgetn_wstr

returns an error if the associated call to wget_wch failed.

PORTABILITY

These functions are described in The Single Unix Specification, Version 2.
No error conditions are defined.
This implementation returns ERR if the window pointer is null,
or if the lower-level wget_wch call returns an ERR.
In the latter case,
an ERR return without other data is treated as an end-of-file condition,
and the returned array contains a WEOF followed by a null wchar_t.

X/Open curses documents these functions to pass an array of wchar_t,
but all of the vendors implement this using wint_t.