Merge branch 'master' into netgen-1.5
This commit is contained in:
commit
8395df633c
|
|
@ -1660,7 +1660,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
while (ecomp != NULL) {
|
while (ecomp != NULL) {
|
||||||
if ((ecomp->num1 != ecomp->num2) && (ecomp->cell1 != NULL) &&
|
if ((ecomp->num1 != ecomp->num2) && (ecomp->cell1 != NULL) &&
|
||||||
((ecomp->cell1->class == CLASS_RES) ||
|
((ecomp->cell1->class == CLASS_RES) ||
|
||||||
(ecomp->cell1->class == CLASS_VSOURCE))) {
|
(ecomp->cell1->class == CLASS_VSOURCE) ||
|
||||||
|
(ecomp->cell1->class == CLASS_ISOURCE))) {
|
||||||
int node1 = -1, node2 = -1;
|
int node1 = -1, node2 = -1;
|
||||||
lob = NULL;
|
lob = NULL;
|
||||||
for (ob1 = tc1->cell; ob1; ) {
|
for (ob1 = tc1->cell; ob1; ) {
|
||||||
|
|
@ -1709,10 +1710,15 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
tsub1->name,
|
tsub1->name,
|
||||||
tc1->name);
|
tc1->name);
|
||||||
|
|
||||||
/* merge node of endpoints */
|
/* A current source is an open, while a */
|
||||||
for (ob2 = tc1->cell; ob2; ob2 = ob2->next) {
|
/* resistor or voltage source is a short. */
|
||||||
if (ob2->node == node2)
|
|
||||||
ob2->node = node1;
|
if (ecomp->cell1->class != CLASS_ISOURCE) {
|
||||||
|
/* merge node of endpoints */
|
||||||
|
for (ob2 = tc1->cell; ob2; ob2 = ob2->next) {
|
||||||
|
if (ob2->node == node2)
|
||||||
|
ob2->node = node1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* snip, snip. Excise this device */
|
/* snip, snip. Excise this device */
|
||||||
|
|
@ -1765,7 +1771,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
|
|
||||||
if ((ecomp->num1 != ecomp->num2) && (ecomp->cell2 != NULL) &&
|
if ((ecomp->num1 != ecomp->num2) && (ecomp->cell2 != NULL) &&
|
||||||
((ecomp->cell2->class == CLASS_RES) ||
|
((ecomp->cell2->class == CLASS_RES) ||
|
||||||
(ecomp->cell2->class == CLASS_VSOURCE))) {
|
(ecomp->cell2->class == CLASS_VSOURCE) ||
|
||||||
|
(ecomp->cell2->class == CLASS_ISOURCE))) {
|
||||||
int node1 = -1, node2 = -1;
|
int node1 = -1, node2 = -1;
|
||||||
lob = NULL;
|
lob = NULL;
|
||||||
for (ob2 = tc2->cell; ob2; ) {
|
for (ob2 = tc2->cell; ob2; ) {
|
||||||
|
|
@ -1815,9 +1822,11 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
tc2->name);
|
tc2->name);
|
||||||
|
|
||||||
/* merge node of endpoints */
|
/* merge node of endpoints */
|
||||||
for (ob1 = tc2->cell; ob1; ob1 = ob1->next) {
|
if (ecomp->cell2->class != CLASS_ISOURCE) {
|
||||||
if (ob1->node == node2)
|
for (ob1 = tc2->cell; ob1; ob1 = ob1->next) {
|
||||||
ob1->node = node1;
|
if (ob1->node == node2)
|
||||||
|
ob1->node = node1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* snip, snip. Excise this device */
|
/* snip, snip. Excise this device */
|
||||||
|
|
|
||||||
11
base/spice.c
11
base/spice.c
|
|
@ -865,6 +865,17 @@ skip_ends:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Ignore anything in a .CONTROL ... .ENDC block */
|
||||||
|
else if (matchnocase(nexttok, ".CONTROL")) {
|
||||||
|
while (1) {
|
||||||
|
SpiceSkipNewLine();
|
||||||
|
SkipTok(NULL);
|
||||||
|
if (EndParseFile()) break;
|
||||||
|
if (matchnocase(nexttok, ".ENDC"))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Blackbox (library) mode---parse only subcircuits and models;
|
// Blackbox (library) mode---parse only subcircuits and models;
|
||||||
// ignore all components.
|
// ignore all components.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue