#include <curses.priv.h>
-MODULE_ID("$Id: lib_newwin.c,v 1.19 1998/02/11 12:13:54 tom Exp $")
+MODULE_ID("$Id: lib_newwin.c,v 1.21 1999/10/03 00:42:03 tom Exp $")
void _nc_freewin(WINDOW *win)
{
if (! (win->_flags & _SUBWIN)) {
for (i = 0; i <= win->_maxy && win->_line[i].text; i++)
- free(win->_line[i].text);
+ FreeIfNeeded(win->_line[i].text);
}
free(win->_line);
free(win);
returnWin(0);
if (num_lines == 0)
- num_lines = orig->_maxy - begy;
+ num_lines = orig->_maxy + 1 - begy;
if (num_columns == 0)
- num_columns = orig->_maxx - begx;
+ num_columns = orig->_maxx + 1 - begx;
if (orig->_flags & _ISPAD)
flags |= _ISPAD;