Merge branch 'master' into netgen-1.5
This commit is contained in:
commit
1acef6c52c
|
|
@ -300,8 +300,6 @@ int flattenInstancesOf(char *name, int fnum, char *instance)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* Placeholder cells must not be flattened */
|
|
||||||
if (ThisCell->flags & CELL_PLACEHOLDER) return 0;
|
|
||||||
|
|
||||||
FreeNodeNames(ThisCell);
|
FreeNodeNames(ThisCell);
|
||||||
|
|
||||||
|
|
@ -339,6 +337,10 @@ int flattenInstancesOf(char *name, int fnum, char *instance)
|
||||||
LastObj = ParentParams;
|
LastObj = ParentParams;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (ChildCell->flags & CELL_PLACEHOLDER) {
|
||||||
|
LastObj = ParentParams;
|
||||||
|
continue; // Placeholder cells must not be flattened
|
||||||
|
}
|
||||||
if (ChildCell == ThisCell) {
|
if (ChildCell == ThisCell) {
|
||||||
LastObj = ParentParams;
|
LastObj = ParentParams;
|
||||||
continue; // Avoid infinite loop
|
continue; // Avoid infinite loop
|
||||||
|
|
@ -1753,8 +1755,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
" makes a better match\n", ecomp->cell1->name,
|
" makes a better match\n", ecomp->cell1->name,
|
||||||
name1, file1);
|
name1, file1);
|
||||||
flattenInstancesOf(name1, file1, ecomp->cell1->name);
|
if (flattenInstancesOf(name1, file1, ecomp->cell1->name) > 0)
|
||||||
modified1++;
|
modified1++;
|
||||||
}
|
}
|
||||||
else if (ecomp->cell1 && (ecomp->num1 > 0)) {
|
else if (ecomp->cell1 && (ecomp->num1 > 0)) {
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
|
|
@ -1766,8 +1768,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
" makes a better match\n", ecomp->cell2->name,
|
" makes a better match\n", ecomp->cell2->name,
|
||||||
name2, file2);
|
name2, file2);
|
||||||
flattenInstancesOf(name2, file2, ecomp->cell2->name);
|
if (flattenInstancesOf(name2, file2, ecomp->cell2->name) > 0)
|
||||||
modified2++;
|
modified2++;
|
||||||
}
|
}
|
||||||
else if (ecomp->cell2 && (ecomp->num2 > 0)) {
|
else if (ecomp->cell2 && (ecomp->num2 > 0)) {
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
|
|
@ -1861,8 +1863,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
" makes a better match\n", ecomp->cell2->name,
|
" makes a better match\n", ecomp->cell2->name,
|
||||||
name2, file2);
|
name2, file2);
|
||||||
flattenInstancesOf(name2, file2, ecomp->cell2->name);
|
if (flattenInstancesOf(name2, file2, ecomp->cell2->name) > 0)
|
||||||
modified2++;
|
modified2++;
|
||||||
}
|
}
|
||||||
else if (ecomp->cell2) {
|
else if (ecomp->cell2) {
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
|
|
@ -1932,8 +1934,8 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
" makes a better match\n", ecomp->cell1->name,
|
" makes a better match\n", ecomp->cell1->name,
|
||||||
name1, file1);
|
name1, file1);
|
||||||
flattenInstancesOf(name1, file1, ecomp->cell1->name);
|
if (flattenInstancesOf(name1, file1, ecomp->cell1->name) > 0)
|
||||||
modified1++;
|
modified1++;
|
||||||
}
|
}
|
||||||
else if (ecomp->cell1) {
|
else if (ecomp->cell1) {
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
Fprintf(stdout, "Flattening instances of %s in cell %s (%d)"
|
||||||
|
|
@ -2295,11 +2297,12 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell"
|
Fprintf(stdout, "Flattening instances of %s in cell"
|
||||||
" %s (%d) makes a better match\n",
|
" %s (%d) makes a better match\n",
|
||||||
ecompX0->cell1->name, name1, file1);
|
ecompX0->cell1->name, name1, file1);
|
||||||
flattenInstancesOf(name1, file1,
|
if (flattenInstancesOf(name1, file1,
|
||||||
ecompX0->cell1->name);
|
ecompX0->cell1->name) > 0) {
|
||||||
ecompX0->num1 = 0;
|
ecompX0->num1 = 0;
|
||||||
ecomp0X->num1 += ecompX0->num1;
|
ecomp0X->num1 += ecompX0->num1;
|
||||||
modified1++;
|
modified1++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -2331,11 +2334,12 @@ PrematchLists(char *name1, int file1, char *name2, int file2)
|
||||||
Fprintf(stdout, "Flattening instances of %s in cell"
|
Fprintf(stdout, "Flattening instances of %s in cell"
|
||||||
" %s (%d) makes a better match\n",
|
" %s (%d) makes a better match\n",
|
||||||
ecomp0X->cell2->name, name2, file2);
|
ecomp0X->cell2->name, name2, file2);
|
||||||
flattenInstancesOf(name2, file2,
|
if (flattenInstancesOf(name2, file2,
|
||||||
ecomp0X->cell2->name);
|
ecomp0X->cell2->name) > 0) {
|
||||||
ecomp0X->num2 = 0;
|
ecomp0X->num2 = 0;
|
||||||
ecompX0->num2 += ecomp0X->num2;
|
ecompX0->num2 += ecomp0X->num2;
|
||||||
modified2++;
|
modified2++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Fprintf(stdout, "Flattening instances of %s in "
|
Fprintf(stdout, "Flattening instances of %s in "
|
||||||
|
|
|
||||||
|
|
@ -3582,7 +3582,7 @@ int FlattenUnmatched(struct nlist *tc, char *parent, int stoplevel, int loclevel
|
||||||
tc->name, parent, tc->file);
|
tc->name, parent, tc->file);
|
||||||
changed = flattenInstancesOf(parent, tc->file, tc->name);
|
changed = flattenInstancesOf(parent, tc->file, tc->name);
|
||||||
Fprintf(stdout, "(%d instance%s)\n", changed, ((changed == 1) ? "" : "s"));
|
Fprintf(stdout, "(%d instance%s)\n", changed, ((changed == 1) ? "" : "s"));
|
||||||
return 1;
|
return (changed != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tc->cell == NULL) return 0;
|
if (tc->cell == NULL) return 0;
|
||||||
|
|
|
||||||
|
|
@ -4570,7 +4570,7 @@ int Tclnetgen_Init(Tcl_Interp *interp)
|
||||||
/* Remember the interpreter */
|
/* Remember the interpreter */
|
||||||
netgeninterp = interp;
|
netgeninterp = interp;
|
||||||
|
|
||||||
if (Tcl_InitStubs(interp, "8.5", 0) == NULL) return TCL_ERROR;
|
if (Tcl_InitStubs(interp, TCL_VERSION, 0) == NULL) return TCL_ERROR;
|
||||||
|
|
||||||
for (n = 0; netgen_cmds[n].name != NULL; n++) {
|
for (n = 0; netgen_cmds[n].name != NULL; n++) {
|
||||||
sprintf(keyword, "netgen::%s", netgen_cmds[n].name);
|
sprintf(keyword, "netgen::%s", netgen_cmds[n].name);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue