cleanup ivars() related globals on program termination
This commit is contained in:
parent
f4ad29a17c
commit
84283b43d4
|
|
@ -15,6 +15,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
|||
#include "variable.h"
|
||||
#include "plotting/graf.h"
|
||||
#include "display.h"
|
||||
#include "../misc/ivars.h"
|
||||
|
||||
#ifdef HAVE_GNUREADLINE
|
||||
#include <readline/readline.h>
|
||||
|
|
@ -73,6 +74,9 @@ com_quit(wordlist *wl)
|
|||
DevSwitch(NULL);
|
||||
|
||||
/* then go away */
|
||||
|
||||
destroy_ivars();
|
||||
|
||||
byemesg();
|
||||
exit(exitcode);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator)
|
|||
static void
|
||||
sp_shutdown(int exitval)
|
||||
{
|
||||
cleanvars();
|
||||
destroy_ivars();
|
||||
#ifdef PARALLEL_ARCH
|
||||
{
|
||||
Error("Fatal error in SPICE", -1);
|
||||
|
|
|
|||
|
|
@ -109,13 +109,12 @@ ivars(char *argv0)
|
|||
}
|
||||
|
||||
void
|
||||
cleanvars(void)
|
||||
destroy_ivars(void)
|
||||
{
|
||||
tfree(News_File);
|
||||
tfree(Default_MFB_Cap);
|
||||
tfree(Help_Path);
|
||||
tfree(Lib_Path);
|
||||
tfree(Spice_Path);
|
||||
if (Inp_Path) /* may be NULL in LINUX */
|
||||
tfree(Inp_Path);
|
||||
tfree(Inp_Path);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,6 @@
|
|||
|
||||
|
||||
void ivars(char*);
|
||||
void cleanvars(void);
|
||||
void destroy_ivars(void);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue