@@ -58,6 +59,7 @@
intgetn_wstr(wint_t*wstr,intn);intwget_wstr(WINDOW*win,wint_t*wstr);intwgetn_wstr(WINDOW*win,wint_t*wstr,intn);
+
intmvget_wstr(inty,intx,wint_t*wstr);intmvgetn_wstr(inty,intx,wint_t*wstr,intn);intmvwget_wstr(WINDOW*win,inty,intx,wint_t*wstr);
@@ -133,13 +135,32 @@
X/Open curses documented these functions to pass an array of wchar_t in
1997, but that was an error because of this part of the description:
- The effect of get_wstr() is as though a series of calls to
- get_wch() were made, until a newline character, end-of-line
- character, or end-of-file character is processed.
+ The effect of get_wstr is as though a series of calls to get_wch
+ were made, until a newline character, end-of-line character, or
+ end-of-file character is processed.
+
+ The latter function get_wch can return a negative value, while wchar_t
+ is a unsigned type. All of the vendors implement this using wint_t,
+ following the standard.
+
+ X/Open Curses, Issue 7 (2009) is unclear regarding whether the termi-
+ nating nullwchar_t value is counted in the length parameter n. X/Open
+ Curses, Issue 7 revised the corresponding description of wgetnstr to
+ address this issue. The unrevised description of wget_nwstr can be in-
+ terpreted either way. This implementation counts the terminator in the
+ length.
+
+ X/Open Curses does not specify what happens if the length n is nega-
+ tive.
+
+ o For analogy with wgetnstr, ncurses 6.2 uses a limit (based on
+ LINE_MAX).
+
+ o Some other implementations (such as Solaris xcurses) do the same,
+ while others (PDCurses) do not allow this.
- The latter function get_wch() can return a negative value, while
- wchar_t is a unsigned type. All of the vendors implement this using
- wint_t, following the standard.
+ o NetBSD 7 curses imitates ncurses 6.1 in this regard, treating a -1
+ as an indefinite number of characters.