+ char *last_setbuf = (SP_PARM != 0) ? SP_PARM->_setbuf : 0;
+
+ NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
+#ifdef TRACE
+ trace(0); /* close trace file, freeing its setbuf */
+ {
+ static va_list fake;
+ free(_nc_varargs("?", fake));
+ }
+#endif
+ fclose(stdout);
+ FreeIfNeeded(last_setbuf);