From 750d6c0ecf2704d3f666a34baaf3988e8535c917 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Fri, 13 Nov 2020 10:24:31 -0500 Subject: [PATCH] Corrected a bad error (missing braces around a code block of more than one line) in the "grow-min" function that was affecting GDS output for any layers using the grow-min operator. --- VERSION | 2 +- cif/CIFgen.c | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/VERSION b/VERSION index 896df0cf..0eea60da 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.81 +8.3.82 diff --git a/cif/CIFgen.c b/cif/CIFgen.c index d98313c4..6eda31ee 100644 --- a/cif/CIFgen.c +++ b/cif/CIFgen.c @@ -148,9 +148,9 @@ cifGrowMinFunc(tile, table) int locDist, width, height, h; TileType type, tptype; Tile *tp, *tp2; + bool changed; void SetMinBoxGrid(); /* Forward reference */ - TiToRect(tile, &area); area.r_xbot *= cifScale; @@ -159,6 +159,7 @@ cifGrowMinFunc(tile, table) area.r_ytop *= cifScale; parea = area; + changed = FALSE; /* Check whole tile for minimum width */ width = area.r_xtop - area.r_xbot; @@ -205,6 +206,7 @@ cifGrowMinFunc(tile, table) 0.25 * (double)((growDistance + width) * (growDistance + width)) + 0.5); area.r_ybot -= h; + changed = TRUE; } else if (freeTop == FALSE && freeBot == TRUE) { @@ -212,17 +214,19 @@ cifGrowMinFunc(tile, table) 0.25 * (double)((growDistance + width) * (growDistance + width)) + 0.5); area.r_ytop += h; + changed = TRUE; } else { locDist = (growDistance - height) / 2; area.r_ybot -= locDist; area.r_ytop += locDist; + changed = TRUE; } } } /* Ensure grid limit is not violated */ - SetMinBoxGrid(&area, growDistance); + if (changed) SetMinBoxGrid(&area, growDistance); DBPaintPlane(cifPlane, &area, table, (PaintUndoInfo *) NULL); @@ -280,9 +284,11 @@ cifGrowMinFunc(tile, table) parea.r_ytop = area.r_ytop; } if ((width < growDistance) || (height < growDistance)) + { /* Ensure grid limit is not violated */ SetMinBoxGrid(&parea, growDistance); DBPaintPlane(cifPlane, &parea, table, (PaintUndoInfo *) NULL); + } } }