2 /***************************************************************************
4 ****************************************************************************
5 * ncurses is copyright (C) 1992-1995 *
7 * zmbenhal@netcom.com *
9 * esr@snark.thyrsus.com *
11 * Permission is hereby granted to reproduce and distribute ncurses *
12 * by any means and for any fee, whether alone or as part of a *
13 * larger distribution, in source or in binary form, PROVIDED *
14 * this notice is included with any such distribution, and is not *
15 * removed from any of its header files. Mention of ncurses in any *
16 * applications linked with it is highly appreciated. *
18 * ncurses comes AS IS with no warranty, implied or expressed. *
20 ***************************************************************************/
25 ** The routine delwin().
29 #include <curses.priv.h>
31 MODULE_ID("$Id: lib_delwin.c,v 1.8 1997/02/01 23:22:54 tom Exp $")
33 static bool have_children(WINDOW *win)
36 for (p = _nc_windows; p != 0; p = p->next) {
37 if (p->win->_flags & _SUBWIN
38 && p->win->_parent == win)
44 int delwin(WINDOW *win)
46 T((T_CALLED("delwin(%p)"), win));
49 || have_children(win))
52 if (win->_flags & _SUBWIN)
53 touchwin(win->_parent);