Subject: lib/26506: curses overwrite(), overlay() and copywin() anr badly broken
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dsl@l8s.co.uk>
List: netbsd-bugs
Date: 08/01/2004 20:07:54
>Number:         26506
>Category:       lib
>Synopsis:       curses overwrite(), overlay() and copywin() are badly broken
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 01 21:06:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     David Laight
>Release:        NetBSD 2.0
>Organization:
	
>Environment:
	'current' 1 Aug 2004
Architecture: i386
Machine: i386
>Description:
	The curses overlay() and overwrite() functions call copywin()
	assuming that it uses screen-relative coordinates for the two
	windows.   Although the documentation isn't exactly clear, other
	implementations use window-relative coordinates.

	The code doesn't even DTRT for overwrite() as it fails to copy
	the last lines/columns to teh destinsation window.
>How-To-Repeat:
	It should be possible to preserve part of the screen as in:
		w = newwin(10, 20, 5, 30);
		sv = newwin(10, 20, 5, 30);
		overwrite(curscr, sc);
		xxx(w);
		/* restore old contents */
		touchwin(sv);
		wrefresh(sv);
		delwin(sv);
		delwin(w);
	But it doesn't work.....
>Fix:
	Coming soon....
>Release-Note:
>Audit-Trail:
>Unformatted: