Subject: lib/26506: curses overwrite(), overlay() and copywin() anr badly broken
To: None <>
From: None <>
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
>Originator:     David Laight
>Release:        NetBSD 2.0
	'current' 1 Aug 2004
Architecture: i386
Machine: i386
	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.
	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);
		/* restore old contents */
	But it doesn't work.....
	Coming soon....