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