cleanup CKTfndDev(), findInstance() invocation
This commit is contained in:
parent
fa1d115ec2
commit
0cc59b1dc8
|
|
@ -47,8 +47,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
inst = NULL;
|
||||
code = CKTtypelook("Vsource");
|
||||
if (code != -1) {
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, NULL, NULL);
|
||||
error = CKTfndDev(ckt, &code, &inst, job->input, NULL, NULL);
|
||||
if (!error && !((VSRCinstance *)inst)->VSRCacGiven) {
|
||||
errMsg = TMALLOC(char, strlen(noacinput) + 1);
|
||||
strcpy(errMsg,noacinput);
|
||||
|
|
@ -58,8 +57,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
|
||||
code = CKTtypelook("Isource");
|
||||
if (code != -1 && inst==NULL) {
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, NULL, NULL);
|
||||
error = CKTfndDev(ckt, &code, &inst, job->input, NULL, NULL);
|
||||
if (error) {
|
||||
/* XXX ??? */
|
||||
SPfrontEnd->IFerror (ERR_WARNING,
|
||||
|
|
|
|||
|
|
@ -51,8 +51,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
Itype = CKTtypelook("Isource");
|
||||
Vtype = CKTtypelook("Vsource");
|
||||
if(Itype != -1) {
|
||||
error = CKTfndDev(ckt,&Itype,&ptr,
|
||||
job->TFinSrc, NULL, NULL);
|
||||
error = CKTfndDev(ckt, &Itype, &ptr, job->TFinSrc, NULL, NULL);
|
||||
if(error ==0) {
|
||||
job->TFinIsI = 1;
|
||||
job->TFinIsV = 0;
|
||||
|
|
@ -62,9 +61,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
}
|
||||
|
||||
if( (Vtype != -1) && (ptr==NULL) ) {
|
||||
error = CKTfndDev(ckt,&Vtype,&ptr,
|
||||
job->TFinSrc, NULL,
|
||||
NULL);
|
||||
error = CKTfndDev(ckt, &Vtype, &ptr, job->TFinSrc, NULL, NULL);
|
||||
job->TFinIsV = 1;
|
||||
job->TFinIsI = 0;
|
||||
if(error !=0) {
|
||||
|
|
|
|||
|
|
@ -43,8 +43,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
return(E_INTERN);
|
||||
}
|
||||
|
||||
error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind1),
|
||||
here->MUTindName1, NULL, NULL);
|
||||
error = CKTfndDev(ckt, &ktype, (GENinstance **) &(here->MUTind1), here->MUTindName1, NULL, NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
IFuid namarray[2];
|
||||
|
|
@ -54,8 +53,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
"%s: coupling to non-existant inductor %s.",
|
||||
namarray);
|
||||
}
|
||||
error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind2),
|
||||
here->MUTindName2, NULL, NULL);
|
||||
error = CKTfndDev(ckt, &ktype, (GENinstance **) &(here->MUTind2), here->MUTindName2, NULL, NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
IFuid namarray[2];
|
||||
|
|
|
|||
|
|
@ -40,8 +40,7 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
|
|||
* (name, type, direct pointer) - the type and direct pointer
|
||||
* WILL be set on return unless error is not OK
|
||||
*/
|
||||
error = sim->findInstance (ckt, dev, fast, devnam, NULL,
|
||||
NULL);
|
||||
error = sim->findInstance (ckt, dev, fast, devnam, NULL, NULL);
|
||||
if (error)
|
||||
return (error);
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,7 @@ SENstartup(CKTcircuit *ckt, int restart)
|
|||
type = -1;
|
||||
fast = NULL;
|
||||
|
||||
err = CKTfndDev(ckt, &type, &fast,
|
||||
ckt->CKTsenInfo->SENdevices[i],
|
||||
NULL, NULL);
|
||||
err = CKTfndDev(ckt, &type, &fast, ckt->CKTsenInfo->SENdevices[i], NULL, NULL);
|
||||
if (err != OK)
|
||||
return err;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue