inp2m.c, #4/7, move code up into the for loop
This commit is contained in:
parent
5a95487ad7
commit
74145c53a6
|
|
@ -80,13 +80,17 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current)
|
|||
if (!thismodel)
|
||||
txfree(INPgetModBin(ckt, nname[i], &thismodel, tab, line));
|
||||
|
||||
if (thismodel)
|
||||
if (thismodel) {
|
||||
model = nname[i];
|
||||
INPinsert(&model, tab);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (i >= max_i) {
|
||||
LITERR ("could not find a valid modelname");
|
||||
return;
|
||||
}
|
||||
INPtermInsert(ckt, &nname[i], tab, &node[i]);
|
||||
}
|
||||
|
||||
numnodes = i;
|
||||
|
|
@ -96,12 +100,6 @@ INP2M(CKTcircuit *ckt, INPtables *tab, card *current)
|
|||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < numnodes; i++)
|
||||
INPtermInsert(ckt, &nname[i], tab, &node[i]);
|
||||
model = nname[numnodes];
|
||||
|
||||
INPinsert(&model, tab);
|
||||
|
||||
if (thismodel->INPmodType != INPtypelook("Mos1") &&
|
||||
thismodel->INPmodType != INPtypelook("Mos2") &&
|
||||
thismodel->INPmodType != INPtypelook("Mos3") &&
|
||||
|
|
|
|||
Loading…
Reference in New Issue