bug reported by Yamamaya: revert deleting dicoS structure in inp.c and measure.c:

still to be used by 'listing param'
deletion moved to com_remcirc()
This commit is contained in:
h_vogt 2013-10-20 13:51:18 +02:00 committed by rlar
parent a2522def52
commit 02555fbe99
4 changed files with 10 additions and 10 deletions

View File

@ -666,11 +666,6 @@ inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile)
prev_card = dd;
} //end of for-loop
/* If we don't have .meas lines, we free the dicoS structure now.
If we have .meas lines, dicoS is freed in do_measure() */
if (ft_curckt && !ft_curckt->ci_meas)
nupa_del_dicoS();
/* set temperature, if defined, to new value.
cp_vset will set the variable "temp" and also set CKTtemp,
so we can do it only here because the circuit has to be already there */

View File

@ -431,9 +431,6 @@ do_measure(
txfree(an_name);
/* numparam data structure dicoS is no longer needed */
nupa_del_dicoS();
fflush(stdout);
return(measures_passed);

View File

@ -472,8 +472,7 @@ nupa_init(char *srcfile)
}
/* free dicoS (called from do_measure() in measure.c or
immediately from inp_spsource() in inp.c) */
/* free dicoS (called from com_remcirc()) */
void
nupa_del_dicoS(void)
{
@ -594,6 +593,11 @@ nupa_list_params(FILE *cp_out)
NGHASHPTR htable_p; /* current hash table */
dico_p = dicoS;
if (dico_p == NULL) {
fprintf(cp_err, "\nWarning: No symbol table available for 'listing param'\n");
return;
}
fprintf(cp_out, "\n\n");
/* -----------------------------------------------------------------

View File

@ -23,6 +23,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "plotting/graf.h"
#include "spiceif.h"
#include "outitf.h"
#include "numparam/numpaif.h"
#include "ngspice/inpdefs.h"
@ -216,6 +217,9 @@ com_remcirc(wordlist *wl)
return;
}
/* delete numparam data structure dicoS */
nupa_del_dicoS();
dbfree(ft_curckt->ci_dbs);
ft_curckt->ci_dbs = NULL;
dbs = NULL;