X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Fbase%2Flib_freeall.c;h=5bcc974bc2577d27a03990e29273c4467823fa1f;hp=dbdf443f00821155f1998aaf361c1a760fe796a2;hb=d49a800c7f54c8d9e77f745423c821a8535ada59;hpb=37babca07fea18b480155ef60ef302ca09fca152 diff --git a/ncurses/base/lib_freeall.c b/ncurses/base/lib_freeall.c index dbdf443f..5bcc974b 100644 --- a/ncurses/base/lib_freeall.c +++ b/ncurses/base/lib_freeall.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc. * + * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -31,7 +31,6 @@ ****************************************************************************/ #include -#include #include #if HAVE_NC_FREEALL @@ -40,7 +39,7 @@ extern int malloc_errfd; /* FIXME */ #endif -MODULE_ID("$Id: lib_freeall.c,v 1.57 2009/04/19 14:31:26 tom Exp $") +MODULE_ID("$Id: lib_freeall.c,v 1.59 2010/01/23 17:57:43 tom Exp $") /* * Free all ncurses data. This is used for testing only (there's no practical @@ -66,14 +65,14 @@ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_DCL0) if (SP_PARM != 0) { _nc_lock_global(curses); - while (_nc_windows != 0) { + while (WindowList(SP_PARM) != 0) { bool deleted = FALSE; /* Delete only windows that're not a parent */ - for (each_window(p)) { + for (each_window(SP_PARM, p)) { bool found = FALSE; - for (each_window(q)) { + for (each_window(SP_PARM, q)) { if ((p != q) && (q->win._flags & _SUBWIN) && (&(p->win) == q->win._parent)) {