-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.4031 2023/11/11 23:13:58 tom Exp $
+-- $Id: NEWS,v 1.4033 2023/11/19 00:46:27 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.
+20231118
+ + improve description of length-parameter and error-returns in several
+ manpages: curs_addchstr.3x, curs_addstr.3x, curs_addwstr.3x,
+ curs_in_wch.3x, curs_in_wchstr.3x, curs_inchstr.3x, curs_ins_wstr.3x,
+ curs_insstr.3x, curs_instr.3x, curs_inwstr.3x
+ + amend parameter check for entire string versus specific length in
+ winsnstr() and wins_nwstr() to match Solaris.
+ + make similar correction to wins_nwstr().
+ + correct loop termination condition in waddnstr() and waddnwstr()
+ (Debian #1055882, cf: 20201205).
+
20231111
+ used "infocmp -u" to help trim redundant capabilities -TD
+ add limit checks in infocmp needed when processing extended
-5:0:10 6.4 20231111
+5:0:10 6.4 20231118
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1576 2023/11/11 10:45:00 tom Exp $
+# $Id: dist.mk,v 1.1577 2023/11/18 10:46:15 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 = 4
-NCURSES_PATCH = 20231111
+NCURSES_PATCH = 20231118
# We don't append the patch to the version, since this only applies to releases
VERSION = $(NCURSES_MAJOR).$(NCURSES_MINOR)
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_add_wchstr.3x,v 1.28 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_add_wchstr.3x,v 1.30 2023/11/18 21:18:55 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_add_wchstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_add_wchstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_add_wchstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_add_wchstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These functions copy the (null-terminated) array of complex characters
<EM>wchstr</EM> into the window image structure starting at the current cursor
- position. The four functions with <EM>n</EM> as the last argument copy at most
- <EM>n</EM> elements, but no more than will fit on the line. If <STRONG>n</STRONG>=<STRONG>-1</STRONG> then the
- whole array is copied, to the maximum number of characters that will
- fit on the line.
+ position.
- The window cursor is <EM>not</EM> advanced. These functions work faster than
+ The four functions with <EM>n</EM> as the last argument copy at most <EM>n</EM> elements,
+ but no more than will fit on the line. If <STRONG>n</STRONG>=<STRONG>-1</STRONG> then the whole array is
+ copied, to the maximum number of characters that will fit on the line.
+
+ The window cursor is <EM>not</EM> advanced. These functions are faster than
<STRONG>waddnstr</STRONG>. On the other hand:
- <STRONG>o</STRONG> they do not perform checking (such as for the newline, backspace,
+ <STRONG>o</STRONG> they do not perform checking (such as for the newline, backspace,
or carriage return characters),
<STRONG>o</STRONG> they do not advance the current cursor position,
<STRONG>o</STRONG> they do not expand other control characters to ^-escapes, and
- <STRONG>o</STRONG> they truncate the string if it crosses the right margin, rather
+ <STRONG>o</STRONG> they truncate the string if it crosses the right margin, rather
than wrapping it around to the new line.
- These functions end successfully on encountering a null <STRONG>cchar_t</STRONG>, or
- when they have filled the current line. If a complex character cannot
- completely fit at the end of the current line, the remaining columns
+ These functions end successfully on encountering a null <STRONG>cchar_t</STRONG>, or
+ when they have filled the current line. If a complex character cannot
+ completely fit at the end of the current line, the remaining columns
are filled with the background character and rendition.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
All functions return the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> on success.
- X/Open does not define any error conditions. This implementation
- returns an error if the window pointer is null.
+ X/Open does not define any error conditions. This implementation
+ returns an error
+
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
- Functions with a "mv" prefix first perform a cursor movement using
+ <STRONG>o</STRONG> if the <EM>wchstr</EM> parameter is null.
+
+ 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-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
-
- Comparable functions in the narrow-character (ncurses) library are
- described in <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_addchstr.3x,v 1.34 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_addchstr.3x,v 1.36 2023/11/18 21:18:55 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_addchstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_addchstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_addchstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_addchstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These functions copy the (null-terminated) <EM>chstr</EM> array into the window
- image structure starting at the current cursor position. The four
- functions with <EM>n</EM> as the last argument copy at most <EM>n</EM> elements, but no
- more than will fit on the line. If <STRONG>n</STRONG>=<STRONG>-1</STRONG> then the whole array is
+ image structure starting at the current cursor position.
+
+ The four functions with <EM>n</EM> as the last argument copy at most <EM>n</EM> elements,
+ but no more than will fit on the line. If <STRONG>n</STRONG>=<STRONG>-1</STRONG> then the whole array is
copied, to the maximum number of characters that will fit on the line.
- The window cursor is <EM>not</EM> advanced. These functions work faster than
+ The window cursor is <EM>not</EM> advanced. These functions are faster than
<STRONG>waddnstr</STRONG>. On the other hand:
- <STRONG>o</STRONG> they do not perform checking (such as for the newline, backspace,
+ <STRONG>o</STRONG> they do not perform checking (such as for the newline, backspace,
or carriage return characters),
<STRONG>o</STRONG> they do not advance the current cursor position,
<STRONG>o</STRONG> they do not expand other control characters to ^-escapes, and
- <STRONG>o</STRONG> they truncate the string if it crosses the right margin, rather
+ <STRONG>o</STRONG> they truncate the string if it crosses the right margin, rather
than wrapping it around to the new line.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
All functions return the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> on success.
- X/Open does not define any error conditions. This implementation
- returns an error if the window pointer is null.
+ X/Open does not define any error conditions. This implementation
+ returns an error
+
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
- Functions with a "mv" prefix first perform a cursor movement using
+ <STRONG>o</STRONG> if the <EM>wchstr</EM> parameter is null.
+
+ 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-SEE-ALSO">SEE ALSO</a></H2><PRE>
- <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
-
- Comparable functions in the wide-character (ncursesw) library are
- described in <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>, <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_addstr.3x,v 1.35 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_addstr.3x,v 1.37 2023/11/18 21:18:55 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_addstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_addstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_addstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_addstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
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. If an error is returned by the <STRONG>wmove</STRONG>, no
- characters are added to the window.
-
- If an error is returned by <STRONG>waddch</STRONG> (e.g., because the window is not
- large enough, or an illegal byte sequence was detected) only part of
- the string may be added. Aside from that, there is a special case in
- <STRONG>waddch</STRONG> where an error may be returned after successfully writing a
- character to the lower-right corner of a window when <STRONG><A HREF="scrollok.3x.html">scrollok(3x)</A></STRONG> is
- disabled.
+ the window pointer is null.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
</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_addch.3x.html">curs_addch(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_addwstr.3x,v 1.27 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_addwstr.3x,v 1.29 2023/11/18 21:18:55 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_addwstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_addwstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_addwstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_addwstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
</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_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_addch.3x.html">curs_addch(3x)</A></STRONG>, <STRONG><A HREF="curs_addchstr.3x.html">curs_addchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_addstr.3x.html">curs_addstr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_add_wch.3x.html">curs_add_wch(3x)</A></STRONG>, <STRONG><A HREF="curs_add_wchstr.3x.html">curs_add_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_addwstr.3x.html">curs_addwstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_in_wch.3x,v 1.22 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_in_wch.3x,v 1.24 2023/11/18 18:00:11 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_in_wch 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_in_wch 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_in_wch 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_in_wch 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
</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_inch.3x.html">curs_inch(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_in_wch.3x.html">curs_in_wch(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_in_wchstr.3x,v 1.28 2023/11/11 11:42:45 tom Exp @
+ * @Id: curs_in_wchstr.3x,v 1.32 2023/11/18 20:55:18 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_in_wchstr 3x 2023-11-11 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_in_wchstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_in_wchstr 3x 2023-11-11 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_in_wchstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
starting at the current cursor position in the named window.
Attributes (rendition) are stored with the characters.
- The <STRONG>in_wchnstr</STRONG>, <STRONG>mvin_wchnstr</STRONG>, <STRONG>mvwin_wchnstr</STRONG> and <STRONG>win_wchnstr</STRONG> fill the
- array with at most <EM>n</EM> <STRONG>cchar_t</STRONG> elements.
+ The four functions with <EM>n</EM> as the last argument return a leading
+ substring at most <EM>n</EM> characters long (exclusive of the trailing zeroed
+ <STRONG>cchar_t</STRONG>. Transfer stops at the end of the current line, or when <EM>n</EM>
+ characters have been stored at the location referenced by <EM>wchstr</EM>.
-
-</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Note that all routines except <STRONG>win_wchnstr</STRONG> may be macros.
-
- Reading a line that overflows the array pointed to by <EM>wchstr</EM> with
- <STRONG>in_wchstr</STRONG>, <STRONG>mvin_wchstr</STRONG>, <STRONG>mvwin_wchstr</STRONG> or <STRONG>win_wchstr</STRONG> causes undefined
- results. Therefore, the use of <STRONG>in_wchnstr</STRONG>, <STRONG>mvin_wchnstr</STRONG>,
- <STRONG>mvwin_wchnstr</STRONG>, or <STRONG>win_wchnstr</STRONG> is recommended.
+ Constants defined in <STRONG><curses.h></STRONG> can be used with the <STRONG>&</STRONG> (logical AND)
+ operator to extract the character or the attribute alone from any
+ position in the <EM>wchstr</EM> [see <STRONG><A HREF="curs_getcchar.3x.html">getcchar(3x)</A></STRONG>].
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
Upon successful completion, these functions return <STRONG>OK</STRONG>. Otherwise, they
return <STRONG>ERR</STRONG>.
+ X/Open Curses defines no error conditions. This implementation returns
+ an error
+
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
+
+ <STRONG>o</STRONG> if the <EM>wchstr</EM> parameter is null.
+
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-NOTES">NOTES</a></H2><PRE>
+ All routines except <STRONG>win_wchnstr</STRONG> may be macros.
+
+ Reading a line that overflows the array pointed to by <EM>wchstr</EM> with
+ <STRONG>in_wchstr</STRONG>, <STRONG>mvin_wchstr</STRONG>, <STRONG>mvwin_wchstr</STRONG> or <STRONG>win_wchstr</STRONG> causes undefined
+ results. Therefore, the use of <STRONG>in_wchnstr</STRONG>, <STRONG>mvin_wchnstr</STRONG>,
+ <STRONG>mvwin_wchnstr</STRONG>, or <STRONG>win_wchnstr</STRONG> is recommended.
+
+
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
The XSI Curses defines no error conditions. This implementation checks
for null pointers, returning <STRONG>ERR</STRONG> in that case.
-ncurses 6.4 2023-11-11 <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-NAME">NAME</a></li>
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
-<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
</ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_inchstr.3x,v 1.35 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_inchstr.3x,v 1.40 2023/11/19 00:08:58 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_inchstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_inchstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_inchstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_inchstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These routines return a NULL-terminated array of <STRONG>chtype</STRONG> quantities,
starting at the current cursor position in the named window and ending
- at the right margin of the window. The four functions with <EM>n</EM> as the
- last argument, return a leading substring at most <EM>n</EM> characters long
- (exclusive of the trailing (chtype)0). Constants defined in <STRONG><curses.h></STRONG>
- can be used with the <STRONG>&</STRONG> (logical AND) operator to extract the character
- or the attribute alone from any position in the <EM>chstr</EM> [see
- <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>].
+ at the right margin of the window.
+
+ The four functions with <EM>n</EM> as the last argument, return a leading
+ substring at most <EM>n</EM> characters long (exclusive of the trailing
+ (chtype)0). Transfer stops at the end of the current line, or when <EM>n</EM>
+ characters have been stored at the location referenced by <EM>chstr</EM>.
+
+ Constants defined in <STRONG><curses.h></STRONG> can be used with the <STRONG>&</STRONG> (logical AND)
+ operator to extract the character or the attribute alone from any
+ position in the <EM>chstr</EM> [see <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>].
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
other than <STRONG>ERR</STRONG> upon successful completion (the number of characters
retrieved, exclusive of the trailing 0).
- X/Open Curses defines no error conditions. In this implementation:
+ X/Open Curses defines no error conditions. This implementation returns
+ an error
- <STRONG>o</STRONG> If the <EM>win</EM> parameter is null, an error is returned,
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
- <STRONG>o</STRONG> If the <EM>chstr</EM> parameter is null, an error is returned,
+ <STRONG>o</STRONG> if the <EM>chstr</EM> parameter is null.
- 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-NOTES">NOTES</a></H2><PRE>
- Note that all routines except <STRONG>winchnstr</STRONG> may be macros. SVr4 does not
- document whether the result string is zero-terminated; it does not
- document whether a length limit argument includes any trailing 0; and
- it does not document the meaning of the return value.
+ All routines except <STRONG>winchnstr</STRONG> may be macros.
+
+ SVr4 does not document whether the result string is zero-terminated; it
+ does not document whether a length limit argument includes any trailing
+ 0; and it does not document the meaning of the return value.
+
+ Reading a line that overflows the array pointed to by <EM>chstr</EM> with
+ <STRONG>inchstr</STRONG>, <STRONG>mvinchstr</STRONG>, <STRONG>mvwinchstr</STRONG> or <STRONG>winchstr</STRONG> causes undefined results.
+ Therefore, the use of <STRONG>inchnstr</STRONG>, <STRONG>mvinchnstr</STRONG>, <STRONG>mvwinchnstr</STRONG>, or <STRONG>winchnstr</STRONG>
+ is recommended.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These functions are described in the XSI Curses standard, Issue 4. It
- is no more specific than the SVr4 documentation on the trailing 0. It
+ These functions are described in the XSI Curses standard, Issue 4. It
+ is no more specific than the SVr4 documentation on the trailing 0. It
does specify that the successful return of the functions is <STRONG>OK</STRONG>.
</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_inch.3x.html">curs_inch(3x)</A></STRONG>
-
- Comparable functions in the wide-character (ncursesw) library are
- described in <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>.
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>, <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_ins_wstr.3x,v 1.25 2023/11/11 11:43:21 tom Exp @
+ * @Id: curs_ins_wstr.3x,v 1.27 2023/11/18 23:44:30 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_ins_wstr 3x 2023-11-11 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_ins_wstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_ins_wstr 3x 2023-11-11 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_ins_wstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These routines insert a <STRONG>wchar_t</STRONG> character string (as many characters as
- will fit on the line) before the character under the cursor. All
- characters to the right of the cursor are shifted right, with the
- possibility of the rightmost characters on the line being lost. No
- wrapping is performed. The cursor position does not change (after
- moving to <EM>y</EM>, <EM>x</EM>, if specified). The four routines with <EM>n</EM> as the last
- argument insert a leading substring of at most <EM>n</EM> <STRONG>wchar_t</STRONG> characters.
- If <EM>n</EM> is less than 1, the entire string is inserted.
-
- If a character in <EM>wstr</EM> is a tab, newline, carriage return or backspace,
- the cursor is moved appropriately within the window. A newline also
- does a <STRONG>clrtoeol</STRONG> before moving. Tabs are considered to be at every
- eighth column. If a character in <EM>wstr</EM> is another control character, it
- is drawn in the <STRONG>^</STRONG><EM>X</EM> notation. Calling <STRONG>win_wch</STRONG> after adding a control
- character (and moving to it, if necessary) does not return the control
- character, but instead returns a character in the ^-representation of
- the control character.
+ will fit on the line) before the character under the cursor, as if
+ calling <STRONG><A HREF="curs_ins_wch.3x.html">wins_wch(3x)</A></STRONG>. All characters to the right of the cursor are
+ shifted right, with the possibility of the rightmost characters on the
+ line being lost. No wrapping is performed.
+
+ The cursor position does not change (after moving to <EM>y</EM>, <EM>x</EM>, if
+ specified).
+
+ The functions with <EM>n</EM> as the last argument insert a leading substring of
+ at most <EM>n</EM> <STRONG>wchar_t</STRONG> characters. If <EM>n</EM> is less than zero, the entire
+ string is inserted (stopping on a L'\0' character).
+
+ Special characters are handled as in <STRONG><A HREF="curs_add_wch.3x.html">wadd_wch(3x)</A></STRONG>.
+
+
+</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
+ All functions return the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> on success.
+
+ X/Open does not define any error conditions. This implementation
+ returns an error
+
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
+
+ <STRONG>o</STRONG> if the <EM>wstr</EM> parameter is null or
+
+ <STRONG>o</STRONG> if the <STRONG>wins_wch</STRONG> function returns an error.
+
+ Functions with a "mv" prefix first perform a cursor movement using
+ <STRONG><A HREF="curs_move.3x.html">wmove(3x)</A></STRONG>, and return an error if the position is outside the window,
+ or if the window pointer is null.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Note that all but wins_nwstr may be macros.
+ All but <STRONG>wins_nwstr</STRONG> may be macros.
If the first character in the string is a nonspacing character, these
functions will fail. XSI does not define what will happen if a
nonspacing character follows a control character.
-</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- Upon successful completion, these functions return <STRONG>OK</STRONG>. Otherwise, they
- return <STRONG>ERR</STRONG>.
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+ These functions are described in the XSI Curses standard, Issue 4,
+ which adds const qualifiers to the arguments.
- 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.
+ X/Open states that the entire string is inserted if <EM>n</EM> is less than 1.
+ This is probably an error, because it is inconsistent with other
+ functions, and differs from the X/Open implementation on Solaris.
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
-ncurses 6.4 2023-11-11 <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-NAME">NAME</a></li>
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
-<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-NOTES">NOTES</a></li>
+<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
</ul>
</div>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_insstr.3x,v 1.42 2023/11/11 11:46:07 tom Exp @
+ * @Id: curs_insstr.3x,v 1.44 2023/11/18 23:46:00 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_insstr 3x 2023-11-11 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_insstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_insstr 3x 2023-11-11 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_insstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These routines insert a character string (as many characters as will
- fit on the line) before the character under the cursor. All characters
- to the right of the cursor are shifted right with the possibility of
- the rightmost characters on the line being lost. The cursor position
- does not change (after moving to <EM>y</EM>, <EM>x</EM>, if specified). The functions
- with <EM>n</EM> as the last argument insert a leading substring of at most <EM>n</EM>
- characters. If <EM>n</EM><=0, then the entire string is inserted.
+ fit on the line) before the character under the cursor, as if calling
+ <STRONG><A HREF="curs_insch.3x.html">winsch(3x)</A></STRONG>. All characters to the right of the cursor are shifted
+ right, with the possibility of the rightmost characters on the line
+ being lost. No wrapping is performed.
- Special characters are handled as in <STRONG>addch</STRONG>.
+ The cursor position does not change (after moving to <EM>y</EM>, <EM>x</EM>, if
+ specified).
+
+ The functions with <EM>n</EM> as the last argument insert a leading substring of
+ at most <EM>n</EM> characters. If <EM>n</EM> is less than zero, the entire string is
+ inserted (stopping on a NUL character).
+
+ Special characters are handled as in <STRONG><A HREF="curs_addch.3x.html">waddch(3x)</A></STRONG>.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- All routines that return an integer return <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG>
- (SVr4 specifies only "an integer value other than <STRONG>ERR</STRONG>") upon successful
- completion, unless otherwise noted in the preceding routine
- descriptions.
+ All functions return the integer <STRONG>ERR</STRONG> upon failure and <STRONG>OK</STRONG> on success.
+
+ X/Open does not define any error conditions. This implementation
+ returns an error
- X/Open defines no error conditions. In this implementation, if the
- window parameter is null or the str parameter is null, an error is
- returned.
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
- 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.
+ <STRONG>o</STRONG> if the <EM>str</EM> parameter is null or
+
+ <STRONG>o</STRONG> the <STRONG><A HREF="curs_insch.3x.html">winsch(3x)</A></STRONG> function returns an error.
+
+ Functions with a "mv" prefix first perform a cursor movement using
+ <STRONG><A HREF="curs_move.3x.html">wmove(3x)</A></STRONG>, and return an error if the position is outside the window,
+ or if the window pointer is null.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Note that all but <STRONG>winsnstr</STRONG> may be macros.
+ All but <STRONG>winsnstr</STRONG> may be macros.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These functions are described in the XSI Curses standard, Issue 4,
+ These functions are described in the XSI Curses standard, Issue 4,
which adds const qualifiers to the arguments.
- The Single Unix Specification, Version 2 states that <STRONG>insnstr</STRONG> and
- <STRONG>winsnstr</STRONG> perform wrapping. This is probably an error, since it makes
- this group of functions inconsistent. Also, no implementation of
+ The Single Unix Specification, Version 2 states that <STRONG>insnstr</STRONG> and
+ <STRONG>winsnstr</STRONG> perform wrapping. This is probably an error, since it makes
+ this group of functions inconsistent. Also, no implementation of
curses documents this inconsistency.
+ X/Open states that the entire string is inserted if <EM>n</EM> is less than 1.
+ This is probably an error, because it is inconsistent with other
+ functions, and differs from the SVr4 and X/Open implementations on
+ Solaris.
+
</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_clear.3x.html">curs_clear(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_ins_wstr.3x.html">curs_ins_wstr(3x)</A></STRONG>, <STRONG><A HREF="curs_util.3x.html">curs_util(3x)</A></STRONG>
-ncurses 6.4 2023-11-11 <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_insstr.3x.html">curs_insstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_instr.3x,v 1.36 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_instr.3x,v 1.41 2023/11/19 00:20:02 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_instr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_instr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_instr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_instr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
- These routines return a string of characters in <EM>str</EM>, extracted starting
- at the current cursor position in the named window. Attributes are
- stripped from the characters. The four functions with <EM>n</EM> as the last
- argument return a leading substring at most <EM>n</EM> characters long
- (exclusive of the trailing NUL).
+ These routines return a string of characters in <EM>str</EM>, starting at the
+ current cursor position in the named window. Attributes are stripped
+ from the characters.
+
+ The four functions with <EM>n</EM> as the last argument return a leading
+ substring at most <EM>n</EM> characters long (exclusive of the trailing NUL).
+ Transfer stops at the end of the current line, or when <EM>n</EM> characters
+ have been stored at the location referenced by <EM>str</EM>.
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- All of the functions return <STRONG>ERR</STRONG> upon failure, or the number of
+ All of the functions return <STRONG>ERR</STRONG> upon failure, or the number of
characters actually read into the string.
- X/Open Curses defines no error conditions. In this implementation:
+ X/Open Curses defines no error conditions. This implementation returns
+ an error
- <STRONG>o</STRONG> If the <EM>win</EM> parameter is null, an error is returned,
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
- <STRONG>o</STRONG> If the <EM>chstr</EM> parameter is null, an error is returned,
+ <STRONG>o</STRONG> if the <EM>chstr</EM> parameter is null.
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
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- Note that all routines except <STRONG>winnstr</STRONG> may be macros.
+ All routines except <STRONG>winnstr</STRONG> may be macros.
+
+ Reading a line that overflows the array pointed to by <EM>str</EM> with <STRONG>instr</STRONG>,
+ <STRONG>mvinstr</STRONG>, <STRONG>mvwinstr</STRONG> or <STRONG>winstr</STRONG> causes undefined results. Therefore, the
+ use of <STRONG>innstr</STRONG>, <STRONG>mvinnstr</STRONG>, <STRONG>mvwinnstr</STRONG>, or <STRONG>winnstr</STRONG> is recommended.
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
</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="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_inwstr.3x,v 1.28 2023/10/07 21:19:07 tom Exp @
+ * @Id: curs_inwstr.3x,v 1.33 2023/11/19 00:10:50 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="generator" content="Manpage converted by man2html - see https://invisible-island.net/scripts/readme.html#others_scripts">
-<TITLE>curs_inwstr 3x 2023-10-07 ncurses 6.4 Library calls</TITLE>
+<TITLE>curs_inwstr 3x 2023-11-18 ncurses 6.4 Library calls</TITLE>
<link rel="author" href="mailto:bug-ncurses@gnu.org">
</HEAD>
<BODY>
-<H1 class="no-header">curs_inwstr 3x 2023-10-07 ncurses 6.4 Library calls</H1>
+<H1 class="no-header">curs_inwstr 3x 2023-11-18 ncurses 6.4 Library calls</H1>
<PRE>
<STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG> Library calls <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
</PRE><H2><a name="h2-DESCRIPTION">DESCRIPTION</a></H2><PRE>
These routines return a string of <STRONG>wchar_t</STRONG> wide characters in <EM>wstr</EM>,
- extracted starting at the current cursor position in the named window.
+ starting at the current cursor position in the named window.
The four functions with <EM>n</EM> as the last argument return a leading
substring at most <EM>n</EM> characters long (exclusive of the trailing NUL).
character, an error is generated.
-</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
- All routines except <STRONG>winnwstr</STRONG> may be macros.
-
- Each cell in the window holds a complex character (i.e., base- and
- combining-characters) together with attributes and color. These
- functions store only the wide characters, ignoring attributes and
- color. Use <STRONG>in_wchstr</STRONG> to return the complex characters from a window.
-
-
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- All routines return <STRONG>ERR</STRONG> upon failure. Upon successful completion, the
+ All routines return <STRONG>ERR</STRONG> upon failure. Upon successful completion, the
*<STRONG>inwstr</STRONG> routines return <STRONG>OK</STRONG>, and the *<STRONG>innwstr</STRONG> routines return the number
of characters read into the string.
+ X/Open defines no error conditions. This implementation returns an
+ error
+
+ <STRONG>o</STRONG> if the <EM>win</EM> parameter is null or
+
+ <STRONG>o</STRONG> if the <EM>wstr</EM> parameter is null, or
+
+ <STRONG>o</STRONG> if no characters could be read.
+
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-NOTES">NOTES</a></H2><PRE>
+ All routines except <STRONG>winnwstr</STRONG> may be macros.
+
+ Each cell in the window holds a complex character (i.e., base- and
+ combining-characters) together with attributes and color. These
+ functions store only the wide characters, ignoring attributes and
+ color. Use <STRONG>in_wchstr</STRONG> to return the complex characters from a window.
+
+ Reading a line that overflows the array pointed to by <EM>wstr</EM> with <STRONG>inwstr</STRONG>,
+ <STRONG>mvinwstr</STRONG>, <STRONG>mvwinwstr</STRONG> or <STRONG>winwstr</STRONG> causes undefined results. Therefore,
+ the use of <STRONG>innwstr</STRONG>, <STRONG>mvinnwstr</STRONG>, <STRONG>mvwinnwstr</STRONG>, or <STRONG>winnwstr</STRONG> is recommended.
+
+
</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_instr.3x.html">curs_instr(3x)</A></STRONG>, <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
+ <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="curs_inch.3x.html">curs_inch(3x)</A></STRONG>, <STRONG><A HREF="curs_inchstr.3x.html">curs_inchstr(3x)</A></STRONG>, <STRONG><A HREF="curs_instr.3x.html">curs_instr(3x)</A></STRONG>,
+ <STRONG><A HREF="curs_in_wchstr.3x.html">curs_in_wchstr(3x)</A></STRONG>
-ncurses 6.4 2023-10-07 <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
+ncurses 6.4 2023-11-18 <STRONG><A HREF="curs_inwstr.3x.html">curs_inwstr(3x)</A></STRONG>
</PRE>
<div class="nav">
<ul>
<li><a href="#h2-NAME">NAME</a></li>
<li><a href="#h2-SYNOPSIS">SYNOPSIS</a></li>
<li><a href="#h2-DESCRIPTION">DESCRIPTION</a></li>
-<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
</ul>
</div>
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.4 (patch 20231111).
+ This describes <STRONG>ncurses</STRONG> version 6.4 (patch 20231118).
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
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences.
- This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20231111).
+ This manual describes <STRONG>ncurses</STRONG> version 6.4 (patch 20231118).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_add_wchstr.3x,v 1.28 2023/10/07 21:19:07 tom Exp $
-.TH curs_add_wchstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_add_wchstr.3x,v 1.30 2023/11/18 21:18:55 tom Exp $
+.TH curs_add_wchstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
array of complex characters \fIwchstr\fP
into the window image structure
starting at the current cursor position.
+.PP
The four functions with \fIn\fP as the last
argument copy at most \fIn\fP elements,
but no more than will fit on the line.
to the maximum number of characters that will fit on the line.
.PP
The window cursor is \fInot\fP advanced.
-These functions work faster than \fBwaddnstr\fP.
+These functions are faster than \fBwaddnstr\fP.
On the other hand:
.bP
they do not perform checking
.PP
X/Open does not define any error conditions.
This implementation returns an error
-if the window pointer is null.
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwchstr\fP parameter is null.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
These entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_addwstr\fP(3X)
-.PP
-Comparable functions in the narrow-character (ncurses) library are
-described in
-\fB\%curs_addchstr\fP(3X).
+\fB\%curs_addch\fP(3X),
+\fB\%curs_addchstr\fP(3X),
+\fB\%curs_addstr\fP(3X),
+\fB\%curs_addwstr\fP(3X),
+\fB\%curs_add_wch\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addchstr.3x,v 1.34 2023/10/07 21:19:07 tom Exp $
-.TH curs_addchstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_addchstr.3x,v 1.36 2023/11/18 21:18:55 tom Exp $
+.TH curs_addchstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
\fIchstr\fP array
into the window image structure
starting at the current cursor position.
+.PP
The four functions with \fIn\fP as the last
argument copy at most \fIn\fP elements,
but no more than will fit on the line.
to the maximum number of characters that will fit on the line.
.PP
The window cursor is \fInot\fP advanced.
-These functions work faster than \fBwaddnstr\fP.
+These functions are faster than \fBwaddnstr\fP.
On the other hand:
.bP
they do not perform checking
.PP
X/Open does not define any error conditions.
This implementation returns an error
-if the window pointer is null.
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwchstr\fP parameter is null.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
These entry points are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_addstr\fP(3X)
-.PP
-Comparable functions in the wide-character (ncursesw) library are
-described in
-\fB\%curs_add_wchstr\fP(3X).
+\fB\%curs_addch\fP(3X),
+\fB\%curs_addstr\fP(3X),
+\fB\%curs_addwstr\fP(3X),
+\fB\%curs_add_wchstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addstr.3x,v 1.35 2023/10/07 21:19:07 tom Exp $
-.TH curs_addstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_addstr.3x,v 1.37 2023/11/18 21:18:55 tom Exp $
+.TH curs_addstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
-If an error is returned by the \fBwmove\fP,
-no characters are added to the window.
-.PP
-If an error is returned by \fBwaddch\fP
-(e.g.,
-because the window is not large enough,
-or an illegal byte sequence was detected)
-only part of the string may be added.
-Aside from that,
-there is a special case in \fBwaddch\fP where an error may be
-returned after successfully writing a character to the lower-right corner
-of a window when \fBscrollok\fP(3X) is disabled.
.SH NOTES
All of these functions except \fBwaddnstr\fP may be macros.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_addch\fP(3X)
+\fB\%curs_addch\fP(3X),
+\fB\%curs_addchstr\fP(3X),
+\fB\%curs_addwstr\fP(3X),
+\fB\%curs_add_wchstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_addwstr.3x,v 1.27 2023/10/07 21:19:07 tom Exp $
-.TH curs_addwstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_addwstr.3x,v 1.29 2023/11/18 21:18:55 tom Exp $
+.TH curs_addwstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.SH SEE ALSO
\fB\%curses\fP(3X),
\fB\%curs_addch\fP(3X),
-\fB\%curs_add_wch\fP(3X)
+\fB\%curs_addchstr\fP(3X),
+\fB\%curs_addstr\fP(3X),
+\fB\%curs_add_wch\fP(3X),
+\fB\%curs_add_wchstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_in_wch.3x,v 1.22 2023/10/07 21:19:07 tom Exp $
-.TH curs_in_wch 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_in_wch.3x,v 1.24 2023/11/18 18:00:11 tom Exp $
+.TH curs_in_wch 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
These functions are described in the XSI Curses standard, Issue 4.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_inch\fP(3X)
+\fB\%curs_inch\fP(3X),
+\fB\%curs_inchstr\fP(3X),
+\fB\%curs_instr\fP(3X),
+\fB\%curs_inwstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_in_wchstr.3x,v 1.28 2023/11/11 11:42:45 tom Exp $
-.TH curs_in_wchstr 3X 2023-11-11 "ncurses 6.4" "Library calls"
+.\" $Id: curs_in_wchstr.3x,v 1.32 2023/11/18 20:55:18 tom Exp $
+.TH curs_in_wchstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.ie t .ds '' ''
.el .ds '' ""
.\}
+.
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
\fB\%in_wchstr\fP,
\fB\%in_wchnstr\fP,
starting at the current cursor position in the named window.
Attributes (rendition) are stored with the characters.
.PP
-The
-\fBin_wchnstr\fP,
-\fBmvin_wchnstr\fP,
-\fBmvwin_wchnstr\fP
-and
-\fBwin_wchnstr\fP
-fill the array
-with at most
-\fIn\fP
-\fBcchar_t\fP
-elements.
+The four functions with \fIn\fP as the last argument return
+a leading substring at most \fIn\fP characters long
+(exclusive of the trailing zeroed \fBcchar_t\fR.
+Transfer stops at the end of the current line, or when \fIn\fP characters have
+been stored at the location referenced by \fIwchstr\fP.
+.PP
+Constants defined in \fB<curses.h>\fP can be used with the \fB&\fP (logical
+AND) operator to extract the character or the attribute alone from any position
+in the \fIwchstr\fP [see \fBgetcchar\fP(3X)].
+.SH RETURN VALUE
+Upon successful completion, these functions return
+\fBOK\fP.
+Otherwise, they return
+\fBERR\fP.
+.PP
+X/Open Curses defines no error conditions.
+This implementation returns an error
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwchstr\fP parameter is null.
+.PP
+Functions with a \*(``mv\*('' prefix first perform a cursor movement using
+\fBwmove\fP, and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
-Note that all routines except
-\fBwin_wchnstr\fP
-may be
-macros.
+All routines except \fBwin_wchnstr\fP may be macros.
.PP
Reading a line that overflows the array pointed to by
\fIwchstr\fP
\fBmvwin_wchnstr\fP, or
\fBwin_wchnstr\fP
is recommended.
-.SH RETURN VALUE
-Upon successful completion, these functions return
-\fBOK\fP.
-Otherwise, they return
-\fBERR\fP.
-.PP
-Functions with a \*(``mv\*('' prefix first perform a cursor movement using
-\fBwmove\fP, and return an error if the position is outside the window,
-or if the window pointer is null.
.SH PORTABILITY
The XSI Curses defines no error conditions.
This implementation checks for null pointers,
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inchstr.3x,v 1.35 2023/10/07 21:19:07 tom Exp $
-.TH curs_inchstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_inchstr.3x,v 1.40 2023/11/19 00:08:58 tom Exp $
+.TH curs_inchstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
These routines return a NULL-terminated array of \fBchtype\fP quantities,
starting at the current cursor position in the named window and ending at the
right margin of the window.
-The four functions with \fIn\fP as
-the last argument, return a leading substring at most \fIn\fP characters long
+.PP
+The four functions with \fIn\fP as the last argument, return
+a leading substring at most \fIn\fP characters long
(exclusive of the trailing (chtype)0).
+Transfer stops at the end of the current line, or when \fIn\fP characters have
+been stored at the location referenced by \fIchstr\fP.
+.PP
Constants defined in \fB<curses.h>\fP can be used with the \fB&\fP (logical
AND) operator to extract the character or the attribute alone from any position
in the \fIchstr\fP [see \fBcurs_inch\fP(3X)].
retrieved, exclusive of the trailing 0).
.PP
X/Open Curses defines no error conditions.
-In this implementation:
+This implementation returns an error
.bP
-If the \fIwin\fP parameter is null, an error is returned,
+if the \fIwin\fP parameter is null or
.bP
-If the \fIchstr\fP parameter is null, an error is returned,
+if the \fIchstr\fP parameter is null.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
-Note that all routines except \fBwinchnstr\fP may be macros.
+All routines except \fBwinchnstr\fP may be macros.
+.PP
SVr4 does not
document whether the result string is zero-terminated; it does not document
whether a length limit argument includes any trailing 0; and it does not
document the meaning of the return value.
+.PP
+Reading a line that overflows the array pointed to by
+\fIchstr\fP
+with
+\fBinchstr\fP,
+\fBmvinchstr\fP,
+\fBmvwinchstr\fP
+or
+\fBwinchstr\fP
+causes undefined results.
+Therefore, the use of
+\fBinchnstr\fP,
+\fBmvinchnstr\fP,
+\fBmvwinchnstr\fP, or
+\fBwinchnstr\fP
+is recommended.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4.
It is no
that the successful return of the functions is \fBOK\fP.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_inch\fP(3X)
-.PP
-Comparable functions in the wide-character (ncursesw) library are
-described in
-\fB\%curs_in_wchstr\fP(3X).
+\fB\%curs_inch\fP(3X),
+\fB\%curs_inwstr\fP(3X),
+\fB\%curs_in_wchstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_ins_wstr.3x,v 1.25 2023/11/11 11:43:21 tom Exp $
-.TH curs_ins_wstr 3X 2023-11-11 "ncurses 6.4" "Library calls"
+.\" $Id: curs_ins_wstr.3x,v 1.27 2023/11/18 23:44:30 tom Exp $
+.TH curs_ins_wstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.ie t .ds '' ''
.el .ds '' ""
.\}
+.
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
\fB\%ins_wstr\fP,
\fB\%ins_nwstr\fP,
.SH DESCRIPTION
These routines insert a \fBwchar_t\fP character string
(as many characters as will fit on the line)
-before the character under the cursor.
+before the character under the cursor,
+as if calling \fBwins_wch\fP(3X).
All characters to the right of the cursor are shifted right,
with the possibility of the rightmost characters on the line being lost.
No wrapping is performed.
+.PP
The cursor position does not change
(after moving to \fIy\fP, \fIx\fP, if specified).
-The four routines with \fIn\fP as the last argument
+.PP
+The functions with \fIn\fP as the last argument
insert a leading substring of at most \fIn\fP \fBwchar_t\fP characters.
-If \fIn\fP is less than 1, the entire string is inserted.
+If \fIn\fP is less than zero, the entire string is inserted
+(stopping on a L'\e0' character).
+.PP
+Special characters are handled as in \fBwadd_wch\fP(3X).
+.SH RETURN VALUE
+All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success.
+.PP
+X/Open does not define any error conditions.
+This implementation returns an error
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwstr\fP parameter is null or
+.bP
+if the \fBwins_wch\fP function returns an error.
.PP
-If a character in \fIwstr\fP is a tab, newline, carriage return or
-backspace, the cursor is moved appropriately within the window.
-A newline also does a \fBclrtoeol\fP before moving.
-Tabs are considered to be at every eighth column.
-If a character in \fIwstr\fP is another control character,
-it is drawn in the \fB^\fIX\fR notation.
-Calling \fBwin_wch\fP after adding a control character
-(and moving to it, if necessary)
-does not return the control character,
-but instead returns a character in the ^-representation
-of the control character.
+Functions with a \*(``mv\*('' prefix first perform a cursor movement using
+\fBwmove\fP(3X), and return an error if the position is outside the window,
+or if the window pointer is null.
.SH NOTES
-Note that all but wins_nwstr may be macros.
+All but \fBwins_nwstr\fP may be macros.
.PP
If the first character in the string is a nonspacing character, these
functions will fail.
XSI does not define what will happen if a nonspacing character follows
a control character.
-.SH RETURN VALUE
-Upon successful completion, these functions return \fBOK\fP.
-Otherwise, they return \fBERR\fP.
+.SH PORTABILITY
+These functions are described in the XSI Curses standard, Issue 4, which adds
+const qualifiers to the arguments.
.PP
-Functions with a \*(``mv\*('' prefix first perform a cursor movement using
-\fBwmove\fP, and return an error if the position is outside the window,
-or if the window pointer is null.
+X/Open states that the entire string is inserted if \fIn\fP is less than 1.
+This is probably an error,
+because it is inconsistent with other functions,
+and differs from the X/Open implementation on Solaris.
.SH SEE ALSO
\fB\%curses\fP(3X),
\fB\%curs_insstr\fP(3X),
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_insstr.3x,v 1.42 2023/11/11 11:46:07 tom Exp $
-.TH curs_insstr 3X 2023-11-11 "ncurses 6.4" "Library calls"
+.\" $Id: curs_insstr.3x,v 1.44 2023/11/18 23:46:00 tom Exp $
+.TH curs_insstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.ie t .ds '' ''
.el .ds '' ""
.\}
+.
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
\fB\%insstr\fP,
\fB\%insnstr\fP,
.SH DESCRIPTION
These routines insert a character string
(as many characters as will fit on the line)
-before the character under the cursor.
-All characters to the right of the cursor are shifted right
+before the character under the cursor,
+as if calling \fBwinsch\fP(3X).
+All characters to the right of the cursor are shifted right,
with the possibility of the rightmost characters on the line being lost.
+No wrapping is performed.
+.PP
The cursor position does not change
(after moving to \fIy\fP, \fIx\fP, if specified).
+.PP
The functions with \fIn\fP as the last argument
insert a leading substring of at most \fIn\fP characters.
-If \fIn\fP<=0, then the entire string is inserted.
+If \fIn\fP is less than zero, the entire string is inserted
+(stopping on a NUL character).
.PP
-Special characters are handled as in \fBaddch\fP.
+Special characters are handled as in \fBwaddch\fP(3X).
.SH RETURN VALUE
-All routines that return an integer return \fBERR\fP upon failure and \fBOK\fP
-(SVr4 specifies only "an integer value other than \fBERR\fP")
-upon successful completion,
-unless otherwise noted in the preceding routine descriptions.
+All functions return the integer \fBERR\fP upon failure and \fBOK\fP on success.
.PP
-X/Open defines no error conditions.
-In this implementation,
-if the window parameter is null or the str parameter is null,
-an error is returned.
+X/Open does not define any error conditions.
+This implementation returns an error
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIstr\fP parameter is null or
+.bP
+the \fBwinsch\fP(3X) function returns an error.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
-\fBwmove\fP, and return an error if the position is outside the window,
+\fBwmove\fP(3X), and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
-Note that all but \fBwinsnstr\fP may be macros.
+All but \fBwinsnstr\fP may be macros.
.SH PORTABILITY
These functions are described in the XSI Curses standard, Issue 4, which adds
const qualifiers to the arguments.
-.LP
+.PP
The Single Unix Specification, Version 2 states that
\fBinsnstr\fP and \fBwinsnstr\fP perform wrapping.
This is probably an error, since it makes this group of functions inconsistent.
Also, no implementation of curses documents this inconsistency.
+.PP
+X/Open states that the entire string is inserted if \fIn\fP is less than 1.
+This is probably an error,
+because it is inconsistent with other functions,
+and differs from the SVr4 and X/Open implementations on Solaris.
.SH SEE ALSO
\fB\%curses\fP(3X),
-\fB\%curs_clear\fP(3X),
\fB\%curs_inch\fP(3X),
+\fB\%curs_ins_wstr\fP(3X),
\fB\%curs_util\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_instr.3x,v 1.36 2023/10/07 21:19:07 tom Exp $
-.TH curs_instr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_instr.3x,v 1.41 2023/11/19 00:20:02 tom Exp $
+.TH curs_instr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
\fBint mvwinnstr(WINDOW *\fIwin\fP, int \fIy\fP, int \fIx\fP, char *\fIstr\fP, int \fIn\fP);
.fi
.SH DESCRIPTION
-These routines return a string of characters in \fIstr\fP, extracted starting
-at the current cursor position in the named window.
+These routines return a string of characters in \fIstr\fP,
+starting at the current cursor position in the named window.
Attributes are stripped from the characters.
-The four
-functions with \fIn\fP as the last argument return a leading substring at most
-\fIn\fP characters long (exclusive of the trailing NUL).
+.PP
+The four functions with \fIn\fP as the last argument return
+a leading substring at most \fIn\fP characters long
+(exclusive of the trailing NUL).
+Transfer stops at the end of the current line, or when \fIn\fP characters have
+been stored at the location referenced by \fIstr\fP.
.SH RETURN VALUE
All of the functions return \fBERR\fP upon failure,
or the number of characters actually read into the string.
.PP
X/Open Curses defines no error conditions.
-In this implementation:
+This implementation returns an error
.bP
-If the \fIwin\fP parameter is null, an error is returned,
+if the \fIwin\fP parameter is null or
.bP
-If the \fIchstr\fP parameter is null, an error is returned,
+if the \fIchstr\fP parameter is null.
.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
.SH NOTES
-Note that all routines except \fBwinnstr\fP may be macros.
+All routines except \fBwinnstr\fP may be macros.
+.PP
+Reading a line that overflows the array pointed to by
+\fIstr\fP
+with
+\fBinstr\fP,
+\fBmvinstr\fP,
+\fBmvwinstr\fP
+or
+\fBwinstr\fP
+causes undefined results.
+Therefore, the use of
+\fBinnstr\fP,
+\fBmvinnstr\fP,
+\fBmvwinnstr\fP, or
+\fBwinnstr\fP
+is recommended.
.SH PORTABILITY
SVr4 does not
document whether a length limit includes or excludes the trailing NUL.
value for \fIn\fP.
In this case, the functions return the string ending at the right margin.
.SH SEE ALSO
-\fB\%curses\fP(3X)
+\fB\%curses\fP(3X),
+\fB\%curs_inchstr\fP(3X),
+\fB\%curs_inch\fP(3X),
+\fB\%curs_inwstr\fP(3X),
+\fB\%curs_in_wchstr\fP(3X)
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_inwstr.3x,v 1.28 2023/10/07 21:19:07 tom Exp $
-.TH curs_inwstr 3X 2023-10-07 "ncurses 6.4" "Library calls"
+.\" $Id: curs_inwstr.3x,v 1.33 2023/11/19 00:10:50 tom Exp $
+.TH curs_inwstr 3X 2023-11-18 "ncurses 6.4" "Library calls"
.ie \n(.g \{\
.ds `` \(lq
.ds '' \(rq
.ie t .ds '' ''
.el .ds '' ""
.\}
+.de bP
+.ie n .IP \(bu 4
+.el .IP \(bu 2
+..
.SH NAME
\fB\%inwstr\fP,
\fB\%innwstr\fP,
.fi
.SH DESCRIPTION
These routines return a string of \fBwchar_t\fP wide characters in \fIwstr\fP,
-extracted starting at the current cursor position in the named window.
+starting at the current cursor position in the named window.
.PP
The four functions with \fIn\fP as the last argument return
a leading substring at most \fIn\fP characters long
.PP
If the size \fIn\fP is not large enough to store a complete complex character,
an error is generated.
-.SH NOTES
-All routines except
-\fBwinnwstr\fP
-may be macros.
-.PP
-Each cell in the window holds a complex character (i.e., base-
-and combining-characters) together with attributes and color.
-These functions store only the wide characters,
-ignoring attributes and color.
-Use \fBin_wchstr\fP to return the complex characters from a window.
.SH RETURN VALUE
All routines return
\fBERR\fP
routines return the
number of characters read into the string.
.PP
+X/Open defines no error conditions.
+This implementation returns an error
+.bP
+if the \fIwin\fP parameter is null or
+.bP
+if the \fIwstr\fP parameter is null, or
+.bP
+if no characters could be read.
+.PP
Functions with a \*(``mv\*('' prefix first perform a cursor movement using
\fBwmove\fP, and return an error if the position is outside the window,
or if the window pointer is null.
+.SH NOTES
+All routines except
+\fBwinnwstr\fP
+may be macros.
+.PP
+Each cell in the window holds a complex character (i.e., base-
+and combining-characters) together with attributes and color.
+These functions store only the wide characters,
+ignoring attributes and color.
+Use \fBin_wchstr\fP to return the complex characters from a window.
+.PP
+Reading a line that overflows the array pointed to by
+\fIwstr\fP
+with
+\fBinwstr\fP,
+\fBmvinwstr\fP,
+\fBmvwinwstr\fP
+or
+\fBwinwstr\fP
+causes undefined results.
+Therefore, the use of
+\fBinnwstr\fP,
+\fBmvinnwstr\fP,
+\fBmvwinnwstr\fP, or
+\fBwinnwstr\fP
+is recommended.
.SH SEE ALSO
\fB\%curses\fP(3X),
+\fB\%curs_inch\fP(3X),
+\fB\%curs_inchstr\fP(3X),
\fB\%curs_instr\fP(3X),
\fB\%curs_in_wchstr\fP(3X)
-# $Id: manhtml.aliases,v 1.27 2023/10/14 22:36:19 tom Exp $
+# $Id: manhtml.aliases,v 1.28 2023/11/19 00:14:00 tom Exp $
#***************************************************************************
# Copyright 2019-2022,2023 Thomas E. Dickey *
# Copyright 2013,2017 Free Software Foundation, Inc. *
wbkgdset(3X) curs_bkgd(3X)
wget_wch(3X) curs_get_wch(3X)
wgetch(3X) curs_getch(3X)
+wins_wch(3X) curs_ins_wch(3X)
+winsch(3X) curs_insch(3X)
+wmove(3X) curs_move(3X)
wnoutrefresh(3X) curs_refresh(3X)
wrefresh(3X) curs_refresh(3X)
wsetscrreg(3X) curs_outopts(3X)
/****************************************************************************
- * Copyright 2019-2020,2022 Thomas E. Dickey *
+ * Copyright 2019-2022,2023 Thomas E. Dickey *
* Copyright 1998-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_addstr.c,v 1.58 2022/06/11 20:12:04 tom Exp $")
+MODULE_ID("$Id: lib_addstr.c,v 1.61 2023/11/18 23:54:19 tom Exp $")
NCURSES_EXPORT(int)
waddnstr(WINDOW *win, const char *astr, int n)
T((T_CALLED("waddnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(astr, n), n));
- if (win && (str != 0)) {
+ if (win && (str != 0) && (n != 0)) {
+ bool explicit = (n > 0);
+
TR(TRACE_VIRTPUT | TRACE_ATTRS,
("... current %s", _traceattr(WINDOW_ATTRS(win))));
code = OK;
TR(TRACE_VIRTPUT, ("str is not null, length = %d",
- ((n > 0) ? n : (int) strlen(str))));
- if (n < 0)
+ (explicit ? n : (int) strlen(str))));
+ if (!explicit)
n = INT_MAX;
- while ((*str != '\0') && (n-- > 0)) {
+ while ((explicit || (*str != '\0')) && (n-- > 0)) {
NCURSES_CH_T ch;
TR(TRACE_VIRTPUT, ("*str = %#o", UChar(*str)));
SetChar(ch, UChar(*str++), A_NORMAL);
_nc_viscbuf(astr, n),
n));
- if (!win)
+ if (!win || !astr)
returnCode(ERR);
y = win->_cury;
T((T_CALLED("waddnwstr(%p,%s,%d)"), (void *) win, _nc_viswbufn(str, n), n));
- if (win && (str != 0)) {
+ if (win && (str != 0) && (n != 0)) {
+ bool explicit = (n > 0);
+
TR(TRACE_VIRTPUT | TRACE_ATTRS,
("... current %s", _traceattr(WINDOW_ATTRS(win))));
code = OK;
TR(TRACE_VIRTPUT, ("str is not null, length = %d",
- ((n > 0) ? n : (int) wcslen(str))));
- if (n < 0)
+ (explicit ? n : (int) wcslen(str))));
+ if (!explicit)
n = INT_MAX;
- while ((*str != L('\0')) && (n-- > 0)) {
+ while ((explicit || (*str != L('\0'))) && (n-- > 0)) {
NCURSES_CH_T ch;
TR(TRACE_VIRTPUT, ("*str[0] = %#lx", (unsigned long) *str));
SetChar(ch, *str++, A_NORMAL);
/****************************************************************************
- * Copyright 2018-2020,2022 Thomas E. Dickey *
+ * Copyright 2018-2022,2023 Thomas E. Dickey *
* Copyright 2004-2009,2016 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <curses.priv.h>
#include <ctype.h>
-MODULE_ID("$Id: lib_insnstr.c,v 1.8 2022/05/21 17:35:15 tom Exp $")
+MODULE_ID("$Id: lib_insnstr.c,v 1.9 2023/11/18 23:47:19 tom Exp $")
NCURSES_EXPORT(int)
winsnstr(WINDOW *win, const char *s, int n)
T((T_CALLED("winsnstr(%p,%s,%d)"), (void *) win, _nc_visbufn(s, n), n));
- if (win != 0 && str != 0) {
+ if (win != 0 && str != 0 && n != 0) {
SCREEN *sp = _nc_screen_of(win);
#if USE_WIDEC_SUPPORT
/*
* call to the wins_nwstr() function.
*/
if (sp->_screen_unicode) {
- size_t nn = (n > 0) ? (size_t) n : strlen(s);
+ size_t nn = (n >= 0) ? (size_t) n : strlen(s);
wchar_t *buffer = typeMalloc(wchar_t, nn + 1);
if (buffer != 0) {
mbstate_t state;
NCURSES_SIZE_T ox = win->_curx;
const unsigned char *cp;
- for (cp = str; (n <= 0 || (cp - str) < n) && *cp; cp++) {
+ for (cp = str; (n < 0 || (cp - str) < n) && *cp; cp++) {
_nc_insert_ch(sp, win, (chtype) UChar(*cp));
}
win->_curx = ox;
/****************************************************************************
- * Copyright 2019,2020 Thomas E. Dickey *
+ * Copyright 2019-2020,2023 Thomas E. Dickey *
* Copyright 2002-2016,2017 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_ins_wch.c,v 1.25 2020/12/05 20:04:59 tom Exp $")
+MODULE_ID("$Id: lib_ins_wch.c,v 1.27 2023/11/18 23:48:20 tom Exp $")
/*
* Insert the given character, updating the current location to simplify
(void *) win, _nc_viswbufn(wstr, n), n));
if (win != 0
- && wstr != 0) {
- if (n < 1)
+ && wstr != 0
+ && n != 0) {
+ bool explicit = TRUE;
+
+ if (n < 0) {
+ explicit = FALSE;
n = INT_MAX;
+ }
code = OK;
if (n > 0) {
NCURSES_SIZE_T oy = win->_cury;
NCURSES_SIZE_T ox = win->_curx;
- for (cp = wstr; (*cp != L'\0') && ((cp - wstr) < n); cp++) {
+ for (cp = wstr; (explicit || (*cp != L'\0')) && ((cp - wstr) < n); cp++) {
int len = _nc_wacs_width(*cp);
if ((len >= 0 && len != 1) || !is7bits(*cp)) {
-ncurses6 (6.4+20231111) unstable; urgency=low
+ncurses6 (6.4+20231118) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 Nov 2023 05:36:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 13 Nov 2023 20:05:39 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20231111) unstable; urgency=low
+ncurses6 (6.4+20231118) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 Nov 2023 05:36:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 13 Nov 2023 20:05:39 -0500
ncurses6 (5.9+20131005) unstable; urgency=low
-ncurses6 (6.4+20231111) unstable; urgency=low
+ncurses6 (6.4+20231118) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 10 Nov 2023 05:36:12 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Mon, 13 Nov 2023 20:05:39 -0500
ncurses6 (5.9+20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.616 2023/11/10 10:36:12 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.617 2023/11/14 01:05:39 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "4"\r
!define VERSION_YYYY "2023"\r
-!define VERSION_MMDD "1111"\r
+!define VERSION_MMDD "1118"\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.4
-Release: 20231111
+Release: 20231118
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.4
-Release: 20231111
+Release: 20231118
License: X11
Group: Development/Libraries
URL: https://invisible-island.net/ncurses/
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.4
-Release: 20231111
+Release: 20231118
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz