drop `INPmodUsed' which is redundant to `INPmodfast'

This commit is contained in:
rlar 2013-07-17 20:40:13 +02:00
parent 468b4b973c
commit df5c785a84
5 changed files with 4 additions and 8 deletions

View File

@ -913,11 +913,11 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val)
prevMod->GENnextModel = mods->GENnextModel;
INPgetMod(ckt, mods->GENmodName, &inpmod, ft_curckt->ci_symtab);
inpmod->INPmodUsed = 0;
if (curMod != nghash_delete(ckt->MODnameHash, curMod->GENmodName))
fprintf(stderr, "ERROR, ouch nasal daemons ...\n");
FREE(mods);
inpmod->INPmodfast = NULL;
break;
}
prevMod = mods;

View File

@ -75,7 +75,6 @@ struct INPmodel{
IFuid INPmodName; /* uid of model */
int INPmodType; /* type index of device type */
INPmodel *INPnextModel; /* link to next model */
int INPmodUsed; /* flag to indicate it has already been used */
card *INPmodLine; /* pointer to line describing model */
GENmodel *INPmodfast; /* high speed pointer to model for access */
};

View File

@ -132,7 +132,6 @@ create_model( CKTcircuit* ckt, INPmodel* modtmp, INPtables* tab )
#ifdef CIDER
} /* analytical vs. numerical model parsing */
#endif
modtmp->INPmodUsed = 1;
modtmp->INPmodLine->error = err;
return 0;
@ -244,7 +243,7 @@ INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, cha
if ( strncmp( modtmp->INPmodName, name, strlen( name ) ) == 0 &&
in_range( l, lmin, lmax ) && in_range( w, wmin, wmax ) ) {
if ( !modtmp->INPmodUsed ) {
if ( !modtmp->INPmodfast ) {
error = create_model( ckt, modtmp, tab );
if ( error ) return NULL;
}
@ -291,7 +290,7 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab)
return (err);
} /* end of checking for illegal model */
if (! modtmp->INPmodUsed) { /* Check if model is already defined */
if (! modtmp->INPmodfast) { /* Check if model is already defined */
error = create_model( ckt, modtmp, tab );
if ( error ) return INPerror(error);
}

View File

@ -46,7 +46,6 @@ int INPmakeMod(char *token, int type, card * line)
(*i)->INPmodName = token; /* model name */
(*i)->INPmodType = type; /* model type */
(*i)->INPnextModel = NULL; /* pointer to next model (end of list) */
(*i)->INPmodUsed = 0; /* model is unused */
(*i)->INPmodLine = line; /* model line */
(*i)->INPmodfast = NULL;
return (OK);

View File

@ -158,7 +158,7 @@ char *MIFgetMod(
}
/* check to see if this model's parameters have been processed */
if(! modtmp->INPmodUsed) {
if(! modtmp->INPmodfast) {
/* not already processed, so create data struct */
error = ft_sim->newModel ( ckt, modtmp->INPmodType,
@ -235,7 +235,6 @@ char *MIFgetMod(
} /* end while end of line not reached */
modtmp->INPmodUsed = 1;
modtmp->INPmodLine->error = err;
} /* end if model parameters not processed yet */