-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3662 2021/05/08 23:37:13 tom Exp $
+-- $Id: NEWS,v 1.3665 2021/05/15 23:59:31 tom Exp $
-------------------------------------------------------------------------------
This is a log of changes that ncurses has gone through since Zeyd started
Changes through 1.9.9e did not credit all contributions;
it is not possible to add this information.
+20210515
+ + improve manual pages for wgetnstr, newwin (prompted by
+ report/testcase by Bill Gray).
+
20210508
+ modify tputs' error check to allow it to be used without first
calling tgetent or setupterm, noting that terminfo initialization
- is requires for supporting the terminfo delay feature (report by
+ is required for supporting the terminfo delay feature (report by
Sebastiano Vigna).
+ fix several warnings from clang --analyze
+ add null-pointer check in comp_parse.c, when a "use=" clause refers
-5:0:10 6.2 20210508
+5:0:10 6.2 20210515
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1414 2021/05/08 13:20:24 tom Exp $
+# $Id: dist.mk,v 1.1415 2021/05/15 09:37:23 tom Exp $
# Makefile for creating ncurses distributions.
#
# This only needs to be used directly as a makefile by developers, but
# These define the major/minor/patch versions of ncurses.
NCURSES_MAJOR = 6
NCURSES_MINOR = 2
-NCURSES_PATCH = 20210508
+NCURSES_PATCH = 20210515
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="tput.1.html">tput(1)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
<!--
****************************************************************************
- * Copyright 2018-2019,2020 Thomas E. Dickey *
+ * Copyright 2018-2020,2021 Thomas E. Dickey *
* Copyright 1998-2010,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_getstr.3x,v 1.31 2020/10/18 00:27:44 tom Exp @
+ * @Id: curs_getstr.3x,v 1.32 2021/05/15 23:37:18 tom Exp @
* X/Open says also until EOf
* X/Open says then an EOS is added to the result
* X/Open doesn't mention n<0
not included in the returned string). The resulting value is placed in
the area pointed to by the character pointer <EM>str</EM>, followed by a NUL.
- <STRONG>wgetnstr</STRONG> reads at most <EM>n</EM> characters, thus preventing a possible over-
- flow of the input buffer. Any attempt to enter more characters (other
- than the terminating newline or carriage return) causes a beep. Func-
- tion keys also cause a beep and are ignored. The <STRONG>getnstr</STRONG> function
- reads from the <EM>stdscr</EM> default window.
+ The <STRONG>getnstr</STRONG> function reads from the <EM>stdscr</EM> default window. The other
+ functions, such as <STRONG>wgetnstr</STRONG>, read from the window given as a parameter.
- The user's erase and kill characters are interpreted. If keypad mode
- is on for the window, <STRONG>KEY_LEFT</STRONG> and <STRONG>KEY_BACKSPACE</STRONG> are both considered
- equivalent to the user's kill character.
+ <STRONG>getnstr</STRONG> reads at most <EM>n</EM> characters, thus preventing a possible overflow
+ of the input buffer. Any attempt to enter more characters (other than
+ the terminating newline or carriage return) causes a beep. Function
+ keys also cause a beep and are ignored.
- Characters input are echoed only if <STRONG>echo</STRONG> is currently on. In that
- case, backspace is echoed as deletion of the previous character (typi-
+ The user's <EM>erase</EM> and <EM>kill</EM> characters are interpreted:
+
+ <STRONG>o</STRONG> The <EM>erase</EM> character (e.g., <STRONG>^H</STRONG>) erases the character at the end of
+ the buffer, moving the cursor to the left.
+
+ If <EM>keypad</EM> mode is on for the window, <STRONG>KEY_LEFT</STRONG> and <STRONG>KEY_BACKSPACE</STRONG> are
+ both considered equivalent to the user's erase character.
+
+ <STRONG>o</STRONG> The <EM>kill</EM> character (e.g., <STRONG>^U</STRONG>) erases the entire buffer, leaving the
+ cursor at the beginning of the buffer.
+
+ Characters input are echoed only if <STRONG>echo</STRONG> is currently on. In that
+ case, backspace is echoed as deletion of the previous character (typi-
cally a left motion).
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
All routines return the integer <STRONG>ERR</STRONG> upon failure and an <STRONG>OK</STRONG> (SVr4 speci-
- fies only "an integer value other than <STRONG>ERR</STRONG>") upon successful comple-
+ fies only "an integer value other than <STRONG>ERR</STRONG>") upon successful comple-
tion.
X/Open defines no error conditions.
- In this implementation, these functions return an error if the window
+ In this implementation, these functions return an error if the window
pointer is null, or if its timeout expires without having any data.
- This implementation provides an extension as well. If a <STRONG>SIGWINCH</STRONG> in-
+ This implementation provides an extension as well. If a <STRONG>SIGWINCH</STRONG> in-
terrupts the function, it will return <STRONG>KEY_RESIZE</STRONG> rather than <STRONG>OK</STRONG> or <STRONG>ERR</STRONG>.
- Functions with a "mv" prefix first perform a cursor movement using
+ Functions with a "mv" prefix first perform a cursor movement using
<STRONG>wmove</STRONG>, and return an error if the position is outside the window, or if
the window pointer is null.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These functions are described in the XSI Curses standard, Issue 4.
- They read single-byte characters only. The standard does not define
- any error conditions. This implementation returns <STRONG>ERR</STRONG> if the window
+ These functions are described in the XSI Curses standard, Issue 4.
+ They read single-byte characters only. The standard does not define
+ any error conditions. This implementation returns <STRONG>ERR</STRONG> if the window
pointer is null, or if the lower-level <STRONG><A HREF="curs_getch.3x.html">wgetch(3x)</A></STRONG> call returns an <STRONG>ERR</STRONG>.
- SVr3 and early SVr4 curses implementations did not reject function
- keys; the SVr4.0 documentation claimed that "special keys" (such as
- function keys, "home" key, "clear" key, <EM>etc</EM>.) are "interpreted", with-
- out giving details. It lied. In fact, the "character" value appended
- to the string by those implementations was predictable but not useful
+ SVr3 and early SVr4 curses implementations did not reject function
+ keys; the SVr4.0 documentation claimed that "special keys" (such as
+ function keys, "home" key, "clear" key, <EM>etc</EM>.) are "interpreted", with-
+ out giving details. It lied. In fact, the "character" value appended
+ to the string by those implementations was predictable but not useful
(being, in fact, the low-order eight bits of the key's KEY_ value).
- The functions <STRONG>getnstr</STRONG>, <STRONG>mvgetnstr</STRONG>, and <STRONG>mvwgetnstr</STRONG> were present but not
+ The functions <STRONG>getnstr</STRONG>, <STRONG>mvgetnstr</STRONG>, and <STRONG>mvwgetnstr</STRONG> were present but not
documented in SVr4.
X/Open Curses, Issue 5 (2007) stated that these functions "read at most
- <EM>n</EM> 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
+ <EM>n</EM> 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 <EM>n</EM>-1 bytes" to allow for the terminating NUL. As of 2018,
some implementations do, some do not count it:
- <STRONG>o</STRONG> ncurses 6.1 and PDCurses do not count the NUL in the given limit,
+ <STRONG>o</STRONG> ncurses 6.1 and PDCurses do not count the NUL in the given limit,
while
<STRONG>o</STRONG> Solaris SVr4 and NetBSD curses count the NUL as part of the limit.
- <STRONG>o</STRONG> Solaris xcurses provides both: its wide-character <STRONG>wget_nstr</STRONG> re-
+ <STRONG>o</STRONG> Solaris xcurses provides both: its wide-character <STRONG>wget_nstr</STRONG> re-
serves a NUL, but its <STRONG>wgetnstr</STRONG> does not count the NUL consistently.
In SVr4 curses, a negative value of <EM>n</EM> tells <STRONG>wgetnstr</STRONG> to assume that the
- caller's buffer is large enough to hold the result, i.e., to act like
- <STRONG>wgetstr</STRONG>. X/Open Curses does not mention this (or anything related to
- negative or zero values of <EM>n</EM>), however most implementations use the
+ caller's buffer is large enough to hold the result, i.e., to act like
+ <STRONG>wgetstr</STRONG>. X/Open Curses does not mention this (or anything related to
+ negative or zero values of <EM>n</EM>), however most implementations use the
feature, with different limits:
- <STRONG>o</STRONG> Solaris SVr4 curses and PDCurses limit the result to 255 bytes.
+ <STRONG>o</STRONG> Solaris SVr4 curses and PDCurses limit the result to 255 bytes.
Other Unix systems than Solaris are likely to use the same limit.
<STRONG>o</STRONG> Solaris xcurses limits the result to <STRONG>LINE_MAX</STRONG> bytes.
- <STRONG>o</STRONG> NetBSD 7 assumes no particular limit for the result from <STRONG>wgetstr</STRONG>.
- However, it limits the <STRONG>wgetnstr</STRONG> parameter <EM>n</EM> to ensure that it is
+ <STRONG>o</STRONG> NetBSD 7 assumes no particular limit for the result from <STRONG>wgetstr</STRONG>.
+ However, it limits the <STRONG>wgetnstr</STRONG> parameter <EM>n</EM> to ensure that it is
greater than zero.
- A comment in NetBSD's source code states that this is specified in
+ A comment in NetBSD's source code states that this is specified in
SUSv2.
- <STRONG>o</STRONG> ncurses (before 6.2) assumes no particular limit for the result
- from <STRONG>wgetstr</STRONG>, and treats the <EM>n</EM> parameter of <STRONG>wgetnstr</STRONG> like SVr4
+ <STRONG>o</STRONG> ncurses (before 6.2) assumes no particular limit for the result
+ from <STRONG>wgetstr</STRONG>, and treats the <EM>n</EM> parameter of <STRONG>wgetnstr</STRONG> like SVr4
curses.
- <STRONG>o</STRONG> ncurses 6.2 uses <STRONG>LINE_MAX</STRONG>, or a larger (system-dependent) value
- which the <STRONG>sysconf</STRONG> function may provide. If neither <STRONG>LINE_MAX</STRONG> or
- <STRONG>sysconf</STRONG> is available, ncurses uses the POSIX value for <STRONG>LINE_MAX</STRONG> (a
- 2048 byte limit). In either case, it reserves a byte for the ter-
+ <STRONG>o</STRONG> ncurses 6.2 uses <STRONG>LINE_MAX</STRONG>, or a larger (system-dependent) value
+ which the <STRONG>sysconf</STRONG> function may provide. If neither <STRONG>LINE_MAX</STRONG> or
+ <STRONG>sysconf</STRONG> is available, ncurses uses the POSIX value for <STRONG>LINE_MAX</STRONG> (a
+ 2048 byte limit). In either case, it reserves a byte for the ter-
minating NUL.
+ Although <STRONG>getnstr</STRONG> is equivalent to a series of calls to <STRONG>getch</STRONG>, it also
+ makes changes to the curses modes to allow simple editing of the input
+ buffer:
+
+ <STRONG>o</STRONG> <STRONG>getnstr</STRONG> saves the current value of the <STRONG>nl</STRONG>, <STRONG>echo</STRONG>, <STRONG>raw</STRONG> and <STRONG>cbreak</STRONG>
+ modes, and sets <STRONG>nl</STRONG>, <STRONG>noecho</STRONG>, <STRONG>noraw</STRONG>, and <STRONG>cbreak</STRONG>.
+
+ <STRONG>getnstr</STRONG> handles the echoing of characters, rather than relying on
+ the caller to set an appropriate mode.
+
+ <STRONG>o</STRONG> It also obtains the <EM>erase</EM> and <EM>kill</EM> characters from <STRONG>erasechar</STRONG> and
+ <STRONG>killchar</STRONG>, respectively.
+
+ <STRONG>o</STRONG> On return, <STRONG>getnstr</STRONG> restores the modes to their previous values.
+
+ Other implementations differ. While they may set the <EM>echo</EM> mode, they
+ do not modify the <EM>raw</EM> mode, and may take the <EM>cbreak</EM> mode set by the
+ caller into account when deciding whether to handle echoing within
+ <STRONG>getnstr</STRONG> or as a side-effect of the <STRONG>getch</STRONG> calls. Because ncurses sets
+ these modes, its signal handlers for INTR and QUIT (e.g., <STRONG>^C</STRONG> or <STRONG>^\</STRONG>) may
+ catch a signal and stop the program, where other implementations allow
+ one to enter those characters in the buffer.
+
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_getch.3x.html">curs_getch(3x)</A></STRONG>, <STRONG><A HREF="curs_termattrs.3x.html">curs_termattrs(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>.
<!--
****************************************************************************
- * Copyright 2020 Thomas E. Dickey *
+ * Copyright 2020,2021 Thomas E. Dickey *
* Copyright 1998-2015,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_window.3x,v 1.21 2020/02/02 23:34:34 tom Exp @
+ * @Id: curs_window.3x,v 1.22 2021/05/15 23:57:14 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
A new full-screen window is created by calling <STRONG>newwin(0,0,0,0)</STRONG>.
+ Regardless of the function used for creating a new window (e.g.,
+ <STRONG>newwin</STRONG>, <STRONG>subwin</STRONG>, <STRONG>derwin</STRONG>, <STRONG>newpad</STRONG>), rather than a duplicate (with <STRONG>dupwin</STRONG>),
+ all of the window modes are initialized to the default values. These
+ functions set window modes after a window is created:
+
+ idcok, idlok, immedok, keypad, leaveok, nodelay, scrollok,
+ setscrreg, syncok, wbkgdset, wbkgrndset, and wtimeout
+
</PRE><H3><a name="h3-delwin">delwin</a></H3><PRE>
Calling <STRONG>delwin</STRONG> deletes the named window, freeing all memory associated
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "form_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
https://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG> and related pages whose names begin "menu_" for detailed
descriptions of the entry points.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
method of updating character screens with reasonable optimization.
This implementation is "new curses" (ncurses) and is the approved
replacement for 4.4BSD classic curses, which has been discontinued.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
The <STRONG>ncurses</STRONG> library emulates the curses library of System V Release 4
UNIX, and XPG4 (X/Open Portability Guide) curses (also known as XSI
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_variables.3x.html">curs_variables(3x)</A></STRONG>,
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This manual describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="toe.1m.html">toe(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="term.5.html">term(5)</A></STRONG>. <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>. <STRONG><A HREF="user_caps.5.html">user_caps(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>,
<STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
<STRONG><A HREF="clear.1.html">clear(1)</A></STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="tabs.1.html">tabs(1)</A></STRONG>, <STRONG><A HREF="tset.1.html">tset(1)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
<STRONG>csh(1)</STRONG>, <STRONG>sh(1)</STRONG>, <STRONG>stty(1)</STRONG>, <STRONG><A HREF="curs_terminfo.3x.html">curs_terminfo(3x)</A></STRONG>, <STRONG>tty(4)</STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>,
<STRONG>ttys(5)</STRONG>, <STRONG>environ(7)</STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210403).
+ This describes <STRONG>ncurses</STRONG> version 6.2 (patch 20210515).
.\"***************************************************************************
-.\" Copyright 2018-2019,2020 Thomas E. Dickey *
+.\" Copyright 2018-2020,2021 Thomas E. Dickey *
.\" Copyright 1998-2010,2017 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_getstr.3x,v 1.31 2020/10/18 00:27:44 tom Exp $
+.\" $Id: curs_getstr.3x,v 1.32 2021/05/15 23:37:18 tom Exp $
.TH curs_getstr 3X ""
.ie \n(.g .ds `` \(lq
.el .ds `` ``
area pointed to by the character pointer \fIstr\fR,
followed by a NUL.
.PP
-\fBwgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible
+The \fBgetnstr\fR function reads
+from the \fIstdscr\fR default window.
+The other functions, such as \fBwgetnstr\fP,
+read from the window given as a parameter.
+.PP
+\fBgetnstr\fR reads at most \fIn\fR characters, thus preventing a possible
overflow of the input buffer.
Any attempt to enter more characters (other
than the terminating newline or carriage return) causes a beep.
Function
keys also cause a beep and are ignored.
-The \fBgetnstr\fR function reads
-from the \fIstdscr\fR default window.
.PP
-The user's erase and kill characters are interpreted.
-If keypad
-mode is on for the window, \fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
-are both considered equivalent to the user's kill character.
+The user's \fIerase\fP and \fIkill\fP characters are interpreted:
+.bP
+The \fIerase\fP character (e.g., \fB^H\fP) erases the character
+at the end of the buffer, moving the cursor to the left.
+.IP
+If \fIkeypad\fP mode is on for the window,
+\fBKEY_LEFT\fR and \fBKEY_BACKSPACE\fR
+are both considered equivalent to the user's erase character.
+.bP
+The \fIkill\fP character (e.g., \fB^U\fP) erases the entire buffer,
+leaving the cursor at the beginning of the buffer.
.PP
Characters input are echoed only if \fBecho\fR is currently on.
In that case,
If neither \fBLINE_MAX\fP or \fBsysconf\fP is available,
ncurses uses the POSIX value for \fBLINE_MAX\fP (a 2048 byte limit).
In either case, it reserves a byte for the terminating NUL.
+.PP
+Although \fBgetnstr\fP is equivalent to a series of calls to \fBgetch\fP,
+it also makes changes to the curses modes to allow simple editing of
+the input buffer:
+.bP
+\fBgetnstr\fP saves the current value of the \fBnl\fP, \fBecho\fP,
+\fBraw\fP and \fBcbreak\fP modes, and sets
+\fBnl\fP,
+\fBnoecho\fP,
+\fBnoraw\fP, and
+\fBcbreak\fP.
+.IP
+\fBgetnstr\fP handles the echoing of characters,
+rather than relying on the caller to set an appropriate mode.
+.bP
+It also obtains the \fIerase\fP and \fIkill\fP characters
+from \fBerasechar\fP and \fBkillchar\fP, respectively.
+.bP
+On return, \fBgetnstr\fP restores the modes to their previous values.
+.PP
+Other implementations differ.
+While they may set the \fIecho\fP mode,
+they do not modify the \fIraw\fP mode, and may take the \fIcbreak\fP
+mode set by the caller into account when deciding whether to handle
+echoing within \fBgetnstr\fP or as a side-effect of the \fBgetch\fP calls.
+Because ncurses sets these modes,
+its signal handlers for INTR and QUIT
+(e.g., \fB^C\fP or \fB^\\\fP) may catch a signal and stop the program,
+where other implementations allow one to enter those characters in the buffer.
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_getch\fR(3X),
+\fBcurs_termattrs\fR(3X),
\fBcurs_variables\fR(3X).
.\"***************************************************************************
-.\" Copyright 2020 Thomas E. Dickey *
+.\" Copyright 2020,2021 Thomas E. Dickey *
.\" Copyright 1998-2015,2016 Free Software Foundation, Inc. *
.\" *
.\" Permission is hereby granted, free of charge, to any person obtaining a *
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_window.3x,v 1.21 2020/02/02 23:34:34 tom Exp $
+.\" $Id: curs_window.3x,v 1.22 2021/05/15 23:57:14 tom Exp $
.TH curs_window 3X ""
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.na
.hy 0
.SH NAME
.RE
.PP
A new full-screen window is created by calling \fBnewwin(0,0,0,0)\fR.
+.PP
+Regardless of the function used for creating a new window
+(e.g., \fBnewwin\fP, \fBsubwin\fP, \fBderwin\fP, \fBnewpad\fP),
+rather than a duplicate (with \fBdupwin\fP),
+all of the window modes are initialized to the default values.
+These functions set window modes after a window is created:
+.RS
+.na
+.PP
+idcok,
+idlok,
+immedok,
+keypad,
+leaveok,
+nodelay,
+scrollok,
+setscrreg,
+syncok,
+wbkgdset,
+wbkgrndset, and
+wtimeout
+.RE
+.ad
.SS delwin
.PP
Calling \fBdelwin\fR deletes the named window, freeing all memory
-ncurses6 (6.2+20210508) unstable; urgency=low
+ncurses6 (6.2+20210515) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 15 May 2021 05:37:23 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20210508) unstable; urgency=low
+ncurses6 (6.2+20210515) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 15 May 2021 05:37:23 -0400
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.2+20210508) unstable; urgency=low
+ncurses6 (6.2+20210515) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 May 2021 09:20:24 -0400
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 15 May 2021 05:37:23 -0400
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.457 2021/05/08 13:20:24 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.458 2021/05/15 09:37:23 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "2"\r
!define VERSION_YYYY "2021"\r
-!define VERSION_MMDD "0508"\r
+!define VERSION_MMDD "0515"\r
!define VERSION_PATCH ${VERSION_YYYY}${VERSION_MMDD}\r
\r
!define MY_ABI "5"\r
Summary: shared libraries for terminal handling
Name: mingw32-ncurses6
Version: 6.2
-Release: 20210508
+Release: 20210515
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.2
-Release: 20210508
+Release: 20210515
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.2
-Release: 20210508
+Release: 20210515
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz