Merge branch 'master' of 192.168.0.7:/home/tim/gitsrc/magic

Pull before push.
This commit is contained in:
Tim Edwards
2021-05-12 22:50:13 -04:00
2 changed files with 117 additions and 106 deletions
+12
View File
@@ -217,6 +217,18 @@ ResMakePortBreakpoints(def)
plane = def->cd_planes[DBPlane(node->rs_ttype)]; plane = def->cd_planes[DBPlane(node->rs_ttype)];
rect = &(node->rs_bbox); rect = &(node->rs_bbox);
/* Beware of zero-area ports */
if (rect->r_xbot == rect->r_xtop)
{
rect->r_xbot--;
rect->r_xtop++;
}
if (rect->r_ybot == rect->r_ytop)
{
rect->r_ybot--;
rect->r_ytop++;
}
TTMaskSetOnlyType(&mask, node->rs_ttype); TTMaskSetOnlyType(&mask, node->rs_ttype);
(void) DBSrPaintArea((Tile *) NULL, plane, rect, &mask, (void) DBSrPaintArea((Tile *) NULL, plane, rect, &mask,
ResAddBreakpointFunc, (ClientData)node); ResAddBreakpointFunc, (ClientData)node);
+8 -9
View File
@@ -62,11 +62,12 @@ ResPrintExtRes(outextfile,resistors,nodename)
for (; resistors != NULL; resistors = resistors->rr_nextResistor) for (; resistors != NULL; resistors = resistors->rr_nextResistor)
{ {
/* /*
These names shouldn't be null; they should either be set by * These names shouldn't be null; they should either be set by
the device name or by the node printing routine. This * the device name or by the node printing routine. This
code is included in case the resistor network is printed * code is included in case the resistor network is printed
before the nodes. * before the nodes.
*/ */
if (resistors->rr_connection1->rn_name == NULL) if (resistors->rr_connection1->rn_name == NULL)
{ {
(void)sprintf(newname, "%s%s%d", nodename, ".r", nodenum++); (void)sprintf(newname, "%s%s%d", nodename, ".r", nodenum++);
@@ -93,7 +94,6 @@ ResPrintExtRes(outextfile,resistors,nodename)
} }
} }
/* /*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
* *
@@ -205,7 +205,6 @@ ResPrintExtNode(outextfile, nodelist, nodename)
FILE *outextfile; FILE *outextfile;
resNode *nodelist; resNode *nodelist;
char *nodename; char *nodename;
{ {
int nodenum = 0; int nodenum = 0;
char newname[MAXNAME], tmpname[MAXNAME], *cp; char newname[MAXNAME], tmpname[MAXNAME], *cp;
@@ -218,12 +217,14 @@ ResPrintExtNode(outextfile, nodelist, nodename)
/* we don't want to rip out that node with a "killnode" statement. */ /* we don't want to rip out that node with a "killnode" statement. */
for (; nodelist != NULL; nodelist = nodelist->rn_more) for (; nodelist != NULL; nodelist = nodelist->rn_more)
{
if (nodelist->rn_name != NULL) if (nodelist->rn_name != NULL)
if (!strcmp(nodelist->rn_name, nodename)) if (!strcmp(nodelist->rn_name, nodename))
{ {
DoKillNode = FALSE; DoKillNode = FALSE;
break; break;
} }
}
if ((ResOptionsFlags & ResOpt_DoExtFile) && DoKillNode) if ((ResOptionsFlags & ResOpt_DoExtFile) && DoKillNode)
{ {
@@ -253,8 +254,7 @@ ResPrintExtNode(outextfile, nodelist, nodename)
/* rnode name R C x y type (R is always 0) */ /* rnode name R C x y type (R is always 0) */
fprintf(outextfile, "rnode \"%s\" 0 %g %d %d %d\n", fprintf(outextfile, "rnode \"%s\" 0 %g %d %d %d\n",
snode->rn_name, snode->rn_name,
(snode->rn_float.rn_area/ (snode->rn_float.rn_area / ExtCurStyle->exts_capScale),
ExtCurStyle->exts_capScale),
snode->rn_loc.p_x, snode->rn_loc.p_x,
snode->rn_loc.p_y, snode->rn_loc.p_y,
/* the following is TEMPORARILY set to 0 */ /* the following is TEMPORARILY set to 0 */
@@ -263,7 +263,6 @@ ResPrintExtNode(outextfile, nodelist, nodename)
} }
} }
/* /*
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
* *