reintroduce numparm cleanup
mumparm, 5/5
Revert "keep dico structure"
This reverts commit 12bf33431c.
trouble mit revert
trouble mit
trouble mit
mumparm, 1/4
mumparm, 2/4
mumparm, 3/4
mumparm, 4/4
mumparm, 5/5
rebane
This commit is contained in:
parent
db5268b2ad
commit
3ee36be39f
|
|
@ -470,7 +470,14 @@ nupa_init(char *srcfile)
|
||||||
static void
|
static void
|
||||||
nupa_done(void)
|
nupa_done(void)
|
||||||
{
|
{
|
||||||
/* int i; not needed so far, see below */
|
/*
|
||||||
|
error: ‘dico’ undeclared (first use in this function)
|
||||||
|
error: (Each undeclared identifier is reported only once
|
||||||
|
error: for each function it appears in.)
|
||||||
|
error: ‘inst_dico’ undeclared (first use in this function)
|
||||||
|
*/
|
||||||
|
|
||||||
|
int i;
|
||||||
char *reply; /* user reply */
|
char *reply; /* user reply */
|
||||||
SPICE_DSTRING rep; /* dynamic report */
|
SPICE_DSTRING rep; /* dynamic report */
|
||||||
int dictsize, nerrors;
|
int dictsize, nerrors;
|
||||||
|
|
@ -485,22 +492,29 @@ nupa_done(void)
|
||||||
nerrors = dicoS->errcount;
|
nerrors = dicoS->errcount;
|
||||||
dictsize = donedico(dicoS);
|
dictsize = donedico(dicoS);
|
||||||
|
|
||||||
/* We cannot remove dico here because numparam is usedby
|
for (i = dynmaxline; i >= 0; i--) {
|
||||||
the .measure statement, which is invoked only after the
|
dispose(dicoS->dynrefptr[i]);
|
||||||
simulation has finished */
|
}
|
||||||
/*
|
for (i = 0; i <= dicoS->stack_depth; i++) {
|
||||||
* for (i = dynmaxline; i >= 0; i--) {
|
if (dicoS->local_symbols[i])
|
||||||
* dispose(dico->dynrefptr[i]);
|
nghash_free(dicoS->local_symbols[i], (void (*)(void*)) dico_free_entry, NULL);
|
||||||
* }
|
dicoS->inst_name[i];
|
||||||
* dispose(dico->dynrefptr);
|
}
|
||||||
* dispose(dico->dyncategory);
|
dispose(dicoS->local_symbols);
|
||||||
* dispose(dico->dyndat);
|
dispose(dicoS->inst_name);
|
||||||
* dispose(dico);
|
destroy_numparm_keys(dicoS);
|
||||||
* dico = NULL;
|
dispose(dicoS->dynrefptr);
|
||||||
* dispose(inst_dico->dyndat);
|
if (dicoS->inst_symbols)
|
||||||
* dispose(inst_dico);
|
fprintf(stderr, "ouch, what's to free here ?\n");
|
||||||
* inst_dico = NULL;
|
dispose(dicoS->dyncategory);
|
||||||
*/
|
if(dicoS->global_symbols)
|
||||||
|
nghash_free(dicoS->global_symbols, (void (*)(void*)) dico_free_entry, NULL);
|
||||||
|
// dispose(dicoS->dyndat);
|
||||||
|
dispose(dicoS);
|
||||||
|
dicoS = NULL;
|
||||||
|
// dispose(inst_dico->dyndat);
|
||||||
|
// dispose(inst_dico);
|
||||||
|
// inst_dico = NULL;
|
||||||
|
|
||||||
if (nerrors) {
|
if (nerrors) {
|
||||||
/* debug: ask if spice run really wanted */
|
/* debug: ask if spice run really wanted */
|
||||||
|
|
|
||||||
|
|
@ -247,6 +247,14 @@ initdico(tdico *dico)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void
|
||||||
|
destroy_numparm_keys(tdico *dico)
|
||||||
|
{
|
||||||
|
spice_dstring_free(&keyS);
|
||||||
|
spice_dstring_free(&fmathS);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
dico_free_entry(entry *entry_p)
|
dico_free_entry(entry *entry_p)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue