Article View: net.bugs
Article #146Curses bug (Both net.sources dist. and 4.2 BSD)
From: Mike Laman
Date: Fri, 11 Nov 1983 23:08
Date: Fri, 11 Nov 1983 23:08
37 lines
1675 bytes
1675 bytes
There is a bug in wdeleteln(). This bug is in the curses library distributed
over net.sources, and in the 4.2 BSD distribution (that sdcsvax received
at least).
Even though the last line of the window gets cleared internally, its "refresh"
image may not. The fix is simple. Add the following two lines to the end
of the wdeleteln() routine.
win->_firstch[win->_maxy-1] = 0;
win->_lastch[win->_maxy-1] = win->_maxx - 1;
Now wrefresh() will look at the entire line.
I have enclosed a little program that will show you if you have the bug. Just
compile it with you curses library (termlib too) and run it.
#include <curses.h>
main() {
register i;
initscr();
mvaddstr(0, 20, "This program will delete line #5 after");
mvaddstr(1, 20, "writing the line number for each line.");
for(i = 0; i < LINES; ++i)
mvprintw(i, 0, "Line #%d", i);
refresh();
addstr(" You have the bug if the BOTTOM line is not COMPLETELY blank!");
move(5, 0);
deleteln();
move(LINES - 3, 0);
refresh();
endwin();
}
Mike Laman
UUCP: {ucbvax,philabs,sdccsu3,sdcsla}!sdcsvax!laman
Technical Details
Message-ID:
<3933@sdcsvax.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!linus!security!genrad!decvax!sdchema!sdcsvax!lamanShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP Path: arc1-ca.pugleaf.net!utzoo!linus!security!genrad!decvax!sdchema!sdcsvax!laman From: laman@sdcsvax.UUCP (Mike Laman) Newsgroups: net.bugs,net.bugs.4bsd Subject: Curses bug (Both net.sources dist. and 4.2 BSD) Message-ID: <3933@sdcsvax.UUCP> Date: Fri, 11-Nov-83 18:08:04 EST Article-I.D.: sdcsvax.3933 Posted: Fri Nov 11 18:08:04 1983 Date-Received: Thu, 17-Nov-83 23:07:29 EST Organization: U.C. San Diego, Computer Science Dept. Lines: 37