CKTfndMod(), drop unused arguments `type' and `modfast'
This commit is contained in:
parent
7b495e0a7b
commit
e7def1a0bc
|
|
@ -619,7 +619,7 @@ finddev_special(
|
|||
|
||||
// assert(second && *second == -1)
|
||||
// assert(third && *third == NULL)
|
||||
*modptr = ft_sim->findModel (ckt, -1, NULL, name);
|
||||
*modptr = ft_sim->findModel (ckt, name);
|
||||
if (*modptr) {
|
||||
*device_or_model = 1;
|
||||
return (*modptr)->GENmodType;
|
||||
|
|
@ -1215,7 +1215,7 @@ finddev(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr)
|
|||
|
||||
// assert(second && *second == -1)
|
||||
// assert(third && *third == NULL)
|
||||
*modptr = ft_sim->findModel (ckt, -1, modptr, name);
|
||||
*modptr = ft_sim->findModel (ckt, name);
|
||||
if (*modptr)
|
||||
return (*modptr)->GENmodType;
|
||||
|
||||
|
|
|
|||
|
|
@ -321,7 +321,7 @@ extern void CKTncDump(CKTcircuit *);
|
|||
extern int CKTfndAnal(CKTcircuit *, int *, JOB **, IFuid , TSKtask *, IFuid);
|
||||
extern int CKTfndBranch(CKTcircuit *, IFuid);
|
||||
extern GENinstance *CKTfndDev(CKTcircuit *, IFuid);
|
||||
extern GENmodel *CKTfndMod(CKTcircuit *, int, GENmodel **, IFuid);
|
||||
extern GENmodel *CKTfndMod(CKTcircuit *, IFuid);
|
||||
extern int CKTfndNode(CKTcircuit *, CKTnode **, IFuid);
|
||||
extern int CKTfndTask(CKTcircuit *, TSKtask **, IFuid );
|
||||
extern int CKTground(CKTcircuit *, CKTnode **, IFuid);
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ struct IFsimulator {
|
|||
/* set a parameter on a model */
|
||||
int (*askModelQuest) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *);
|
||||
/* ask a questions about a model */
|
||||
GENmodel *(*findModel) (CKTcircuit *, int, GENmodel **, IFuid);
|
||||
GENmodel *(*findModel) (CKTcircuit *, IFuid);
|
||||
/* find a specific model */
|
||||
int (*deleteModel) (CKTcircuit *, GENmodel *);
|
||||
/* delete a model from the circuit*/
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
GENmodel *
|
||||
CKTfndMod(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid modname)
|
||||
CKTfndMod(CKTcircuit *ckt, IFuid modname)
|
||||
{
|
||||
return nghash_find(ckt->MODnameHash, modname);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
|||
|
||||
// assert(second)
|
||||
// assert(third && *third == NULL)
|
||||
mymodfast = CKTfndMod(ckt, type, NULL, name);
|
||||
mymodfast = CKTfndMod(ckt, name);
|
||||
if(!mymodfast) {
|
||||
mymodfast = (GENmodel *) tmalloc((size_t) *(DEVices[type]->DEVmodSize));
|
||||
if(mymodfast == NULL) return(E_NOMEM);
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
// assert(second && *second == -1)
|
||||
// assert(third && *third == NULL)
|
||||
modfast = CKTfndMod(ckt, -1, NULL, varUid);
|
||||
modfast = CKTfndMod(ckt, varUid);
|
||||
if (!modfast)
|
||||
return E_NOMOD;
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
// assert(second && *second == -1)
|
||||
// assert(third && *third == NULL)
|
||||
modfast = CKTfndMod(ckt, -1, NULL, varUid);
|
||||
modfast = CKTfndMod(ckt, varUid);
|
||||
if (!modfast)
|
||||
return E_NOMOD;
|
||||
CKTdltMod(ckt, modfast);
|
||||
|
|
|
|||
|
|
@ -1399,7 +1399,7 @@ get_mod_param TCL_CMDPROCARGS(clientData, interp, argc, argv)
|
|||
typecode = -1;
|
||||
// assert(second && *second == -1)
|
||||
// assert(third && *third == NULL)
|
||||
modptr = ft_sim->findModel (ft_curckt->ci_ckt, -1, NULL, name);
|
||||
modptr = ft_sim->findModel (ft_curckt->ci_ckt, name);
|
||||
err = modptr ? OK : E_NOMOD;
|
||||
if (modptr)
|
||||
typecode = modptr->GENmodType;
|
||||
|
|
|
|||
Loading…
Reference in New Issue