summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_clrbot.c
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1997-07-30 17:21:39 +0000
committerache <ache@FreeBSD.org>1997-07-30 17:21:39 +0000
commitd6cf2089bc5887f137a83ede9767e5154e3b8186 (patch)
tree2eda095cc49ccd84c07771c2714cb72c8d3a931c /lib/libncurses/lib_clrbot.c
parent2d46d6b6b7899598c975cea266468603c9a442ba (diff)
downloadFreeBSD-src-d6cf2089bc5887f137a83ede9767e5154e3b8186.zip
FreeBSD-src-d6cf2089bc5887f137a83ede9767e5154e3b8186.tar.gz
Fix logical background handling by merging it from ncurses 4.1
No new user-visible functions added
Diffstat (limited to 'lib/libncurses/lib_clrbot.c')
-rw-r--r--lib/libncurses/lib_clrbot.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libncurses/lib_clrbot.c b/lib/libncurses/lib_clrbot.c
index fa48db8..e803920 100644
--- a/lib/libncurses/lib_clrbot.c
+++ b/lib/libncurses/lib_clrbot.c
@@ -12,8 +12,6 @@
#include "curses.priv.h"
-#define BLANK ' '|A_NORMAL
-
int wclrtobot(WINDOW *win)
{
chtype *ptr, *end, *maxx = NULL;
@@ -30,11 +28,13 @@ int y, startx, minx;
end = &win->_line[y][win->_maxx];
for (ptr = &win->_line[y][startx]; ptr <= end; ptr++) {
- if (*ptr != BLANK) {
+ chtype blank = _nc_background(win);
+
+ if (*ptr != blank) {
maxx = ptr;
if (minx == _NOCHANGE)
minx = ptr - win->_line[y];
- *ptr = BLANK;
+ *ptr = blank;
}
}
OpenPOWER on IntegriCloud