diff options
author | ache <ache@FreeBSD.org> | 1995-01-16 17:33:33 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1995-01-16 17:33:33 +0000 |
commit | a3f21b4c3f2dd6b65ab0db3a35bf0533f666636d (patch) | |
tree | d76fb53bb2a2920050427a7bf488163ca9de5c51 /lib/libncurses | |
parent | 27a4665f102a41fd66a51d1189fad7130a2b0277 (diff) | |
download | FreeBSD-src-a3f21b4c3f2dd6b65ab0db3a35bf0533f666636d.zip FreeBSD-src-a3f21b4c3f2dd6b65ab0db3a35bf0533f666636d.tar.gz |
Back out bkgd changes, now acts per braindamaged sysv standard
Diffstat (limited to 'lib/libncurses')
-rw-r--r-- | lib/libncurses/lib_addch.c | 8 | ||||
-rw-r--r-- | lib/libncurses/lib_bkgd.c | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/lib/libncurses/lib_addch.c b/lib/libncurses/lib_addch.c index 5ec6576..00684ed 100644 --- a/lib/libncurses/lib_addch.c +++ b/lib/libncurses/lib_addch.c @@ -56,14 +56,10 @@ chtype ch = c; T(("win attr = %x", win->_attrs)); ch |= win->_attrs; - /* Don't attempt to replace any given attributes */ - if ((ch&A_ATTRIBUTES) == A_NORMAL) { - if (ch == ' ') - ch = win->_bkgd; + if (win->_line[y][x]&A_CHARTEXT == ' ') + ch |= win->_bkgd; else ch |= (win->_bkgd&A_ATTRIBUTES); - } - T(("bkg = %x -> ch = %x", win->_bkgd, ch)); if (win->_line[y][x] != ch) { diff --git a/lib/libncurses/lib_bkgd.c b/lib/libncurses/lib_bkgd.c index f54e4d1..0210995 100644 --- a/lib/libncurses/lib_bkgd.c +++ b/lib/libncurses/lib_bkgd.c @@ -27,13 +27,10 @@ int x, y; T(("wbkgd(%x, %x) called", win, ch)); for (y = 0; y < win->_maxy; y++) for (x = 0; x < win->_maxx; x++) - /* Don't attempt to replace existing attrs */ - if ((win->_line[y][x]&A_ATTRIBUTES) == A_NORMAL) { - if (win->_line[y][x] == ' ') - win->_line[y][x] = ch; + if (win->_line[y][x]&A_CHARTEXT == ' ') + win->_line[y][x] |= ch; else win->_line[y][x] |= (ch&A_ATTRIBUTES); - } touchwin(win); return OK; } |