+
+NCURSES_EXPORT(void)
+NCURSES_SP_NAME(_nc_free_and_exit) (NCURSES_SP_DCLx int code)
+{
+ if (SP_PARM) {
+ delscreen(SP_PARM);
+ if (SP_PARM->_term)
+ NCURSES_SP_NAME(del_curterm) (NCURSES_SP_ARGx SP_PARM->_term);
+ }
+ exit(code);
+}
+#endif /* HAVE_NC_FREEALL */
+
+#if NCURSES_SP_FUNCS
+NCURSES_EXPORT(void)
+_nc_free_and_exit(int code)
+{
+ NCURSES_SP_NAME(_nc_free_and_exit) (CURRENT_SCREEN, code);
+}
+#endif
+
+NCURSES_EXPORT(void)
+exit_curses(int code)
+{
+#if NO_LEAKS
+#if NCURSES_SP_FUNCS
+ NCURSES_SP_NAME(_nc_free_and_exit) (CURRENT_SCREEN, code);
+#else
+ _nc_free_and_exit(code); /* deprecated... */