ngspice/src/spicelib/parser/inpkmods.c

40 lines
772 B
C
Raw Normal View History

2000-04-27 22:03:57 +02:00
/**********
Copyright 1990 Regents of the University of California. All rights reserved.
Author: 1985 Thomas L. Quarles
**********/
/*
*/
#include "ngspice/ngspice.h"
2000-04-27 22:03:57 +02:00
#include <stdio.h>
#include "ngspice/inpdefs.h"
#include "ngspice/ftedefs.h"
#include "inpxx.h"
2000-04-27 22:03:57 +02:00
extern INPmodel *modtab;
extern NGHASHPTR modtabhash;
2000-04-27 22:03:57 +02:00
void INPkillMods(void)
2000-04-27 22:03:57 +02:00
{
INPmodel *modtmp;
INPmodel *prev = NULL;
2011-04-28 17:59:36 +02:00
for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) {
if (prev)
FREE(prev);
prev = modtmp;
2000-04-27 22:03:57 +02:00
}
if (prev)
FREE(prev);
2011-04-28 17:59:36 +02:00
modtab = NULL;
ft_curckt->ci_modtab = NULL;
/* free the hash table */
if (modtabhash) {
nghash_free(modtabhash, NULL, NULL);
modtabhash = NULL;
}
ft_curckt->ci_modtabhash = NULL;
2000-04-27 22:03:57 +02:00
}