+ X/Open Curses, Issue 5 (2007) stated that these functions "read at most
+ <I>n</I> bytes" but did not state whether the terminating NUL is counted in
+ that limit. X/Open Curses, Issue 7 (2009) changed that to say they
+ "read at most <I>n</I>-1 bytes" to allow for the terminating NUL. As of 2018,
+ some implementations do, some do not count it:
+
+ <B>o</B> ncurses 6.1 and PDCurses do not count the NUL in the given limit,
+ while
+
+ <B>o</B> Solaris SVr4 and NetBSD curses count the NUL as part of the limit.
+
+ <B>o</B> Solaris xcurses provides both: its wide-character <B>wget_nstr</B> re-
+ serves a NUL, but its <B>wgetnstr</B> does not count the NUL consistently.
+
+ In SVr4 curses, a negative value of <I>n</I> tells <B>wgetnstr</B> to assume that the
+ caller's buffer is large enough to hold the result, i.e., to act like
+ <B>wgetstr</B>. X/Open Curses does not mention this (or anything related to
+ negative or zero values of <I>n</I>), however most implementations use the
+ feature, with different limits:
+
+ <B>o</B> Solaris SVr4 curses and PDCurses limit the result to 255 bytes.
+ Other Unix systems than Solaris are likely to use the same limit.
+
+ <B>o</B> Solaris xcurses limits the result to <B>LINE_MAX</B> bytes.
+
+ <B>o</B> NetBSD 7 assumes no particular limit for the result from <B>wgetstr</B>.
+ However, it limits the <B>wgetnstr</B> parameter <I>n</I> to ensure that it is
+ greater than zero.
+
+ A comment in NetBSD's source code states that this is specified in
+ SUSv2.
+
+ <B>o</B> ncurses (before 6.2) assumes no particular limit for the result
+ from <B>wgetstr</B>, and treats the <I>n</I> parameter of <B>wgetnstr</B> like SVr4
+ curses.
+
+ <B>o</B> ncurses 6.2 uses <B>LINE_MAX</B>, or a larger (system-dependent) value
+ which the <B>sysconf</B> function may provide. If neither <B>LINE_MAX</B> or
+ <B>sysconf</B> is available, ncurses uses the POSIX value for <B>LINE_MAX</B> (a
+ 2048 byte limit). In either case, it reserves a byte for the ter-
+ minating NUL.
+
+ Although <B>getnstr</B> is equivalent to a series of calls to <B>getch</B>, it also
+ makes changes to the curses modes to allow simple editing of the input
+ buffer:
+
+ <B>o</B> <B>getnstr</B> saves the current value of the <B>nl</B>, <B>echo</B>, <B>raw</B> and <B>cbreak</B>
+ modes, and sets <B>nl</B>, <B>noecho</B>, <B>noraw</B>, and <B>cbreak</B>.
+
+ <B>getnstr</B> handles the echoing of characters, rather than relying on
+ the caller to set an appropriate mode.
+
+ <B>o</B> It also obtains the <I>erase</I> and <I>kill</I> characters from <B>erasechar</B> and
+ <B>killchar</B>, respectively.
+
+ <B>o</B> On return, <B>getnstr</B> restores the modes to their previous values.
+
+ Other implementations differ in their treatment of special characters:
+
+ <B>o</B> While they may set the <I>echo</I> mode, other implementations do not mod-
+ ify the <I>raw</I> mode, They may take the <I>cbreak</I> mode set by the caller
+ into account when deciding whether to handle echoing within <B>getnstr</B>
+ or as a side-effect of the <B>getch</B> calls.
+
+ <B>o</B> The original ncurses (as pcurses in 1986) set <B>noraw</B> and <B>cbreak</B> when
+ accepting input for <B>getnstr</B>. That may have been done to make func-
+ tion- and cursor-keys work; it is not necessary with ncurses.
+
+ Since 1995, ncurses has provided signal handlers for INTR and QUIT
+ (e.g., <B>^C</B> or <B>^\</B>). With the <B>noraw</B> and <B>cbreak</B> settings, those may
+ catch a signal and stop the program, where other implementations
+ allow one to enter those characters in the buffer.
+
+ <B>o</B> Starting in 2021 (ncurses 6.3), <B>getnstr</B> sets <B>raw</B>, rather than <B>noraw</B>
+ and <B>cbreak</B> for better compatibility with SVr4-curses, e.g., allow-
+ ing one to enter a <B>^C</B> into the buffer.
+