/****************************************************************************
- * Copyright (c) 1998-2017,2018 Free Software Foundation, Inc. *
+ * Copyright (c) 1998-2018,2019 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 *
extern int malloc_errfd; /* FIXME */
#endif
-MODULE_ID("$Id: lib_freeall.c,v 1.69 2018/03/01 15:02:12 tom Exp $")
+MODULE_ID("$Id: lib_freeall.c,v 1.71 2019/12/15 00:30:49 tom Exp $")
/*
* Free all ncurses data. This is used for testing only (there's no practical
NCURSES_SP_NAME(_nc_flush) (NCURSES_SP_ARG);
NCURSES_SP_NAME(_nc_freeall) (NCURSES_SP_ARG);
#ifdef TRACE
- trace(0); /* close trace file, freeing its setbuf */
+ curses_trace(0); /* close trace file, freeing its setbuf */
{
static va_list fake;
free(_nc_varargs("?", fake));
exit(code);
}
-#else
+#else /* !HAVE_NC_FREEALL */
NCURSES_EXPORT(void)
_nc_freeall(void)
{
}
exit(code);
}
-#endif
+#endif /* HAVE_NC_FREEALL */
#if NCURSES_SP_FUNCS
NCURSES_EXPORT(void)
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... */
+#endif
+#endif
+ exit(code);
+}