Compare commits

..

1 Commits

Author SHA1 Message Date
Torleif Skår fc7aac1ca1
Merge d825f6cafe into 246c0ea7a4 2025-10-31 17:26:02 +01:00
4 changed files with 20 additions and 65 deletions

View File

@ -1 +1 @@
8.3.573
8.3.571

View File

@ -28,7 +28,6 @@ static const char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magi
#include "utils/magic.h"
#include "utils/geometry.h"
#include "utils/signals.h"
#include "tiles/tile.h"
#include "utils/hash.h"
#include "database/database.h"
@ -1479,28 +1478,19 @@ cifBloatAllFunc(
if (op->co_distance > 0)
{
Rect cifarea;
cifarea.r_xbot = area.r_xbot;
cifarea.r_ybot = area.r_ybot;
cifarea.r_xtop = area.r_xtop;
cifarea.r_ytop = area.r_ytop;
/* Note: This is non-optimal, as it causes all tiles
* in the "bloat" group to be re-processed for each
* tile processed in the search group. However, it
* is difficult to find an optimal method.
*/
STACKPUSH(t, ResetStack);
GeoClip(&cifarea, &clipArea);
if (GEO_RECTNULL(&cifarea))
GeoClip(&area, &clipArea);
if (GEO_RECTNULL(&area))
continue;
}
/* Diagonal: If expanding across the edge of a diagonal, then */
/* just fill the whole tile. Note that diagonal tiles are not */
/* clipped; the clipping only determines if the tile is */
/* outside the clip area. */
/* Diagonal: If expanding across the edge of a diagonal, */
/* then just fill the whole tile. */
if (IsSplit(t))
{
@ -1515,12 +1505,8 @@ cifBloatAllFunc(
CIFPaintTable, (PaintUndoInfo *) NULL);
}
else
{
if (op->co_distance > 0)
GeoClip(&area, &clipArea);
DBNMPaintPlane(cifPlane, TiGetTypeExact(t), &area,
CIFPaintTable, (PaintUndoInfo *) NULL);
}
/* Top */
for (tp = RT(t); RIGHT(tp) > LEFT(t); tp = BL(tp))
@ -1561,7 +1547,6 @@ cifBloatAllFunc(
TiSetClient(t, CIF_UNPROCESSED);
}
if (SigInterruptPending) return 1;
return 0; /* Keep the search alive. . . */
}
@ -4710,13 +4695,12 @@ cifBridgeLimFunc2(
void
cifInteractingRegions(
CIFOp *op,
const Rect *area, /* Area of interest to check */
CellDef *cellDef,
Plane *temps[], /* Planes to use for temporaries. */
Plane *plane)
{
Tile *tile = NULL, *t, *tp;
Rect rect;
Rect area;
int i;
TileType type;
bool interacts;
@ -4725,7 +4709,7 @@ cifInteractingRegions(
if (RegStack == (Stack *)NULL)
RegStack = StackNew(64);
while (DBSrPaintArea((Tile *)tile, plane, area, &CIFSolidBits,
while (DBSrPaintArea((Tile *)tile, plane, &TiPlaneRect, &CIFSolidBits,
cifSquaresInitFunc, (ClientData)NULL) != 0)
{
/* Now, search for (nontrivially) connected tiles in all */
@ -4745,10 +4729,7 @@ cifInteractingRegions(
TiSetClientINT(t, CIF_PROCESSED);
/* Get tile area for interaction search */
TiToRect(t, &rect);
/* Ignore tiles outside of the search area */
if (!GEO_SURROUND(area, &rect)) continue;
TiToRect(t, &area);
/* "interacting" includes touching as well as overlapping, so expand
* search by one unit in every direction and then check overlap.
@ -4757,10 +4738,10 @@ cifInteractingRegions(
*/
if ((pointertype)op->co_client & CIFOP_INT_TOUCHING)
{
rect.r_xbot -= 1;
rect.r_xtop += 1;
rect.r_ybot -= 1;
rect.r_ytop += 1;
area.r_xbot -= 1;
area.r_xtop += 1;
area.r_ybot -= 1;
area.r_ytop += 1;
}
/* Check if this tile interacts with the rule's types, or skip */
@ -4768,7 +4749,7 @@ cifInteractingRegions(
if (!interacts)
{
if (cifSrTiles2(op, &rect, cellDef, temps, cifInteractFunc, (ClientData)NULL))
if (cifSrTiles2(op, &area, cellDef, temps, cifInteractFunc, (ClientData)NULL))
interacts = TRUE;
}
@ -4821,8 +4802,8 @@ cifInteractingRegions(
if (interacts)
{
TiToRect(t, &rect);
DBPaintPlane(cifPlane, &rect, CIFPaintTable, (PaintUndoInfo *)NULL);
TiToRect(t, &area);
DBPaintPlane(cifPlane, &area, CIFPaintTable, (PaintUndoInfo *)NULL);
}
/* Top */
@ -4857,9 +4838,6 @@ cifInteractingRegions(
STACKPUSH(tp, RegStack);
}
}
/* Allow interrupts here */
if (SigInterruptPending) break;
}
}
@ -5335,7 +5313,7 @@ CIFGenLayer(
DBClearPaintPlane(nextPlane);
cifPlane = nextPlane;
cifInteractingRegions(op, area, cellDef, temps, curPlane);
cifInteractingRegions(op, cellDef, temps, curPlane);
temp = curPlane;
curPlane = nextPlane;
nextPlane = temp;

View File

@ -234,7 +234,7 @@ cifParseLayers(
*/
{
TileTypeBitMask curCifMask, curPaintMask;
char curLayer[512], *p, *cp;
char curLayer[40], *p, *cp;
TileType paintType;
int i;
bool allResidues;
@ -246,10 +246,6 @@ cifParseLayers(
{
p = curLayer;
if (*string == '(')
while ((*string != ')') && (*string != 0))
*p++ = *string++;
if (*string == '*')
{
allResidues = TRUE;
@ -267,22 +263,7 @@ cifParseLayers(
if (paintMask != NULL)
{
if (*curLayer == '(')
{
TileType t;
/* Layer groups with parentheses can only be paint types,
* and will be parsed accordingly. Residues will be
* handled within the group. Set paintType to -3, which
* is flagged and handled below.
*/
DBTechNoisyNameMask(curLayer, &curPaintMask);
paintType = -3;
allResidues = FALSE;
}
else
paintType = DBTechNameTypes(curLayer, &curPaintMask);
paintType = DBTechNameTypes(curLayer, &curPaintMask);
if (paintType >= 0) goto okpaint;
}
else paintType = -2;
@ -318,7 +299,7 @@ okpaint:
TechError("Ambiguous layer (type) \"%s\".\n", curLayer);
continue;
}
if ((paintType >= 0) || (paintType == -3))
if (paintType >= 0)
{
if (paintType == TT_SPACE && spaceOK ==0)
TechError("\"Space\" layer not permitted in CIF rules.\n");

View File

@ -27,7 +27,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "utils/magic.h"
#include "textio/textio.h"
#include "utils/signals.h"
#include "utils/geometry.h"
#include "tiles/tile.h"
#include "utils/hash.h"
@ -135,7 +134,7 @@ drcFindOtherCells(use, area)
* different for "drc why" commands than for "drc check".
*
* Returns:
* 0 to keep the search going. In case of an interrupt, return 1.
* 0 to keep the search going.
*
* ----------------------------------------------------------------------------
*/
@ -157,9 +156,6 @@ drcSubCopyErrors(tile, cxp)
arg->dCD_clientData);
(*(arg->dCD_errors))++;
/* Allow a break here */
if (SigInterruptPending) return 1;
return 0;
}