Curses question

davep at microsoft.UUCP davep at microsoft.UUCP
Sun Jan 22 04:42:34 AEST 1984


The following program causes the curses package to core dump in wrefresh().
(The program creates a 7 line by 40 col box starting at 20,20)

#include <curses.h>

main()
{
	
	WINDOW *w;

	initscr();
	w = newwin(7, 41, 20, 20);
	box(w, '|', '-');
	wrefresh(w);
	endwin();
}


The problem seems to be that the window I've defined exceeds the bounds of my
24x80 screen.  When makech() (in wrefresh()) tries to update the 25th line of
the screen I get a core dump. 

My interpretation of the documentation for wrefresh is that if the window
doesn't fit in the actual screen,  it will only update the parts that fit on
the screen and return an error.   However I don't see this happening in
makech().

Now my question.   Is this a bug, or my misunderstanding of the documentation?
If I misunderstood the documentation, does that mean I shouldn't create
windows that are larger than the actual screen size?


Thanx.

					David Perlin
					uw-beaver!microsoft!davep
					decvax!microsoft!davep



More information about the Comp.unix mailing list