parser/inpgmod.c, cleanup, local variables
This commit is contained in:
parent
c2e0c944a6
commit
8e77d740fc
|
|
@ -40,10 +40,8 @@ extern INPmodel *modtab;
|
||||||
static int
|
static int
|
||||||
create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
||||||
{
|
{
|
||||||
IFvalue *val;
|
|
||||||
char *err = NULL, *line, *parm, *endptr;
|
char *err = NULL, *line, *parm, *endptr;
|
||||||
int error, j;
|
int error, j;
|
||||||
double dval;
|
|
||||||
|
|
||||||
/* not already defined, so create & give parameters */
|
/* not already defined, so create & give parameters */
|
||||||
error = ft_sim->newModel(ckt, modtmp->INPmodType, &(modtmp->INPmodfast), modtmp->INPmodName);
|
error = ft_sim->newModel(ckt, modtmp->INPmodType, &(modtmp->INPmodfast), modtmp->INPmodName);
|
||||||
|
|
@ -97,7 +95,7 @@ create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (j < *(ft_sim->devices[modtmp->INPmodType]->numModelParms)) {
|
if (j < *(ft_sim->devices[modtmp->INPmodType]->numModelParms)) {
|
||||||
val = INPgetValue(ckt, &line, ft_sim->devices[modtmp->INPmodType]->modelParms[j].dataType, tab);
|
IFvalue *val = INPgetValue(ckt, &line, ft_sim->devices[modtmp->INPmodType]->modelParms[j].dataType, tab);
|
||||||
|
|
||||||
error = ft_sim->setModelParm(ckt, modtmp->INPmodfast,
|
error = ft_sim->setModelParm(ckt, modtmp->INPmodfast,
|
||||||
ft_sim->devices[modtmp->INPmodType]->modelParms[j].id,
|
ft_sim->devices[modtmp->INPmodType]->modelParms[j].id,
|
||||||
|
|
@ -107,9 +105,11 @@ create_model(CKTcircuit *ckt, INPmodel *modtmp, INPtables *tab)
|
||||||
} else if (strcmp(parm, "level") == 0) {
|
} else if (strcmp(parm, "level") == 0) {
|
||||||
/* just grab the level number and throw away */
|
/* just grab the level number and throw away */
|
||||||
/* since we already have that info from pass1 */
|
/* since we already have that info from pass1 */
|
||||||
val = INPgetValue(ckt, &line, IF_REAL, tab);
|
INPgetValue(ckt, &line, IF_REAL, tab);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
double dval;
|
||||||
|
|
||||||
/* want only the parameter names in output - not the values */
|
/* want only the parameter names in output - not the values */
|
||||||
errno = 0; /* To distinguish success/failure after call */
|
errno = 0; /* To distinguish success/failure after call */
|
||||||
dval = strtod(parm, &endptr);
|
dval = strtod(parm, &endptr);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue