K&R: cif/*.c bulk function implementation conversion
Beware of the MISMATCH with the prototype found in original
source, with the type declaration below.
External call sites checked to confirm argument order is
correct with the argument name order.
// nedges <> dir
bool
cifOrient(edges, nedges, dir)
CIFPath *edges[], /* Array of edges to be categorized. */
int dir[], /* Array to hold directions. */
int nedges) /* Size of arrays. */
// spacing <> border
int
CIFGetContactSize(type, edge, spacing, border)
TileType type,
int *edge,
int *border,
int *spacing)
K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
parent
ff412b74d8
commit
2f7f76bf9c
314
cif/CIFgen.c
314
cif/CIFgen.c
|
|
@ -100,9 +100,9 @@ extern void cifGenClip(Rect *area, Rect *expanded, Rect *clip);
|
|||
*/
|
||||
|
||||
int
|
||||
cifPaintFunc(tile, table)
|
||||
Tile *tile;
|
||||
PaintResultType *table; /* Used for painting. */
|
||||
cifPaintFunc(
|
||||
Tile *tile,
|
||||
PaintResultType *table) /* Used for painting. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -133,8 +133,8 @@ cifPaintFunc(tile, table)
|
|||
*/
|
||||
|
||||
void
|
||||
SetBoxGrid(area)
|
||||
Rect *area;
|
||||
SetBoxGrid(
|
||||
Rect *area)
|
||||
{
|
||||
int limit;
|
||||
int delta;
|
||||
|
|
@ -209,8 +209,8 @@ SetBoxGrid(area)
|
|||
*/
|
||||
|
||||
int
|
||||
SetValueGrid(value)
|
||||
int value;
|
||||
SetValueGrid(
|
||||
int value)
|
||||
{
|
||||
int limit;
|
||||
int delta;
|
||||
|
|
@ -242,9 +242,9 @@ SetValueGrid(value)
|
|||
*/
|
||||
|
||||
void
|
||||
SetMinBoxGrid(area, width)
|
||||
Rect *area;
|
||||
int width;
|
||||
SetMinBoxGrid(
|
||||
Rect *area,
|
||||
int width)
|
||||
{
|
||||
int wtest;
|
||||
int wtot;
|
||||
|
|
@ -296,9 +296,9 @@ SetMinBoxGrid(area, width)
|
|||
*/
|
||||
|
||||
int
|
||||
cifGrowMinFunc(tile, table)
|
||||
Tile *tile;
|
||||
PaintResultType *table; /* Table to be used for painting. */
|
||||
cifGrowMinFunc(
|
||||
Tile *tile,
|
||||
PaintResultType *table) /* Table to be used for painting. */
|
||||
{
|
||||
Rect area, parea;
|
||||
int locDist, width, height, h;
|
||||
|
|
@ -471,9 +471,9 @@ cifGrowMinFunc(tile, table)
|
|||
*/
|
||||
|
||||
int
|
||||
cifGrowGridFunc(tile, table)
|
||||
Tile *tile;
|
||||
PaintResultType *table; /* Table to be used for painting. */
|
||||
cifGrowGridFunc(
|
||||
Tile *tile,
|
||||
PaintResultType *table) /* Table to be used for painting. */
|
||||
{
|
||||
Rect area;
|
||||
int remainder;
|
||||
|
|
@ -547,9 +547,9 @@ cifGrowGridFunc(tile, table)
|
|||
#define STOP_ES 0x80
|
||||
|
||||
int
|
||||
cifGrowEuclideanFunc(tile, table)
|
||||
Tile *tile;
|
||||
PaintResultType *table; /* Table to be used for painting. */
|
||||
cifGrowEuclideanFunc(
|
||||
Tile *tile,
|
||||
PaintResultType *table) /* Table to be used for painting. */
|
||||
{
|
||||
Tile *tp;
|
||||
Rect area, rtmp;
|
||||
|
|
@ -760,9 +760,9 @@ cifGrowEuclideanFunc(tile, table)
|
|||
*/
|
||||
|
||||
int
|
||||
cifGrowFunc(tile, table)
|
||||
Tile *tile;
|
||||
PaintResultType *table; /* Table to be used for painting. */
|
||||
cifGrowFunc(
|
||||
Tile *tile,
|
||||
PaintResultType *table) /* Table to be used for painting. */
|
||||
{
|
||||
Rect area;
|
||||
TileType oldType = TiGetTypeExact(tile);
|
||||
|
|
@ -889,9 +889,9 @@ cifGrowFunc(tile, table)
|
|||
*/
|
||||
|
||||
int
|
||||
cifBloatFunc(tile, clientData)
|
||||
Tile *tile;
|
||||
ClientData clientData;
|
||||
cifBloatFunc(
|
||||
Tile *tile,
|
||||
ClientData clientData)
|
||||
{
|
||||
Rect tileArea, cifArea, bloat;
|
||||
TileType oldType, type, topLeftType, bottomRightType;
|
||||
|
|
@ -1216,9 +1216,9 @@ endbloat:
|
|||
*/
|
||||
|
||||
int
|
||||
cifProcessResetFunc(tile, clientData)
|
||||
Tile *tile;
|
||||
ClientData clientData; /* unused */
|
||||
cifProcessResetFunc(
|
||||
Tile *tile,
|
||||
ClientData clientData) /* unused */
|
||||
{
|
||||
tile->ti_client = (ClientData) CIF_UNPROCESSED;
|
||||
return 0;
|
||||
|
|
@ -1265,9 +1265,9 @@ cifProcessSelectiveResetFunc(tile, clipArea)
|
|||
*/
|
||||
|
||||
int
|
||||
cifFoundFunc(tile, BloatStackPtr)
|
||||
Tile *tile;
|
||||
Stack **BloatStackPtr;
|
||||
cifFoundFunc(
|
||||
Tile *tile,
|
||||
Stack **BloatStackPtr)
|
||||
{
|
||||
PUSHTILE(tile, *BloatStackPtr);
|
||||
return 0;
|
||||
|
|
@ -1301,9 +1301,9 @@ typedef struct _bloatStruct {
|
|||
*/
|
||||
|
||||
int
|
||||
cifBloatAllFunc(tile, bls)
|
||||
Tile *tile; /* The tile to be processed. */
|
||||
BloatStruct *bls;
|
||||
cifBloatAllFunc(
|
||||
Tile *tile, /* The tile to be processed. */
|
||||
BloatStruct *bls)
|
||||
{
|
||||
Rect area, clipArea;
|
||||
TileTypeBitMask *connect;
|
||||
|
|
@ -1589,8 +1589,8 @@ typedef struct _bridgeCheckStruct {
|
|||
*/
|
||||
|
||||
int
|
||||
GetEuclideanWidthGrid(width)
|
||||
int width;
|
||||
GetEuclideanWidthGrid(
|
||||
int width)
|
||||
{
|
||||
int weuclid;
|
||||
int delta;
|
||||
|
|
@ -1647,10 +1647,10 @@ GetEuclideanWidthGrid(width)
|
|||
*/
|
||||
|
||||
void
|
||||
GetExpandedAreaGrid(wrule, space, area)
|
||||
int wrule;
|
||||
bool space;
|
||||
Rect *area;
|
||||
GetExpandedAreaGrid(
|
||||
int wrule,
|
||||
bool space,
|
||||
Rect *area)
|
||||
{
|
||||
bool horiz;
|
||||
bool overlap;
|
||||
|
|
@ -1782,9 +1782,9 @@ GetExpandedAreaGrid(wrule, space, area)
|
|||
*/
|
||||
|
||||
int
|
||||
cifBridgeFunc1(tile, brs)
|
||||
Tile *tile;
|
||||
BridgeStruct *brs;
|
||||
cifBridgeFunc1(
|
||||
Tile *tile,
|
||||
BridgeStruct *brs)
|
||||
{
|
||||
Plane *plane = brs->plane;
|
||||
Rect area;
|
||||
|
|
@ -1904,9 +1904,9 @@ cifBridgeFunc1(tile, brs)
|
|||
*/
|
||||
|
||||
int
|
||||
cifBridgeFunc2(tile, brs)
|
||||
Tile *tile;
|
||||
BridgeStruct *brs;
|
||||
cifBridgeFunc2(
|
||||
Tile *tile,
|
||||
BridgeStruct *brs)
|
||||
{
|
||||
Plane *plane = brs->plane;
|
||||
Rect area;
|
||||
|
|
@ -2004,9 +2004,9 @@ cifBridgeFunc2(tile, brs)
|
|||
*/
|
||||
|
||||
int
|
||||
cifBridgeCheckFunc(tile, brcs)
|
||||
Tile *tile;
|
||||
BridgeCheckStruct *brcs;
|
||||
cifBridgeCheckFunc(
|
||||
Tile *tile,
|
||||
BridgeCheckStruct *brcs)
|
||||
{
|
||||
int dir = brcs->direction;
|
||||
Tile *self = brcs->tile;
|
||||
|
|
@ -2080,13 +2080,13 @@ cifBridgeCheckFunc(tile, brcs)
|
|||
#define CLOSE_DONE 2
|
||||
|
||||
int
|
||||
cifCloseFunc(tile, plane)
|
||||
Tile *tile;
|
||||
Plane *plane;
|
||||
cifCloseFunc(
|
||||
Tile *tile,
|
||||
Plane *plane)
|
||||
{
|
||||
Rect area, newarea;
|
||||
int atotal;
|
||||
int cifGatherFunc(Tile *tile, int *atotal, int mode);
|
||||
int cifGatherFunc(Tile *tile, int *atotal, bool mode);
|
||||
|
||||
/* If tile is marked, then it has been handled, so ignore it */
|
||||
if (tile->ti_client != (ClientData)CIF_UNPROCESSED) return 0;
|
||||
|
|
@ -2115,10 +2115,10 @@ cifCloseFunc(tile, plane)
|
|||
}
|
||||
|
||||
int
|
||||
cifGatherFunc(tile, atotal, mode)
|
||||
Tile *tile;
|
||||
int *atotal;
|
||||
bool mode;
|
||||
cifGatherFunc(
|
||||
Tile *tile,
|
||||
int *atotal,
|
||||
bool mode)
|
||||
{
|
||||
Tile *tp;
|
||||
TileType type;
|
||||
|
|
@ -2292,9 +2292,9 @@ cifSquaresInitFunc(tile, clientData)
|
|||
*/
|
||||
|
||||
int
|
||||
cifSquaresStripFunc(tile, stripsData)
|
||||
Tile *tile;
|
||||
StripsData *stripsData;
|
||||
cifSquaresStripFunc(
|
||||
Tile *tile,
|
||||
StripsData *stripsData)
|
||||
{
|
||||
bool vertical;
|
||||
int width, height;
|
||||
|
|
@ -2419,9 +2419,9 @@ cifSquaresStripFunc(tile, stripsData)
|
|||
|
||||
|
||||
int
|
||||
cifUnconnectFunc(tile, clientData)
|
||||
Tile *tile;
|
||||
ClientData clientData; /* unused */
|
||||
cifUnconnectFunc(
|
||||
Tile *tile,
|
||||
ClientData clientData) /* unused */
|
||||
{
|
||||
TileType t = TiGetTypeExact(tile);
|
||||
if (t == TT_SPACE) return 1;
|
||||
|
|
@ -2449,10 +2449,10 @@ cifUnconnectFunc(tile, clientData)
|
|||
*/
|
||||
|
||||
void
|
||||
cifRectBoundingBox(op, cellDef, plane)
|
||||
CIFOp *op;
|
||||
CellDef *cellDef;
|
||||
Plane *plane;
|
||||
cifRectBoundingBox(
|
||||
CIFOp *op,
|
||||
CellDef *cellDef,
|
||||
Plane *plane)
|
||||
{
|
||||
Tile *tile = NULL, *t, *tp;
|
||||
Rect bbox, area, *maxr;
|
||||
|
|
@ -2608,10 +2608,10 @@ cifRectBoundingBox(op, cellDef, plane)
|
|||
*/
|
||||
|
||||
void
|
||||
cifSquaresFillArea(op, cellDef, plane)
|
||||
CIFOp *op;
|
||||
CellDef *cellDef;
|
||||
Plane *plane;
|
||||
cifSquaresFillArea(
|
||||
CIFOp *op,
|
||||
CellDef *cellDef,
|
||||
Plane *plane)
|
||||
{
|
||||
Tile *tile, *t, *tp;
|
||||
Rect bbox, area, square, cut, llcut;
|
||||
|
|
@ -2937,10 +2937,10 @@ cifSquaresFillArea(op, cellDef, plane)
|
|||
*/
|
||||
|
||||
void
|
||||
cifSlotsFillArea(op, cellDef, plane)
|
||||
CIFOp *op;
|
||||
CellDef *cellDef;
|
||||
Plane *plane;
|
||||
cifSlotsFillArea(
|
||||
CIFOp *op,
|
||||
CellDef *cellDef,
|
||||
Plane *plane)
|
||||
{
|
||||
Tile *tile, *t, *tp;
|
||||
Rect bbox, area, square, cut, llcut;
|
||||
|
|
@ -3306,9 +3306,9 @@ cifSlotsFillArea(op, cellDef, plane)
|
|||
*/
|
||||
|
||||
int
|
||||
cifBloatMaxFunc(tile, op)
|
||||
Tile *tile; /* The tile to be processed. */
|
||||
CIFOp *op; /* Describes the operation to be performed
|
||||
cifBloatMaxFunc(
|
||||
Tile *tile, /* The tile to be processed. */
|
||||
CIFOp *op) /* Describes the operation to be performed
|
||||
* (all we care about is the opcode and
|
||||
* bloat table).
|
||||
*/
|
||||
|
|
@ -3443,9 +3443,9 @@ cifBloatMaxFunc(tile, op)
|
|||
*/
|
||||
|
||||
bool
|
||||
inside_triangle(rect, tile)
|
||||
Rect *rect;
|
||||
Tile *tile;
|
||||
inside_triangle(
|
||||
Rect *rect,
|
||||
Tile *tile)
|
||||
{
|
||||
int theight, twidth;
|
||||
dlong f1, f2, f3, f4;
|
||||
|
|
@ -3498,9 +3498,9 @@ inside_triangle(rect, tile)
|
|||
*/
|
||||
|
||||
int
|
||||
cifContactFunc(tile, csi)
|
||||
Tile *tile; /* Tile to be diced up. */
|
||||
CIFSquaresInfo *csi; /* Describes how to generate squares. */
|
||||
cifContactFunc(
|
||||
Tile *tile, /* Tile to be diced up. */
|
||||
CIFSquaresInfo *csi) /* Describes how to generate squares. */
|
||||
{
|
||||
Rect area;
|
||||
int i, nAcross, j, nUp, left, bottom, pitch, halfsize;
|
||||
|
|
@ -3576,12 +3576,13 @@ cifContactFunc(tile, csi)
|
|||
*/
|
||||
|
||||
int
|
||||
cifSlotFunc(area, op, numY, numX, cut, vertical)
|
||||
Rect *area; /* Area to be diced up */
|
||||
CIFOp *op; /* Describes how to generate squares. */
|
||||
int *numY, *numX; /* Return values: # rows and # columns */
|
||||
Rect *cut; /* initial (lower left) cut area */
|
||||
bool vertical; /* if TRUE, slot is aligned vertically */
|
||||
cifSlotFunc(
|
||||
Rect *area, /* Area to be diced up */
|
||||
CIFOp *op, /* Describes how to generate squares. */
|
||||
int *numY,
|
||||
int *numX, /* Return values: # rows and # columns */
|
||||
Rect *cut, /* initial (lower left) cut area */
|
||||
bool vertical) /* if TRUE, slot is aligned vertically */
|
||||
{
|
||||
int i, j, xpitch, ypitch, delta, limit;
|
||||
int *axtop, *axbot, *aytop, *aybot;
|
||||
|
|
@ -3715,11 +3716,12 @@ calcY:
|
|||
*/
|
||||
|
||||
int
|
||||
cifSquareFunc(area, op, rows, columns, cut)
|
||||
Rect *area; /* Area to be diced up */
|
||||
CIFOp *op; /* Describes how to generate squares. */
|
||||
int *rows, *columns; /* Return values: # rows and # columns, */
|
||||
Rect *cut; /* initial (lower left) cut area. */
|
||||
cifSquareFunc(
|
||||
Rect *area, /* Area to be diced up */
|
||||
CIFOp *op, /* Describes how to generate squares. */
|
||||
int *rows,
|
||||
int *columns, /* Return values: # rows and # columns, */
|
||||
Rect *cut) /* initial (lower left) cut area. */
|
||||
{
|
||||
int pitch, delta, limit;
|
||||
bool glimit;
|
||||
|
|
@ -3827,11 +3829,12 @@ sqY:
|
|||
*/
|
||||
|
||||
int
|
||||
cifSquareGridFunc(area, op, rows, columns, cut)
|
||||
Rect *area; /* Area to be diced up */
|
||||
CIFOp *op; /* Describes how to generate squares. */
|
||||
int *rows, *columns; /* Return values: # rows and # columns, */
|
||||
Rect *cut; /* initial (lower left) cut area. */
|
||||
cifSquareGridFunc(
|
||||
Rect *area, /* Area to be diced up */
|
||||
CIFOp *op, /* Describes how to generate squares. */
|
||||
int *rows,
|
||||
int *columns, /* Return values: # rows and # columns, */
|
||||
Rect *cut) /* initial (lower left) cut area. */
|
||||
{
|
||||
Rect locarea;
|
||||
int left, bottom, right, top, pitch;
|
||||
|
|
@ -3918,13 +3921,13 @@ cifSquareGridFunc(area, op, rows, columns, cut)
|
|||
*/
|
||||
|
||||
void
|
||||
cifSrTiles(cifOp, area, cellDef, temps, func, cdArg)
|
||||
CIFOp *cifOp; /* Geometric operation being processed. */
|
||||
Rect *area; /* Area of Magic paint to consider. */
|
||||
CellDef *cellDef; /* CellDef to search for paint. */
|
||||
Plane *temps[]; /* Planes to use for temporaries. */
|
||||
int (*func)(); /* Search function to pass to DBSrPaintArea. */
|
||||
ClientData cdArg; /* Client data for func. */
|
||||
cifSrTiles(
|
||||
CIFOp *cifOp, /* Geometric operation being processed. */
|
||||
Rect *area, /* Area of Magic paint to consider. */
|
||||
CellDef *cellDef, /* CellDef to search for paint. */
|
||||
Plane *temps[], /* Planes to use for temporaries. */
|
||||
int (*func)(), /* Search function to pass to DBSrPaintArea. */
|
||||
ClientData cdArg) /* Client data for func. */
|
||||
{
|
||||
TileTypeBitMask maskBits;
|
||||
TileType t;
|
||||
|
|
@ -4005,9 +4008,9 @@ typedef struct _bridgeLimCheckStruct {
|
|||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
bridgeLimFound(tile, calcOverlap)
|
||||
Tile *tile;
|
||||
bool calcOverlap;
|
||||
bridgeLimFound(
|
||||
Tile *tile,
|
||||
bool calcOverlap)
|
||||
{
|
||||
if (calcOverlap)
|
||||
{
|
||||
|
|
@ -4027,10 +4030,10 @@ bridgeLimFound(tile, calcOverlap)
|
|||
*------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
bridgeLimSrTiles(brlims, area, calcOverlap)
|
||||
BridgeLimStruct *brlims; /* Bridge-Lim structure. */
|
||||
Rect *area; /* Area of Magic paint to consider. */
|
||||
bool calcOverlap; /* TRUE to calculate the overlap of the limiting tiles in the specified area. */
|
||||
bridgeLimSrTiles(
|
||||
BridgeLimStruct *brlims, /* Bridge-Lim structure. */
|
||||
Rect *area, /* Area of Magic paint to consider. */
|
||||
bool calcOverlap) /* TRUE to calculate the overlap of the limiting tiles in the specified area. */
|
||||
{
|
||||
TileTypeBitMask maskBits;
|
||||
TileType t;
|
||||
|
|
@ -4086,9 +4089,9 @@ bridgeLimSrTiles(brlims, area, calcOverlap)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
cifBridgeLimFunc0(tile, brlims)
|
||||
Tile *tile;
|
||||
BridgeLimStruct *brlims;
|
||||
cifBridgeLimFunc0(
|
||||
Tile *tile,
|
||||
BridgeLimStruct *brlims)
|
||||
{
|
||||
Plane *plane = brlims->plane;
|
||||
Rect area, parea;
|
||||
|
|
@ -4161,9 +4164,9 @@ cifBridgeLimFunc0(tile, brlims)
|
|||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
bridgeLimCheckFunc(tile, brlimcs)
|
||||
Tile *tile;
|
||||
BridgeLimCheckStruct *brlimcs;
|
||||
bridgeLimCheckFunc(
|
||||
Tile *tile,
|
||||
BridgeLimCheckStruct *brlimcs)
|
||||
{
|
||||
int dir = brlimcs->direction;
|
||||
Tile *self = brlimcs->tile;
|
||||
|
|
@ -4231,9 +4234,9 @@ bridgeLimCheckFunc(tile, brlimcs)
|
|||
*-----------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
bridgeErase(brlims, area)
|
||||
BridgeLimStruct *brlims; /* Bridge-lim structure. */
|
||||
Rect *area; /* Area of Magic paint to consider. */
|
||||
bridgeErase(
|
||||
BridgeLimStruct *brlims, /* Bridge-lim structure. */
|
||||
Rect *area) /* Area of Magic paint to consider. */
|
||||
{
|
||||
TileTypeBitMask maskBits;
|
||||
TileType t;
|
||||
|
|
@ -4277,9 +4280,9 @@ bridgeErase(brlims, area)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
cifBridgeLimFunc1(tile, brlims)
|
||||
Tile *tile;
|
||||
BridgeLimStruct *brlims;
|
||||
cifBridgeLimFunc1(
|
||||
Tile *tile,
|
||||
BridgeLimStruct *brlims)
|
||||
{
|
||||
Plane *plane = brlims->plane;
|
||||
Rect area;
|
||||
|
|
@ -4438,9 +4441,9 @@ cifBridgeLimFunc1(tile, brlims)
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
int
|
||||
cifBridgeLimFunc2(tile, brlims)
|
||||
Tile *tile;
|
||||
BridgeLimStruct *brlims;
|
||||
cifBridgeLimFunc2(
|
||||
Tile *tile,
|
||||
BridgeLimStruct *brlims)
|
||||
{
|
||||
Plane *plane = brlims->plane;
|
||||
Rect area;
|
||||
|
|
@ -4571,24 +4574,24 @@ cifBridgeLimFunc2(tile, brlims)
|
|||
*/
|
||||
|
||||
Plane *
|
||||
CIFGenLayer(op, area, cellDef, origDef, temps, hier, clientdata)
|
||||
CIFOp *op; /* List of CIFOps telling how to make layer. */
|
||||
Rect *area; /* Area to consider when generating CIF. Only
|
||||
CIFGenLayer(
|
||||
CIFOp *op, /* List of CIFOps telling how to make layer. */
|
||||
Rect *area, /* Area to consider when generating CIF. Only
|
||||
* material in this area will be considered, so
|
||||
* the caller should usually expand his desired
|
||||
* area by one CIF radius.
|
||||
*/
|
||||
CellDef *cellDef; /* CellDef to search when paint layers are
|
||||
CellDef *cellDef, /* CellDef to search when paint layers are
|
||||
* needed for operation.
|
||||
*/
|
||||
CellDef *origDef; /* Original CellDef for which output is being
|
||||
CellDef *origDef, /* Original CellDef for which output is being
|
||||
* generated (cellDef may be derived from this).
|
||||
*/
|
||||
Plane *temps[]; /* Temporary layers to be used when needed
|
||||
Plane *temps[], /* Temporary layers to be used when needed
|
||||
* for operation.
|
||||
*/
|
||||
bool hier; /* TRUE if called from CIFGenSubcells or CIFGenArrays */
|
||||
ClientData clientdata; /*
|
||||
bool hier, /* TRUE if called from CIFGenSubcells or CIFGenArrays */
|
||||
ClientData clientdata) /*
|
||||
* Data that may be passed to the CIF operation
|
||||
* function.
|
||||
*/
|
||||
|
|
@ -5176,31 +5179,31 @@ CIFGenLayer(op, area, cellDef, origDef, temps, hier, clientdata)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFGen(cellDef, origDef, area, planes, layers, replace, genAllPlanes, hier, clientdata)
|
||||
CellDef *cellDef; /* Cell for which CIF is to be generated. */
|
||||
CellDef *origDef; /* Original cell, if different from cellDef */
|
||||
Rect *area; /* Any CIF overlapping this area (in coords
|
||||
CIFGen(
|
||||
CellDef *cellDef, /* Cell for which CIF is to be generated. */
|
||||
CellDef *origDef, /* Original cell, if different from cellDef */
|
||||
Rect *area, /* Any CIF overlapping this area (in coords
|
||||
* of cellDef) will be generated. The CIF
|
||||
* will be clipped to this area.
|
||||
*/
|
||||
Plane **planes; /* Pointer to array of pointers to planes
|
||||
Plane **planes, /* Pointer to array of pointers to planes
|
||||
* to hold "real" CIF layers that are
|
||||
* generated. Pointers may initially be
|
||||
* NULL.
|
||||
*/
|
||||
TileTypeBitMask *layers; /* CIF layers to generate. */
|
||||
bool replace; /* TRUE means that the new CIF is to replace
|
||||
TileTypeBitMask *layers, /* CIF layers to generate. */
|
||||
bool replace, /* TRUE means that the new CIF is to replace
|
||||
* anything that was previously in planes.
|
||||
* FALSE means that the new CIF is to be
|
||||
* OR'ed in with the current contents of
|
||||
* planes.
|
||||
*/
|
||||
bool genAllPlanes; /* If TRUE, generate a tile plane even for
|
||||
bool genAllPlanes, /* If TRUE, generate a tile plane even for
|
||||
* those layers not specified as being
|
||||
* generated in the 'layers' mask above.
|
||||
*/
|
||||
bool hier; /* TRUE if called from CIFGenSubcells or CIFGenArrays */
|
||||
ClientData clientdata; /* Data that may be passed along to the
|
||||
bool hier, /* TRUE if called from CIFGenSubcells or CIFGenArrays */
|
||||
ClientData clientdata) /* Data that may be passed along to the
|
||||
* CIF operation functions.
|
||||
*/
|
||||
{
|
||||
|
|
@ -5290,9 +5293,9 @@ CIFGen(cellDef, origDef, area, planes, layers, replace, genAllPlanes, hier, clie
|
|||
*/
|
||||
|
||||
void
|
||||
cifClipPlane(plane, clip)
|
||||
Plane *plane;
|
||||
Rect *clip;
|
||||
cifClipPlane(
|
||||
Plane *plane,
|
||||
Rect *clip)
|
||||
{
|
||||
Rect r;
|
||||
|
||||
|
|
@ -5344,12 +5347,13 @@ cifClipPlane(plane, clip)
|
|||
*/
|
||||
|
||||
void
|
||||
cifGenClip(area, expanded, clip)
|
||||
Rect *area; /* Any CIF overlapping this area (in coords
|
||||
cifGenClip(
|
||||
Rect *area, /* Any CIF overlapping this area (in coords
|
||||
* of cellDef) will be generated. The CIF
|
||||
* will be clipped to this area.
|
||||
*/
|
||||
Rect *expanded, *clip;
|
||||
Rect *expanded,
|
||||
Rect *clip)
|
||||
{
|
||||
if (area->r_xbot > TiPlaneRect.r_xbot)
|
||||
{
|
||||
|
|
@ -5395,8 +5399,8 @@ cifGenClip(area, expanded, clip)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFClearPlanes(planes)
|
||||
Plane **planes; /* Pointer to an array of MAXCIFLAYERS
|
||||
CIFClearPlanes(
|
||||
Plane **planes) /* Pointer to an array of MAXCIFLAYERS
|
||||
* planes.
|
||||
*/
|
||||
{
|
||||
|
|
|
|||
135
cif/CIFhier.c
135
cif/CIFhier.c
|
|
@ -107,7 +107,7 @@ static CIFLayer *CurCifLayer;
|
|||
*/
|
||||
|
||||
void
|
||||
CIFInitCells()
|
||||
CIFInitCells(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ CIFInitCells()
|
|||
*/
|
||||
|
||||
void
|
||||
cifHierCleanup()
|
||||
cifHierCleanup(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -232,10 +232,10 @@ typedef struct _maskHintsData
|
|||
|
||||
/* DEPRECATED */
|
||||
int
|
||||
cifMaskHints(name, value, targetDef)
|
||||
char *name;
|
||||
char *value;
|
||||
CellDef *targetDef;
|
||||
cifMaskHints(
|
||||
char *name,
|
||||
char *value,
|
||||
CellDef *targetDef)
|
||||
{
|
||||
char *propvalue, *newval;
|
||||
bool propfound;
|
||||
|
|
@ -277,10 +277,10 @@ cifMaskHints(name, value, targetDef)
|
|||
*/
|
||||
|
||||
int
|
||||
cifFlatMaskHints(name, value, mhd)
|
||||
char *name;
|
||||
char *value;
|
||||
MaskHintsData *mhd;
|
||||
cifFlatMaskHints(
|
||||
char *name,
|
||||
char *value,
|
||||
MaskHintsData *mhd)
|
||||
{
|
||||
Rect r, newr;
|
||||
char *vptr, *newval, *lastval, *propvalue;
|
||||
|
|
@ -361,9 +361,9 @@ cifFlatMaskHints(name, value, mhd)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFCopyMaskHints(scx, targetDef)
|
||||
SearchContext *scx;
|
||||
CellDef *targetDef;
|
||||
CIFCopyMaskHints(
|
||||
SearchContext *scx,
|
||||
CellDef *targetDef)
|
||||
{
|
||||
MaskHintsData mhd;
|
||||
|
||||
|
|
@ -392,9 +392,9 @@ CIFCopyMaskHints(scx, targetDef)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierCopyMaskHints(scx, clientData)
|
||||
SearchContext *scx;
|
||||
ClientData clientData;
|
||||
cifHierCopyMaskHints(
|
||||
SearchContext *scx,
|
||||
ClientData clientData)
|
||||
{
|
||||
MaskHintsData mhd;
|
||||
|
||||
|
|
@ -431,9 +431,9 @@ cifHierCopyMaskHints(scx, clientData)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierCopyFunc(tile, cxp)
|
||||
Tile *tile; /* Pointer to tile to copy. */
|
||||
TreeContext *cxp; /* Describes context of search, including
|
||||
cifHierCopyFunc(
|
||||
Tile *tile, /* Pointer to tile to copy. */
|
||||
TreeContext *cxp) /* Describes context of search, including
|
||||
* transform and client data.
|
||||
*/
|
||||
{
|
||||
|
|
@ -500,8 +500,8 @@ cifHierCopyFunc(tile, cxp)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierCellFunc(scx)
|
||||
SearchContext *scx; /* Describes cell and area in cell. */
|
||||
cifHierCellFunc(
|
||||
SearchContext *scx) /* Describes cell and area in cell. */
|
||||
{
|
||||
SearchContext newscx;
|
||||
Rect rootArea;
|
||||
|
|
@ -560,9 +560,9 @@ cifHierCellFunc(scx)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierErrorFunc(tile, checkArea)
|
||||
Tile *tile; /* Tile that covers area it shouldn't. */
|
||||
Rect *checkArea; /* Intersection of this and tile is error. */
|
||||
cifHierErrorFunc(
|
||||
Tile *tile, /* Tile that covers area it shouldn't. */
|
||||
Rect *checkArea) /* Intersection of this and tile is error. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -602,9 +602,9 @@ cifHierErrorFunc(tile, checkArea)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierCheckFunc(tile, plane)
|
||||
Tile *tile; /* Tile containing CIF. */
|
||||
Plane *plane; /* Plane to check against and modify. */
|
||||
cifHierCheckFunc(
|
||||
Tile *tile, /* Tile containing CIF. */
|
||||
Plane *plane) /* Plane to check against and modify. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -649,9 +649,9 @@ cifHierCheckFunc(tile, plane)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierTempCheckFunc(tile, plane)
|
||||
Tile *tile; /* Tile containing CIF. */
|
||||
Plane *plane; /* Plane to check against and modify. */
|
||||
cifHierTempCheckFunc(
|
||||
Tile *tile, /* Tile containing CIF. */
|
||||
Plane *plane) /* Plane to check against and modify. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -684,9 +684,9 @@ cifHierTempCheckFunc(tile, plane)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierPaintFunc(tile, plane)
|
||||
Tile *tile;
|
||||
Plane *plane; /* Plane in which to paint CIF over tile's
|
||||
cifHierPaintFunc(
|
||||
Tile *tile,
|
||||
Plane *plane) /* Plane in which to paint CIF over tile's
|
||||
* area.
|
||||
*/
|
||||
{
|
||||
|
|
@ -725,8 +725,8 @@ cifHierPaintFunc(tile, plane)
|
|||
*/
|
||||
|
||||
void
|
||||
cifCheckAndErase(style)
|
||||
CIFStyle *style; /* Describes how to make CIF. */
|
||||
cifCheckAndErase(
|
||||
CIFStyle *style) /* Describes how to make CIF. */
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -766,10 +766,10 @@ cifCheckAndErase(style)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFGenSubcells(def, area, output)
|
||||
CellDef *def; /* Parent cell for which CIF is computed. */
|
||||
Rect *area; /* All CIF in this area is interesting. */
|
||||
Plane **output; /* Array of pointers to planes into which
|
||||
CIFGenSubcells(
|
||||
CellDef *def, /* Parent cell for which CIF is computed. */
|
||||
Rect *area, /* All CIF in this area is interesting. */
|
||||
Plane **output) /* Array of pointers to planes into which
|
||||
* the CIF output will be OR'ed (real CIF
|
||||
* only).
|
||||
*/
|
||||
|
|
@ -934,13 +934,14 @@ CIFGenSubcells(def, area, output)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierElementFuncLow(use, transform, x, y, checkArea)
|
||||
CellUse *use; /* CellUse being array-checked. */
|
||||
Transform *transform; /* Transform from this instance to
|
||||
cifHierElementFuncLow(
|
||||
CellUse *use, /* CellUse being array-checked. */
|
||||
Transform *transform, /* Transform from this instance to
|
||||
* the parent.
|
||||
*/
|
||||
int x, y; /* Indices of this instance. */
|
||||
Rect *checkArea; /* Area (in parent coords) to be
|
||||
int x,
|
||||
int y, /* Indices of this instance. */
|
||||
Rect *checkArea) /* Area (in parent coords) to be
|
||||
* CIF-generated.
|
||||
*/
|
||||
{
|
||||
|
|
@ -957,13 +958,14 @@ cifHierElementFuncLow(use, transform, x, y, checkArea)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierElementFuncHigh(use, transform, x, y, checkArea)
|
||||
CellUse *use; /* CellUse being array-checked. */
|
||||
Transform *transform; /* Transform from this instance to
|
||||
cifHierElementFuncHigh(
|
||||
CellUse *use, /* CellUse being array-checked. */
|
||||
Transform *transform, /* Transform from this instance to
|
||||
* the parent.
|
||||
*/
|
||||
int x, y; /* Indices of this instance. */
|
||||
Rect *checkArea; /* Area (in parent coords) to be
|
||||
int x,
|
||||
int y, /* Indices of this instance. */
|
||||
Rect *checkArea) /* Area (in parent coords) to be
|
||||
* CIF-generated.
|
||||
*/
|
||||
{
|
||||
|
|
@ -998,13 +1000,14 @@ cifHierElementFuncHigh(use, transform, x, y, checkArea)
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
cifHierElementFunc(use, transform, x, y, checkArea)
|
||||
CellUse *use; /* CellUse being array-checked. */
|
||||
Transform *transform; /* Transform from this instance to
|
||||
cifHierElementFunc(
|
||||
CellUse *use, /* CellUse being array-checked. */
|
||||
Transform *transform, /* Transform from this instance to
|
||||
* the parent.
|
||||
*/
|
||||
int x, y; /* Indices of this instance. */
|
||||
Rect *checkArea; /* Area (in parent coords) to be
|
||||
int x,
|
||||
int y, /* Indices of this instance. */
|
||||
Rect *checkArea) /* Area (in parent coords) to be
|
||||
* CIF-generated.
|
||||
*/
|
||||
{
|
||||
|
|
@ -1062,9 +1065,9 @@ cifHierElementFunc(use, transform, x, y, checkArea)
|
|||
*/
|
||||
|
||||
int
|
||||
cifGrowSliver(tile, area)
|
||||
Tile *tile;
|
||||
Rect *area;
|
||||
cifGrowSliver(
|
||||
Tile *tile,
|
||||
Rect *area)
|
||||
{
|
||||
int height, width, expand_up, expand_side;
|
||||
|
||||
|
|
@ -1123,8 +1126,8 @@ cifGrowSliver(tile, area)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierPaintArrayFunc(tile)
|
||||
Tile *tile;
|
||||
cifHierPaintArrayFunc(
|
||||
Tile *tile)
|
||||
{
|
||||
Rect area;
|
||||
int i, j, xbot, xtop;
|
||||
|
|
@ -1194,9 +1197,9 @@ cifHierPaintArrayFunc(tile)
|
|||
*/
|
||||
|
||||
int
|
||||
cifHierArrayFunc(scx, output)
|
||||
SearchContext *scx; /* Information about the search. */
|
||||
Plane **output; /* Array of planes to hold results. */
|
||||
cifHierArrayFunc(
|
||||
SearchContext *scx, /* Information about the search. */
|
||||
Plane **output) /* Array of planes to hold results. */
|
||||
{
|
||||
Rect childArea, parentArea, A, B, C, D, expandedArea;
|
||||
CellUse *use;
|
||||
|
|
@ -1540,10 +1543,10 @@ cifHierArrayFunc(scx, output)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFGenArrays(def, area, output)
|
||||
CellDef *def; /* Parent cell for which CIF is computed. */
|
||||
Rect *area; /* All CIF in this area is interesting. */
|
||||
Plane **output; /* Array of pointers to planes into which
|
||||
CIFGenArrays(
|
||||
CellDef *def, /* Parent cell for which CIF is computed. */
|
||||
Rect *area, /* All CIF in this area is interesting. */
|
||||
Plane **output) /* Array of pointers to planes into which
|
||||
* the CIF output will be OR'ed (real CIF
|
||||
* only, temp layers won't appear). If
|
||||
* output is NULL, then CIF is stored in
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ global int CIFErrorLayer; /* Index of CIF layer associated with errors.*/
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPrintStats()
|
||||
CIFPrintStats(void)
|
||||
{
|
||||
TxPrintf("CIF statistics (recent/total):\n");
|
||||
cifTotalTileOps += CIFTileOps;
|
||||
|
|
@ -136,8 +136,8 @@ CIFPrintStats()
|
|||
*/
|
||||
|
||||
float
|
||||
CIFGetOutputScale(convert)
|
||||
int convert;
|
||||
CIFGetOutputScale(
|
||||
int convert)
|
||||
{
|
||||
if (CIFCurStyle == NULL) return 1.0;
|
||||
|
||||
|
|
@ -159,8 +159,8 @@ CIFGetOutputScale(convert)
|
|||
*/
|
||||
|
||||
float
|
||||
CIFGetScale(convert)
|
||||
int convert;
|
||||
CIFGetScale(
|
||||
int convert)
|
||||
{
|
||||
if (CIFCurStyle == NULL) return 1.0;
|
||||
|
||||
|
|
@ -185,10 +185,10 @@ CIFGetScale(convert)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPrintStyle(dolist, doforall, docurrent)
|
||||
bool dolist; /* Return as a list if true */
|
||||
bool doforall; /* Print all known styles if true */
|
||||
bool docurrent; /* Print current style if true */
|
||||
CIFPrintStyle(
|
||||
bool dolist, /* Return as a list if true */
|
||||
bool doforall, /* Print all known styles if true */
|
||||
bool docurrent) /* Print current style if true */
|
||||
{
|
||||
CIFKeep *style;
|
||||
|
||||
|
|
@ -254,8 +254,8 @@ CIFPrintStyle(dolist, doforall, docurrent)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSetStyle(name)
|
||||
char *name; /* Name of the new style. If NULL, just
|
||||
CIFSetStyle(
|
||||
char *name) /* Name of the new style. If NULL, just
|
||||
* print out the valid styles.
|
||||
*/
|
||||
{
|
||||
|
|
@ -320,10 +320,10 @@ CIFSetStyle(name)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFNameToMask(name, result, depend)
|
||||
char *name;
|
||||
TileTypeBitMask *result;
|
||||
TileTypeBitMask *depend;
|
||||
CIFNameToMask(
|
||||
char *name,
|
||||
TileTypeBitMask *result,
|
||||
TileTypeBitMask *depend)
|
||||
{
|
||||
int i, j;
|
||||
CIFOp *op;
|
||||
|
|
@ -414,11 +414,11 @@ CIFNameToMask(name, result, depend)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFError(area, message)
|
||||
Rect *area; /* Place in CIFErrorDef where there was a
|
||||
CIFError(
|
||||
Rect *area, /* Place in CIFErrorDef where there was a
|
||||
* problem in generating CIFErrorLayer.
|
||||
*/
|
||||
char *message; /* Short note about what went wrong. */
|
||||
char *message) /* Short note about what went wrong. */
|
||||
{
|
||||
char msg[200];
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ CIFError(area, message)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFOutputScaleFactor()
|
||||
CIFOutputScaleFactor(void)
|
||||
{
|
||||
if (CIFCurStyle == NULL) return 1;
|
||||
return CIFCurStyle->cs_scaleFactor;
|
||||
|
|
|
|||
|
|
@ -126,8 +126,8 @@ char *cifSubcellId = NULL;
|
|||
*/
|
||||
|
||||
void
|
||||
CIFReadCellInit(ptrkeys)
|
||||
int ptrkeys;
|
||||
CIFReadCellInit(
|
||||
int ptrkeys)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -162,8 +162,8 @@ CIFReadCellInit(ptrkeys)
|
|||
*/
|
||||
|
||||
bool
|
||||
cifForgetCell(cifNum)
|
||||
int cifNum;
|
||||
cifForgetCell(
|
||||
int cifNum)
|
||||
{
|
||||
HashEntry *h;
|
||||
|
||||
|
|
@ -196,8 +196,8 @@ cifForgetCell(cifNum)
|
|||
*/
|
||||
|
||||
void
|
||||
cifUniqueCell(cifNum)
|
||||
int cifNum;
|
||||
cifUniqueCell(
|
||||
int cifNum)
|
||||
{
|
||||
HashEntry *h;
|
||||
CellDef *def, *testdef;
|
||||
|
|
@ -256,8 +256,8 @@ cifUniqueCell(cifNum)
|
|||
*/
|
||||
|
||||
CellDef *
|
||||
cifFindCell(cifNum)
|
||||
int cifNum; /* The CIF number of the desired cell. */
|
||||
cifFindCell(
|
||||
int cifNum) /* The CIF number of the desired cell. */
|
||||
{
|
||||
HashEntry *h;
|
||||
CellDef *def, *testdef;
|
||||
|
|
@ -299,10 +299,10 @@ cifFindCell(cifNum)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFScalePlanes(scalen, scaled, planearray)
|
||||
int scalen;
|
||||
int scaled;
|
||||
Plane **planearray;
|
||||
CIFScalePlanes(
|
||||
int scalen,
|
||||
int scaled,
|
||||
Plane **planearray)
|
||||
{
|
||||
int pNum;
|
||||
Plane *newplane;
|
||||
|
|
@ -348,8 +348,9 @@ CIFScalePlanes(scalen, scaled, planearray)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFInputRescale(n, d)
|
||||
int n, d;
|
||||
CIFInputRescale(
|
||||
int n,
|
||||
int d)
|
||||
{
|
||||
CIFReadStyle *istyle = cifCurReadStyle;
|
||||
CIFReadLayer *cl;
|
||||
|
|
@ -417,7 +418,7 @@ CIFInputRescale(n, d)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseStart()
|
||||
CIFParseStart(void)
|
||||
{
|
||||
int number;
|
||||
|
||||
|
|
@ -502,9 +503,9 @@ CIFParseStart()
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
int cifCheckPaintFunc(tile, clientData)
|
||||
Tile *tile;
|
||||
ClientData clientData;
|
||||
int cifCheckPaintFunc(
|
||||
Tile *tile,
|
||||
ClientData clientData)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
|
@ -512,9 +513,9 @@ int cifCheckPaintFunc(tile, clientData)
|
|||
/* Callback function for copying paint from one CIF cell into another */
|
||||
|
||||
int
|
||||
cifCopyPaintFunc(tile, cifCopyRec)
|
||||
Tile *tile;
|
||||
CIFCopyRec *cifCopyRec;
|
||||
cifCopyPaintFunc(
|
||||
Tile *tile,
|
||||
CIFCopyRec *cifCopyRec)
|
||||
{
|
||||
int pNum;
|
||||
TileType dinfo;
|
||||
|
|
@ -558,9 +559,9 @@ cifCopyPaintFunc(tile, cifCopyRec)
|
|||
*/
|
||||
|
||||
int
|
||||
cifMaskHintFunc(tile, lrecp)
|
||||
Tile *tile;
|
||||
LinkedRect **lrecp;
|
||||
cifMaskHintFunc(
|
||||
Tile *tile,
|
||||
LinkedRect **lrecp)
|
||||
{
|
||||
Rect r;
|
||||
LinkedRect *newlr;
|
||||
|
|
@ -886,9 +887,9 @@ CIFPaintCurrent(filetype)
|
|||
/* Use CIF layer geometry to define a fixed bounding box for the current cell */
|
||||
|
||||
int
|
||||
cifMakeBoundaryFunc(tile, clientdata)
|
||||
Tile *tile; /* Tile of CIF information. */
|
||||
ClientData clientdata; /* Pass the file type (CIF or CALMA) */
|
||||
cifMakeBoundaryFunc(
|
||||
Tile *tile, /* Tile of CIF information. */
|
||||
ClientData clientdata) /* Pass the file type (CIF or CALMA) */
|
||||
{
|
||||
/* It is assumed that there is one rectangle for the boundary. */
|
||||
/* If there are multiple rectangles defined with the boundary */
|
||||
|
|
@ -965,9 +966,9 @@ cifMakeBoundaryFunc(tile, clientdata)
|
|||
/* Paint CIF layer geometry into the current cell def as magic layer "type" */
|
||||
|
||||
int
|
||||
cifPaintCurrentFunc(tile, type)
|
||||
Tile *tile; /* Tile of CIF information. */
|
||||
TileType type; /* Magic type to be painted. */
|
||||
cifPaintCurrentFunc(
|
||||
Tile *tile, /* Tile of CIF information. */
|
||||
TileType type) /* Magic type to be painted. */
|
||||
{
|
||||
Rect area;
|
||||
int pNum;
|
||||
|
|
@ -1042,7 +1043,7 @@ cifPaintCurrentFunc(tile, type)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseFinish()
|
||||
CIFParseFinish(void)
|
||||
{
|
||||
if (!cifSubcellBeingRead)
|
||||
{
|
||||
|
|
@ -1097,7 +1098,7 @@ CIFParseFinish()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseDelete()
|
||||
CIFParseDelete(void)
|
||||
{
|
||||
int number;
|
||||
|
||||
|
|
@ -1139,7 +1140,7 @@ CIFParseDelete()
|
|||
*/
|
||||
|
||||
char *
|
||||
cifParseName()
|
||||
cifParseName(void)
|
||||
{
|
||||
char ch;
|
||||
char *bufferp;
|
||||
|
|
@ -1181,7 +1182,7 @@ cifParseName()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseUser9()
|
||||
cifParseUser9(void)
|
||||
{
|
||||
char *name;
|
||||
|
||||
|
|
@ -1213,7 +1214,7 @@ cifParseUser9()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseCall()
|
||||
CIFParseCall(void)
|
||||
{
|
||||
int called;
|
||||
Transform transform;
|
||||
|
|
@ -1280,7 +1281,7 @@ CIFParseCall()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseUser91()
|
||||
cifParseUser91(void)
|
||||
{
|
||||
if (cifSubcellId != NULL)
|
||||
{
|
||||
|
|
@ -1311,7 +1312,7 @@ cifParseUser91()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseUser94()
|
||||
cifParseUser94(void)
|
||||
{
|
||||
Rect rectangle;
|
||||
char *name = NULL;
|
||||
|
|
@ -1401,7 +1402,7 @@ cifParseUser94()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseUser95()
|
||||
cifParseUser95(void)
|
||||
{
|
||||
/* Modified by BIM 1/8/2018 */
|
||||
Rect rectangle;
|
||||
|
|
@ -1561,7 +1562,7 @@ cifParseUser95()
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
bool
|
||||
CIFParseUser()
|
||||
CIFParseUser(void)
|
||||
{
|
||||
char ch;
|
||||
|
||||
|
|
|
|||
|
|
@ -119,10 +119,10 @@ cifLowY(a, b)
|
|||
*/
|
||||
|
||||
bool
|
||||
cifOrient(edges, nedges, dir)
|
||||
CIFPath *edges[]; /* Array of edges to be categorized. */
|
||||
int dir[]; /* Array to hold directions. */
|
||||
int nedges; /* Size of arrays. */
|
||||
cifOrient(
|
||||
CIFPath *edges[], /* Array of edges to be categorized. */
|
||||
int nedges, /* Size of arrays. */
|
||||
int dir[]) /* Array to hold directions. */
|
||||
{
|
||||
Point *p, *q;
|
||||
int n;
|
||||
|
|
@ -179,10 +179,11 @@ cifOrient(edges, nedges, dir)
|
|||
*/
|
||||
|
||||
bool
|
||||
cifCross(edge, dir, ybot, ytop)
|
||||
CIFPath *edge; /* Pointer to first of 2 path points in edge */
|
||||
int dir; /* Direction of edge */
|
||||
int ybot, ytop; /* Range of interest */
|
||||
cifCross(
|
||||
CIFPath *edge, /* Pointer to first of 2 path points in edge */
|
||||
int dir, /* Direction of edge */
|
||||
int ybot,
|
||||
int ytop) /* Range of interest */
|
||||
{
|
||||
int ebot, etop;
|
||||
|
||||
|
|
@ -223,12 +224,12 @@ cifCross(edge, dir, ybot, ytop)
|
|||
*/
|
||||
|
||||
LinkedRect *
|
||||
CIFPolyToRects(path, plane, resultTbl, ui, isCalma)
|
||||
CIFPath *path; /* Path describing a polygon. */
|
||||
Plane *plane; /* Plane to draw on */
|
||||
PaintResultType *resultTbl;
|
||||
PaintUndoInfo *ui;
|
||||
bool isCalma; /* TRUE for Calma, FALSE for CIF */
|
||||
CIFPolyToRects(
|
||||
CIFPath *path, /* Path describing a polygon. */
|
||||
Plane *plane, /* Plane to draw on */
|
||||
PaintResultType *resultTbl,
|
||||
PaintUndoInfo *ui,
|
||||
bool isCalma) /* TRUE for Calma, FALSE for CIF */
|
||||
{
|
||||
int npts = 0, n, *dir, curr, wrapno;
|
||||
int xbot, xtop, ybot, ytop;
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseBox()
|
||||
CIFParseBox(void)
|
||||
{
|
||||
Point center;
|
||||
Point direction;
|
||||
|
|
@ -176,7 +176,7 @@ CIFParseBox()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseFlash()
|
||||
CIFParseFlash(void)
|
||||
{
|
||||
int diameter;
|
||||
int savescale;
|
||||
|
|
@ -236,11 +236,11 @@ CIFParseFlash()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPropRecordPath(def, pathheadp, iswire, propname)
|
||||
CellDef *def;
|
||||
CIFPath *pathheadp;
|
||||
bool iswire;
|
||||
char *propname;
|
||||
CIFPropRecordPath(
|
||||
CellDef *def,
|
||||
CIFPath *pathheadp,
|
||||
bool iswire,
|
||||
char *propname)
|
||||
{
|
||||
extern float CIFGetOutputScale(int convert);
|
||||
CIFPath *pathp;
|
||||
|
|
@ -316,13 +316,13 @@ CIFPropRecordPath(def, pathheadp, iswire, propname)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPaintWirePath(pathheadp, width, endcap, plane, ptable, ui)
|
||||
CIFPath *pathheadp;
|
||||
int width;
|
||||
bool endcap;
|
||||
Plane *plane;
|
||||
PaintResultType *ptable;
|
||||
PaintUndoInfo *ui;
|
||||
CIFPaintWirePath(
|
||||
CIFPath *pathheadp,
|
||||
int width,
|
||||
bool endcap,
|
||||
Plane *plane,
|
||||
PaintResultType *ptable,
|
||||
PaintUndoInfo *ui)
|
||||
{
|
||||
CIFPath *pathp, *previousp, *nextp, *polypath;
|
||||
CIFPath *returnpath, *newpath, *savepath;
|
||||
|
|
@ -562,13 +562,13 @@ CIFPaintWirePath(pathheadp, width, endcap, plane, ptable, ui)
|
|||
*/
|
||||
|
||||
LinkedRect *
|
||||
PaintPolygon(pointlist, number, plane, ptable, ui, keep)
|
||||
Point *pointlist; /* Array of Point structures */
|
||||
int number; /* total number of points */
|
||||
Plane *plane; /* Plane structure to paint into */
|
||||
PaintResultType *ptable; /* Paint result table */
|
||||
PaintUndoInfo *ui; /* Undo record */
|
||||
bool keep; /* Return list of rects if true */
|
||||
PaintPolygon(
|
||||
Point *pointlist, /* Array of Point structures */
|
||||
int number, /* total number of points */
|
||||
Plane *plane, /* Plane structure to paint into */
|
||||
PaintResultType *ptable, /* Paint result table */
|
||||
PaintUndoInfo *ui, /* Undo record */
|
||||
bool keep) /* Return list of rects if true */
|
||||
{
|
||||
LinkedRect *rectp, *rectlist;
|
||||
CIFPath *newpath, *cifpath = (CIFPath *)NULL;
|
||||
|
|
@ -617,14 +617,14 @@ PaintPolygon(pointlist, number, plane, ptable, ui, keep)
|
|||
*/
|
||||
|
||||
void
|
||||
PaintWireList(pointlist, number, width, endcap, plane, ptable, ui)
|
||||
Point *pointlist; /* Array of Point structures */
|
||||
int number; /* total number of points */
|
||||
int width; /* Route width of path */
|
||||
bool endcap; /* Whether or not to add 1/2 width endcaps */
|
||||
Plane *plane; /* Plane structure to paint into */
|
||||
PaintResultType *ptable; /* Paint result table */
|
||||
PaintUndoInfo *ui; /* Undo record */
|
||||
PaintWireList(
|
||||
Point *pointlist, /* Array of Point structures */
|
||||
int number, /* total number of points */
|
||||
int width, /* Route width of path */
|
||||
bool endcap, /* Whether or not to add 1/2 width endcaps */
|
||||
Plane *plane, /* Plane structure to paint into */
|
||||
PaintResultType *ptable, /* Paint result table */
|
||||
PaintUndoInfo *ui) /* Undo record */
|
||||
{
|
||||
CIFPath *newpath, *cifpath = (CIFPath *)NULL;
|
||||
int i;
|
||||
|
|
@ -661,7 +661,7 @@ PaintWireList(pointlist, number, width, endcap, plane, ptable, ui)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseWire()
|
||||
CIFParseWire(void)
|
||||
{
|
||||
int width;
|
||||
CIFPath *pathheadp, *polypath;
|
||||
|
|
@ -721,7 +721,7 @@ CIFParseWire()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseLayer()
|
||||
CIFParseLayer(void)
|
||||
{
|
||||
#define MAXCHARS 4
|
||||
char name[MAXCHARS+1];
|
||||
|
|
@ -784,7 +784,7 @@ CIFParseLayer()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParsePoly()
|
||||
CIFParsePoly(void)
|
||||
{
|
||||
CIFPath *pathheadp;
|
||||
LinkedRect *rectp;
|
||||
|
|
|
|||
|
|
@ -90,8 +90,9 @@ void CIFReadLoadStyle(char *stylename);
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFReadTechLimitScale(ns, ds)
|
||||
int ns, ds;
|
||||
CIFReadTechLimitScale(
|
||||
int ns,
|
||||
int ds)
|
||||
{
|
||||
int gridup, scaledown;
|
||||
int scale, limit, mult;
|
||||
|
|
@ -131,9 +132,9 @@ CIFReadTechLimitScale(ns, ds)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFReadNameToType(name, newOK)
|
||||
char *name; /* Name of a CIF layer. */
|
||||
bool newOK; /* TRUE means OK to create a new layer if this
|
||||
CIFReadNameToType(
|
||||
char *name, /* Name of a CIF layer. */
|
||||
bool newOK) /* TRUE means OK to create a new layer if this
|
||||
* name is one we haven't seen before.
|
||||
*/
|
||||
{
|
||||
|
|
@ -196,10 +197,10 @@ CIFReadNameToType(name, newOK)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFCalmaLayerToCifLayer(layer, datatype, calmaStyle)
|
||||
int layer; /* Calma layer number */
|
||||
int datatype; /* Calma datatype */
|
||||
CIFReadStyle *calmaStyle;
|
||||
CIFCalmaLayerToCifLayer(
|
||||
int layer, /* Calma layer number */
|
||||
int datatype, /* Calma datatype */
|
||||
CIFReadStyle *calmaStyle)
|
||||
{
|
||||
CalmaLayerType clt;
|
||||
HashEntry *he;
|
||||
|
|
@ -251,10 +252,10 @@ CIFCalmaLayerToCifLayer(layer, datatype, calmaStyle)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFParseReadLayers(string, mask, newok)
|
||||
char *string; /* Comma-separated list of CIF layers. */
|
||||
TileTypeBitMask *mask; /* Where to store bit mask. */
|
||||
bool newok; /* If TRUE, create new layers if they don't exist */
|
||||
CIFParseReadLayers(
|
||||
char *string, /* Comma-separated list of CIF layers. */
|
||||
TileTypeBitMask *mask, /* Where to store bit mask. */
|
||||
bool newok) /* If TRUE, create new layers if they don't exist */
|
||||
{
|
||||
int i;
|
||||
char *p;
|
||||
|
|
@ -313,7 +314,7 @@ CIFParseReadLayers(string, mask, newok)
|
|||
*/
|
||||
|
||||
void
|
||||
cifNewReadStyle()
|
||||
cifNewReadStyle(void)
|
||||
{
|
||||
int i;
|
||||
CIFOp *op;
|
||||
|
|
@ -353,7 +354,7 @@ cifNewReadStyle()
|
|||
*/
|
||||
|
||||
void
|
||||
cifReadStyleInit()
|
||||
cifReadStyleInit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -395,7 +396,7 @@ cifReadStyleInit()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFReadTechInit()
|
||||
CIFReadTechInit(void)
|
||||
{
|
||||
CIFReadKeep *style;
|
||||
|
||||
|
|
@ -433,7 +434,7 @@ CIFReadTechInit()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFReadTechStyleInit()
|
||||
CIFReadTechStyleInit(void)
|
||||
{
|
||||
cifNReadLayers = 0;
|
||||
cifCurReadLayer = NULL;
|
||||
|
|
@ -460,10 +461,10 @@ CIFReadTechStyleInit()
|
|||
*/
|
||||
/* ARGSUSED */
|
||||
bool
|
||||
CIFReadTechLine(sectionName, argc, argv)
|
||||
char *sectionName; /* Name of this section ("cifinput"). */
|
||||
int argc; /* Number of fields on line. */
|
||||
char *argv[]; /* Values of fields. */
|
||||
CIFReadTechLine(
|
||||
char *sectionName, /* Name of this section ("cifinput"). */
|
||||
int argc, /* Number of fields on line. */
|
||||
char *argv[]) /* Values of fields. */
|
||||
{
|
||||
CIFOp *newOp = NULL;
|
||||
CIFReadKeep *newStyle, *p;
|
||||
|
|
@ -1051,7 +1052,7 @@ CIFReadTechLine(sectionName, argc, argv)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFReadTechFinal()
|
||||
CIFReadTechFinal(void)
|
||||
{
|
||||
/* Reduce the scale by the multiplier, as much as possible while */
|
||||
/* keeping all CIF input ops in integer units. */
|
||||
|
|
@ -1095,8 +1096,8 @@ CIFReadTechFinal()
|
|||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
CIFReadLoadStyle(stylename)
|
||||
char *stylename;
|
||||
CIFReadLoadStyle(
|
||||
char *stylename)
|
||||
{
|
||||
SectionID invcifr;
|
||||
|
||||
|
|
@ -1138,8 +1139,8 @@ CIFReadLoadStyle(stylename)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFReadGetGrowSize(type)
|
||||
TileType type;
|
||||
CIFReadGetGrowSize(
|
||||
TileType type)
|
||||
{
|
||||
CIFReadStyle *istyle = cifCurReadStyle;
|
||||
CIFOp *op;
|
||||
|
|
@ -1193,8 +1194,8 @@ CIFReadGetGrowSize(type)
|
|||
*/
|
||||
|
||||
float
|
||||
CIFGetInputScale(convert)
|
||||
int convert;
|
||||
CIFGetInputScale(
|
||||
int convert)
|
||||
{
|
||||
/* Avoid divide-by-0 error if there is no cif input style */
|
||||
/* in the tech file. */
|
||||
|
|
@ -1226,10 +1227,10 @@ CIFGetInputScale(convert)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPrintReadStyle(dolist, doforall, docurrent)
|
||||
bool dolist; /* Return as a list if true */
|
||||
bool doforall; /* Return list of all styles if true */
|
||||
bool docurrent; /* Return current style if true */
|
||||
CIFPrintReadStyle(
|
||||
bool dolist, /* Return as a list if true */
|
||||
bool doforall, /* Return list of all styles if true */
|
||||
bool docurrent) /* Return current style if true */
|
||||
{
|
||||
CIFReadKeep *style;
|
||||
|
||||
|
|
@ -1297,8 +1298,8 @@ CIFPrintReadStyle(dolist, doforall, docurrent)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSetReadStyle(name)
|
||||
char *name; /* Name of the new style. If NULL,
|
||||
CIFSetReadStyle(
|
||||
char *name) /* Name of the new style. If NULL,
|
||||
* just print the name of the current
|
||||
* style.
|
||||
*/
|
||||
|
|
@ -1358,10 +1359,10 @@ CIFSetReadStyle(name)
|
|||
*/
|
||||
|
||||
int
|
||||
cifParseCalmaNums(str, numArray, numNums)
|
||||
char *str; /* String to parse */
|
||||
int *numArray; /* Array to fill in */
|
||||
int numNums; /* Maximum number of entries in numArray */
|
||||
cifParseCalmaNums(
|
||||
char *str, /* String to parse */
|
||||
int *numArray, /* Array to fill in */
|
||||
int numNums) /* Maximum number of entries in numArray */
|
||||
{
|
||||
int numFilled, num;
|
||||
|
||||
|
|
@ -1421,9 +1422,10 @@ cifParseCalmaNums(str, numArray, numNums)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFTechInputScale(n, d, opt)
|
||||
int n, d;
|
||||
bool opt;
|
||||
CIFTechInputScale(
|
||||
int n,
|
||||
int d,
|
||||
bool opt)
|
||||
{
|
||||
CIFReadStyle *istyle = cifCurReadStyle;
|
||||
CIFReadLayer *cl;
|
||||
|
|
|
|||
105
cif/CIFrdutils.c
105
cif/CIFrdutils.c
|
|
@ -205,9 +205,9 @@ CIFReadWarning(char *format, ...)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFScaleCoord(cifCoord, snap_type)
|
||||
int cifCoord; /* A coordinate in CIF units. */
|
||||
int snap_type; /* How to deal with fractional results */
|
||||
CIFScaleCoord(
|
||||
int cifCoord, /* A coordinate in CIF units. */
|
||||
int snap_type) /* How to deal with fractional results */
|
||||
{
|
||||
int result, scale, remain, denom;
|
||||
int mult, mfactor;
|
||||
|
|
@ -343,8 +343,8 @@ CIFScaleCoord(cifCoord, snap_type)
|
|||
*/
|
||||
|
||||
bool
|
||||
cifIsBlank(ch)
|
||||
int ch;
|
||||
cifIsBlank(
|
||||
int ch)
|
||||
{
|
||||
|
||||
if ( isdigit(ch) || isupper(ch)
|
||||
|
|
@ -376,7 +376,7 @@ cifIsBlank(ch)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSkipBlanks()
|
||||
CIFSkipBlanks(void)
|
||||
{
|
||||
|
||||
while (cifIsBlank(PEEK())) {
|
||||
|
|
@ -405,7 +405,7 @@ CIFSkipBlanks()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSkipSep()
|
||||
CIFSkipSep(void)
|
||||
{
|
||||
int ch;
|
||||
|
||||
|
|
@ -435,7 +435,7 @@ CIFSkipSep()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSkipToSemi()
|
||||
CIFSkipToSemi(void)
|
||||
{
|
||||
int ch;
|
||||
|
||||
|
|
@ -464,7 +464,7 @@ CIFSkipToSemi()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSkipSemi()
|
||||
CIFSkipSemi(void)
|
||||
{
|
||||
|
||||
CIFSkipBlanks();
|
||||
|
|
@ -495,8 +495,8 @@ CIFSkipSemi()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseSInteger(valuep)
|
||||
int *valuep;
|
||||
CIFParseSInteger(
|
||||
int *valuep)
|
||||
{
|
||||
bool is_signed;
|
||||
char buffer[ BUFSIZ ];
|
||||
|
|
@ -540,8 +540,8 @@ CIFParseSInteger(valuep)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseInteger(valuep)
|
||||
int *valuep;
|
||||
CIFParseInteger(
|
||||
int *valuep)
|
||||
{
|
||||
|
||||
if (!CIFParseSInteger(valuep))
|
||||
|
|
@ -581,9 +581,9 @@ CIFParseInteger(valuep)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParsePoint(pointp, iscale)
|
||||
Point *pointp;
|
||||
int iscale;
|
||||
CIFParsePoint(
|
||||
Point *pointp,
|
||||
int iscale)
|
||||
{
|
||||
int rescale;
|
||||
|
||||
|
|
@ -667,9 +667,9 @@ CIFParsePoint(pointp, iscale)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParsePath(pathheadpp, iscale)
|
||||
CIFPath **pathheadpp;
|
||||
int iscale;
|
||||
CIFParsePath(
|
||||
CIFPath **pathheadpp,
|
||||
int iscale)
|
||||
{
|
||||
CIFPath *pathtailp, *newpathp;
|
||||
bool nonManhattan = FALSE; /* diagnostic only */
|
||||
|
|
@ -744,9 +744,9 @@ CIFParsePath(pathheadpp, iscale)
|
|||
*/
|
||||
|
||||
bool
|
||||
test_insideness(start, tpoint)
|
||||
CIFPath *start;
|
||||
Point *tpoint;
|
||||
test_insideness(
|
||||
CIFPath *start,
|
||||
Point *tpoint)
|
||||
{
|
||||
Rect tmprect, irect;
|
||||
|
||||
|
|
@ -782,10 +782,11 @@ test_insideness(start, tpoint)
|
|||
*/
|
||||
|
||||
bool
|
||||
seg_intersect(tstart, bf, bs, respt)
|
||||
CIFPath *tstart;
|
||||
Point *bf, *bs;
|
||||
Point *respt;
|
||||
seg_intersect(
|
||||
CIFPath *tstart,
|
||||
Point *bf,
|
||||
Point *bs,
|
||||
Point *respt)
|
||||
{
|
||||
int afx = tstart->cifp_x;
|
||||
int afy = tstart->cifp_y;
|
||||
|
|
@ -848,9 +849,10 @@ seg_intersect(tstart, bf, bs, respt)
|
|||
*/
|
||||
|
||||
bool
|
||||
path_intersect(pathHead, start, respt)
|
||||
CIFPath *pathHead, *start;
|
||||
Point *respt;
|
||||
path_intersect(
|
||||
CIFPath *pathHead,
|
||||
CIFPath *start,
|
||||
Point *respt)
|
||||
{
|
||||
CIFPath *path, *segcrossed, *new;
|
||||
Point tmppt;
|
||||
|
|
@ -953,8 +955,8 @@ path_intersect(pathHead, start, respt)
|
|||
*/
|
||||
|
||||
bool
|
||||
is_clockwise(pathHead)
|
||||
CIFPath *pathHead;
|
||||
is_clockwise(
|
||||
CIFPath *pathHead)
|
||||
{
|
||||
CIFPath *path, *midx = NULL, *last;
|
||||
Point *p1, *p2, *p3;
|
||||
|
|
@ -1047,11 +1049,11 @@ is_clockwise(pathHead)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFMakeManhattanPath(pathHead, plane, resultTbl, ui)
|
||||
CIFPath *pathHead;
|
||||
Plane *plane;
|
||||
PaintResultType *resultTbl;
|
||||
PaintUndoInfo *ui;
|
||||
CIFMakeManhattanPath(
|
||||
CIFPath *pathHead,
|
||||
Plane *plane,
|
||||
PaintResultType *resultTbl,
|
||||
PaintUndoInfo *ui)
|
||||
{
|
||||
CIFPath *new, *new2, *next, *path;
|
||||
int xinit, xdiff, xincr, xlast, x;
|
||||
|
|
@ -1185,8 +1187,9 @@ CIFMakeManhattanPath(pathHead, plane, resultTbl, ui)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFEdgeDirection(first, last)
|
||||
CIFPath *first, *last; /* Edge to be categorized. */
|
||||
CIFEdgeDirection(
|
||||
CIFPath *first,
|
||||
CIFPath *last) /* Edge to be categorized. */
|
||||
{
|
||||
|
||||
if (first->cifp_x < last->cifp_x)
|
||||
|
|
@ -1233,8 +1236,8 @@ CIFEdgeDirection(first, last)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFCleanPath(pathHead)
|
||||
CIFPath *pathHead;
|
||||
CIFCleanPath(
|
||||
CIFPath *pathHead)
|
||||
{
|
||||
CIFPath *next, *path, *prev, *last;
|
||||
int dir1, dir2;
|
||||
|
|
@ -1332,8 +1335,8 @@ path_inc:
|
|||
*/
|
||||
|
||||
void
|
||||
CIFFreePath(path)
|
||||
CIFPath *path; /* Path to be freed. */
|
||||
CIFFreePath(
|
||||
CIFPath *path) /* Path to be freed. */
|
||||
{
|
||||
while (path != NULL)
|
||||
{
|
||||
|
|
@ -1361,7 +1364,7 @@ CIFFreePath(path)
|
|||
*/
|
||||
|
||||
void
|
||||
cifCommandError()
|
||||
cifCommandError(void)
|
||||
{
|
||||
CIFReadError("unknown command `%c'; ignored.\n" , PEEK());
|
||||
CIFSkipToSemi();
|
||||
|
|
@ -1386,7 +1389,7 @@ cifCommandError()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseEnd()
|
||||
cifParseEnd(void)
|
||||
{
|
||||
TAKE();
|
||||
CIFSkipBlanks();
|
||||
|
|
@ -1415,7 +1418,7 @@ cifParseEnd()
|
|||
*/
|
||||
|
||||
bool
|
||||
cifParseComment()
|
||||
cifParseComment(void)
|
||||
{
|
||||
int opens;
|
||||
int ch;
|
||||
|
|
@ -1467,8 +1470,8 @@ cifParseComment()
|
|||
*/
|
||||
|
||||
Transform *
|
||||
CIFDirectionToTrans(point)
|
||||
Point *point; /* Direction vector from origin. */
|
||||
CIFDirectionToTrans(
|
||||
Point *point) /* Direction vector from origin. */
|
||||
{
|
||||
if ((point->p_x != 0) && (point->p_y == 0))
|
||||
{
|
||||
|
|
@ -1507,8 +1510,8 @@ CIFDirectionToTrans(point)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFParseTransform(transformp)
|
||||
Transform *transformp;
|
||||
CIFParseTransform(
|
||||
Transform *transformp)
|
||||
{
|
||||
char ch;
|
||||
Point point;
|
||||
|
|
@ -1601,8 +1604,8 @@ CIFParseTransform(transformp)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFReadFile(file)
|
||||
FILE *file; /* File from which to read CIF. */
|
||||
CIFReadFile(
|
||||
FILE *file) /* File from which to read CIF. */
|
||||
{
|
||||
/* We will use 1-word CIF numbers as keys in this hash table */
|
||||
CIFReadCellInit(1);
|
||||
|
|
|
|||
60
cif/CIFsee.c
60
cif/CIFsee.c
|
|
@ -76,9 +76,9 @@ typedef struct {
|
|||
*/
|
||||
|
||||
int
|
||||
cifPaintDBFunc(tile, pld)
|
||||
Tile *tile; /* Tile of CIF information. */
|
||||
PaintLayerData *pld;
|
||||
cifPaintDBFunc(
|
||||
Tile *tile, /* Tile of CIF information. */
|
||||
PaintLayerData *pld)
|
||||
{
|
||||
Rect area;
|
||||
int pNum;
|
||||
|
|
@ -132,14 +132,14 @@ cifPaintDBFunc(tile, pld)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFPaintLayer(rootDef, area, cifLayer, magicLayer, paintDef)
|
||||
CellDef *rootDef; /* Cell for which to generate CIF. Must be
|
||||
CIFPaintLayer(
|
||||
CellDef *rootDef, /* Cell for which to generate CIF. Must be
|
||||
* the rootDef of a window.
|
||||
*/
|
||||
Rect *area; /* Area in which to generate CIF. */
|
||||
char *cifLayer; /* CIF layer to highlight on the screen. */
|
||||
int magicLayer; /* Magic layer to paint with the result */
|
||||
CellDef *paintDef; /* CellDef to paint into (may be NULL) */
|
||||
Rect *area, /* Area in which to generate CIF. */
|
||||
char *cifLayer, /* CIF layer to highlight on the screen. */
|
||||
int magicLayer, /* Magic layer to paint with the result */
|
||||
CellDef *paintDef) /* CellDef to paint into (may be NULL) */
|
||||
{
|
||||
int oldCount, i;
|
||||
char msg[100];
|
||||
|
|
@ -217,9 +217,9 @@ CIFPaintLayer(rootDef, area, cifLayer, magicLayer, paintDef)
|
|||
*/
|
||||
|
||||
int
|
||||
cifSeeFunc(tile, sld)
|
||||
Tile *tile; /* Tile to be entered as feedback. */
|
||||
SeeLayerData *sld; /* Layer and explanation for the feedback. */
|
||||
cifSeeFunc(
|
||||
Tile *tile, /* Tile to be entered as feedback. */
|
||||
SeeLayerData *sld) /* Layer and explanation for the feedback. */
|
||||
{
|
||||
Rect area;
|
||||
|
||||
|
|
@ -258,12 +258,12 @@ cifSeeFunc(tile, sld)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSeeLayer(rootDef, area, layer)
|
||||
CellDef *rootDef; /* Cell for which to generate CIF. Must be
|
||||
CIFSeeLayer(
|
||||
CellDef *rootDef, /* Cell for which to generate CIF. Must be
|
||||
* the rootDef of a window.
|
||||
*/
|
||||
Rect *area; /* Area in which to generate CIF. */
|
||||
char *layer; /* CIF layer to highlight on the screen. */
|
||||
Rect *area, /* Area in which to generate CIF. */
|
||||
char *layer) /* CIF layer to highlight on the screen. */
|
||||
{
|
||||
int oldCount, i;
|
||||
char msg[100];
|
||||
|
|
@ -348,14 +348,14 @@ CIFSeeLayer(rootDef, area, layer)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFSeeHierLayer(rootDef, area, layer, arrays, subcells)
|
||||
CellDef *rootDef; /* Def in which to compute CIF. Must be
|
||||
CIFSeeHierLayer(
|
||||
CellDef *rootDef, /* Def in which to compute CIF. Must be
|
||||
* the root definition of a window.
|
||||
*/
|
||||
Rect *area; /* Area in which to generate CIF. */
|
||||
char *layer; /* CIF layer to be highlighted. */
|
||||
bool arrays; /* TRUE means show array interactions. */
|
||||
bool subcells; /* TRUE means show subcell interactions. */
|
||||
Rect *area, /* Area in which to generate CIF. */
|
||||
char *layer, /* CIF layer to be highlighted. */
|
||||
bool arrays, /* TRUE means show array interactions. */
|
||||
bool subcells) /* TRUE means show subcell interactions. */
|
||||
{
|
||||
int i, oldCount;
|
||||
SeeLayerData sld;
|
||||
|
|
@ -426,11 +426,11 @@ typedef struct {
|
|||
} coverstats;
|
||||
|
||||
void
|
||||
CIFCoverageLayer(rootDef, area, layer, dolist)
|
||||
CellDef *rootDef; /* Def in which to compute CIF coverage */
|
||||
Rect *area; /* Area in which to compute coverage */
|
||||
char *layer; /* CIF layer for coverage computation. */
|
||||
bool dolist; /* If TRUE, report only the value, in decimal */
|
||||
CIFCoverageLayer(
|
||||
CellDef *rootDef, /* Def in which to compute CIF coverage */
|
||||
Rect *area, /* Area in which to compute coverage */
|
||||
char *layer, /* CIF layer for coverage computation. */
|
||||
bool dolist) /* If TRUE, report only the value, in decimal */
|
||||
{
|
||||
coverstats cstats;
|
||||
int i, scale;
|
||||
|
|
@ -510,9 +510,9 @@ CIFCoverageLayer(rootDef, area, layer, dolist)
|
|||
}
|
||||
|
||||
int
|
||||
cifCoverageFunc(tile, arg)
|
||||
Tile *tile;
|
||||
ClientData *arg;
|
||||
cifCoverageFunc(
|
||||
Tile *tile,
|
||||
ClientData *arg)
|
||||
{
|
||||
coverstats *cstats = (coverstats *)arg;
|
||||
Rect r;
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ bool cifCheckCalmaNum(char *str);
|
|||
*/
|
||||
|
||||
void
|
||||
cifTechFreeStyle()
|
||||
cifTechFreeStyle(void)
|
||||
{
|
||||
int i;
|
||||
CIFOp *op;
|
||||
|
|
@ -148,7 +148,7 @@ cifTechFreeStyle()
|
|||
*/
|
||||
|
||||
void
|
||||
cifTechNewStyle()
|
||||
cifTechNewStyle(void)
|
||||
{
|
||||
cifTechFreeStyle();
|
||||
cifTechStyleInit();
|
||||
|
|
@ -165,7 +165,7 @@ cifTechNewStyle()
|
|||
*/
|
||||
|
||||
void
|
||||
cifTechStyleInit()
|
||||
cifTechStyleInit(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
|
@ -216,18 +216,18 @@ cifTechStyleInit()
|
|||
*/
|
||||
|
||||
void
|
||||
cifParseLayers(string, style, paintMask, cifMask, spaceOK)
|
||||
char *string; /* List of layers. */
|
||||
CIFStyle *style; /* Gives CIF style for parsing string.*/
|
||||
TileTypeBitMask *paintMask; /* Place to store mask of paint layers. If
|
||||
cifParseLayers(
|
||||
char *string, /* List of layers. */
|
||||
CIFStyle *style, /* Gives CIF style for parsing string.*/
|
||||
TileTypeBitMask *paintMask, /* Place to store mask of paint layers. If
|
||||
* NULL, then only CIF layer names are
|
||||
* considered.
|
||||
*/
|
||||
TileTypeBitMask *cifMask; /* Place to store mask of CIF layers. If
|
||||
TileTypeBitMask *cifMask, /* Place to store mask of CIF layers. If
|
||||
* NULL, then only paint layer names are
|
||||
* considered.
|
||||
*/
|
||||
int spaceOK; /* are space layers permissible in this cif
|
||||
int spaceOK) /* are space layers permissible in this cif
|
||||
layer?
|
||||
*/
|
||||
{
|
||||
|
|
@ -357,7 +357,7 @@ okpaint:
|
|||
*/
|
||||
|
||||
void
|
||||
CIFTechInit()
|
||||
CIFTechInit(void)
|
||||
{
|
||||
CIFKeep *style;
|
||||
|
||||
|
|
@ -393,7 +393,7 @@ CIFTechInit()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFTechStyleInit()
|
||||
CIFTechStyleInit(void)
|
||||
{
|
||||
CalmaTechInit();
|
||||
|
||||
|
|
@ -434,8 +434,9 @@ CIFTechStyleInit()
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFTechLimitScale(ns, ds)
|
||||
int ns, ds;
|
||||
CIFTechLimitScale(
|
||||
int ns,
|
||||
int ds)
|
||||
{
|
||||
int gridup, scaledown;
|
||||
int scale, limit, expand;
|
||||
|
|
@ -474,9 +475,9 @@ CIFTechLimitScale(ns, ds)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFParseScale(true_scale, expander)
|
||||
char *true_scale;
|
||||
int *expander;
|
||||
CIFParseScale(
|
||||
char *true_scale,
|
||||
int *expander)
|
||||
{
|
||||
char *decimal;
|
||||
short places;
|
||||
|
|
@ -525,10 +526,10 @@ CIFParseScale(true_scale, expander)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFTechLine(sectionName, argc, argv)
|
||||
char *sectionName; /* The name of this section. */
|
||||
int argc; /* Number of fields on line. */
|
||||
char *argv[]; /* Values of fields. */
|
||||
CIFTechLine(
|
||||
char *sectionName, /* The name of this section. */
|
||||
int argc, /* Number of fields on line. */
|
||||
char *argv[]) /* Values of fields. */
|
||||
{
|
||||
TileTypeBitMask mask, tempMask, cifMask, bloatLayers;
|
||||
int i, j, l, distance;
|
||||
|
|
@ -1540,8 +1541,8 @@ bloatCheck:
|
|||
*/
|
||||
|
||||
bool
|
||||
cifCheckCalmaNum(str)
|
||||
char *str;
|
||||
cifCheckCalmaNum(
|
||||
char *str)
|
||||
{
|
||||
int n = atoi(str);
|
||||
|
||||
|
|
@ -1577,9 +1578,9 @@ cifCheckCalmaNum(str)
|
|||
*/
|
||||
|
||||
void
|
||||
cifComputeRadii(layer, des)
|
||||
CIFLayer *layer; /* Layer for which to compute distances. */
|
||||
CIFStyle *des; /* CIF style (used to find temp layer
|
||||
cifComputeRadii(
|
||||
CIFLayer *layer, /* Layer for which to compute distances. */
|
||||
CIFStyle *des) /* CIF style (used to find temp layer
|
||||
* distances.
|
||||
*/
|
||||
{
|
||||
|
|
@ -1685,8 +1686,8 @@ cifComputeRadii(layer, des)
|
|||
*/
|
||||
|
||||
void
|
||||
cifComputeHalo(style)
|
||||
CIFStyle *style;
|
||||
cifComputeHalo(
|
||||
CIFStyle *style)
|
||||
{
|
||||
int maxGrow, maxShrink, i;
|
||||
|
||||
|
|
@ -1755,7 +1756,7 @@ cifComputeHalo(style)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFTechFinal()
|
||||
CIFTechFinal(void)
|
||||
{
|
||||
CIFStyle *style = CIFCurStyle;
|
||||
CIFOp *op;
|
||||
|
|
@ -2139,8 +2140,8 @@ CIFTechFinal()
|
|||
*/
|
||||
|
||||
void
|
||||
CIFLoadStyle(stylename)
|
||||
char *stylename;
|
||||
CIFLoadStyle(
|
||||
char *stylename)
|
||||
{
|
||||
SectionID invcif;
|
||||
|
||||
|
|
@ -2188,11 +2189,11 @@ CIFLoadStyle(stylename)
|
|||
*/
|
||||
|
||||
int
|
||||
CIFGetContactSize(type, edge, spacing, border)
|
||||
TileType type;
|
||||
int *edge;
|
||||
int *border;
|
||||
int *spacing;
|
||||
CIFGetContactSize(
|
||||
TileType type,
|
||||
int *edge,
|
||||
int *spacing,
|
||||
int *border)
|
||||
{
|
||||
CIFStyle *style = CIFCurStyle;
|
||||
CIFOp *op, *sop;
|
||||
|
|
@ -2285,8 +2286,9 @@ CIFGetContactSize(type, edge, spacing, border)
|
|||
*/
|
||||
|
||||
void
|
||||
CIFTechOutputScale(n, d)
|
||||
int n, d;
|
||||
CIFTechOutputScale(
|
||||
int n,
|
||||
int d)
|
||||
{
|
||||
int i, j, lgcf, lexpand;
|
||||
CIFStyle *ostyle = CIFCurStyle;
|
||||
|
|
|
|||
|
|
@ -118,9 +118,9 @@ bool CIFArrayWriteDisable = FALSE;
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFWrite(rootDef, f)
|
||||
CellDef *rootDef; /* Pointer to CellDef to be written */
|
||||
FILE *f; /* Open output file */
|
||||
CIFWrite(
|
||||
CellDef *rootDef, /* Pointer to CellDef to be written */
|
||||
FILE *f) /* Open output file */
|
||||
{
|
||||
bool good;
|
||||
int oldCount = DBWFeedbackCount;
|
||||
|
|
@ -205,8 +205,8 @@ CIFWrite(rootDef, f)
|
|||
*/
|
||||
|
||||
int
|
||||
cifWriteInitFunc(def)
|
||||
CellDef *def;
|
||||
cifWriteInitFunc(
|
||||
CellDef *def)
|
||||
{
|
||||
def->cd_client = (ClientData) 0;
|
||||
return (0);
|
||||
|
|
@ -229,8 +229,8 @@ cifWriteInitFunc(def)
|
|||
*/
|
||||
|
||||
int
|
||||
cifWriteMarkFunc(use)
|
||||
CellUse *use;
|
||||
cifWriteMarkFunc(
|
||||
CellUse *use)
|
||||
{
|
||||
if (use->cu_def->cd_client != (ClientData) 0) return 0;
|
||||
use->cu_def->cd_client = (ClientData) cifCellNum;
|
||||
|
|
@ -255,9 +255,9 @@ cifWriteMarkFunc(use)
|
|||
*/
|
||||
|
||||
void
|
||||
cifOutPreamble(outf, cell)
|
||||
FILE *outf;
|
||||
CellDef *cell;
|
||||
cifOutPreamble(
|
||||
FILE *outf,
|
||||
CellDef *cell)
|
||||
{
|
||||
extern char *MagicVersion;
|
||||
extern char *MagicCompileTime;
|
||||
|
|
@ -304,8 +304,8 @@ cifOutPreamble(outf, cell)
|
|||
*/
|
||||
|
||||
void
|
||||
cifOut(outf)
|
||||
FILE *outf;
|
||||
cifOut(
|
||||
FILE *outf)
|
||||
{
|
||||
CellDef *def;
|
||||
bool needHier;
|
||||
|
|
@ -353,9 +353,9 @@ cifOut(outf)
|
|||
*/
|
||||
|
||||
void
|
||||
cifOutFunc(def, f)
|
||||
CellDef *def; /* Pointer to cell def to be written */
|
||||
FILE *f; /* Open output file */
|
||||
cifOutFunc(
|
||||
CellDef *def, /* Pointer to cell def to be written */
|
||||
FILE *f) /* Open output file */
|
||||
{
|
||||
Rect bigArea;
|
||||
Label *lab;
|
||||
|
|
@ -484,9 +484,9 @@ cifOutFunc(def, f)
|
|||
*/
|
||||
|
||||
int
|
||||
cifWriteUseFunc(use, f)
|
||||
CellUse *use;
|
||||
FILE *f;
|
||||
cifWriteUseFunc(
|
||||
CellUse *use,
|
||||
FILE *f)
|
||||
{
|
||||
int x, y, topx, topy;
|
||||
int realx, realy;
|
||||
|
|
@ -582,9 +582,9 @@ cifWriteUseFunc(use, f)
|
|||
*/
|
||||
|
||||
int
|
||||
cifWriteLabelFunc(tile, f)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
FILE *f; /* File in which to write. */
|
||||
cifWriteLabelFunc(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
FILE *f) /* File in which to write. */
|
||||
{
|
||||
Rect r;
|
||||
int type;
|
||||
|
|
@ -641,9 +641,9 @@ cifWriteLabelFunc(tile, f)
|
|||
*/
|
||||
|
||||
int
|
||||
cifWritePaintFunc(tile, f)
|
||||
Tile *tile; /* Tile to be written out. */
|
||||
FILE *f; /* File in which to write. */
|
||||
cifWritePaintFunc(
|
||||
Tile *tile, /* Tile to be written out. */
|
||||
FILE *f) /* File in which to write. */
|
||||
{
|
||||
Rect r;
|
||||
|
||||
|
|
@ -722,9 +722,9 @@ cifWritePaintFunc(tile, f)
|
|||
*/
|
||||
|
||||
bool
|
||||
CIFWriteFlat(rootDef, f)
|
||||
CellDef *rootDef; /* Pointer to CellDef to be written */
|
||||
FILE *f; /* Open output file */
|
||||
CIFWriteFlat(
|
||||
CellDef *rootDef, /* Pointer to CellDef to be written */
|
||||
FILE *f) /* Open output file */
|
||||
{
|
||||
bool good;
|
||||
int oldCount = DBWFeedbackCount;
|
||||
|
|
|
|||
Loading…
Reference in New Issue