summaryrefslogtreecommitdiffstats
path: root/lib/libncurses
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1994-11-27 05:23:52 +0000
committerache <ache@FreeBSD.org>1994-11-27 05:23:52 +0000
commit32a635775a0f2efd45765d3ff4b21ea5d224ae1c (patch)
treee67aae797fb8c72b7f5719913a4f889ffae37542 /lib/libncurses
parent0195ab27b479798e963ac35c0561fe4e0e43e334 (diff)
downloadFreeBSD-src-32a635775a0f2efd45765d3ff4b21ea5d224ae1c.zip
FreeBSD-src-32a635775a0f2efd45765d3ff4b21ea5d224ae1c.tar.gz
Fix many duplicated attribute sets
Diffstat (limited to 'lib/libncurses')
-rw-r--r--lib/libncurses/lib_deleteln.c4
-rw-r--r--lib/libncurses/lib_doupdate.c12
-rw-r--r--lib/libncurses/lib_insdel.c4
-rw-r--r--lib/libncurses/lib_insertln.c4
-rw-r--r--lib/libncurses/lib_scroll.c4
5 files changed, 6 insertions, 22 deletions
diff --git a/lib/libncurses/lib_deleteln.c b/lib/libncurses/lib_deleteln.c
index 4720b54..054b99f 100644
--- a/lib/libncurses/lib_deleteln.c
+++ b/lib/libncurses/lib_deleteln.c
@@ -24,10 +24,6 @@ int y, touched = 0;
if (win->_idlok && (delete_line != NULL)) {
wrefresh(win);
- if (back_color_erase) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
putp(delete_line);
touched = 1;
}
diff --git a/lib/libncurses/lib_doupdate.c b/lib/libncurses/lib_doupdate.c
index 0900ff2..e729a47 100644
--- a/lib/libncurses/lib_doupdate.c
+++ b/lib/libncurses/lib_doupdate.c
@@ -147,7 +147,7 @@ sigaction_t act, oact;
/* perhaps we should turn attributes off here */
- if (!(curscr->_attrs & A_NORMAL))
+ if (curscr->_attrs != A_NORMAL)
vidattr(curscr->_attrs = A_NORMAL);
fflush(SP->_ofp);
@@ -179,7 +179,7 @@ int i = 0, j = 0;
int lastNonBlank;
T(("ClrUpdate(%x) called", scr));
- if (back_color_erase) {
+ if (back_color_erase && curscr->_attrs != A_NORMAL) {
T(("back_color_erase, turning attributes off"));
vidattr(curscr->_attrs = A_NORMAL);
}
@@ -308,7 +308,7 @@ int attrchanged = 0;
lastChar = columns - 1;
GoTo(lineno, firstChar);
if(clr_eol) {
- if (back_color_erase) {
+ if (back_color_erase && curscr->_attrs != A_NORMAL) {
T(("back_color_erase, turning attributes off"));
vidattr(curscr->_attrs = A_NORMAL);
}
@@ -378,7 +378,7 @@ int attrchanged = 0;
if (attrchanged) {
GoTo(lineno, firstChar);
- if (back_color_erase) {
+ if (back_color_erase && curscr->_attrs != A_NORMAL) {
T(("back_color_erase, turning attributes off"));
vidattr(curscr->_attrs = A_NORMAL);
}
@@ -412,7 +412,7 @@ int attrchanged = 0;
if((nLastChar == firstChar) && clr_eol) {
GoTo(lineno, firstChar);
- if (back_color_erase) {
+ if (back_color_erase && curscr->_attrs != A_NORMAL) {
T(("back_color_erase, turning attributes off"));
vidattr(curscr->_attrs = A_NORMAL);
}
@@ -558,7 +558,7 @@ static void DelChar(int count)
{
T(("DelChar(%d) called", count));
- if (back_color_erase) {
+ if (back_color_erase && curscr->_attrs != A_NORMAL) {
T(("back_color_erase, turning attributes off"));
vidattr(curscr->_attrs = A_NORMAL);
}
diff --git a/lib/libncurses/lib_insdel.c b/lib/libncurses/lib_insdel.c
index a9fcec5..879631f 100644
--- a/lib/libncurses/lib_insdel.c
+++ b/lib/libncurses/lib_insdel.c
@@ -86,10 +86,6 @@ chtype blank = ' ';
if (win->_maxx == columns && win->_idlok == TRUE) {
wrefresh(win);
- if (back_color_erase) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
if (n > 0) {
mvcur(-1, -1, win->_cury, 0);
if (parm_insert_line) {
diff --git a/lib/libncurses/lib_insertln.c b/lib/libncurses/lib_insertln.c
index c431440..4a39ce0 100644
--- a/lib/libncurses/lib_insertln.c
+++ b/lib/libncurses/lib_insertln.c
@@ -24,10 +24,6 @@ int y, touched = 0;
if (win->_idlok && (insert_line != NULL)) {
wrefresh(win);
- if (back_color_erase) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
putp(insert_line);
touched = 1;
}
diff --git a/lib/libncurses/lib_scroll.c b/lib/libncurses/lib_scroll.c
index a348e70..c15e52e 100644
--- a/lib/libncurses/lib_scroll.c
+++ b/lib/libncurses/lib_scroll.c
@@ -88,10 +88,6 @@ chtype blank = ' ';
if (win->_maxx == columns && win->_regtop == 0 && win->_regbottom == lines) {
wrefresh(win);
- if (back_color_erase) {
- T(("back_color_erase, turning attributes off"));
- vidattr(curscr->_attrs = A_NORMAL);
- }
/* at the moment this relies on scroll_reverse and scroll_forward
or parm_rindex and parm_index.
we should add idl support as an alternative */
OpenPOWER on IntegriCloud