Browse Source

inp2m.c, #4/7, move code up into the for loop

pre-master-46
rlar 9 years ago
parent
commit
74145c53a6
  1. 12
      src/spicelib/parser/inp2m.c

12
src/spicelib/parser/inp2m.c

@ -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…
Cancel
Save