From d1d4eb11a55632dae7482790a1c8cb54c4451650 Mon Sep 17 00:00:00 2001 From: rlar Date: Sat, 22 Sep 2012 10:53:05 +0200 Subject: [PATCH] invoke cleanup functions in com_quit() trying to get the valgrind reports down. --- src/frontend/misccoms.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/src/frontend/misccoms.c b/src/frontend/misccoms.c index 4fb45fc14..a56409eaf 100644 --- a/src/frontend/misccoms.c +++ b/src/frontend/misccoms.c @@ -16,6 +16,8 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group #include "plotting/graf.h" #include "display.h" #include "../misc/ivars.h" +#include "com_alias.h" +#include "define.h" #ifdef HAVE_GNUREADLINE #include @@ -55,11 +57,23 @@ com_quit(wordlist *wl) /* start to clean up the mess */ +#if 0 { - wordlist *t = wl_cons(copy("all"), NULL); - com_destroy(t); - wl_free(t); + wordlist all = { "all", NULL, NULL }; + wordlist star = { "*", NULL, NULL }; + + com_destroy(&all); + com_unalias(&star); + com_undefine(&star); + + cp_remvar("history"); + cp_remvar("noglob"); + cp_remvar("brief"); + cp_remvar("sourcepath"); + cp_remvar("program"); + cp_remvar("prompt"); } +#endif #ifdef EXPERIMENTAL_CODE /* Destroy CKT when quit. Add by Gong Ding, gdiso@ustc.edu */