-- sale, use or other dealings in this Software without prior written --
-- authorization. --
-------------------------------------------------------------------------------
--- $Id: NEWS,v 1.3225 2018/12/01 20:59:08 tom Exp $
+-- $Id: NEWS,v 1.3227 2018/12/08 23:02:39 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.
+20181208
+ + modify wbkgd() and wbkgrnd() to improve compatibility with SVr4
+ curses, changing the way the window rendition is updated when the
+ background character is modified (report by Valery Ushakov).
+
20181201
+ add midnightbsd to CF_XOPEN_SOURCE macro (patch by Urs Jansen).
+ add "@" command to test/ncurses F-test, to allow rapid jump to
-5:0:10 6.1 20181201
+5:0:10 6.1 20181208
# use or other dealings in this Software without prior written #
# authorization. #
##############################################################################
-# $Id: dist.mk,v 1.1254 2018/11/30 23:49:03 tom Exp $
+# $Id: dist.mk,v 1.1255 2018/12/08 16:21:26 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 = 1
-NCURSES_PATCH = 20181201
+NCURSES_PATCH = 20181208
# 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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_bkgd.3x,v 1.26 2018/07/28 21:34:06 tom Exp @
+ * @Id: curs_bkgd.3x,v 1.28 2018/12/09 00:45:05 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H3><a name="h3-bkgd">bkgd</a></H3><PRE>
The <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> functions set the background property of the current
or specified window and then apply this setting to every character
- position in that window:
+ position in that window. According to X/Open Curses, it should do
+ this:
- <STRONG>o</STRONG> The rendition of every character on the screen is changed to the
+ <STRONG>o</STRONG> The rendition of every character on the screen is changed to the
new background rendition.
- <STRONG>o</STRONG> Wherever the former background character appears, it is changed to
+ <STRONG>o</STRONG> Wherever the former background character appears, it is changed to
the new background character.
+ Neither X/Open Curses nor the SVr4 manual pages give details about the
+ way the rendition of characters on the screen is updated when <STRONG>bkgd</STRONG> or
+ <STRONG>wbkgd</STRONG> is used to change the background character.
+
+ This implementation, like SVr4 curses, does not store the background
+ and window attribute contributions to each cell separately. It updates
+ the rendition by comparing the character, non-color attributes and col-
+ ors contained in the background. For each cell in the window, whether
+ or not it is blank:
+
+ <STRONG>o</STRONG> The library first compares the <EM>character</EM>, and if it matches the
+ current character part of the background, it replaces that with the
+ new background character.
+
+ <STRONG>o</STRONG> The library then checks if the cell uses color, i.e., its color
+ pair value is nonzero. If not, it simply replaces the attributes
+ and color pair in the cell with those from the new background char-
+ acter.
+
+ <STRONG>o</STRONG> If the cell uses color, and that matches the color in the current
+ background, the library removes attributes which may have come from
+ the current background and adds attributes from the new background.
+ It finishes by setting the cell to use the color from the new back-
+ ground.
+
+ <STRONG>o</STRONG> If the cell uses color, and that does not match the color in the
+ current background, the library updates only the non-color
+ attributes, first removing those which may have come from the cur-
+ rent background, and then adding attributes from the new back-
+ ground.
+
</PRE><H3><a name="h3-getbkgd">getbkgd</a></H3><PRE>
The <STRONG>getbkgd</STRONG> function returns the given window's current background
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
- The routines <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> return the integer <STRONG>OK</STRONG>. The SVr4.0 manual
- says "or a non-negative integer if <STRONG>immedok</STRONG> is set", but this appears to
- be an error.
+ These functions are described in the XSI Curses standard, Issue 4. It
+ specifies that <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> return <STRONG>ERR</STRONG> on failure, but gives no fail-
+ ure conditions.
+
+ The routines <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> return the integer <STRONG>OK</STRONG>, unless the library
+ has not been initialized.
+
+ In contrast, the SVr4.0 manual says <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> may return <STRONG>OK</STRONG> "or a
+ non-negative integer if <STRONG>immedok</STRONG> is set", which refers to the return
+ value from <STRONG>wrefresh</STRONG> (used to implement the immediate repainting). The
+ SVr4 curses <STRONG>wrefresh</STRONG> returns the number of characters written to the
+ screen during the refresh. This implementation does not do that.
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
Note that <STRONG>bkgdset</STRONG> and <STRONG>bkgd</STRONG> may be macros.
+ X/Open Curses mentions that the character part of the background must
+ be a single-byte value. This implementation, like SVr4, checks to
+ ensure that, and will reuse the old background character if the check
+ fails.
+
</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
- These functions are described in the XSI Curses standard, Issue 4. It
- specifies that <STRONG>bkgd</STRONG> and <STRONG>wbkgd</STRONG> return <STRONG>ERR</STRONG> on failure, but gives no fail-
- ure conditions.
+ These functions are described in the XSI Curses standard, Issue 4
+ (X/Open Curses).
</PRE><H2><a name="h2-SEE-ALSO">SEE ALSO</a></H2><PRE>
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: curs_bkgrnd.3x,v 1.9 2018/07/28 21:34:06 tom Exp @
+ * @Id: curs_bkgrnd.3x,v 1.10 2018/12/09 00:50:50 tom Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
</PRE><H2><a name="h2-NOTES">NOTES</a></H2><PRE>
Note that <STRONG>bkgrnd</STRONG>, <STRONG>bkgrndset</STRONG>, and <STRONG>getbkgrnd</STRONG> may be macros.
+ X/Open Curses does not provide details on how the rendition is changed.
+ This implementation follows the approach used in SVr4 curses, which is
+ explained in the manual page for <STRONG>wbkgd</STRONG>.
+
</PRE><H2><a name="h2-RETURN-VALUE">RETURN VALUE</a></H2><PRE>
The <STRONG>bkgrndset</STRONG> and <STRONG>wbkgrndset</STRONG> routines do not return a value.
<STRONG>o</STRONG> A null character pointer is treated as an error.
+</PRE><H2><a name="h2-PORTABILITY">PORTABILITY</a></H2><PRE>
+ These functions are described in the XSI Curses standard, Issue 4
+ (X/Open Curses).
+
+
</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_bkgd.3x.html">curs_bkgd(3x)</A></STRONG>
</li>
<li><a href="#h2-NOTES">NOTES</a></li>
<li><a href="#h2-RETURN-VALUE">RETURN VALUE</a></li>
+<li><a href="#h2-PORTABILITY">PORTABILITY</a></li>
<li><a href="#h2-SEE-ALSO">SEE ALSO</a></li>
</ul>
</div>
<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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
https://invisible-island.net/ncurses/tctest.html
- This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="terminfo.5.html">terminfo(5)</A></STRONG>
- This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</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="tset.1.html">tset(1)</A></STRONG>, <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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
<EM>Terminfo</EM> describes terminals by giving a set of capabilities which they
have, by specifying how to perform screen operations, and by specifying
padding requirements and initialization sequences. This describes
- <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</PRE><H3><a name="h3-Terminfo-Entry-Syntax">Terminfo Entry Syntax</a></H3><PRE>
<STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(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>.
- This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
</PRE><H2><a name="h2-AUTHOR">AUTHOR</a></H2><PRE>
<STRONG><A HREF="tic.1m.html">tic(1m)</A></STRONG>, <STRONG><A HREF="infocmp.1m.html">infocmp(1m)</A></STRONG>, <STRONG><A HREF="captoinfo.1m.html">captoinfo(1m)</A></STRONG>, <STRONG><A HREF="infotocap.1m.html">infotocap(1m)</A></STRONG>, <STRONG><A HREF="ncurses.3x.html">curses(3x)</A></STRONG>, <STRONG>ter-</STRONG>
<STRONG><A HREF="terminfo.5.html">minfo(5)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
* sale, use or other dealings in this Software without prior written *
* authorization. *
****************************************************************************
- * @Id: tput.1,v 1.61 2018/08/25 23:28:12 tom Exp @
+ * @Id: tput.1,v 1.62 2018/09/30 20:31:59 Sven.Joachim Exp @
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML>
<STRONG>o</STRONG> It assigns exit code 4 to "invalid operand", which may be the same
as <EM>unknown</EM> <EM>capability</EM>. For instance, the source code for Solaris'
- xcurses uses the term "invalid' in this case.
+ xcurses uses the term "invalid" in this case.
<STRONG>o</STRONG> It assigns exit code 255 to a numeric variable that is not speci-
fied in the terminfo database. That likely is a documentation
</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="terminfo.5.html">terminfo(5)</A></STRONG>, <STRONG><A HREF="curs_termcap.3x.html">curs_termcap(3x)</A></STRONG>.
- This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
<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.1 (patch 20180901).
+ This describes <STRONG>ncurses</STRONG> version 6.1 (patch 20181208).
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_bkgd.3x,v 1.26 2018/07/28 21:34:06 tom Exp $
+.\" $Id: curs_bkgd.3x,v 1.28 2018/12/09 00:45:05 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
any combination of attributes (i.e., rendition) and a character.
The attribute part of the background is combined (OR'ed) with all non-blank
characters that are written into the window with \fBwaddch\fR.
-Both
-the character and attribute parts of the background are combined with
+Both the character and attribute parts of the background are combined with
the blank characters.
The background becomes a property of the
character and moves with the character through any scrolling and
.PP
The \fBbkgd\fR and \fBwbkgd\fR functions
set the background property of the current or specified window
-and then apply this setting to every character position in that window:
+and then apply this setting to every character position in that window.
+According to X/Open Curses, it should do this:
.PP
.bP
The rendition of every character on the screen is changed to
.bP
Wherever the former background character
appears, it is changed to the new background character.
+.PP
+Neither X/Open Curses nor the SVr4 manual pages give details about
+the way the rendition of characters on the screen is updated when
+\fBbkgd\fP or \fBwbkgd\fP is used to change the background character.
+.PP
+This implementation, like SVr4 curses, does not store the background
+and window attribute contributions to each cell separately.
+It updates the rendition by comparing the character, non-color attributes and
+colors contained in the background.
+For each cell in the window, whether or not it is blank:
+.bP
+The library first compares the \fIcharacter\fP,
+and if it matches the current character part of the background,
+it replaces that with the new background character.
+.bP
+The library then checks if the cell uses color,
+i.e., its color pair value is nonzero.
+If not, it simply replaces the attributes and color pair in the
+cell with those from the new background character.
+.bP
+If the cell uses color,
+and that matches the color in the current background,
+the library removes attributes
+which may have come from the current background
+and adds attributes from the new background.
+It finishes by setting the cell
+to use the color from the new background.
+.bP
+If the cell uses color,
+and that does not match the color in the current background,
+the library updates only the non-color attributes,
+first removing those which may have come from the current background,
+and then adding attributes from the new background.
.SS getbkgd
.PP
The \fBgetbkgd\fR function returns the given window's current background
character/attribute pair.
.SH RETURN VALUE
.PP
-The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR.
-The SVr4.0 manual says "or a non-negative integer if \fBimmedok\fR is set",
-but this appears to be an error.
+These functions are described in the XSI Curses standard, Issue 4.
+It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure,
+but gives no failure conditions.
+.PP
+The routines \fBbkgd\fR and \fBwbkgd\fR return the integer \fBOK\fR,
+unless the library has not been initialized.
+.PP
+In contrast,
+the SVr4.0 manual says \fBbkgd\fR and \fBwbkgd\fR may return \fBOK\fP
+"or a non-negative integer if \fBimmedok\fR is set",
+which refers to the return value from \fBwrefresh\fP
+(used to implement the immediate repainting).
+The SVr4 curses \fBwrefresh\fP returns the number of characters
+written to the screen during the refresh.
+This implementation does not do that.
.SH NOTES
.PP
Note that \fBbkgdset\fR and \fBbkgd\fR may be macros.
+.PP
+X/Open Curses mentions that the character part of the background must
+be a single-byte value.
+This implementation, like SVr4, checks to ensure that,
+and will reuse the old background character if the check fails.
.SH PORTABILITY
.PP
-These functions are described in the XSI Curses standard, Issue 4.
-It specifies that \fBbkgd\fR and \fBwbkgd\fR return \fBERR\fR on failure,
-but gives no failure conditions.
+These functions are described in the XSI Curses standard, Issue 4
+(X/Open Curses).
.SH SEE ALSO
.na
.PP
.\" authorization. *
.\"***************************************************************************
.\"
-.\" $Id: curs_bkgrnd.3x,v 1.9 2018/07/28 21:34:06 tom Exp $
+.\" $Id: curs_bkgrnd.3x,v 1.10 2018/12/09 00:50:50 tom Exp $
.de bP
.ie n .IP \(bu 4
.el .IP \(bu 2
\fBbkgrndset\fR, and
\fBgetbkgrnd\fR
may be macros.
+.PP
+X/Open Curses does not provide details on how the rendition is changed.
+This implementation follows the approach used in SVr4 curses,
+which is explained in the manual page for \fBwbkgd\fP.
.SH RETURN VALUE
.PP
The \fBbkgrndset\fR and \fBwbkgrndset\fR routines do not return a value.
A null window pointer is treated as an error.
.bP
A null character pointer is treated as an error.
+.SH PORTABILITY
+.PP
+These functions are described in the XSI Curses standard, Issue 4
+(X/Open Curses).
.SH SEE ALSO
\fBcurses\fR(3X),
\fBcurs_bkgd\fR(3X)
/****************************************************************************
- * Copyright (c) 1998-2014,2016 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2016,2018 Free Software Foundation, Inc. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a *
* copy of this software and associated documentation files (the *
#include <curses.priv.h>
-MODULE_ID("$Id: lib_bkgd.c,v 1.50 2016/05/28 23:11:26 tom Exp $")
+MODULE_ID("$Id: lib_bkgd.c,v 1.52 2018/12/09 00:09:17 tom Exp $")
/*
* Set the window's background information.
#endif
wbkgrnd(WINDOW *win, const ARG_CH_T ch)
{
+#undef SP_PARM
+#define SP_PARM SP /* to use Charable() */
int code = ERR;
T((T_CALLED("wbkgd(%p,%s)"), (void *) win, _tracech_t(ch)));
- if (win) {
+ if (SP == 0) {
+ ;
+ } else if (win) {
NCURSES_CH_T new_bkgd = CHDEREF(ch);
- NCURSES_CH_T old_bkgrnd;
+ NCURSES_CH_T old_bkgd;
int y;
+ NCURSES_CH_T old_char;
+ attr_t old_attr;
+ int old_pair;
+ NCURSES_CH_T new_char;
+ attr_t new_attr;
+ int new_pair;
+
+ /* SVr4 trims color info if non-color terminal */
+ if (!SP->_pair_limit) {
+ RemAttr(new_bkgd, A_COLOR);
+ SetPair(new_bkgd, 0);
+ }
- memset(&old_bkgrnd, 0, sizeof(old_bkgrnd));
- (void) wgetbkgrnd(win, &old_bkgrnd);
+ memset(&old_bkgd, 0, sizeof(old_bkgd));
+ (void) wgetbkgrnd(win, &old_bkgd);
+
+ old_char = old_bkgd;
+ RemAttr(old_char, ~A_CHARTEXT);
+ old_attr = AttrOf(old_bkgd);
+ old_pair = GetPair(old_bkgd);
+
+ if (!(old_attr & A_COLOR)) {
+ old_pair = 0;
+ }
+
+ new_char = new_bkgd;
+ RemAttr(new_char, ~A_CHARTEXT);
+ new_attr = AttrOf(new_bkgd);
+ new_pair = GetPair(new_bkgd);
+
+ /* SVr4 limits background character to printable 7-bits */
+ if (!Charable(new_bkgd)) {
+ new_char = old_char;
+ }
(void) wbkgrndset(win, CHREF(new_bkgd));
- (void) wattrset(win, (int) AttrOf(win->_nc_bkgd));
+
+ /* SVr4 updates color pair if old/new match, otherwise just attrs */
+ if ((new_pair != 0) && (new_pair == old_pair)) {
+ SetAttr(win->_nc_bkgd, new_attr);
+ SetPair(win->_nc_bkgd, new_pair);
+ } else {
+ SetAttr(win->_nc_bkgd, new_attr);
+ }
for (y = 0; y <= win->_maxy; y++) {
int x;
for (x = 0; x <= win->_maxx; x++) {
- if (CharEq(win->_line[y].text[x], old_bkgrnd)) {
- win->_line[y].text[x] = win->_nc_bkgd;
+ NCURSES_CH_T *cp = &(win->_line[y].text[x]);
+ int tmp_pair = GetPair(*cp);
+ attr_t tmp_attr = AttrOf(*cp);
+
+ if (CharEq(*cp, old_bkgd)) {
+ SetChar2(*cp, CharOf(new_char));
+ }
+ if (tmp_pair != 0) {
+ if (tmp_pair == old_pair) {
+ SetAttr(*cp, (tmp_attr & ~old_attr) | new_attr);
+ SetPair(*cp, new_pair);
+ } else {
+ SetAttr(*cp,
+ (tmp_attr & (~old_attr | A_COLOR))
+ | (new_attr & ALL_BUT_COLOR));
+ }
} else {
- NCURSES_CH_T wch = win->_line[y].text[x];
- RemAttr(wch, (~(A_ALTCHARSET | A_CHARTEXT)));
- win->_line[y].text[x] = _nc_render(win, wch);
+ SetAttr(*cp, new_attr);
+ SetPair(*cp, new_pair);
}
}
}
-ncurses6 (6.1+20181201) unstable; urgency=low
+ncurses6 (6.1+20181208) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 30 Nov 2018 18:49:03 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 Dec 2018 11:21:26 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20181201) unstable; urgency=low
+ncurses6 (6.1+20181208) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 30 Nov 2018 18:49:03 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 Dec 2018 11:21:26 -0500
ncurses6 (5.9-20131005) unstable; urgency=low
-ncurses6 (6.1+20181201) unstable; urgency=low
+ncurses6 (6.1+20181208) unstable; urgency=low
* latest weekly patch
- -- Thomas E. Dickey <dickey@invisible-island.net> Fri, 30 Nov 2018 18:49:03 -0500
+ -- Thomas E. Dickey <dickey@invisible-island.net> Sat, 08 Dec 2018 11:21:26 -0500
ncurses6 (5.9-20120608) unstable; urgency=low
-; $Id: mingw-ncurses.nsi,v 1.301 2018/11/30 23:49:03 tom Exp $\r
+; $Id: mingw-ncurses.nsi,v 1.302 2018/12/08 16:21:26 tom Exp $\r
\r
; TODO add examples\r
; TODO bump ABI to 6\r
!define VERSION_MAJOR "6"\r
!define VERSION_MINOR "1"\r
!define VERSION_YYYY "2018"\r
-!define VERSION_MMDD "1201"\r
+!define VERSION_MMDD "1208"\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.1
-Release: 20181201
+Release: 20181208
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: shared libraries for terminal handling
Name: ncurses6
Version: 6.1
-Release: 20181201
+Release: 20181208
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz
Summary: Curses library with POSIX thread support.
Name: ncursest6
Version: 6.1
-Release: 20181201
+Release: 20181208
License: X11
Group: Development/Libraries
Source: ncurses-%{version}-%{release}.tgz