From 32a635775a0f2efd45765d3ff4b21ea5d224ae1c Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 27 Nov 1994 05:23:52 +0000 Subject: Fix many duplicated attribute sets --- lib/libncurses/lib_deleteln.c | 4 ---- lib/libncurses/lib_doupdate.c | 12 ++++++------ lib/libncurses/lib_insdel.c | 4 ---- lib/libncurses/lib_insertln.c | 4 ---- lib/libncurses/lib_scroll.c | 4 ---- 5 files changed, 6 insertions(+), 22 deletions(-) (limited to 'lib/libncurses') 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 */ -- cgit v1.1