+ X/Open Curses Issue 5 (2007) stated that these functions "read at most
+ <EM>n</EM> bytes" but did not state whether the terminating null character
+ counted toward that limit. X/Open Curses Issue 7 (2009) changed that
+ to say they "read at most <EM>n</EM>-1 bytes" to allow for the terminating null
+ character. As of 2018, some implementations count it, some do not.
+
+ <STRONG>o</STRONG> <EM>ncurses</EM> 6.1 and <EM>PDCurses</EM> do not count the null character toward the
+ limit, while Solaris and NetBSD <EM>curses</EM> do.
+
+ <STRONG>o</STRONG> Solaris <EM>xcurses</EM> offers both behaviors: its wide-character
+ <EM>wgetn</EM><STRONG>_</STRONG><EM>wstr</EM> reserves room for a wide null character, but its non-
+ wide <EM>wgetnstr</EM> does not consistently count a null character toward
+ the limit.
+
+ In SVr4 <EM>curses</EM>, a negative <EM>n</EM> tells <EM>wgetnstr</EM> to assume that the caller's
+ buffer is large enough to hold the result; that is, the function then
+ acts like <EM>wgetstr</EM>. X/Open Curses does not mention this behavior (or
+ anything related to nonpositive <EM>n</EM> values), however most <EM>curses</EM>
+ libraries implement it. Most implementations nevertheless enforce an
+ upper limit on the count of bytes they write to the destination buffer
+ <EM>str</EM>.
+
+ <STRONG>o</STRONG> BSD <EM>curses</EM> lacked <EM>wgetnstr</EM>, and its <EM>wgetstr</EM> wrote to <EM>str</EM>
+ unboundedly, as did that in SVr2.
+
+ <STRONG>o</STRONG> <EM>PDCurses</EM>, and SVr3.1, SVr4, and Solaris <EM>curses</EM> limit both functions
+ to writing 256 bytes. Other System V-based platforms likely use
+ the same limit.
+
+ <STRONG>o</STRONG> Solaris <EM>xcurses</EM> limits the write to <STRONG>LINE_MAX</STRONG> bytes.
+
+ <STRONG>o</STRONG> NetBSD 7 <EM>curses</EM> imposes no particular limit on the length of the
+ write, but does validate <EM>n</EM> to ensure that it is greater than zero.
+ A comment in NetBSD's source code asserts that SUSv2 specifies
+ this.
+
+ <STRONG>o</STRONG> <EM>ncurses</EM> prior to 6.2 (2020) imposes no limit on the length of the
+ write, and treats <EM>wgetnstr</EM>'s <EM>n</EM> parameter as SVr4 <EM>curses</EM> does.
+
+ <STRONG>o</STRONG> <EM>ncurses</EM> 6.2 uses <STRONG>LINE_MAX</STRONG> or a larger (system-dependent) value
+ provided by <STRONG>sysconf(3)</STRONG>. If neither <STRONG>LINE_MAX</STRONG> nor <EM>sysconf</EM> is
+ available, <EM>ncurses</EM> uses the POSIX minimum value for <STRONG>LINE_MAX</STRONG>
+ (2048). In either case, it reserves a byte for the terminating
+ null character.
+
+ Implementations vary in their handling of input control characters.
+
+ <STRONG>o</STRONG> While they may enable the screen's echo option, some do not take it
+ out of raw mode, and may take cbreak mode into account when
+ deciding whether to handle echoing within <EM>wgetnstr</EM> or to rely on it
+ as a side effect of calling <EM>wgetch</EM>.
+
+ <STRONG>o</STRONG> Originally, <EM>ncurses</EM>, like its progenitor <EM>pcurses</EM>, had its <EM>wgetnstr</EM>
+ call <EM>noraw</EM> and <EM>cbreak</EM> before accepting input. That may have been
+ done to make function keys work; it is not necessary with modern
+ <EM>ncurses</EM>.
+
+ Since 1995, <EM>ncurses</EM> has provided handlers for <STRONG>SIGINTR</STRONG> and <STRONG>SIGQUIT</STRONG>
+ events, which are typically generated at the keyboard with <STRONG>^C</STRONG> and
+ <STRONG>^\</STRONG> respectively. In cbreak mode, those handlers catch a signal and
+ stop the program, whereas other implementations write those
+ characters into the buffer.
+
+ <STRONG>o</STRONG> Starting with <EM>ncurses</EM> 6.3 (2021), <EM>wgetnstr</EM> preserves raw mode if
+ the screen was already in that state, allowing one to enter the
+ characters the terminal interprets as interrupt and quit events
+ into the buffer, for better compatibility with SVr4 <EM>curses</EM>.
+
+
+</PRE><H2><a name="h2-HISTORY">HISTORY</a></H2><PRE>
+ 4BSD (1980) <EM>curses</EM> introduced <EM>wgetstr</EM> along with its variants.
+
+ SVr3.1 (1987) added <EM>wgetnstr</EM>, but none of its variants.
+
+ X/Open Curses Issue 4 (1995) specified <EM>getnstr</EM>, <EM>mvwgetnstr</EM>, and
+ <EM>mvgetnstr</EM>.