xref: /original-bsd/lib/libcurses/delwin.c (revision 1e7fda44)
1 # include	"curses.ext"
2 
3 /*
4  *	This routine deletes a window and releases it back to the system.
5  *
6  * 01/26/81 (Berkeley) @(#)delwin.c	1.1
7  */
8 delwin(win)
9 reg WINDOW	*win; {
10 
11 	reg int	i;
12 
13 	if (!(win->_flags & _SUBWIN))
14 		for (i = 0; i < win->_maxy && win->_y[i]; i++)
15 			cfree(win->_y[i]);
16 	cfree(win->_y);
17 	cfree(win);
18 }
19