Browse Source

CKTfndDev(), rewrite invocations where `type == NULL'

pre-master-46
rlar 13 years ago
parent
commit
f375ec6c10
  1. 6
      src/spicelib/devices/ind/mutsetup.c
  2. 3
      src/spicelib/parser/inpaname.c

6
src/spicelib/devices/ind/mutsetup.c

@ -43,7 +43,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
}
// assert(third);
here->MUTind1 = (INDinstance *) CKTfndDev(ckt, NULL, (GENinstance **) &(here->MUTind1), here->MUTindName1);
if (!here->MUTind1)
here->MUTind1 = (INDinstance *) CKTfndDev(ckt, NULL, NULL, here->MUTindName1);
if (!here->MUTind1) {
IFuid namarray[2];
namarray[0]=here->MUTname;
@ -53,7 +54,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
namarray);
}
// assert(third);
here->MUTind2 = (INDinstance *) CKTfndDev(ckt, NULL, (GENinstance **) &(here->MUTind2), here->MUTindName2);
if (!here->MUTind2)
here->MUTind2 = (INDinstance *) CKTfndDev(ckt, NULL, NULL, here->MUTindName2);
if (!here->MUTind2) {
IFuid namarray[2];
namarray[0]=here->MUTname;

3
src/spicelib/parser/inpaname.c

@ -41,7 +41,8 @@ INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
* WILL be set on return unless error is not OK
*/
// assert(third) for all invocations
*fast = sim->findInstance (ckt, NULL, fast, devnam);
if (*fast == NULL)
*fast = sim->findInstance (ckt, NULL, NULL, devnam);
if (*fast == NULL)
return (E_NODEV);

Loading…
Cancel
Save