This commit is contained in:
Gonsolo 2026-06-11 16:52:26 +02:00 committed by GitHub
commit 4596ec6180
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
265 changed files with 8029 additions and 7639 deletions

View File

@ -1138,7 +1138,7 @@ CmdCellname(
int option;
int locargc = cmd->tx_argc;
char *cellname = NULL, *orient = NULL;
void (*func)();
void (*func)(char *, int, bool);
CellDef *newDef, *cellDef;
static const char * const cmdCellOption[] =

View File

@ -57,7 +57,8 @@ struct searchArg
int dbCellDebug = 0;
void
dbInstanceUnplace(CellUse *use)
dbInstanceUnplace(
CellUse *use)
{
ASSERT(use != (CellUse *) NULL, "dbInstanceUnplace");
@ -93,11 +94,11 @@ dbInstanceUnplace(CellUse *use)
*/
CellUse *
DBCellFindDup(use, parent)
CellUse *use; /* Use that is about to be placed in parent.
DBCellFindDup(
CellUse *use, /* Use that is about to be placed in parent.
* Is it a duplicate?
*/
CellDef *parent; /* Parent definiton: does it already have
CellDef *parent) /* Parent definiton: does it already have
* something identical to use?
*/
{
@ -185,9 +186,9 @@ DBCellFindDup(use, parent)
*/
void
DBPlaceCell (use, def)
CellUse * use; /* new celluse to add to subcell tile plane */
CellDef * def; /* parent cell's definition */
DBPlaceCell(
CellUse * use, /* new celluse to add to subcell tile plane */
CellDef * def) /* parent cell's definition */
{
Rect rect; /* argument to DBSrCellPlaneArea(), placeCellFunc() */
BPlane *bplane; /* argument to DBSrCellPlaneArea(), placeCellFunc() */
@ -219,9 +220,9 @@ DBPlaceCell (use, def)
/* this does not mean that anything in the parent cell has changed. */
void
DBPlaceCellNoModify (use, def)
CellUse * use; /* new celluse to add to subcell tile plane */
CellDef * def; /* parent cell's definition */
DBPlaceCellNoModify(
CellUse * use, /* new celluse to add to subcell tile plane */
CellDef * def) /* parent cell's definition */
{
Rect rect; /* argument to DBSrCellPlaneArea(), placeCellFunc() */
BPlane *bplane; /* argument to DBSrCellPlaneArea(), placeCellFunc() */
@ -264,8 +265,8 @@ DBPlaceCellNoModify (use, def)
*/
void
DBDeleteCell (use)
CellUse * use;
DBDeleteCell(
CellUse * use)
{
ASSERT(use != (CellUse *) NULL, "DBDeleteCell");
@ -302,8 +303,8 @@ DBDeleteCell (use)
*/
void
DBDeleteCellNoModify (use)
CellUse * use;
DBDeleteCellNoModify(
CellUse * use)
{
ASSERT(use != (CellUse *) NULL, "DBDeleteCell");

View File

@ -126,8 +126,8 @@ DBPrintUseId(
*/
void
DBCellSetAvail(cellDef)
CellDef *cellDef; /* Pointer to definition of cell we wish to
DBCellSetAvail(
CellDef *cellDef) /* Pointer to definition of cell we wish to
* mark as available.
*/
{
@ -136,8 +136,8 @@ DBCellSetAvail(cellDef)
}
void
DBCellClearAvail(cellDef)
CellDef *cellDef; /* Pointer to definition of cell we wish to
DBCellClearAvail(
CellDef *cellDef) /* Pointer to definition of cell we wish to
* mark as available.
*/
{
@ -168,16 +168,16 @@ DBCellClearAvail(cellDef)
*/
bool
DBCellGetModified(cellDef)
CellDef *cellDef; /* Pointer to definition of cell */
DBCellGetModified(
CellDef *cellDef) /* Pointer to definition of cell */
{
return ((cellDef->cd_flags & CDMODIFIED) != 0);
}
void
DBCellSetModified(cellDef, ismod)
CellDef *cellDef;
bool ismod; /* If TRUE, mark the cell as modified; if FALSE,
DBCellSetModified(
CellDef *cellDef,
bool ismod) /* If TRUE, mark the cell as modified; if FALSE,
* mark it as unmodified.
*/
{
@ -205,8 +205,8 @@ DBCellSetModified(cellDef, ismod)
*/
void
DBComputeUseBbox(use)
CellUse *use;
DBComputeUseBbox(
CellUse *use)
{
Rect *box, *extended;
Rect childRect, childExtend;
@ -271,8 +271,9 @@ DBComputeUseBbox(use)
*/
bool
DBIsChild(cu1, cu2)
CellUse *cu1, *cu2;
DBIsChild(
CellUse *cu1,
CellUse *cu2)
{
return (cu1->cu_parent == cu2->cu_def);
}
@ -294,9 +295,9 @@ DBIsChild(cu1, cu2)
*/
void
DBSetArray(fromCellUse, toCellUse)
CellUse *fromCellUse;
CellUse *toCellUse;
DBSetArray(
CellUse *fromCellUse,
CellUse *toCellUse)
{
toCellUse->cu_xlo = fromCellUse->cu_xlo;
toCellUse->cu_ylo = fromCellUse->cu_ylo;
@ -323,9 +324,9 @@ DBSetArray(fromCellUse, toCellUse)
*/
void
DBSetTrans(cellUse, trans)
CellUse *cellUse;
Transform *trans;
DBSetTrans(
CellUse *cellUse,
Transform *trans)
{
cellUse->cu_transform = *trans;
DBComputeUseBbox(cellUse);
@ -357,12 +358,15 @@ DBSetTrans(cellUse, trans)
*/
void
DBMakeArray(cellUse, rootToCell, xlo, ylo, xhi, yhi, xsep, ysep)
CellUse *cellUse;
Transform *rootToCell;
int xlo, ylo;
int xhi, yhi;
int xsep, ysep;
DBMakeArray(
CellUse *cellUse,
Transform *rootToCell,
int xlo,
int ylo,
int xhi,
int yhi,
int xsep,
int ysep)
{
int t;
@ -417,11 +421,13 @@ DBMakeArray(cellUse, rootToCell, xlo, ylo, xhi, yhi, xsep, ysep)
*/
void
DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi)
CellUse *cu; /* Pointer to cell use which may be an array */
Rect *parentRect; /* Clipping rectangle cu->cu_parent coords */
int *pxlo, *pxhi;
int *pylo, *pyhi;
DBArrayOverlap(
CellUse *cu, /* Pointer to cell use which may be an array */
Rect *parentRect, /* Clipping rectangle cu->cu_parent coords */
int *pxlo,
int *pxhi,
int *pylo,
int *pyhi)
{
int outxlo, outxhi, outylo, outyhi, t;
int xlo, ylo, xhi, yhi, xsep, ysep;
@ -584,8 +590,8 @@ DBArrayOverlap(cu, parentRect, pxlo, pxhi, pylo, pyhi)
void dbReComputeBboxFunc();
void
DBReComputeBbox(cellDef)
CellDef *cellDef; /* Cell def whose bounding box may have changed */
DBReComputeBbox(
CellDef *cellDef) /* Cell def whose bounding box may have changed */
{
extern bool DBBoundPlane();
@ -593,8 +599,8 @@ DBReComputeBbox(cellDef)
}
void
DBReComputeBboxVert(cellDef)
CellDef *cellDef; /* Cell def whose bounding box may have changed */
DBReComputeBboxVert(
CellDef *cellDef) /* Cell def whose bounding box may have changed */
{
extern bool DBBoundPlaneVert();
@ -602,10 +608,10 @@ DBReComputeBboxVert(cellDef)
}
void
dbReComputeBboxFunc(cellDef, boundProc, recurseProc)
CellDef *cellDef; /* Cell def whose bounding box may have changed */
bool (*boundProc)();
void (*recurseProc)();
dbReComputeBboxFunc(
CellDef *cellDef, /* Cell def whose bounding box may have changed */
bool (*boundProc)(),
void (*recurseProc)())
{
bool degenerate;
Rect rect, area, extended, *box;
@ -797,11 +803,12 @@ dbReComputeBboxFunc(cellDef, boundProc, recurseProc)
*/
void
DBComputeArrayArea(area, cellUse, x, y, prect)
Rect *area; /* Area to be transformed. */
CellUse *cellUse; /* Cell use whose bounding box is to be computed */
int x, y; /* Indexes of array element whose box is being found */
Rect *prect; /* Pointer to rectangle to be set to bounding
DBComputeArrayArea(
Rect *area, /* Area to be transformed. */
CellUse *cellUse, /* Cell use whose bounding box is to be computed */
int x,
int y,
Rect *prect) /* Pointer to rectangle to be set to bounding
* box of the given array element, in coordinates
* of the def of cellUse.
*/
@ -848,12 +855,10 @@ DBComputeArrayArea(area, cellUse, x, y, prect)
*/
Transform *
DBGetArrayTransform(use, x, y)
CellUse *use;
int x, y; /* Array indices of the desired element.
* These must fall within the range of
* use's array indices.
*/
DBGetArrayTransform(
CellUse *use,
int x,
int y)
{
static Transform result;
int xsep, ysep, xbase, ybase;

View File

@ -107,12 +107,12 @@ struct copyLabelArg
*/
int
DBPaintPlaneWrapper(def, pNum, type, area, undo)
CellDef *def;
int pNum;
TileType type;
Rect *area;
PaintUndoInfo *undo;
DBPaintPlaneWrapper(
CellDef *def,
int pNum,
TileType type,
Rect *area,
PaintUndoInfo *undo)
{
TileType loctype = type & TT_LEFTMASK;
Rect expand;
@ -139,12 +139,12 @@ DBPaintPlaneWrapper(def, pNum, type, area, undo)
*/
int
DBPaintPlaneMark(def, pNum, type, area, undo)
CellDef *def;
int pNum;
TileType type;
Rect *area;
PaintUndoInfo *undo;
DBPaintPlaneMark(
CellDef *def,
int pNum,
TileType type,
Rect *area,
PaintUndoInfo *undo)
{
TileType loctype = type & TT_LEFTMASK;
@ -160,12 +160,12 @@ DBPaintPlaneMark(def, pNum, type, area, undo)
*/
int
DBPaintPlaneXor(def, pNum, type, area, undo)
CellDef *def;
int pNum;
TileType type;
Rect *area;
PaintUndoInfo *undo;
DBPaintPlaneXor(
CellDef *def,
int pNum,
TileType type,
Rect *area,
PaintUndoInfo *undo)
{
TileType loctype = type & TT_LEFTMASK;
@ -188,12 +188,12 @@ DBPaintPlaneXor(def, pNum, type, area, undo)
*/
int
DBPaintPlaneActive(def, pNum, type, area, undo)
CellDef *def;
int pNum;
TileType type;
Rect *area;
PaintUndoInfo *undo;
DBPaintPlaneActive(
CellDef *def,
int pNum,
TileType type,
Rect *area,
PaintUndoInfo *undo)
{
TileType loctype = type & TT_LEFTMASK;
TileType t;
@ -241,14 +241,14 @@ DBPaintPlaneActive(def, pNum, type, area, undo)
*/
void
DBCellCopyManhattanPaint(scx, mask, xMask, targetUse)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyManhattanPaint(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Types of tiles to be yanked/stuffed */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which material is to be stuffed */
TileTypeBitMask *mask, /* Types of tiles to be yanked/stuffed */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse) /* Cell into which material is to be stuffed */
{
struct copyAllArg arg;
int dbCopyManhattanPaint();
@ -281,14 +281,14 @@ DBCellCopyManhattanPaint(scx, mask, xMask, targetUse)
*/
void
DBCellCopyAllPaint(scx, mask, xMask, targetUse)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyAllPaint(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Types of tiles to be yanked/stuffed */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which material is to be stuffed */
TileTypeBitMask *mask, /* Types of tiles to be yanked/stuffed */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse) /* Cell into which material is to be stuffed */
{
TileTypeBitMask locMask;
struct copyAllArg arg;
@ -325,15 +325,15 @@ DBCellCopyAllPaint(scx, mask, xMask, targetUse)
*/
void
DBCellCheckCopyAllPaint(scx, mask, xMask, targetUse, func)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCheckCopyAllPaint(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Types of tiles to be yanked/stuffed */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which material is to be stuffed */
void (*func)(); /* Function to call on tile split error */
TileTypeBitMask *mask, /* Types of tiles to be yanked/stuffed */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse, /* Cell into which material is to be stuffed */
void (*func)()) /* Function to call on tile split error */
{
TileTypeBitMask locMask;
struct copyAllArg arg;
@ -413,10 +413,10 @@ dbCopyMaskHintPlaneFunc(Tile *tile,
*/
int
dbCopyMaskHintsFunc(key, proprec, puds)
char *key;
PropertyRecord *proprec;
struct propUseDefStruct *puds;
dbCopyMaskHintsFunc(
char *key,
PropertyRecord *proprec,
struct propUseDefStruct *puds)
{
CellDef *dest = puds->puds_dest;
Transform *trans = puds->puds_trans;
@ -480,10 +480,10 @@ dbCopyMaskHintsFunc(key, proprec, puds)
*-----------------------------------------------------------------------------
*/
void
DBCellCopyMaskHints(child, parent, transform)
CellUse *child;
CellDef *parent;
Transform *transform;
DBCellCopyMaskHints(
CellUse *child,
CellDef *parent,
Transform *transform)
{
struct propUseDefStruct puds;
@ -514,9 +514,9 @@ DBCellCopyMaskHints(child, parent, transform)
*-----------------------------------------------------------------------------
*/
int
dbFlatCopyMaskHintsFunc(scx, def)
SearchContext *scx;
CellDef *def;
dbFlatCopyMaskHintsFunc(
SearchContext *scx,
CellDef *def)
{
struct propUseDefStruct puds;
CellUse *use = scx->scx_use;
@ -548,13 +548,13 @@ dbFlatCopyMaskHintsFunc(scx, def)
*-----------------------------------------------------------------------------
*/
void
DBFlatCopyMaskHints(scx, xMask, targetUse)
SearchContext *scx; /* Describes root cell to search, area to
DBFlatCopyMaskHints(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which properties will be added */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse) /* Cell into which properties will be added */
{
DBTreeSrCells(scx, xMask, dbFlatCopyMaskHintsFunc, (ClientData)targetUse->cu_def);
}
@ -577,13 +577,13 @@ DBFlatCopyMaskHints(scx, xMask, targetUse)
*/
void
DBFlattenInPlace(use, dest, xMask, dolabels, toplabels, doclear)
CellUse *use; /* Cell use to flatten */
CellUse *dest; /* Cell use to flatten into */
int xMask; /* Search mask for flattening */
bool dolabels; /* Option to flatten labels */
bool toplabels; /* Option to selectively flatten top-level labels */
bool doclear; /* Delete the original use if TRUE */
DBFlattenInPlace(
CellUse *use, /* Cell use to flatten */
CellUse *dest, /* Cell use to flatten into */
int xMask, /* Search mask for flattening */
bool dolabels, /* Option to flatten labels */
bool toplabels, /* Option to selectively flatten top-level labels */
bool doclear) /* Delete the original use if TRUE */
{
Label *lab;
SearchContext scx;
@ -737,12 +737,12 @@ struct dbFlattenAllData {
*/
int
dbCellFlattenCellsFunc(scx, clientData)
SearchContext *scx; /* Pointer to search context containing
dbCellFlattenCellsFunc(
SearchContext *scx, /* Pointer to search context containing
* ptr to cell use to be copied,
* and transform to the target def.
*/
ClientData clientData; /* Data passed to client function */
ClientData clientData) /* Data passed to client function */
{
CellUse *use, *dest;
int xMask;
@ -778,17 +778,17 @@ dbCellFlattenCellsFunc(scx, clientData)
*/
void
DBCellFlattenAllCells(scx, dest, xMask, dolabels, toplabels)
SearchContext *scx; /* Describes root cell to search and transform
DBCellFlattenAllCells(
SearchContext *scx, /* Describes root cell to search and transform
* from root cell to coords of targetUse.
*/
CellUse *dest; /* CellUse to flatten into (usually EditCellUse) */
int xMask; /* Expansion state mask to be passed to
CellUse *dest, /* CellUse to flatten into (usually EditCellUse) */
int xMask, /* Expansion state mask to be passed to
* the flattening routine that determines
* whether to do a shallow or deep flattening.
*/
bool dolabels; /* Option to flatten labels */
bool toplabels; /* Option to selectively flatten top-level labels */
bool dolabels, /* Option to flatten labels */
bool toplabels) /* Option to selectively flatten top-level labels */
{
int dbCellFlattenCellsFunc();
struct dbFlattenAllData fad;
@ -839,12 +839,12 @@ struct dbCopySubData {
*/
Plane *
DBCellGenerateSubstrate(scx, subType, notSubMask, subShieldMask, targetDef)
SearchContext *scx;
TileType subType; /* Substrate paint type */
TileTypeBitMask *notSubMask; /* Mask of types that are not substrate */
TileTypeBitMask *subShieldMask; /* Mask of types that shield substrate */
CellDef *targetDef;
DBCellGenerateSubstrate(
SearchContext *scx,
TileType subType, /* Substrate paint type */
TileTypeBitMask *notSubMask, /* Mask of types that are not substrate */
TileTypeBitMask *subShieldMask, /* Mask of types that shield substrate */
CellDef *targetDef)
{
struct dbCopySubData csd;
Plane *tempPlane;
@ -930,11 +930,11 @@ DBCellGenerateSubstrate(scx, subType, notSubMask, subShieldMask, targetDef)
*/
Plane *
DBCellGenerateSimpleSubstrate(scx, subType, notSubMask, targetDef)
SearchContext *scx;
TileType subType; /* Substrate paint type */
TileTypeBitMask *notSubMask; /* Mask of types that are not substrate */
CellDef *targetDef;
DBCellGenerateSimpleSubstrate(
SearchContext *scx,
TileType subType, /* Substrate paint type */
TileTypeBitMask *notSubMask, /* Mask of types that are not substrate */
CellDef *targetDef)
{
struct dbCopySubData csd;
Plane *tempPlane;
@ -991,10 +991,10 @@ DBCellGenerateSimpleSubstrate(scx, subType, notSubMask, targetDef)
*/
int
dbEraseSubFunc(tile, dinfo, cxp)
Tile *tile; /* Pointer to source tile with shield type */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* Context from DBTreeSrTiles */
dbEraseSubFunc(
Tile *tile, /* Pointer to source tile with shield type */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* Context from DBTreeSrTiles */
{
SearchContext *scx;
Rect sourceRect, targetRect;
@ -1037,10 +1037,10 @@ dbEraseSubFunc(tile, dinfo, cxp)
*/
int
dbPaintSubFunc(tile, dinfo, cxp)
Tile *tile; /* Pointer to source tile with shield type */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* Context from DBTreeSrTiles */
dbPaintSubFunc(
Tile *tile, /* Pointer to source tile with shield type */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* Context from DBTreeSrTiles */
{
SearchContext *scx;
Rect sourceRect, targetRect;
@ -1084,10 +1084,10 @@ dbPaintSubFunc(tile, dinfo, cxp)
*/
int
dbEraseNonSub(tile, dinfo, cxp)
Tile *tile; /* Pointer to tile to erase from target */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* Context from DBTreeSrTiles */
dbEraseNonSub(
Tile *tile, /* Pointer to tile to erase from target */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* Context from DBTreeSrTiles */
{
SearchContext *scx;
Rect sourceRect, targetRect;
@ -1131,10 +1131,10 @@ dbEraseNonSub(tile, dinfo, cxp)
*/
int
dbCopySubFunc(tile, dinfo, csd)
Tile *tile; /* Pointer to tile to erase from target */
TileType dinfo; /* Split tile information */
struct dbCopySubData *csd; /* Client data */
dbCopySubFunc(
Tile *tile, /* Pointer to tile to erase from target */
TileType dinfo, /* Split tile information */
struct dbCopySubData *csd) /* Client data */
{
Rect rect;
int pNum;
@ -1181,15 +1181,15 @@ dbCopySubFunc(tile, dinfo, csd)
*/
void
DBCellCopyAllLabels(scx, mask, xMask, targetUse, pArea)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyAllLabels(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Only labels of these types are copied */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which labels are to be stuffed */
Rect *pArea; /* If non-NULL, points to a box that will be
TileTypeBitMask *mask, /* Only labels of these types are copied */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse, /* Cell into which labels are to be stuffed */
Rect *pArea) /* If non-NULL, points to a box that will be
* filled in with bbox (in targetUse coords)
* of all labels copied. Will be degenerate
* if nothing was copied.
@ -1217,11 +1217,11 @@ DBCellCopyAllLabels(scx, mask, xMask, targetUse, pArea)
/*ARGSUSED*/
int
dbCopyAllLabels(scx, lab, tpath, arg)
SearchContext *scx;
Label *lab;
TerminalPath *tpath;
struct copyLabelArg *arg;
dbCopyAllLabels(
SearchContext *scx,
Label *lab,
TerminalPath *tpath,
struct copyLabelArg *arg)
{
Rect labTargetRect;
Point labOffset;
@ -1284,20 +1284,20 @@ dbCopyAllLabels(scx, lab, tpath, arg)
*/
void
DBCellCopyGlobLabels(scx, mask, xMask, targetUse, pArea, globmatch)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyGlobLabels(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Only labels of these types are copied */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which labels are to be stuffed */
Rect *pArea; /* If non-NULL, points to a box that will be
TileTypeBitMask *mask, /* Only labels of these types are copied */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse, /* Cell into which labels are to be stuffed */
Rect *pArea, /* If non-NULL, points to a box that will be
* filled in with bbox (in targetUse coords)
* of all labels copied. Will be degenerate
* if nothing was copied.
*/
char *globmatch; /* If non-NULL, only labels matching this
char *globmatch) /* If non-NULL, only labels matching this
* string by glob-style matching are copied.
*/
{
@ -1340,14 +1340,14 @@ DBCellCopyGlobLabels(scx, mask, xMask, targetUse, pArea, globmatch)
*/
void
DBCellCopyPaint(scx, mask, xMask, targetUse)
SearchContext *scx; /* Describes cell to search, area to
DBCellCopyPaint(
SearchContext *scx, /* Describes cell to search, area to
* copy, transform from cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Types of tiles to be yanked/stuffed */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which material is to be stuffed */
TileTypeBitMask *mask, /* Types of tiles to be yanked/stuffed */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse) /* Cell into which material is to be stuffed */
{
int pNum;
PlaneMask planeMask;
@ -1404,15 +1404,15 @@ DBCellCopyPaint(scx, mask, xMask, targetUse)
*/
void
DBCellCopyLabels(scx, mask, xMask, targetUse, pArea)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyLabels(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
TileTypeBitMask *mask; /* Only labels of these types are copied */
int xMask; /* Expansion state mask to be used in search */
CellUse *targetUse; /* Cell into which labels are to be stuffed */
Rect *pArea; /* If non-NULL, points to rectangle to be
TileTypeBitMask *mask, /* Only labels of these types are copied */
int xMask, /* Expansion state mask to be used in search */
CellUse *targetUse, /* Cell into which labels are to be stuffed */
Rect *pArea) /* If non-NULL, points to rectangle to be
* filled in with bbox (in targetUse coords)
* of all labels copied. Will be degenerate
* if no labels are copied.
@ -1467,10 +1467,10 @@ DBCellCopyLabels(scx, mask, xMask, targetUse, pArea)
***/
int
dbCopyManhattanPaint(tile, dinfo, cxp)
Tile *tile; /* Pointer to tile to copy */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* Context from DBTreeSrTiles */
dbCopyManhattanPaint(
Tile *tile, /* Pointer to tile to copy */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* Context from DBTreeSrTiles */
{
SearchContext *scx = cxp->tc_scx;
struct copyAllArg *arg;
@ -1515,10 +1515,10 @@ dbCopyManhattanPaint(tile, dinfo, cxp)
***/
int
dbCopyAllPaint(tile, dinfo, cxp)
Tile *tile; /* Pointer to tile to copy */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* Context from DBTreeSrTiles */
dbCopyAllPaint(
Tile *tile, /* Pointer to tile to copy */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* Context from DBTreeSrTiles */
{
SearchContext *scx = cxp->tc_scx;
struct copyAllArg *arg;
@ -1727,19 +1727,19 @@ splitdone:
*/
void
DBCellCopyAllCells(scx, xMask, targetUse, pArea)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyAllCells(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from root cell to coords
* of targetUse.
*/
CellUse *targetUse; /* Cell into which material is to be stuffed */
int xMask; /* Expansion state mask to be used in
int xMask, /* Expansion state mask to be used in
* searching. Cells not expanded according
* to this mask are copied. To copy everything
* in the subtree under scx->scx_use without
* regard to expansion, pass a mask of 0.
*/
Rect *pArea; /* If non-NULL, points to a rectangle to be
CellUse *targetUse, /* Cell into which material is to be stuffed */
Rect *pArea) /* If non-NULL, points to a rectangle to be
* filled in with bbox (in targetUse coords)
* of all cells copied. Will be degenerate
* if nothing was copied.
@ -1788,13 +1788,13 @@ DBCellCopyAllCells(scx, xMask, targetUse, pArea)
*/
void
DBCellCopyCells(scx, targetUse, pArea)
SearchContext *scx; /* Describes root cell to search, area to
DBCellCopyCells(
SearchContext *scx, /* Describes root cell to search, area to
* copy, transform from coords of
* scx->scx_use->cu_def to coords of targetUse.
*/
CellUse *targetUse; /* Cell into which material is to be stuffed */
Rect *pArea; /* If non-NULL, points to rectangle to be
CellUse *targetUse, /* Cell into which material is to be stuffed */
Rect *pArea) /* If non-NULL, points to rectangle to be
* filled in with bbox (in targetUse coords)
* of all cells copied. Will be degenerate
* if nothing was copied.
@ -1833,12 +1833,12 @@ DBCellCopyCells(scx, targetUse, pArea)
*/
int
dbCellCopyCellsFunc(scx, arg)
SearchContext *scx; /* Pointer to search context containing
dbCellCopyCellsFunc(
SearchContext *scx, /* Pointer to search context containing
* ptr to cell use to be copied,
* and transform to the target def.
*/
struct copyAllArg *arg; /* Client data from caller */
struct copyAllArg *arg) /* Client data from caller */
{
CellUse *use, *newUse;
CellDef *def;
@ -1957,8 +1957,8 @@ DBNewPaintTable(newTable))[NT][NT]
*/
IntProc
DBNewPaintPlane(newProc)
int (*newProc)(); /* Address of new procedure */
DBNewPaintPlane(
int (*newProc)()) /* Address of new procedure */
{
int (*oldProc)() = dbCurPaintPlane;
dbCurPaintPlane = newProc;

View File

@ -60,7 +60,7 @@ bool dbWarnUniqueIds;
*/
extern CellDef *DBCellDefAlloc();
extern int dbLinkFunc();
extern void dbUsePrintInfo();
extern void dbUsePrintInfo(CellUse *StartUse, int who, bool dolist);
extern void DBsetUseIdHash();
extern void DBUnLinkCell();
@ -92,10 +92,10 @@ extern void DBSetUseIdHash();
* ----------------------------------------------------------------------------
*/
bool
DBCellRename(cellname, newname, doforce)
char *cellname;
char *newname;
bool doforce;
DBCellRename(
char *cellname,
char *newname,
bool doforce)
{
HashEntry *entry;
CellDef *celldef;
@ -189,8 +189,8 @@ DBCellRename(cellname, newname, doforce)
*/
void
DBEnumerateTypes(rMask)
TileTypeBitMask *rMask;
DBEnumerateTypes(
TileTypeBitMask *rMask)
{
HashSearch hs;
HashEntry *entry;
@ -225,9 +225,9 @@ DBEnumerateTypes(rMask)
* ----------------------------------------------------------------------------
*/
bool
DBCellDelete(cellname, force)
char *cellname;
bool force;
DBCellDelete(
char *cellname,
bool force)
{
HashEntry *entry;
CellDef *celldef;
@ -380,8 +380,8 @@ DBCellInit()
*/
char *
dbGetUseName(celluse)
CellUse *celluse;
dbGetUseName(
CellUse *celluse)
{
char *useID, *newID, xbuf[10], ybuf[10];
int arxl, aryl, arxh, aryh;
@ -454,10 +454,10 @@ dbGetUseName(celluse)
*/
void
dbCellPrintInfo(StartDef, who, dolist)
CellDef *StartDef;
int who;
bool dolist;
dbCellPrintInfo(
CellDef *StartDef,
int who,
bool dolist)
{
HashSearch hs;
HashEntry *entry;
@ -639,9 +639,9 @@ dbCellPrintInfo(StartDef, who, dolist)
* ----------------------------------------------------------------------------
*/
void
DBTopPrint(mw, dolist)
MagWindow *mw;
bool dolist;
DBTopPrint(
MagWindow *mw,
bool dolist)
{
CellDef *celldef;
CellUse *celluse;
@ -719,7 +719,9 @@ int strcmpbynum(const char *s1, const char *s2)
*/
int
qcompare(const void *one, const void *two)
qcompare(
const void *one,
const void *two)
{
int cval;
@ -751,10 +753,10 @@ qcompare(const void *one, const void *two)
*/
void
DBCellPrint(CellName, who, dolist)
char *CellName;
int who;
bool dolist;
DBCellPrint(
char *CellName,
int who,
bool dolist)
{
int found, numcells;
HashSearch hs;
@ -965,10 +967,10 @@ DBCellPrint(CellName, who, dolist)
*/
void
dbUsePrintInfo(StartUse, who, dolist)
CellUse *StartUse;
int who;
bool dolist;
dbUsePrintInfo(
CellUse *StartUse,
int who,
bool dolist)
{
CellDef *celldef;
CellUse *celluse;
@ -1132,10 +1134,10 @@ dbUsePrintInfo(StartUse, who, dolist)
*/
void
DBUsePrint(CellName, who, dolist)
char *CellName;
int who;
bool dolist;
DBUsePrint(
char *CellName,
int who,
bool dolist)
{
int found;
HashSearch hs;
@ -1230,9 +1232,9 @@ DBUsePrint(CellName, who, dolist)
}
int
dbCellUsePrintFunc(cellUse, dolist)
CellUse *cellUse;
bool *dolist;
dbCellUsePrintFunc(
CellUse *cellUse,
bool *dolist)
{
char *cu_name;
@ -1257,11 +1259,11 @@ dbCellUsePrintFunc(cellUse, dolist)
*/
int
dbLockUseFunc(selUse, use, transform, data)
CellUse *selUse; /* Use from selection cell */
CellUse *use; /* Use from layout corresponding to selection */
Transform *transform;
ClientData data;
dbLockUseFunc(
CellUse *selUse, /* Use from selection cell */
CellUse *use, /* Use from layout corresponding to selection */
Transform *transform,
ClientData data)
{
bool dolock = *((bool *)data);
@ -1309,9 +1311,9 @@ dbLockUseFunc(selUse, use, transform, data)
*/
void
DBLockUse(UseName, bval)
char *UseName;
bool bval;
DBLockUse(
char *UseName,
bool bval)
{
int found;
HashSearch hs;
@ -1388,9 +1390,9 @@ DBLockUse(UseName, bval)
*/
void
DBOrientUse(UseName, dodef)
char *UseName;
bool dodef;
DBOrientUse(
char *UseName,
bool dodef)
{
int found;
HashSearch hs;
@ -1453,11 +1455,11 @@ enum def_orient {ORIENT_NORTH, ORIENT_SOUTH, ORIENT_EAST, ORIENT_WEST,
ORIENT_FLIPPED_WEST};
int
dbOrientUseFunc(selUse, use, transform, data)
CellUse *selUse; /* Use from selection cell */
CellUse *use; /* Use from layout corresponding to selection */
Transform *transform;
ClientData data;
dbOrientUseFunc(
CellUse *selUse, /* Use from selection cell */
CellUse *use, /* Use from layout corresponding to selection */
Transform *transform,
ClientData data)
{
bool *dodef = (bool *)data;
int orient;
@ -1554,9 +1556,9 @@ dbOrientUseFunc(selUse, use, transform, data)
*/
void
DBAbutmentUse(UseName, dolist)
char *UseName;
bool dolist;
DBAbutmentUse(
char *UseName,
bool dolist)
{
int found;
HashSearch hs;
@ -1611,11 +1613,11 @@ DBAbutmentUse(UseName, dolist)
*/
int
dbAbutmentUseFunc(selUse, use, transform, data)
CellUse *selUse; /* Use from selection cell */
CellUse *use; /* Use from layout corresponding to selection */
Transform *transform;
ClientData data;
dbAbutmentUseFunc(
CellUse *selUse, /* Use from selection cell */
CellUse *use, /* Use from layout corresponding to selection */
Transform *transform,
ClientData data)
{
Rect bbox, refbox;
Transform *trans;
@ -1704,8 +1706,8 @@ dbAbutmentUseFunc(selUse, use, transform, data)
*/
CellDef *
DBCellLookDef(cellName)
char *cellName;
DBCellLookDef(
char *cellName)
{
HashEntry *entry;
@ -1744,8 +1746,8 @@ DBCellLookDef(cellName)
*/
CellDef *
DBCellNewDef(cellName)
char *cellName; /* Name by which the cell is known */
DBCellNewDef(
char *cellName) /* Name by which the cell is known */
{
CellDef *cellDef;
HashEntry *entry;
@ -1849,9 +1851,9 @@ DBCellDefAlloc()
*/
CellUse *
DBCellNewUse(cellDef, useName)
CellDef *cellDef; /* Pointer to definition of the cell */
char *useName; /* Pointer to use identifier for the cell. This may
DBCellNewUse(
CellDef *cellDef, /* Pointer to definition of the cell */
char *useName) /* Pointer to use identifier for the cell. This may
* be NULL, in which case a unique use identifier is
* generated automatically when the cell use is linked
* into a parent def.
@ -1905,9 +1907,9 @@ DBCellNewUse(cellDef, useName)
*/
bool
DBCellRenameDef(cellDef, newName)
CellDef *cellDef; /* Pointer to CellDef being renamed */
char *newName; /* Pointer to new name */
DBCellRenameDef(
CellDef *cellDef, /* Pointer to CellDef being renamed */
char *newName) /* Pointer to new name */
{
HashEntry *oldEntry, *newEntry;
CellUse *parent;
@ -1951,8 +1953,8 @@ DBCellRenameDef(cellDef, newName)
*/
bool
DBCellDeleteDef(cellDef)
CellDef *cellDef; /* Pointer to CellDef to be deleted */
DBCellDeleteDef(
CellDef *cellDef) /* Pointer to CellDef to be deleted */
{
HashEntry *entry;
@ -1995,9 +1997,8 @@ DBCellDeleteDef(cellDef)
*/
void
DBCellDefFree(cellDef)
CellDef *cellDef;
DBCellDefFree(
CellDef *cellDef)
{
int pNum;
Label *lab;
@ -2058,8 +2059,8 @@ DBCellDefFree(cellDef)
*/
bool
DBCellDeleteUse(cellUse)
CellUse *cellUse; /* Pointer to CellUse to be deleted */
DBCellDeleteUse(
CellUse *cellUse) /* Pointer to CellUse to be deleted */
{
CellDef *cellDef;
CellUse *useptr;
@ -2120,14 +2121,14 @@ DBCellDeleteUse(cellUse)
*/
int
DBCellSrDefs(pattern, func, cdata)
int pattern; /* Used for selecting cell definitions. If any
DBCellSrDefs(
int pattern, /* Used for selecting cell definitions. If any
* of the bits in the pattern are in a def->cd_flags,
* or if pattern is 0, the user-supplied function
* is invoked.
*/
int (*func)(); /* Function to be applied to each matching CellDef */
ClientData cdata; /* Client data also passed to function */
int (*func)(), /* Function to be applied to each matching CellDef */
ClientData cdata) /* Client data also passed to function */
{
HashSearch hs;
HashEntry *he;
@ -2184,9 +2185,9 @@ DBCellSrDefs(pattern, func, cdata)
*/
bool
DBLinkCell(use, parentDef)
CellUse *use;
CellDef *parentDef;
DBLinkCell(
CellUse *use,
CellDef *parentDef)
{
char useId[100], *lastName;
HashEntry *he;
@ -2248,9 +2249,9 @@ DBLinkCell(use, parentDef)
*/
int
dbLinkFunc(cellUse, defname)
CellUse *cellUse;
char *defname;
dbLinkFunc(
CellUse *cellUse,
char *defname)
{
char *usep = cellUse->cu_id;
@ -2294,9 +2295,9 @@ dbLinkFunc(cellUse, defname)
*/
bool
DBReLinkCell(cellUse, newName)
CellUse *cellUse;
char *newName;
DBReLinkCell(
CellUse *cellUse,
char *newName)
{
if (cellUse->cu_id && strcmp(cellUse->cu_id, newName) == 0)
return (TRUE);
@ -2337,9 +2338,9 @@ DBReLinkCell(cellUse, newName)
*/
CellUse *
DBFindUse(id, parentDef)
char *id;
CellDef *parentDef;
DBFindUse(
char *id,
CellDef *parentDef)
{
HashEntry *he;
char *delimit;
@ -2388,9 +2389,9 @@ DBFindUse(id, parentDef)
*/
void
DBGenerateUniqueIds(def, warn)
CellDef *def;
bool warn; /* If TRUE, warn user when we assign new ids */
DBGenerateUniqueIds(
CellDef *def,
bool warn) /* If TRUE, warn user when we assign new ids */
{
int dbFindNamesFunc();
int dbGenerateUniqueIdsFunc();
@ -2431,9 +2432,9 @@ DBGenerateUniqueIds(def, warn)
*/
void
DBSelectionUniqueIds(selDef, rootDef)
CellDef *selDef; /* Should be Select2Def */
CellDef *rootDef; /* Should be EditRootDef */
DBSelectionUniqueIds(
CellDef *selDef, /* Should be Select2Def */
CellDef *rootDef) /* Should be EditRootDef */
{
int dbFindNamesFunc();
int dbGenerateUniqueIdsFunc();
@ -2473,9 +2474,9 @@ DBSelectionUniqueIds(selDef, rootDef)
*/
int
dbFindNamesFunc(use, parentDef)
CellUse *use;
CellDef *parentDef;
dbFindNamesFunc(
CellUse *use,
CellDef *parentDef)
{
HashEntry *he;
@ -2528,9 +2529,9 @@ dbFindNamesFunc(use, parentDef)
*/
int
dbGenerateUniqueIdsFunc(use, parentDef)
CellUse *use;
CellDef *parentDef;
dbGenerateUniqueIdsFunc(
CellUse *use,
CellDef *parentDef)
{
HashEntry *hedef, *hename;
int suffix;
@ -2577,9 +2578,9 @@ setHash:
*/
void
DBSetUseIdHash(use, parentDef)
CellUse *use;
CellDef *parentDef;
DBSetUseIdHash(
CellUse *use,
CellDef *parentDef)
{
HashEntry *he;
@ -2605,9 +2606,9 @@ DBSetUseIdHash(use, parentDef)
*/
void
DBUnLinkCell(use, parentDef)
CellUse *use;
CellDef *parentDef;
DBUnLinkCell(
CellUse *use,
CellDef *parentDef)
{
HashEntry *he;
@ -2636,10 +2637,10 @@ DBUnLinkCell(use, parentDef)
*/
void
DBNewYank(yname, pyuse, pydef)
char *yname; /* Name of yank buffer */
CellUse **pyuse; /* Pointer to new cell use is stored in *pyuse */
CellDef **pydef; /* Similarly for def */
DBNewYank(
char *yname, /* Name of yank buffer */
CellUse **pyuse, /* Pointer to new cell use is stored in *pyuse */
CellDef **pydef) /* Similarly for def */
{
*pydef = DBCellLookDef(yname);
if (*pydef == (CellDef *) NULL)

View File

@ -83,7 +83,11 @@ struct seeTypesArg
*/
int
DBSrCellPlaneArea(BPlane *plane, const Rect *rect, int (*func)(), ClientData arg)
DBSrCellPlaneArea(
BPlane *plane,
const Rect *rect,
int (*func)(),
ClientData arg)
{
BPEnum sbpe;
BPEnum *bpe;
@ -152,22 +156,22 @@ DBSrCellPlaneArea(BPlane *plane, const Rect *rect, int (*func)(), ClientData arg
*/
int
DBTreeSrTiles(scx, mask, xMask, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
DBTreeSrTiles(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
*/
TileTypeBitMask *mask; /* Only tiles with a type for which
TileTypeBitMask *mask, /* Only tiles with a type for which
* a bit in this mask is on are processed.
*/
int xMask; /* All subcells are visited recursively
int xMask, /* All subcells are visited recursively
* until we encounter uses whose flags,
* when anded with xMask, are not
* equal to xMask.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
int dbCellPlaneSrFunc();
TreeFilter filter;
@ -191,25 +195,25 @@ DBTreeSrTiles(scx, mask, xMask, func, cdarg)
*/
int
DBTreeSrNMTiles(scx, dinfo, mask, xMask, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
DBTreeSrNMTiles(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
*/
TileType dinfo; /* Type containing information about the
TileType dinfo, /* Type containing information about the
* diagonal area to search.
*/
TileTypeBitMask *mask; /* Only tiles with a type for which
TileTypeBitMask *mask, /* Only tiles with a type for which
* a bit in this mask is on are processed.
*/
int xMask; /* All subcells are visited recursively
int xMask, /* All subcells are visited recursively
* until we encounter uses whose flags,
* when anded with xMask, are not
* equal to xMask.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
int dbCellPlaneSrFunc();
TreeFilter filter;
@ -233,9 +237,9 @@ DBTreeSrNMTiles(scx, dinfo, mask, xMask, func, cdarg)
*/
int
dbCellPlaneSrFunc(scx, fp)
SearchContext *scx;
TreeFilter *fp;
dbCellPlaneSrFunc(
SearchContext *scx,
TreeFilter *fp)
{
TreeContext context;
CellDef *def = scx->scx_use->cu_def;
@ -311,22 +315,22 @@ dbCellPlaneSrFunc(scx, fp)
*/
int
DBTreeSrUniqueTiles(scx, mask, xMask, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
DBTreeSrUniqueTiles(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
*/
TileTypeBitMask *mask; /* Only tiles with a type for which
TileTypeBitMask *mask, /* Only tiles with a type for which
* a bit in this mask is on are processed.
*/
int xMask; /* All subcells are visited recursively
int xMask, /* All subcells are visited recursively
* until we encounter uses whose flags,
* when anded with xMask, are not
* equal to xMask.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
int dbCellPlaneSrFunc();
TreeFilter filter;
@ -352,9 +356,9 @@ DBTreeSrUniqueTiles(scx, mask, xMask, func, cdarg)
*/
int
dbCellUniqueTileSrFunc(scx, fp)
SearchContext *scx;
TreeFilter *fp;
dbCellUniqueTileSrFunc(
SearchContext *scx,
TreeFilter *fp)
{
TreeContext context;
TileTypeBitMask uMask;
@ -448,22 +452,22 @@ dbCellUniqueTileSrFunc(scx, fp)
*-----------------------------------------------------------------------------
*/
int
DBNoTreeSrTiles(scx, mask, xMask, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
DBNoTreeSrTiles(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
*/
TileTypeBitMask *mask; /* Only tiles with a type for which
TileTypeBitMask *mask, /* Only tiles with a type for which
* a bit in this mask is on are processed.
*/
int xMask; /* All subcells are visited recursively
int xMask, /* All subcells are visited recursively
* until we encounter uses whose flags,
* when anded with xMask, are not
* equal to xMask.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
TreeContext context;
TreeFilter filter;
@ -544,34 +548,34 @@ DBNoTreeSrTiles(scx, mask, xMask, func, cdarg)
*/
int
DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
DBTreeSrLabels(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
* The area may have zero size. Labels
* need only touch the area.
*/
TileTypeBitMask * mask; /* Only visit labels attached to these types */
int xMask; /* All subcells are visited recursively
TileTypeBitMask * mask, /* Only visit labels attached to these types */
int xMask, /* All subcells are visited recursively
* until we encounter uses whose flags,
* when anded with xMask, are not
* equal to xMask.
*/
TerminalPath *tpath; /* Pointer to a structure describing a
TerminalPath *tpath, /* Pointer to a structure describing a
* partially filled in terminal pathname.
* If this pointer is NULL, we don't bother
* filling it in further; otherwise, we add
* new pathname components as we encounter
* them.
*/
unsigned char flags; /* Flags to denote whether labels should be
unsigned char flags, /* Flags to denote whether labels should be
* searched according to the area of the
* attachment, the area of the label itself,
* or both.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
SearchContext scx2;
Label *lab;
@ -696,9 +700,9 @@ DBTreeSrLabels(scx, mask, xMask, tpath, flags, func, cdarg)
*/
int
dbCellLabelSrFunc(scx, fp)
SearchContext *scx;
TreeFilter *fp;
dbCellLabelSrFunc(
SearchContext *scx,
TreeFilter *fp)
{
Label *lab;
Rect *r = &scx->scx_area;
@ -822,20 +826,20 @@ cleanup:
*/
int
DBTreeSrCells(scx, xMask, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying a cell use to
DBTreeSrCells(
SearchContext *scx, /* Pointer to search context specifying a cell use to
* search, an area in the coordinates of the cell's
* def, and a transform back to "root" coordinates.
*/
int xMask; /* All subcells are visited recursively until we
int xMask, /* All subcells are visited recursively until we
* encounter uses whose flags, when anded with
* xMask, are not equal to xMask. Func is called
* for these cells. A zero mask means all cells in
* the root use are considered not to be expanded,
* and hence are passed to func.
*/
int (*func)(); /* Function to apply to each qualifying cell */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply to each qualifying cell */
ClientData cdarg) /* Client data for above function */
{
int dbTreeCellSrFunc();
CellUse *cellUse = scx->scx_use;
@ -868,13 +872,13 @@ DBTreeSrCells(scx, xMask, func, cdarg)
/*ARGSUSED*/
int
dbTreeCellSrFunc(scx, fp)
SearchContext *scx; /* Pointer to context containing a
dbTreeCellSrFunc(
SearchContext *scx, /* Pointer to context containing a
* CellUse and a transform from coord-
* inates of the def of the use to the
* "root" of the search.
*/
TreeFilter *fp;
TreeFilter *fp)
{
CellUse *use = scx->scx_use;
int result;
@ -924,11 +928,11 @@ dbTreeCellSrFunc(scx, fp)
*/
void
DBSeeTypesAll(rootUse, rootRect, xMask, mask)
CellUse *rootUse; /* CellUse from which to begin search */
Rect *rootRect; /* Clipping rectangle in coordinates of CellUse's def */
int xMask; /* Expansion mask for DBTreeSrTiles() */
TileTypeBitMask *mask; /* Mask to set */
DBSeeTypesAll(
CellUse *rootUse, /* CellUse from which to begin search */
Rect *rootRect, /* Clipping rectangle in coordinates of CellUse's def */
int xMask, /* Expansion mask for DBTreeSrTiles() */
TileTypeBitMask *mask) /* Mask to set */
{
int dbSeeTypesAllSrFunc();
SearchContext scontext;
@ -949,10 +953,10 @@ DBSeeTypesAll(rootUse, rootRect, xMask, mask)
*/
int
dbSeeTypesAllSrFunc(tile, dinfo, cxp)
Tile *tile;
TileType dinfo;
TreeContext *cxp;
dbSeeTypesAllSrFunc(
Tile *tile,
TileType dinfo,
TreeContext *cxp)
{
Rect tileRect;
TileTypeBitMask *mask = (TileTypeBitMask *) cxp->tc_filter->tf_arg;
@ -1002,15 +1006,15 @@ dbSeeTypesAllSrFunc(tile, dinfo, cxp)
*/
int
DBSrRoots(baseDef, transform, func, cdarg)
CellDef *baseDef; /* Base CellDef, all of whose ancestors are
DBSrRoots(
CellDef *baseDef, /* Base CellDef, all of whose ancestors are
* searched for.
*/
Transform *transform; /* Transform from original baseDef to current
Transform *transform, /* Transform from original baseDef to current
* baseDef.
*/
int (*func)(); /* Function to apply at each root cellUse */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each root cellUse */
ClientData cdarg) /* Client data for above function */
{
CellUse *parentUse;
int xoff, yoff, x, y;
@ -1065,9 +1069,9 @@ DBSrRoots(baseDef, transform, func, cdarg)
*/
bool
DBIsAncestor(cellDef1, cellDef2)
CellDef *cellDef1; /* Potential ancestor */
CellDef *cellDef2; /* Potential descendant -- this is where we
DBIsAncestor(
CellDef *cellDef1, /* Potential ancestor */
CellDef *cellDef2) /* Potential descendant -- this is where we
* start the search.
*/
{
@ -1128,15 +1132,15 @@ DBIsAncestor(cellDef1, cellDef2)
*/
int
DBCellSrArea(scx, func, cdarg)
SearchContext *scx;
DBCellSrArea(
SearchContext *scx,
/* Pointer to search context specifying a cell use to
* search, an area in the coordinates of the cell's
* def, and a transform back to "root" coordinates.
* The area may have zero size.
*/
int (*func)(); /* Function to apply at every tile found */
ClientData cdarg; /* Argument to pass to function */
int (*func)(), /* Function to apply at every tile found */
ClientData cdarg) /* Argument to pass to function */
{
TreeFilter filter;
TreeContext context;
@ -1176,9 +1180,9 @@ DBCellSrArea(scx, func, cdarg)
*/
int
dbCellSrFunc(use, cxp)
CellUse *use;
TreeContext *cxp;
dbCellSrFunc(
CellUse *use,
TreeContext *cxp)
{
TreeFilter *fp = cxp->tc_filter;
SearchContext *scx = cxp->tc_scx;
@ -1260,10 +1264,10 @@ dbCellSrFunc(use, cxp)
*/
int
DBCellEnum(cellDef, func, cdarg)
CellDef *cellDef; /* Def whose subcell plane is to be searched */
int (*func)(); /* Function to apply at every tile found */
ClientData cdarg; /* Argument to pass to function */
DBCellEnum(
CellDef *cellDef, /* Def whose subcell plane is to be searched */
int (*func)(), /* Function to apply at every tile found */
ClientData cdarg) /* Argument to pass to function */
{
TreeFilter filter;
int dbEnumFunc();
@ -1299,9 +1303,9 @@ DBCellEnum(cellDef, func, cdarg)
*/
int
dbEnumFunc(use, fp)
CellUse *use;
TreeFilter *fp;
dbEnumFunc(
CellUse *use,
TreeFilter *fp)
{
Rect *bbox;
@ -1345,17 +1349,17 @@ dbEnumFunc(use, fp)
*/
int
DBArraySr(use, searchArea, func, cdarg)
CellUse *use; /* CellUse of array to be searched. */
Rect *searchArea; /* Area of interest, given in the
DBArraySr(
CellUse *use, /* CellUse of array to be searched. */
Rect *searchArea, /* Area of interest, given in the
* coordinates of the parent (i.e. the
* cell use, not def). Must overlap
* the array bounding box.
*/
int (*func)(); /* Function to apply for each overlapping
int (*func)(), /* Function to apply for each overlapping
* array element.
*/
ClientData cdarg; /* Client-specific info to give to func. */
ClientData cdarg) /* Client-specific info to give to func. */
{
int xlo, xhi, ylo, yhi, x, y;
int xsep, ysep, xbase, ybase;
@ -1416,9 +1420,10 @@ typedef struct LCU1 /* A linked celluse record */
*/
bool
DBMovePoint(p, origx, origy)
Point *p;
int origx, origy;
DBMovePoint(
Point *p,
int origx,
int origy)
{
int result = FALSE;
if ((p->p_x < (INFINITY - 2)) && (p->p_x > (MINFINITY + 2)))
@ -1454,8 +1459,10 @@ DBMovePoint(p, origx, origy)
*/
bool
DBScaleValue(v, n, d)
int *v, n, d;
DBScaleValue(
int *v,
int n,
int d)
{
dlong llv = (dlong)(*v);
@ -1498,9 +1505,10 @@ DBScaleValue(v, n, d)
*/
bool
DBScalePoint(p, n, d)
Point *p;
int n, d;
DBScalePoint(
Point *p,
int n,
int d)
{
bool result;
result = DBScaleValue(&p->p_x, n, d);
@ -1529,8 +1537,9 @@ DBScalePoint(p, n, d)
*/
void
DBScaleEverything(scalen, scaled)
int scalen, scaled;
DBScaleEverything(
int scalen,
int scaled)
{
void ToolScaleBox();
@ -1609,11 +1618,13 @@ struct moveArg {
*/
bool
dbScalePlane(oldplane, newplane, pnum, scalen, scaled, doCIF)
Plane *oldplane, *newplane;
int pnum;
int scalen, scaled;
bool doCIF;
dbScalePlane(
Plane *oldplane,
Plane *newplane,
int pnum,
int scalen,
int scaled,
bool doCIF)
{
int dbTileScaleFunc(); /* forward declaration */
struct scaleArg arg;
@ -1643,10 +1654,10 @@ dbScalePlane(oldplane, newplane, pnum, scalen, scaled, doCIF)
*/
int
dbTileScaleFunc(tile, dinfo, scvals)
Tile *tile;
TileType dinfo;
struct scaleArg *scvals;
dbTileScaleFunc(
Tile *tile,
TileType dinfo,
struct scaleArg *scvals)
{
TileType type;
Rect targetRect;
@ -1694,10 +1705,12 @@ dbTileScaleFunc(tile, dinfo, scvals)
*/
bool
dbMovePlane(oldplane, newplane, pnum, origx, origy)
Plane *oldplane, *newplane;
int pnum;
int origx, origy;
dbMovePlane(
Plane *oldplane,
Plane *newplane,
int pnum,
int origx,
int origy)
{
int dbTileMoveFunc(); /* forward declaration */
struct moveArg arg;
@ -1726,10 +1739,10 @@ dbMovePlane(oldplane, newplane, pnum, origx, origy)
*/
int
dbTileMoveFunc(tile, dinfo, mvvals)
Tile *tile;
TileType dinfo;
struct moveArg *mvvals;
dbTileMoveFunc(
Tile *tile,
TileType dinfo,
struct moveArg *mvvals)
{
TileType type;
Rect targetRect;
@ -1774,10 +1787,10 @@ dbTileMoveFunc(tile, dinfo, mvvals)
*/
int
DBSrCellUses(cellDef, func, arg)
CellDef *cellDef; /* Pointer to CellDef to search for uses. */
int (*func)(); /* Function to apply for each cell use. */
ClientData arg; /* data to be passed to function func(). */
DBSrCellUses(
CellDef *cellDef, /* Pointer to CellDef to search for uses. */
int (*func)(), /* Function to apply for each cell use. */
ClientData arg) /* data to be passed to function func(). */
{
int dbCellUseEnumFunc();
int retval;
@ -1952,11 +1965,12 @@ int dbMoveProp(name, proprec, cps)
*/
int
dbScaleCell(cellDef, scalen, scaled)
CellDef *cellDef; /* Pointer to CellDef to be saved. This def might
dbScaleCell(
CellDef *cellDef, /* Pointer to CellDef to be saved. This def might
* be an internal buffer; if so, we ignore it.
*/
int scalen, scaled; /* scale numerator and denominator. */
int scalen,
int scaled)
{
int dbCellScaleFunc(), dbCellUseEnumFunc();
Label *lab;
@ -2110,9 +2124,9 @@ donecell:
*/
int
dbCellDefEnumFunc(cellDef, arg)
CellDef *cellDef;
LinkedCellDef **arg;
dbCellDefEnumFunc(
CellDef *cellDef,
LinkedCellDef **arg)
{
LinkedCellDef *lcd;
@ -2137,9 +2151,9 @@ dbCellDefEnumFunc(cellDef, arg)
*/
int
dbCellUseEnumFunc(cellUse, arg)
CellUse *cellUse;
LinkedCellUse **arg;
dbCellUseEnumFunc(
CellUse *cellUse,
LinkedCellUse **arg)
{
LinkedCellUse *lcu;
@ -2169,11 +2183,12 @@ dbCellUseEnumFunc(cellUse, arg)
*/
int
DBMoveCell(cellDef, origx, origy)
CellDef *cellDef; /* Pointer to CellDef to be saved. This def might
DBMoveCell(
CellDef *cellDef, /* Pointer to CellDef to be saved. This def might
* be an internal buffer; if so, we ignore it.
*/
int origx, origy; /* Internal unit coordinates which will become the new origin */
int origx,
int origy)
{
int dbCellTileEnumFunc(), dbCellUseEnumFunc();
Label *lab;

View File

@ -60,9 +60,9 @@ extern void dbSetPlaneTile();
*/
bool
DBDescendSubcell(use, xMask)
CellUse *use;
unsigned int xMask;
DBDescendSubcell(
CellUse *use,
unsigned int xMask)
{
bool propfound;
@ -125,9 +125,9 @@ DBDescendSubcell(use, xMask)
*/
void
DBCellCopyDefBody(sourceDef, destDef)
CellDef *sourceDef; /* Pointer to CellDef copied from */
CellDef *destDef; /* Pointer to CellDef copied to */
DBCellCopyDefBody(
CellDef *sourceDef, /* Pointer to CellDef copied from */
CellDef *destDef) /* Pointer to CellDef copied to */
{
int i;
int dbCopyDefFunc();
@ -153,9 +153,9 @@ DBCellCopyDefBody(sourceDef, destDef)
}
int
dbCopyDefFunc(use, def)
CellUse *use; /* Subcell use. */
CellDef *def; /* Set parent pointer in each use to this. */
dbCopyDefFunc(
CellUse *use, /* Subcell use. */
CellDef *def) /* Set parent pointer in each use to this. */
{
use->cu_parent = def;
return 0;
@ -182,8 +182,8 @@ dbCopyDefFunc(use, def)
*/
void
DBCellClearDef(cellDef)
CellDef *cellDef; /* Pointer to CellDef to be deleted */
DBCellClearDef(
CellDef *cellDef) /* Pointer to CellDef to be deleted */
{
int pNum;
Plane *plane;
@ -254,8 +254,8 @@ DBCellClearDef(cellDef)
*/
void
DBClearPaintPlane(plane)
Plane *plane;
DBClearPaintPlane(
Plane *plane)
{
Tile *newCenterTile;
@ -286,9 +286,9 @@ DBClearPaintPlane(plane)
*/
void
dbSetPlaneTile(plane, newCenterTile)
Plane *plane;
Tile *newCenterTile;
dbSetPlaneTile(
Plane *plane,
Tile *newCenterTile)
{
/*
* Set the stitches of the newly created center tile
@ -333,8 +333,8 @@ dbSetPlaneTile(plane, newCenterTile)
*/
Plane *
DBNewPlane(body)
ClientData body; /* Body of initial, central tile */
DBNewPlane(
ClientData body) /* Body of initial, central tile */
{
Tile *newtile;

View File

@ -70,9 +70,9 @@ Stack *dbConnectStack = (Stack *)NULL;
*/
TileType
DBTransformDiagonal(oldtype, trans)
TileType oldtype;
Transform *trans;
DBTransformDiagonal(
TileType oldtype,
Transform *trans)
{
TileType dinfo;
int o1, o2, o3, dir, side;
@ -105,9 +105,9 @@ DBTransformDiagonal(oldtype, trans)
*/
TileType
DBInvTransformDiagonal(oldtype, trans)
TileType oldtype;
Transform *trans;
DBInvTransformDiagonal(
TileType oldtype,
Transform *trans)
{
TileType dinfo;
int o1, o2, o3;
@ -168,32 +168,31 @@ DBInvTransformDiagonal(oldtype, trans)
*/
int
DBSrConnect(def, startArea, mask, connect, bounds, func, clientData)
CellDef *def; /* Cell definition in which to carry out
DBSrConnect(
CellDef *def, /* Cell definition in which to carry out
* the connectivity search. Only paint
* in this definition is considered.
*/
Rect *startArea; /* Area to search for an initial tile. Only
Rect *startArea, /* Area to search for an initial tile. Only
* tiles OVERLAPPING the area are considered.
* This area should have positive x and y
* dimensions.
*/
TileTypeBitMask *mask; /* Only tiles of one of these types are used
TileTypeBitMask *mask, /* Only tiles of one of these types are used
* as initial tiles.
*/
TileTypeBitMask *connect; /* Pointer to a table indicating what tile
TileTypeBitMask *connect, /* Pointer to a table indicating what tile
* types connect to what other tile types.
* Each entry gives a mask of types that
* connect to tiles of a given type.
*/
Rect *bounds; /* Area, in coords of scx->scx_use->cu_def,
Rect *bounds, /* Area, in coords of scx->scx_use->cu_def,
* that limits the search: only tiles
* overalapping this area will be returned.
* Use TiPlaneRect to search everywhere.
*/
int (*func)(); /* Function to apply at each connected tile. */
ClientData clientData; /* Client data for above function. */
int (*func)(), /* Function to apply at each connected tile. */
ClientData clientData) /* Client data for above function. */
{
struct conSrArg csa;
int startPlane, result;
@ -262,32 +261,31 @@ dbSrConnectStartFunc(
/* caller. */
int
DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData)
CellDef *def; /* Cell definition in which to carry out
DBSrConnectOnePass(
CellDef *def, /* Cell definition in which to carry out
* the connectivity search. Only paint
* in this definition is considered.
*/
Rect *startArea; /* Area to search for an initial tile. Only
Rect *startArea, /* Area to search for an initial tile. Only
* tiles OVERLAPPING the area are considered.
* This area should have positive x and y
* dimensions.
*/
TileTypeBitMask *mask; /* Only tiles of one of these types are used
TileTypeBitMask *mask, /* Only tiles of one of these types are used
* as initial tiles.
*/
TileTypeBitMask *connect; /* Pointer to a table indicating what tile
TileTypeBitMask *connect, /* Pointer to a table indicating what tile
* types connect to what other tile types.
* Each entry gives a mask of types that
* connect to tiles of a given type.
*/
Rect *bounds; /* Area, in coords of scx->scx_use->cu_def,
Rect *bounds, /* Area, in coords of scx->scx_use->cu_def,
* that limits the search: only tiles
* overalapping this area will be returned.
* Use TiPlaneRect to search everywhere.
*/
int (*func)(); /* Function to apply at each connected tile. */
ClientData clientData; /* Client data for above function. */
int (*func)(), /* Function to apply at each connected tile. */
ClientData clientData) /* Client data for above function. */
{
struct conSrArg csa;
int startPlane, result;
@ -345,10 +343,10 @@ DBSrConnectOnePass(def, startArea, mask, connect, bounds, func, clientData)
*/
int
dbcFindTileFunc(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
ClientData arg;
dbcFindTileFunc(
Tile *tile,
TileType dinfo,
ClientData arg)
{
TileAndDinfo *tad = (TileAndDinfo *)arg;
@ -673,11 +671,10 @@ donesides:
/** @typedef cb_database_srpaintnmarea_t */
/** @typedef cb_database_srpaintarea_t */
int
dbcUnconnectFunc(tile, dinfo, clientData)
Tile *tile; /* Current tile */
TileType dinfo; /* Split tile information, unused */
ClientData clientData; /* Unused. */
dbcUnconnectFunc(
Tile *tile, /* Current tile */
TileType dinfo, /* Split tile information, unused */
ClientData clientData) /* Unused. */
{
return 1;
}
@ -707,11 +704,11 @@ dbcUnconnectFunc(tile, dinfo, clientData)
*/
int
dbcConnectLabelFunc(scx, lab, tpath, csa2)
SearchContext *scx;
Label *lab;
TerminalPath *tpath;
struct conSrArg2 *csa2;
dbcConnectLabelFunc(
SearchContext *scx,
Label *lab,
TerminalPath *tpath,
struct conSrArg2 *csa2)
{
CellDef *def = csa2->csa2_use->cu_def;
Rect r;
@ -889,10 +886,10 @@ dbcConnectLabelFunc(scx, lab, tpath, csa2)
*/
int
dbcConnectFunc(tile, dinfo, cx)
Tile *tile; /* Tile found. */
TileType dinfo; /* Split tile information */
TreeContext *cx; /* Describes context of search. The client
dbcConnectFunc(
Tile *tile, /* Tile found. */
TileType dinfo, /* Split tile information */
TreeContext *cx) /* Describes context of search. The client
* data is a pointer to a conSrArg2 record
* containing various required information.
*/
@ -1087,8 +1084,8 @@ dbcConnectFunc(tile, dinfo, cx)
*/
void
DBTreeCopyConnect(scx, mask, xMask, connect, area, doLabels, destUse)
SearchContext *scx; /* Describes starting area. The
DBTreeCopyConnect(
SearchContext *scx, /* Describes starting area. The
* scx_use field gives the root of
* the hierarchy to search, and the
* scx_area field gives the starting
@ -1096,27 +1093,27 @@ DBTreeCopyConnect(scx, mask, xMask, connect, area, doLabels, destUse)
* this area. The transform is from
* coords of scx_use to destUse.
*/
TileTypeBitMask *mask; /* Tile types to start from in area. */
int xMask; /* Information must be expanded in all
TileTypeBitMask *mask, /* Tile types to start from in area. */
int xMask, /* Information must be expanded in all
* of the windows indicated by this
* mask. Use 0 to consider all info
* regardless of expansion.
*/
TileTypeBitMask *connect; /* Points to table that defines what
TileTypeBitMask *connect, /* Points to table that defines what
* each tile type is considered to
* connect to. Use DBConnectTbl as
* a default.
*/
Rect *area; /* The resulting information is
Rect *area, /* The resulting information is
* clipped to this area. Pass
* TiPlaneRect to get everything.
*/
unsigned char doLabels; /* If SEL_DO_LABELS, copy connected labels
unsigned char doLabels, /* If SEL_DO_LABELS, copy connected labels
* and paint. If SEL_NO_LABELS, copy only
* connected paint. If SEL_SIMPLE_LABELS,
* copy only root of labels in subcircuits.
*/
CellUse *destUse; /* Result use in which to place
CellUse *destUse) /* Result use in which to place
* anything connected to material of
* type mask in area of rootUse.
*/

View File

@ -109,12 +109,12 @@ struct countArg
};
void
DBTreeCountPaint(def, count, hiercount, cleanup, cdata)
CellDef *def;
int (*count)();
void (*hiercount)();
int (*cleanup)();
ClientData cdata;
DBTreeCountPaint(
CellDef *def,
int (*count)(),
void (*hiercount)(),
int (*cleanup)(),
ClientData cdata)
{
struct countArg ca;
int dbCountFunc(), dbCountHierFunc();
@ -137,9 +137,9 @@ DBTreeCountPaint(def, count, hiercount, cleanup, cdata)
}
int
dbCountFunc(use, ca)
CellUse *use;
struct countArg *ca;
dbCountFunc(
CellUse *use,
struct countArg *ca)
{
if ((*ca->ca_count)(use->cu_def, ca->ca_cdata) == 0)
(void) DBCellEnum(use->cu_def, dbCountFunc, (ClientData) ca);
@ -147,9 +147,9 @@ dbCountFunc(use, ca)
}
int
dbCountHierFunc(use, ca)
CellUse *use;
struct countArg *ca;
dbCountHierFunc(
CellUse *use,
struct countArg *ca)
{
int nx, ny;

View File

@ -68,10 +68,10 @@ struct expandArg
*/
void
DBExpand(cellUse, expandMask, expandType)
CellUse *cellUse;
int expandMask;
int expandType;
DBExpand(
CellUse *cellUse,
int expandMask,
int expandType)
{
CellDef *def;
bool expandFlag, expandTest;
@ -138,15 +138,15 @@ DBExpand(cellUse, expandMask, expandType)
*/
void
DBExpandAll(rootUse, rootRect, expandMask, expandType, func, cdarg)
CellUse *rootUse; /* Root cell use from which search begins */
Rect *rootRect; /* Area to be expanded, in root coordinates */
int expandMask; /* Window mask in which cell is to be expanded */
int expandType; /* DB_EXPAND, DB_UNEXPAND, DB_EXPAND_TOGGLE */
int (*func)(); /* Function to call for each cell whose expansion
DBExpandAll(
CellUse *rootUse, /* Root cell use from which search begins */
Rect *rootRect, /* Area to be expanded, in root coordinates */
int expandMask, /* Window mask in which cell is to be expanded */
int expandType, /* DB_EXPAND, DB_UNEXPAND, DB_EXPAND_TOGGLE */
int (*func)(), /* Function to call for each cell whose expansion
* status is modified. NULL means don't call anyone.
*/
ClientData cdarg; /* Argument to pass to func. */
ClientData cdarg) /* Argument to pass to func. */
{
int dbExpandFunc();
SearchContext scontext;
@ -179,13 +179,13 @@ DBExpandAll(rootUse, rootRect, expandMask, expandType, func, cdarg)
*/
int
dbExpandFunc(scx, arg)
SearchContext *scx; /* Pointer to search context containing
dbExpandFunc(
SearchContext *scx, /* Pointer to search context containing
* child use, search area in coor-
* dinates of the child use, and
* transform back to "root".
*/
struct expandArg *arg; /* Client data from caller */
struct expandArg *arg) /* Client data from caller */
{
CellUse *childUse = scx->scx_use;
int n = DBLambda[1];
@ -273,10 +273,10 @@ dbExpandFunc(scx, arg)
*/
CellDef *
DBCellReadArea(rootUse, rootRect, halt_on_error)
CellUse *rootUse; /* Root cell use from which search begins */
Rect *rootRect; /* Area to be read, in root coordinates */
bool halt_on_error; /* If TRUE, failure to find a cell causes a halt */
DBCellReadArea(
CellUse *rootUse, /* Root cell use from which search begins */
Rect *rootRect, /* Area to be read, in root coordinates */
bool halt_on_error) /* If TRUE, failure to find a cell causes a halt */
{
int dbReadAreaFunc();
SearchContext scontext;
@ -292,13 +292,13 @@ DBCellReadArea(rootUse, rootRect, halt_on_error)
}
int
dbReadAreaFunc(scx, err_ptr)
SearchContext *scx; /* Pointer to context specifying
dbReadAreaFunc(
SearchContext *scx, /* Pointer to context specifying
* the cell use to be read in, and
* an area to be recursively read in
* coordinates of the cell use's def.
*/
CellDef **err_ptr; /* If non-NULL, failure to find a cell causes a halt
CellDef **err_ptr) /* If non-NULL, failure to find a cell causes a halt
* and the CellDef in error is returned in err_def.
* If NULL, failure to find a cell still causes a
* halt but no information is passed back to the

View File

@ -112,12 +112,12 @@ static char *DBbackupFile = (char *)NULL;
/* Forward declarations */
char *dbFgets();
FILETYPE dbReadOpen();
FILETYPE dbReadOpen(CellDef *cellDef, bool setFileName, bool dereference, int *errptr);
int DBFileOffset;
bool dbReadLabels();
bool dbReadElements();
bool dbReadProperties();
bool dbReadUse();
bool dbReadUse(CellDef *cellDef, char *line, int len, FILETYPE f, int scalen, int scaled, bool dereference, HashTable *dbUseTable);
#ifdef MAGIC_WRAPPER
/* Used to make a tag callback after loading a techfile */
@ -136,8 +136,8 @@ extern int TagCallback();
*/
static int
file_is_not_writeable(name)
char *name;
file_is_not_writeable(
char *name)
{
struct stat sbuf;
@ -170,7 +170,9 @@ file_is_not_writeable(name)
}
static int
path_is_dir(const char *dirname, const char *filename)
path_is_dir(
const char *dirname,
const char *filename)
{
struct stat statbuf;
char path[PATH_MAX];
@ -221,11 +223,11 @@ typedef struct _linkedDirent {
*/
char *
DBSearchForTech(techname, techroot, pathroot, level)
char *techname;
char *techroot; /* techname without the ".tech" suffix */
char *pathroot;
int level;
DBSearchForTech(
char *techname,
char *techroot, /* techname without the ".tech" suffix */
char *pathroot,
int level)
{
char *newpath, *found, *dptr;
struct dirent *tdent;
@ -338,9 +340,9 @@ DBSearchForTech(techname, techroot, pathroot, level)
*/
int
DBAddStandardCellPaths(pathptr, level)
char *pathptr;
int level;
DBAddStandardCellPaths(
char *pathptr,
int level)
{
int paths = 0;
struct dirent *tdent;
@ -520,10 +522,10 @@ DBAddStandardCellPaths(pathptr, level)
*/
bool
dbCellReadDef(f, cellDef, ignoreTech, dereference)
FILETYPE f; /* The file, already opened by the caller */
CellDef *cellDef; /* Pointer to definition of cell to be read in */
bool ignoreTech; /* If FALSE then the technology of the file MUST
dbCellReadDef(
FILETYPE f, /* The file, already opened by the caller */
CellDef *cellDef, /* Pointer to definition of cell to be read in */
bool ignoreTech, /* If FALSE then the technology of the file MUST
* match the current technology, or else the
* subroutine will return an error condition
* without reading anything. If TRUE, a
@ -531,7 +533,7 @@ dbCellReadDef(f, cellDef, ignoreTech, dereference)
* names do not match, but an attempt will be
* made to read the file anyway.
*/
bool dereference; /* If TRUE, ignore path references in the input */
bool dereference) /* If TRUE, ignore path references in the input */
{
int cellStamp = 0, rectCount = 0, rectReport = 10000;
char line[2048], tech[50], layername[50];
@ -1111,8 +1113,8 @@ DBRemoveBackup()
*/
void
DBFileRecovery(filename)
char *filename;
DBFileRecovery(
char *filename)
{
DIR *cwd;
struct direct *dp;
@ -1232,10 +1234,10 @@ DBFileRecovery(filename)
*/
bool
DBReadBackup(name, archive, usederef)
char *name; /* Name of the backup file */
bool archive; /* TRUE if this is an archive file */
bool usederef; /* If TRUE, then dereference all cells */
DBReadBackup(
char *name, /* Name of the backup file */
bool archive, /* TRUE if this is an archive file */
bool usederef) /* If TRUE, then dereference all cells */
{
FILETYPE f;
static const char *filetypes[] = {"archive", "backup", 0};
@ -1358,9 +1360,9 @@ DBReadBackup(name, archive, usederef)
*/
bool
DBCellRead(cellDef, ignoreTech, dereference, errptr)
CellDef *cellDef; /* Pointer to definition of cell to be read in */
bool ignoreTech; /* If FALSE then the technology of the file MUST
DBCellRead(
CellDef *cellDef, /* Pointer to definition of cell to be read in */
bool ignoreTech, /* If FALSE then the technology of the file MUST
* match the current technology, or else the
* subroutine will return an error condition
* without reading anything. If TRUE, a
@ -1368,8 +1370,8 @@ DBCellRead(cellDef, ignoreTech, dereference, errptr)
* names do not match, but an attempt will be
* made to read the file anyway.
*/
bool dereference; /* If TRUE then ignore path argument to cellDef */
int *errptr; /* Copy of errno set by file reading routine
bool dereference, /* If TRUE then ignore path argument to cellDef */
int *errptr) /* Copy of errno set by file reading routine
* is placed here, unless NULL.
*/
{
@ -1444,16 +1446,16 @@ DBCellRead(cellDef, ignoreTech, dereference, errptr)
*/
FILETYPE
dbReadOpen(cellDef, setFileName, dereference, errptr)
CellDef *cellDef; /* Def being read */
bool setFileName; /* If TRUE then cellDef->cd_file should be updated
dbReadOpen(
CellDef *cellDef, /* Def being read */
bool setFileName, /* If TRUE then cellDef->cd_file should be updated
* to point to the name of the file from which the
* cell was loaded.
*/
bool dereference; /* If dereferencing, try search paths first, and
bool dereference, /* If dereferencing, try search paths first, and
* only if that fails, try the value in cd_file.
*/
int *errptr; /* Pointer to int to hold error value */
int *errptr) /* Pointer to int to hold error value */
{
FILETYPE f = NULL;
int fd;
@ -1678,14 +1680,14 @@ dbReadOpen(cellDef, setFileName, dereference, errptr)
*/
void
DBOpenOnly(cellDef, name, setFileName, errptr)
CellDef *cellDef; /* Def being read */
char *name; /* Name if specified, or NULL */
bool setFileName; /* If TRUE then cellDef->cd_file should be updated
DBOpenOnly(
CellDef *cellDef, /* Def being read */
char *name, /* Name if specified, or NULL */
bool setFileName, /* If TRUE then cellDef->cd_file should be updated
* to point to the name of the file from which the
* cell was loaded.
*/
int *errptr; /* Pointer to int to hold error value */
int *errptr) /* Pointer to int to hold error value */
{
dbReadOpen(cellDef, setFileName, FALSE, errptr);
}
@ -1707,9 +1709,9 @@ DBOpenOnly(cellDef, name, setFileName, errptr)
*/
bool
DBTestOpen(name, fullPath)
char *name;
char **fullPath;
DBTestOpen(
char *name,
char **fullPath)
{
FILETYPE f;
@ -1747,15 +1749,15 @@ DBTestOpen(name, fullPath)
*/
bool
dbReadUse(cellDef, line, len, f, scalen, scaled, dereference, dbUseTable)
CellDef *cellDef; /* Cell whose cells are being read */
char *line; /* Line containing "use ..." */
int len; /* Size of buffer pointed to by line */
FILETYPE f; /* Input file */
int scalen; /* Multiply values in file by this */
int scaled; /* Divide values in file by this */
bool dereference; /* If TRUE, ignore path references */
HashTable *dbUseTable; /* Hash table of instances seen in this file */
dbReadUse(
CellDef *cellDef, /* Cell whose cells are being read */
char *line, /* Line containing "use ..." */
int len, /* Size of buffer pointed to by line */
FILETYPE f, /* Input file */
int scalen, /* Multiply values in file by this */
int scaled, /* Divide values in file by this */
bool dereference, /* If TRUE, ignore path references */
HashTable *dbUseTable) /* Hash table of instances seen in this file */
{
int xlo, xhi, ylo, yhi, xsep, ysep, childStamp;
int absa, absb, absd, abse, nconv;
@ -2396,13 +2398,13 @@ nextLine:
*/
bool
dbReadProperties(cellDef, line, len, f, scalen, scaled)
CellDef *cellDef; /* Cell whose properties are being read */
char *line; /* Line containing << properties >> */
int len; /* Size of buffer pointed to by line */
FILETYPE f; /* Input file */
int scalen; /* Scale up by this factor */
int scaled; /* Scale down by this factor */
dbReadProperties(
CellDef *cellDef, /* Cell whose properties are being read */
char *line, /* Line containing << properties >> */
int len, /* Size of buffer pointed to by line */
FILETYPE f, /* Input file */
int scalen, /* Scale up by this factor */
int scaled) /* Scale down by this factor */
{
char propertytype[32], propertyname[128], propertyvalue[2049];
PropertyRecord *proprec;
@ -2892,13 +2894,13 @@ nextproperty:
*/
bool
dbReadElements(cellDef, line, len, f, scalen, scaled)
CellDef *cellDef; /* Cell whose elements are being read */
char *line; /* Line containing << elements >> */
int len; /* Size of buffer pointed to by line */
FILETYPE f; /* Input file */
int scalen; /* Scale up by this factor */
int scaled; /* Scale down by this factor */
dbReadElements(
CellDef *cellDef, /* Cell whose elements are being read */
char *line, /* Line containing << elements >> */
int len, /* Size of buffer pointed to by line */
FILETYPE f, /* Input file */
int scalen, /* Scale up by this factor */
int scaled) /* Scale down by this factor */
{
char elementname[128], styles[1024], *text, flags[100];
int istyle, ntok;
@ -3066,13 +3068,13 @@ nextelement:
*/
bool
dbReadLabels(cellDef, line, len, f, scalen, scaled)
CellDef *cellDef; /* Cell whose labels are being read */
char *line; /* Line containing << labels >> */
int len; /* Size of buffer pointed to by line */
FILETYPE f; /* Input file */
int scalen; /* Scale up by this factor */
int scaled; /* Scale down by this factor */
dbReadLabels(
CellDef *cellDef, /* Cell whose labels are being read */
char *line, /* Line containing << labels >> */
int len, /* Size of buffer pointed to by line */
FILETYPE f, /* Input file */
int scalen, /* Scale up by this factor */
int scaled) /* Scale down by this factor */
{
char layername[50], text[1024], port_use[50], port_class[50], port_shape[50];
TileType type;
@ -3385,10 +3387,10 @@ nextlabel:
*/
char *
dbFgets(line, len, f)
char *line;
int len;
FILETYPE f;
dbFgets(
char *line,
int len,
FILETYPE f)
{
char *cs;
int l;
@ -3430,8 +3432,8 @@ dbFgets(line, len, f)
*/
int
DBCellFindScale(cellDef)
CellDef *cellDef;
DBCellFindScale(
CellDef *cellDef)
{
int dbFindGCFFunc(), dbFindCellGCFFunc(), dbFindPropGCFFunc();
TileType type;
@ -3508,10 +3510,10 @@ DBCellFindScale(cellDef)
*/
int
dbFindGCFFunc(tile, dinfo, ggcf)
Tile *tile;
TileType dinfo; /* (unused) */
int *ggcf;
dbFindGCFFunc(
Tile *tile,
TileType dinfo, /* (unused) */
int *ggcf)
{
Rect r;
@ -3548,9 +3550,9 @@ dbFindGCFFunc(tile, dinfo, ggcf)
*/
int
dbFindCellGCFFunc(cellUse, ggcf)
CellUse *cellUse; /* Cell use whose "call" is to be written to a file */
int *ggcf; /* Greatest common denominator for all geometry */
dbFindCellGCFFunc(
CellUse *cellUse, /* Cell use whose "call" is to be written to a file */
int *ggcf) /* Greatest common denominator for all geometry */
{
Transform *t;
Rect *b;
@ -3605,10 +3607,10 @@ dbFindCellGCFFunc(cellUse, ggcf)
*/
int
dbFindPropGCFFunc(key, proprec, ggcf)
char *key;
PropertyRecord *proprec;
int *ggcf; /* Client data */
dbFindPropGCFFunc(
char *key,
PropertyRecord *proprec,
int *ggcf) /* Client data */
{
int value, n;
@ -3652,7 +3654,9 @@ dbFindPropGCFFunc(key, proprec, ggcf)
*/
int
cucompare(const void *one, const void *two)
cucompare(
const void *one,
const void *two)
{
CellUse *use1, *use2;
char *s1, *s2;
@ -3692,9 +3696,9 @@ struct cellUseList {
*/
int
dbGetUseFunc(cellUse, useRec)
CellUse *cellUse; /* Cell use whose "call" is to be written to a file */
struct cellUseList *useRec;
dbGetUseFunc(
CellUse *cellUse, /* Cell use whose "call" is to be written to a file */
struct cellUseList *useRec)
{
useRec->useList[useRec->idx] = cellUse;
useRec->idx++;
@ -3720,9 +3724,9 @@ dbGetUseFunc(cellUse, useRec)
*/
int
dbCountUseFunc(cellUse, count)
CellUse *cellUse; /* Cell use whose "call" is to be written to a file */
int *count;
dbCountUseFunc(
CellUse *cellUse, /* Cell use whose "call" is to be written to a file */
int *count)
{
(*count)++;
return 0;
@ -3754,7 +3758,9 @@ struct keyValuePair {
*/
int
keycompare(const void *one, const void *two)
keycompare(
const void *one,
const void *two)
{
int cval;
struct keyValuePair *kv1 = *((struct keyValuePair **)one);
@ -3792,10 +3798,10 @@ struct cellPropList {
*/
int
dbGetPropFunc(key, proprec, propRec)
char *key;
PropertyRecord *proprec;
struct cellPropList *propRec;
dbGetPropFunc(
char *key,
PropertyRecord *proprec,
struct cellPropList *propRec)
{
propRec->keyValueList[propRec->idx] =
(struct keyValuePair *)mallocMagic(sizeof(struct keyValuePair));
@ -3824,10 +3830,10 @@ dbGetPropFunc(key, proprec, propRec)
*/
int
dbCountPropFunc(key, proprec, count)
char *key;
PropertyRecord *proprec;
int *count; /* Client data */
dbCountPropFunc(
char *key,
PropertyRecord *proprec,
int *count) /* Client data */
{
(*count)++;
return 0;
@ -3875,9 +3881,9 @@ typedef struct _pwfrec {
*/
bool
DBCellWriteFile(cellDef, f)
CellDef *cellDef; /* Pointer to definition of cell to be written out */
FILE *f; /* The FILE to write to */
DBCellWriteFile(
CellDef *cellDef, /* Pointer to definition of cell to be written out */
FILE *f) /* The FILE to write to */
{
int dbWritePaintFunc(), dbWriteCellFunc(), dbWritePropFunc();
int dbClearCellFunc();
@ -4220,10 +4226,10 @@ dbWritePropPaintFunc(Tile *tile,
*/
int
dbWritePropFunc(key, proprec, cdata)
char *key;
PropertyRecord *proprec;
ClientData cdata;
dbWritePropFunc(
char *key,
PropertyRecord *proprec,
ClientData cdata)
{
pwfrec *pwf = (pwfrec *)cdata;
FILE *f = pwf->pwf_file;
@ -4329,9 +4335,9 @@ dbWritePropFunc(key, proprec, cdata)
*/
bool
DBCellWriteCommandFile(cellDef, f)
CellDef *cellDef; /* Pointer to definition of cell to be written out */
FILE *f; /* The FILE to write to */
DBCellWriteCommandFile(
CellDef *cellDef, /* Pointer to definition of cell to be written out */
FILE *f) /* The FILE to write to */
{
int dbWritePaintCommandsFunc();
int dbWriteUseCommandsFunc();
@ -4552,10 +4558,10 @@ ioerror:
*/
int
dbWritePaintCommandsFunc(tile, dinfo, cdarg)
Tile *tile;
TileType dinfo;
ClientData cdarg;
dbWritePaintCommandsFunc(
Tile *tile,
TileType dinfo,
ClientData cdarg)
{
char pstring[256];
struct writeArg *arg = (struct writeArg *) cdarg;
@ -4623,9 +4629,9 @@ dbWritePaintCommandsFunc(tile, dinfo, cdarg)
*/
int
dbWriteUseCommandsFunc(cellUse, cdarg)
CellUse *cellUse;
ClientData cdarg;
dbWriteUseCommandsFunc(
CellUse *cellUse,
ClientData cdarg)
{
struct writeArg *arg = (struct writeArg *) cdarg;
FILE *f = arg->wa_file;
@ -4695,10 +4701,10 @@ dbWritePropCommandPaintFunc(Tile *tile,
*/
int
dbWritePropCommandsFunc(key, proprec, cdarg)
char *key;
PropertyRecord *proprec;
ClientData cdarg;
dbWritePropCommandsFunc(
char *key,
PropertyRecord *proprec,
ClientData cdarg)
{
struct writeArg *arg = (struct writeArg *) cdarg;
char *escstr, *p, *v, *value;
@ -4807,9 +4813,9 @@ dbWritePropCommandsFunc(key, proprec, cdarg)
*/
bool
DBCellWrite(cellDef, fileName)
CellDef *cellDef; /* Pointer to definition of cell to be written out */
char *fileName; /* If not NULL, name of file to write. If NULL,
DBCellWrite(
CellDef *cellDef, /* Pointer to definition of cell to be written out */
char *fileName) /* If not NULL, name of file to write. If NULL,
* the name associated with the CellDef is used
*/
{
@ -5137,10 +5143,10 @@ cleanup:
*/
int
dbWritePaintFunc(tile, dinfo, cdarg)
Tile *tile;
TileType dinfo; /* (unused) */
ClientData cdarg;
dbWritePaintFunc(
Tile *tile,
TileType dinfo, /* (unused) */
ClientData cdarg)
{
char pstring[256];
struct writeArg *arg = (struct writeArg *) cdarg;
@ -5222,9 +5228,9 @@ dbWritePaintFunc(tile, dinfo, cdarg)
*/
int
dbClearCellFunc(cellUse, cdarg)
CellUse *cellUse; /* Cell use */
ClientData cdarg; /* Not used */
dbClearCellFunc(
CellUse *cellUse, /* Cell use */
ClientData cdarg) /* Not used */
{
cellUse->cu_def->cd_flags &= ~CDVISITED;
return 0;
@ -5255,10 +5261,10 @@ dbClearCellFunc(cellUse, cdarg)
*/
void
DBPathSubstitute(pathstart, cstring, cellDef)
char *pathstart;
char *cstring;
CellDef *cellDef;
DBPathSubstitute(
char *pathstart,
char *cstring,
CellDef *cellDef)
{
bool subbed = FALSE;
#ifdef MAGIC_WRAPPER
@ -5347,9 +5353,9 @@ DBPathSubstitute(pathstart, cstring, cellDef)
*/
int
dbWriteCellFunc(cellUse, cdarg)
CellUse *cellUse; /* Cell use whose "call" is to be written to a file */
ClientData cdarg;
dbWriteCellFunc(
CellUse *cellUse, /* Cell use whose "call" is to be written to a file */
ClientData cdarg)
{
struct writeArg *arg = (struct writeArg *) cdarg;
Transform *t;
@ -5461,8 +5467,8 @@ dbWriteCellFunc(cellUse, cdarg)
*/
char *
DBGetTech(cellName)
char *cellName; /* Name of cell whose technology
DBGetTech(
char *cellName) /* Name of cell whose technology
* is desired.
*/
{
@ -5491,7 +5497,7 @@ ret:
}
/* File and flags record used to hold information for dbWriteBackupFunc()
* in DBWriteBackup()
* in DBWriteBackup().
*/
typedef struct _fileAndFlags {
@ -5532,10 +5538,10 @@ typedef struct _fileAndFlags {
*/
bool
DBWriteBackup(filename, archive, doforall)
char *filename;
bool archive;
bool doforall;
DBWriteBackup(
char *filename,
bool archive,
bool doforall)
{
FILE *f;
int fd, pid;
@ -5657,9 +5663,9 @@ DBWriteBackup(filename, archive, doforall)
*/
int
dbWriteBackupFunc(def, clientData)
CellDef *def; /* Pointer to CellDef to be saved */
ClientData clientData;
dbWriteBackupFunc(
CellDef *def, /* Pointer to CellDef to be saved */
ClientData clientData)
{
char *name = def->cd_file;
int result, save_flags;
@ -5693,9 +5699,9 @@ dbWriteBackupFunc(def, clientData)
*/
int
dbCheckModifiedCellsFunc(def, cdata)
CellDef *def; /* Pointer to CellDef to be saved */
ClientData cdata; /* Unused */
dbCheckModifiedCellsFunc(
CellDef *def, /* Pointer to CellDef to be saved */
ClientData cdata) /* Unused */
{
if (def->cd_flags & (CDINTERNAL | CDNOEDIT | CDNOTFOUND)) return 0;
else if (!(def->cd_flags & CDAVAILABLE)) return 0;

View File

@ -43,7 +43,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include "commands/commands.h"
#include "textio/textio.h"
static TileType DBPickLabelLayer(/* CellDef *def, Label *lab, bool doCalma */);
static TileType DBPickLabelLayer(CellDef *def, Label *lab, bool doCalma);
/* Globally-accessible font information */
@ -68,8 +68,8 @@ int DBNumFonts = 0;
*/
bool
DBIsSubcircuit(cellDef)
CellDef *cellDef;
DBIsSubcircuit(
CellDef *cellDef)
{
Label *lab;
@ -94,14 +94,14 @@ DBIsSubcircuit(cellDef)
*/
Label *
DBPutLabel(cellDef, rect, align, text, type, flags, port)
CellDef *cellDef;
Rect *rect;
int align;
char *text;
TileType type;
unsigned short flags;
unsigned int port;
DBPutLabel(
CellDef *cellDef,
Rect *rect,
int align,
char *text,
TileType type,
unsigned short flags,
unsigned int port)
{
/* Draw text in a standard X11 font */
return DBPutFontLabel(cellDef, rect, -1, 0, 0, &GeoOrigin,
@ -132,21 +132,21 @@ DBPutLabel(cellDef, rect, align, text, type, flags, port)
* ----------------------------------------------------------------------------
*/
Label *
DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags, port)
CellDef *cellDef; /* Cell in which label is placed */
Rect *rect; /* Location of label; see above for description */
int font; /* A vector outline font to use, or -1 for X11 font */
int size; /* Scale of vector font relative to the database (x8) */
int rot; /* Rotate of the vector font in degrees */
Point *offset; /* Offset of the font from the point of origin */
int align; /* Orientation/alignment of text. If this is < 0,
DBPutFontLabel(
CellDef *cellDef, /* Cell in which label is placed */
Rect *rect, /* Location of label; see above for description */
int font, /* A vector outline font to use, or -1 for X11 font */
int size, /* Scale of vector font relative to the database (x8) */
int rot, /* Rotate of the vector font in degrees */
Point *offset, /* Offset of the font from the point of origin */
int align, /* Orientation/alignment of text. If this is < 0,
* an orientation will be picked to keep the text
* inside the cell boundary.
*/
char *text; /* Pointer to actual text of label */
TileType type; /* Type of tile to be labelled */
unsigned short flags; /* Label flags */
unsigned int port; /* Port index (if label is a port, per the flags) */
char *text, /* Pointer to actual text of label */
TileType type, /* Type of tile to be labelled */
unsigned short flags, /* Label flags */
unsigned int port) /* Port index (if label is a port, per the flags) */
{
Label *lab;
int len, x1, x2, y1, y2, tmp, labx, laby;
@ -262,17 +262,17 @@ DBPutFontLabel(cellDef, rect, font, size, rot, offset, align, text, type, flags,
*/
bool
DBEraseGlobLabel(cellDef, area, mask, areaReturn, globmatch)
CellDef *cellDef; /* Cell being modified */
Rect *area; /* Area from which labels are to be erased.
DBEraseGlobLabel(
CellDef *cellDef, /* Cell being modified */
Rect *area, /* Area from which labels are to be erased.
* This may be a point; any labels touching
* or overlapping it are erased.
*/
TileTypeBitMask *mask; /* Mask of types from which labels are to
TileTypeBitMask *mask, /* Mask of types from which labels are to
* be erased.
*/
Rect *areaReturn; /* Expand this with label bounding box */
char *globmatch; /* If non-NULL, do glob-style matching of
Rect *areaReturn, /* Expand this with label bounding box */
char *globmatch) /* If non-NULL, do glob-style matching of
* any label against this string.
*/
{
@ -353,16 +353,16 @@ DBEraseGlobLabel(cellDef, area, mask, areaReturn, globmatch)
*/
bool
DBEraseLabel(cellDef, area, mask, areaReturn)
CellDef *cellDef; /* Cell being modified */
Rect *area; /* Area from which labels are to be erased.
DBEraseLabel(
CellDef *cellDef, /* Cell being modified */
Rect *area, /* Area from which labels are to be erased.
* This may be a point; any labels touching
* or overlapping it are erased.
*/
TileTypeBitMask *mask; /* Mask of types from which labels are to
TileTypeBitMask *mask, /* Mask of types from which labels are to
* be erased.
*/
Rect *areaReturn; /* Expand this with label bounding box */
Rect *areaReturn) /* Expand this with label bounding box */
{
return DBEraseGlobLabel(cellDef, area, mask, areaReturn, NULL);
}
@ -385,15 +385,15 @@ DBEraseLabel(cellDef, area, mask, areaReturn)
*/
Label *
DBCheckLabelsByContent(def, rect, type, text)
CellDef *def; /* Where to look for label to delete. */
Rect *rect; /* Coordinates of label. If NULL, then
DBCheckLabelsByContent(
CellDef *def, /* Where to look for label to delete. */
Rect *rect, /* Coordinates of label. If NULL, then
* labels are searched regardless of coords.
*/
TileType type; /* Layer label is attached to. If < 0, then
TileType type, /* Layer label is attached to. If < 0, then
* labels are searched regardless of type.
*/
char *text; /* Text associated with label. If NULL, then
char *text) /* Text associated with label. If NULL, then
* labels are searched regardless of text.
*/
{
@ -430,15 +430,15 @@ DBCheckLabelsByContent(def, rect, type, text)
*/
void
DBEraseLabelsByContent(def, rect, type, text)
CellDef *def; /* Where to look for label to delete. */
Rect *rect; /* Coordinates of label. If NULL, then
DBEraseLabelsByContent(
CellDef *def, /* Where to look for label to delete. */
Rect *rect, /* Coordinates of label. If NULL, then
* labels are deleted regardless of coords.
*/
TileType type; /* Layer label is attached to. If < 0, then
TileType type, /* Layer label is attached to. If < 0, then
* labels are deleted regardless of type.
*/
char *text; /* Text associated with label. If NULL, then
char *text) /* Text associated with label. If NULL, then
* labels are deleted regardless of text.
*/
{
@ -493,9 +493,9 @@ DBEraseLabelsByContent(def, rect, type, text)
*/
void
DBRemoveLabel(def, refLab)
CellDef *def; /* Where to look for label to delete. */
Label *refLab;
DBRemoveLabel(
CellDef *def, /* Where to look for label to delete. */
Label *refLab)
{
Label *lab, *labPrev;
@ -544,12 +544,12 @@ DBRemoveLabel(def, refLab)
*/
void
DBReOrientLabel(cellDef, area, newPos)
CellDef *cellDef; /* Cell whose labels are to be modified. */
Rect *area; /* All labels touching this area have their
DBReOrientLabel(
CellDef *cellDef, /* Cell whose labels are to be modified. */
Rect *area, /* All labels touching this area have their
* text positions changed.
*/
int newPos; /* New text positions for all labels in
int newPos) /* New text positions for all labels in
* the area, for example, GEO_NORTH.
*/
{
@ -584,10 +584,10 @@ DBReOrientLabel(cellDef, area, newPos)
*/
int
dbGetLabelArea(tile, dinfo, area)
Tile *tile; /* Tile found. */
TileType dinfo; /* Split tile information (unused) */
Rect *area; /* Area to be modified. */
dbGetLabelArea(
Tile *tile, /* Tile found. */
TileType dinfo, /* Split tile information (unused) */
Rect *area) /* Area to be modified. */
{
Rect r;
@ -617,10 +617,10 @@ dbGetLabelArea(tile, dinfo, area)
*/
int
dbLabelNotEmpty(tile, dinfo, clientData)
Tile *tile; /* Tile found. */
TileType dinfo; /* Split tile information (unused) */
ClientData clientData; /* (unused) */
dbLabelNotEmpty(
Tile *tile, /* Tile found. */
TileType dinfo, /* Split tile information (unused) */
ClientData clientData) /* (unused) */
{
return 1;
}
@ -648,9 +648,9 @@ dbLabelNotEmpty(tile, dinfo, clientData)
*/
void
DBAdjustLabels(def, area)
CellDef *def; /* Cell whose paint was changed. */
Rect *area; /* Area where paint was modified. */
DBAdjustLabels(
CellDef *def, /* Cell whose paint was changed. */
Rect *area) /* Area where paint was modified. */
{
Label *lab;
TileType newType;
@ -759,9 +759,9 @@ DBAdjustLabels(def, area)
*/
void
DBAdjustLabelsNew(def, area)
CellDef *def; /* Cell whose paint was changed. */
Rect *area; /* Area where paint was modified. */
DBAdjustLabelsNew(
CellDef *def, /* Cell whose paint was changed. */
Rect *area) /* Area where paint was modified. */
{
Label *lab, *labPrev;
TileType newType;
@ -863,10 +863,10 @@ TileTypeBitMask *dbAdjustPlaneTypes; /* Mask of all types in current
* plane being searched.
*/
TileType
DBPickLabelLayer(def, lab, doCalma)
CellDef *def; /* Cell definition containing label. */
Label *lab; /* Label for which a home must be found. */
bool doCalma; /* if TRUE, use rules for GDS and LEF */
DBPickLabelLayer(
CellDef *def, /* Cell definition containing label. */
Label *lab, /* Label for which a home must be found. */
bool doCalma) /* if TRUE, use rules for GDS and LEF */
{
TileTypeBitMask types[3], types2[3];
Rect check1, check2;
@ -1116,10 +1116,10 @@ DBPickLabelLayer(def, lab, doCalma)
*/
int
dbPickFunc1(tile, dinfo, mask)
Tile *tile; /* Tile found. */
TileType dinfo; /* Split tile information */
TileTypeBitMask *mask; /* Mask to be modified. */
dbPickFunc1(
Tile *tile, /* Tile found. */
TileType dinfo, /* Split tile information */
TileTypeBitMask *mask) /* Mask to be modified. */
{
TileType type;
@ -1143,10 +1143,10 @@ dbPickFunc1(tile, dinfo, mask)
*/
int
dbPickFunc2(tile, dinfo, mask)
Tile *tile; /* Tile found. */
TileType dinfo; /* Split tile information */
TileTypeBitMask *mask; /* Mask to be modified. */
dbPickFunc2(
Tile *tile, /* Tile found. */
TileType dinfo, /* Split tile information */
TileTypeBitMask *mask) /* Mask to be modified. */
{
TileType type;
TileTypeBitMask tmp, *rMask;
@ -1230,9 +1230,9 @@ DBFontInitCurves()
*/
void
CalcBezierPoints(fp, bp)
FontPath *fp; /* Pointer to last point of closed path */
FontPath *bp; /* Pointer to 1st of 3 bezier control points */
CalcBezierPoints(
FontPath *fp, /* Pointer to last point of closed path */
FontPath *bp) /* Pointer to 1st of 3 bezier control points */
{
FontPath *newPath, *curPath;
Point *beginPath, *ctrl1, *ctrl2, *endPath;
@ -1286,8 +1286,8 @@ CalcBezierPoints(fp, bp)
*/
char *
dbGetToken(ff)
FILE *ff;
dbGetToken(
FILE *ff)
{
static char line[512];
static char *lineptr = NULL;
@ -1351,8 +1351,8 @@ dbGetToken(ff)
*/
void
DBFontLabelSetBBox(label)
Label *label;
DBFontLabelSetBBox(
Label *label)
{
char *tptr;
Point *coffset, rcenter;
@ -1511,12 +1511,12 @@ DBFontLabelSetBBox(label)
*/
int
DBFontChar(font, ccode, clist, coffset, cbbox)
int font; /* Index of font */
char ccode; /* ASCII character code */
FontChar **clist; /* Return vector list here */
Point **coffset; /* Return position offset here */
Rect **cbbox; /* Return bounding box here */
DBFontChar(
int font, /* Index of font */
char ccode, /* ASCII character code */
FontChar **clist, /* Return vector list here */
Point **coffset, /* Return position offset here */
Rect **cbbox) /* Return bounding box here */
{
if (font < 0 || font >= DBNumFonts) return - 1;
@ -1548,8 +1548,8 @@ DBFontChar(font, ccode, clist, coffset, cbbox)
*/
int
DBNameToFont(name)
char *name;
DBNameToFont(
char *name)
{
int i;
for (i = 0; i < DBNumFonts; i++)
@ -1585,9 +1585,9 @@ DBNameToFont(name)
#define NUMBUF 16
int
DBLoadFont(fontfile, scale)
char *fontfile;
float scale;
DBLoadFont(
char *fontfile,
float scale)
{
FILE *ff;
const char * const ascii_names[] = {

View File

@ -106,20 +106,20 @@ bool dbParseArray();
*/
int
DBSearchLabel(scx, mask, xMask, pattern, func, cdarg)
SearchContext *scx; /* Search context: specifies CellUse,
DBSearchLabel(
SearchContext *scx, /* Search context: specifies CellUse,
* transform to "root" coordinates, and
* an area to search.
*/
TileTypeBitMask *mask; /* Only search for labels on these layers */
int xMask; /* Expansion state mask for searching. Cell
TileTypeBitMask *mask, /* Only search for labels on these layers */
int xMask, /* Expansion state mask for searching. Cell
* uses are only considered to be expanded
* when their expand masks have all the bits
* of xMask set.
*/
char *pattern; /* Pattern for which to search */
int (*func)(); /* Function to apply to each match */
ClientData cdarg; /* Argument to pass to function */
char *pattern, /* Pattern for which to search */
int (*func)(), /* Function to apply to each match */
ClientData cdarg) /* Argument to pass to function */
{
TerminalPath tpath;
int dbSrLabelFunc();
@ -160,14 +160,14 @@ DBSearchLabel(scx, mask, xMask, pattern, func, cdarg)
*/
int
dbSrLabelFunc(scx, label, tpath, labsr)
SearchContext *scx; /* Contains pointer to use in which label
dbSrLabelFunc(
SearchContext *scx, /* Contains pointer to use in which label
* occurred, and transform back to root
* coordinates.
*/
Label *label; /* Label itself */
TerminalPath *tpath; /* Full pathname of the terminal */
labSrStruct *labsr; /* Information passed to this routine */
Label *label, /* Label itself */
TerminalPath *tpath, /* Full pathname of the terminal */
labSrStruct *labsr) /* Information passed to this routine */
{
if (Match(labsr->labSrPattern, label->lab_text))
if ((*labsr->labSrFunc)(scx, label, tpath, labsr->labSrArg))
@ -209,14 +209,14 @@ dbSrLabelFunc(scx, label, tpath, labsr)
*/
int
DBSrLabelLoc(rootUse, name, func, cdarg)
CellUse *rootUse; /* Cell in which to search. */
char *name; /* A hierarchical label name consisting of zero or more
DBSrLabelLoc(
CellUse *rootUse, /* Cell in which to search. */
char *name, /* A hierarchical label name consisting of zero or more
* use-ids followed by a label name (fields separated
* with slashes).
*/
int (*func)(); /* Applied to each instance of the label name */
ClientData cdarg; /* Data to pass through to (*func)() */
int (*func)(), /* Applied to each instance of the label name */
ClientData cdarg) /* Data to pass through to (*func)() */
{
CellDef *def;
SearchContext scx;
@ -273,10 +273,10 @@ DBSrLabelLoc(rootUse, name, func, cdarg)
*/
void
DBTreeFindUse(name, use, scx)
char *name;
CellUse *use;
SearchContext *scx;
DBTreeFindUse(
char *name,
CellUse *use,
SearchContext *scx)
{
char *cp;
HashEntry *he;
@ -369,10 +369,10 @@ DBTreeFindUse(name, use, scx)
*/
bool
dbParseArray(cp, use, scx)
char *cp;
CellUse *use;
SearchContext *scx;
dbParseArray(
char *cp,
CellUse *use,
SearchContext *scx)
{
int xdelta, ydelta, i1, i2, indexCount;
Transform trans, trans2;
@ -491,22 +491,22 @@ dbParseArray(cp, use, scx)
*/
bool
DBNearestLabel(cellUse, area, point, xMask, labelArea, labelName, length)
CellUse *cellUse; /* Start search at this cell. */
Rect *area; /* Search this area of cellUse. */
Point *point; /* Find nearest label to this point. */
int xMask; /* Recursively search subcells as long
DBNearestLabel(
CellUse *cellUse, /* Start search at this cell. */
Rect *area, /* Search this area of cellUse. */
Point *point, /* Find nearest label to this point. */
int xMask, /* Recursively search subcells as long
* as their expand masks, when anded with
* xMask, are equal to xMask. 0 means search
* all the way down through the hierarchy.
*/
Rect *labelArea; /* To be filled in with area of closest
Rect *labelArea, /* To be filled in with area of closest
* label. NULL means ignore.
*/
char *labelName; /* Fill this in with name of label, unless
char *labelName, /* Fill this in with name of label, unless
* NULL.
*/
int length; /* This gives the maximum number of chars
int length) /* This gives the maximum number of chars
* that may be used in labelName, including
* the NULL character to terminate.
*/
@ -567,11 +567,11 @@ DBNearestLabel(cellUse, area, point, xMask, labelArea, labelName, length)
*/
int
dbNearestLabelFunc(scx, label, tpath, funcData)
SearchContext *scx; /* Describes state of search. */
Label *label; /* Label found. */
TerminalPath *tpath; /* Name of label. */
struct nldata *funcData; /* Parameters to DBNearestLabel (passed as
dbNearestLabelFunc(
SearchContext *scx, /* Describes state of search. */
Label *label, /* Label found. */
TerminalPath *tpath, /* Name of label. */
struct nldata *funcData) /* Parameters to DBNearestLabel (passed as
* ClientData).
*/
{

View File

@ -49,7 +49,7 @@ extern UndoType dbUndoIDPaint, dbUndoIDSplit, dbUndoIDJoin;
/* ----------------------- Forward declarations ----------------------- */
Tile *dbPaintMerge();
Tile *dbPaintMerge(Tile *tile, TileType newType, Rect *area, Plane *plane, int mergeFlags, PaintUndoInfo *undo, bool mark);
Tile *dbMergeType();
Tile *dbPaintMergeVert();
@ -162,10 +162,10 @@ int dbPaintDebug = 0;
*/
void
dbSplitUndo(tile, splitx, undo)
Tile *tile;
int splitx;
PaintUndoInfo *undo;
dbSplitUndo(
Tile *tile,
int splitx,
PaintUndoInfo *undo)
{
splitUE *xxsup;
@ -181,10 +181,10 @@ dbSplitUndo(tile, splitx, undo)
}
void
dbJoinUndo(tile, splitx, undo)
Tile *tile;
int splitx;
PaintUndoInfo *undo;
dbJoinUndo(
Tile *tile,
int splitx,
PaintUndoInfo *undo)
{
splitUE *xxsup;
@ -239,19 +239,19 @@ dbJoinUndo(tile, splitx, undo)
*/
int
DBPaintPlane0(plane, area, resultTbl, undo, method)
Plane *plane; /* Plane whose paint is to be modified */
Rect *area; /* Area to be changed */
const PaintResultType *resultTbl; /* Table, indexed by the type of tile already
DBPaintPlane0(
Plane *plane, /* Plane whose paint is to be modified */
Rect *area, /* Area to be changed */
const PaintResultType *resultTbl, /* Table, indexed by the type of tile already
* present in the plane, giving the type to
* which the existing tile must change as a
* result of this paint operation.
*/
PaintUndoInfo *undo; /* Record containing everything needed to
PaintUndoInfo *undo, /* Record containing everything needed to
* save undo entries for this operation.
* If NULL, the undo package is not used.
*/
unsigned char method; /* If PAINT_MARK, the routine marks tiles as it
unsigned char method) /* If PAINT_MARK, the routine marks tiles as it
* goes to avoid processing tiles twice.
*/
{
@ -735,10 +735,10 @@ done2:
*/
void
DBSplitTile(plane, point, splitx)
Plane *plane;
Point *point;
int splitx;
DBSplitTile(
Plane *plane,
Point *point,
int splitx)
{
Tile *tile, *newtile, *tp;
tile = PlaneGetHint(plane);
@ -785,13 +785,13 @@ DBSplitTile(plane, point, splitx)
*/
void
DBFracturePlane(plane, area, resultTbl, undo)
Plane *plane; /* Plane whose paint is to be modified */
Rect *area; /* Area to be changed */
const PaintResultType *resultTbl; /* Paint table, to pinpoint those tiles
DBFracturePlane(
Plane *plane, /* Plane whose paint is to be modified */
Rect *area, /* Area to be changed */
const PaintResultType *resultTbl, /* Paint table, to pinpoint those tiles
* that interact with the paint type.
*/
PaintUndoInfo *undo; /* Record containing everything needed to
PaintUndoInfo *undo) /* Record containing everything needed to
* save undo entries for this operation.
* If NULL, the undo package is not used.
*/
@ -1044,11 +1044,11 @@ done:
*/
int
DBMergeNMTiles0(plane, area, undo, mergeOnce)
Plane *plane;
Rect *area;
PaintUndoInfo *undo;
bool mergeOnce;
DBMergeNMTiles0(
Plane *plane,
Rect *area,
PaintUndoInfo *undo,
bool mergeOnce)
{
Point start;
int clipTop;
@ -1357,9 +1357,9 @@ nmdone:
*/
int
DBDiagonalProc(oldtype, dinfo)
TileType oldtype;
DiagInfo *dinfo;
DBDiagonalProc(
TileType oldtype,
DiagInfo *dinfo)
{
TileType old_n, old_s, old_e, old_w;
TileType new_n, new_s, new_e, new_w;
@ -1816,10 +1816,10 @@ nextrect:
*/
int
dbNMEnumFunc(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
LinkedRect **arg;
dbNMEnumFunc(
Tile *tile,
TileType dinfo,
LinkedRect **arg)
{
LinkedRect *lr;
@ -1849,9 +1849,9 @@ dbNMEnumFunc(tile, dinfo, arg)
*/
void
dbMarkClient(tile, clip)
Tile *tile;
Rect *clip;
dbMarkClient(
Tile *tile,
Rect *clip)
{
if (LEFT(tile) < clip->r_xtop &&
RIGHT(tile) > clip->r_xbot &&
@ -1899,14 +1899,14 @@ dbMarkClient(tile, clip)
*/
Tile *
dbPaintMerge(tile, newType, area, plane, mergeFlags, undo, mark)
Tile *tile; /* Tile to be merged with its neighbors */
TileType newType; /* Type to which we will change 'tile' */
Rect *area; /* Original area painted, needed for marking */
Plane *plane; /* Plane on which this resides */
int mergeFlags; /* Specify which directions to merge */
PaintUndoInfo *undo; /* See DBPaintPlane() above */
bool mark; /* Mark tiles that were processed */
dbPaintMerge(
Tile *tile, /* Tile to be merged with its neighbors */
TileType newType, /* Type to which we will change 'tile' */
Rect *area, /* Original area painted, needed for marking */
Plane *plane, /* Plane on which this resides */
int mergeFlags, /* Specify which directions to merge */
PaintUndoInfo *undo, /* See DBPaintPlane() above */
bool mark) /* Mark tiles that were processed */
{
Tile *delayed = NULL; /* delayed free to extend lifetime */
Tile *tp, *tpLast;
@ -2086,20 +2086,20 @@ dbPaintMerge(tile, newType, area, plane, mergeFlags, undo, mark)
*/
void
DBPaintType(plane, area, resultTbl, client, undo, tileMask)
Plane *plane; /* Plane whose paint is to be modified */
Rect *area; /* Area to be changed */
const PaintResultType *resultTbl; /* Table, indexed by the type of tile already
DBPaintType(
Plane *plane, /* Plane whose paint is to be modified */
Rect *area, /* Area to be changed */
const PaintResultType *resultTbl, /* Table, indexed by the type of tile already
* present in the plane, giving the type to
* which the existing tile must change as a
* result of this paint operation.
*/
ClientData client; /* ClientData for tile */
PaintUndoInfo *undo; /* Record containing everything needed to
ClientData client, /* ClientData for tile */
PaintUndoInfo *undo, /* Record containing everything needed to
* save undo entries for this operation.
* If NULL, the undo package is not used.
*/
TileTypeBitMask *tileMask; /* Mask of un-mergable tile types */
TileTypeBitMask *tileMask) /* Mask of un-mergable tile types */
{
Point start;
int clipTop, mergeFlags;
@ -2399,13 +2399,13 @@ done:
*/
Tile *
dbMergeType(tile, newType, plane, mergeFlags, undo, client)
Tile *tile; /* Tile to be merged with its neighbors */
TileType newType; /* Type to which we will change 'tile' */
Plane *plane; /* Plane on which this resides */
int mergeFlags; /* Specify which directions to merge */
PaintUndoInfo *undo; /* See DBPaintPlane() above */
ClientData client;
dbMergeType(
Tile *tile, /* Tile to be merged with its neighbors */
TileType newType, /* Type to which we will change 'tile' */
Plane *plane, /* Plane on which this resides */
int mergeFlags, /* Specify which directions to merge */
PaintUndoInfo *undo, /* See DBPaintPlane() above */
ClientData client)
{
Tile *delayed = NULL; /* delayed free to extend lifetime */
Tile *tp, *tpLast;
@ -2581,15 +2581,15 @@ dbMergeType(tile, newType, plane, mergeFlags, undo, client)
*/
int
DBPaintPlaneVert(plane, area, resultTbl, undo)
Plane *plane; /* Plane whose paint is to be modified */
Rect *area; /* Area to be changed */
const PaintResultType *resultTbl; /* Table, indexed by the type of tile already
DBPaintPlaneVert(
Plane *plane, /* Plane whose paint is to be modified */
Rect *area, /* Area to be changed */
const PaintResultType *resultTbl, /* Table, indexed by the type of tile already
* present in the plane, giving the type to
* which the existing tile must change as a
* result of this paint operation.
*/
PaintUndoInfo *undo; /* Record containing everything needed to
PaintUndoInfo *undo) /* Record containing everything needed to
* save undo entries for this operation.
* If NULL, the undo package is not used.
*/
@ -2873,12 +2873,12 @@ done:
*/
Tile *
dbPaintMergeVert(tile, newType, plane, mergeFlags, undo)
Tile *tile; /* Tile to be merged with its neighbors */
TileType newType; /* Type to which we will change 'tile' */
Plane *plane; /* Plane on which this resides */
int mergeFlags; /* Specify which directions to merge */
PaintUndoInfo *undo; /* See DBPaintPlane() above */
dbPaintMergeVert(
Tile *tile, /* Tile to be merged with its neighbors */
TileType newType, /* Type to which we will change 'tile' */
Plane *plane, /* Plane on which this resides */
int mergeFlags, /* Specify which directions to merge */
PaintUndoInfo *undo) /* See DBPaintPlane() above */
{
Tile *delayed = NULL; /* delayed free to extend lifetime */
Tile *tp, *tpLast;
@ -3040,10 +3040,10 @@ dbPaintMergeVert(tile, newType, plane, mergeFlags, undo)
#include "utils/styles.h"
void
dbPaintShowTile(tile, undo, str)
Tile *tile; /* Tile to be highlighted */
PaintUndoInfo *undo; /* Cell to which tile belongs is undo->pu_def */
char *str; /* Message to be displayed */
dbPaintShowTile(
Tile *tile, /* Tile to be highlighted */
PaintUndoInfo *undo, /* Cell to which tile belongs is undo->pu_def */
char *str) /* Message to be displayed */
{
char answer[100];
Rect r;
@ -3099,12 +3099,12 @@ dbPaintShowTile(tile, undo, str)
*/
bool
TiNMSplitY(oldtile, newtile, y, dir, undo)
Tile **oldtile; /* Tile to be split */
Tile **newtile; /* Tile to be generated */
int y; /* Y coordinate of split */
int dir; /* 1: new tile on top, 0: new tile on bottom */
PaintUndoInfo *undo; /* Undo record */
TiNMSplitY(
Tile **oldtile, /* Tile to be split */
Tile **newtile, /* Tile to be generated */
int y, /* Y coordinate of split */
int dir, /* 1: new tile on top, 0: new tile on bottom */
PaintUndoInfo *undo) /* Undo record */
{
long tmpdx;
int x, delx, height;
@ -3228,12 +3228,12 @@ TiNMSplitY(oldtile, newtile, y, dir, undo)
*/
bool
TiNMSplitX(oldtile, newtile, x, dir, undo)
Tile **oldtile; /* Tile to be split */
Tile **newtile; /* Tile to be generated */
int x; /* X coordinate of split */
int dir; /* 1: new tile on right, 0: new tile on left */
PaintUndoInfo *undo; /* Undo record */
TiNMSplitX(
Tile **oldtile, /* Tile to be split */
Tile **newtile, /* Tile to be generated */
int x, /* X coordinate of split */
int dir, /* 1: new tile on right, 0: new tile on left */
PaintUndoInfo *undo) /* Undo record */
{
long tmpdy;
int y, dely, width;
@ -3355,9 +3355,9 @@ TiNMSplitX(oldtile, newtile, x, dir, undo)
*/
Tile *
TiNMMergeRight(tile, plane)
Tile *tile;
Plane *plane;
TiNMMergeRight(
Tile *tile,
Plane *plane)
{
Tile *delayed = NULL; /* delayed free to extend lifetime */
TileType ttype = TiGetTypeExact(tile);
@ -3438,9 +3438,9 @@ TiNMMergeRight(tile, plane)
*/
Tile *
TiNMMergeLeft(tile, plane)
Tile *tile;
Plane *plane;
TiNMMergeLeft(
Tile *tile,
Plane *plane)
{
Tile *delayed = NULL; /* delayed free to extend lifetime */
TileType ttype = TiGetTypeExact(tile);

View File

@ -46,10 +46,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
void
DBPaint (cellDef, rect, type)
CellDef * cellDef; /* CellDef to modify */
Rect * rect; /* Area to paint */
TileType type; /* Type of tile to be painted */
DBPaint(
CellDef * cellDef, /* CellDef to modify */
Rect * rect, /* Area to paint */
TileType type) /* Type of tile to be painted */
{
int pNum;
PaintUndoInfo ui;
@ -119,10 +119,10 @@ DBPaint (cellDef, rect, type)
*/
int
dbResolveImages(tile, dinfo, cellDef)
Tile *tile;
TileType dinfo;
CellDef *cellDef;
dbResolveImages(
Tile *tile,
TileType dinfo,
CellDef *cellDef)
{
Rect rect;
@ -153,10 +153,10 @@ dbResolveImages(tile, dinfo, cellDef)
*/
void
DBErase (cellDef, rect, type)
CellDef * cellDef; /* Cell to modify */
Rect * rect; /* Area to paint */
TileType type; /* Type of tile to be painted */
DBErase(
CellDef * cellDef, /* Cell to modify */
Rect * rect, /* Area to paint */
TileType type) /* Type of tile to be painted */
{
int pNum;
PaintUndoInfo ui;
@ -225,10 +225,10 @@ DBErase (cellDef, rect, type)
*/
void
DBPaintMask(cellDef, rect, mask)
CellDef *cellDef; /* CellDef to modify */
Rect *rect; /* Area to paint */
TileTypeBitMask *mask; /* Mask of types to be erased */
DBPaintMask(
CellDef *cellDef, /* CellDef to modify */
Rect *rect, /* Area to paint */
TileTypeBitMask *mask) /* Mask of types to be erased */
{
TileType t;
@ -253,11 +253,11 @@ DBPaintMask(cellDef, rect, mask)
*/
void
DBPaintValid(cellDef, rect, mask, dinfo)
CellDef *cellDef; /* CellDef to modify */
Rect *rect; /* Area to paint */
TileTypeBitMask *mask; /* Mask of types to be erased */
TileType dinfo; /* If non-zero, then rect is a triangle and
DBPaintValid(
CellDef *cellDef, /* CellDef to modify */
Rect *rect, /* Area to paint */
TileTypeBitMask *mask, /* Mask of types to be erased */
TileType dinfo) /* If non-zero, then rect is a triangle and
* dinfo contains side and direction information
*/
{
@ -331,10 +331,10 @@ DBPaintValid(cellDef, rect, mask, dinfo)
*/
void
DBEraseMask(cellDef, rect, mask)
CellDef *cellDef; /* CellDef to modify */
Rect *rect; /* Area to erase */
TileTypeBitMask *mask; /* Mask of types to be erased */
DBEraseMask(
CellDef *cellDef, /* CellDef to modify */
Rect *rect, /* Area to erase */
TileTypeBitMask *mask) /* Mask of types to be erased */
{
TileType t;
@ -363,11 +363,11 @@ DBEraseMask(cellDef, rect, mask)
*/
void
DBEraseValid(cellDef, rect, mask, dinfo)
CellDef *cellDef; /* CellDef to modify */
Rect *rect; /* Area to erase */
TileTypeBitMask *mask; /* Mask of types to be erased */
TileType dinfo; /* w/Non-Manhattan geometry, "rect" is a
DBEraseValid(
CellDef *cellDef, /* CellDef to modify */
Rect *rect, /* Area to erase */
TileTypeBitMask *mask, /* Mask of types to be erased */
TileType dinfo) /* w/Non-Manhattan geometry, "rect" is a
* triangle and dinfo holds side & direction
*/
{

View File

@ -59,7 +59,7 @@ LayerInfo *dbContactInfo[NT];
int dbNumContacts;
/* Forward declaration */
void dbTechMatchResidues();
void dbTechMatchResidues(TileTypeBitMask *inMask, TileTypeBitMask *outMask, bool contactsOnly);
void dbTechAddStackedContacts();
int dbTechAddOneStackedContact();
@ -166,10 +166,10 @@ DBTechInitContact()
*/
bool
DBTechAddContact(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechAddContact(
char *sectionName,
int argc,
char *argv[])
{
TileType contactType;
int nresidues;
@ -335,8 +335,9 @@ dbTechAddStackedContacts()
*/
int
dbTechAddOneStackedContact(type1, type2)
TileType type1, type2;
dbTechAddOneStackedContact(
TileType type1,
TileType type2)
{
LayerInfo *lim, *lin, *lp;
TileTypeBitMask ttshared, ttall, mmask;
@ -438,9 +439,9 @@ dbTechAddOneStackedContact(type1, type2)
*/
TileType
DBPlaneToResidue(type, plane)
TileType type;
int plane;
DBPlaneToResidue(
TileType type,
int plane)
{
TileType rt, rt2;
LayerInfo *lp = &dbLayerInfo[type], *lr;
@ -475,8 +476,8 @@ DBPlaneToResidue(type, plane)
*/
void
DBMaskAddStacking(mask)
TileTypeBitMask *mask;
DBMaskAddStacking(
TileTypeBitMask *mask)
{
TileType ttype;
TileTypeBitMask *rMask;
@ -511,10 +512,10 @@ DBMaskAddStacking(mask)
*/
int
dbTechContactResidues(argc, argv, contactType)
int argc;
char **argv;
TileType contactType;
dbTechContactResidues(
int argc,
char **argv,
TileType contactType)
{
int homePlane, residuePlane, nresidues;
PlaneMask pMask;
@ -653,9 +654,10 @@ dbTechContactResidues(argc, argv, contactType)
*/
void
dbTechMatchResidues(inMask, outMask, contactsOnly)
TileTypeBitMask *inMask, *outMask;
bool contactsOnly;
dbTechMatchResidues(
TileTypeBitMask *inMask,
TileTypeBitMask *outMask,
bool contactsOnly)
{
TileType type;
LayerInfo *li;
@ -691,8 +693,9 @@ dbTechMatchResidues(inMask, outMask, contactsOnly)
*/
TileType
DBTechFindStacking(type1, type2)
TileType type1, type2;
DBTechFindStacking(
TileType type1,
TileType type2)
{
TileType rtype, rtype1, rtype2, stackType;
LayerInfo *li;
@ -821,9 +824,9 @@ DBTechFinalContact()
*/
bool
DBTechTypesOnPlane(src, plane)
TileTypeBitMask *src;
int plane;
DBTechTypesOnPlane(
TileTypeBitMask *src,
int plane)
{
int i;
PlaneMask pmask;
@ -856,8 +859,9 @@ DBTechTypesOnPlane(src, plane)
*/
TileType
DBTechGetContact(type1, type2)
TileType type1, type2;
DBTechGetContact(
TileType type1,
TileType type2)
{
int pmask;
LayerInfo *lp;
@ -888,8 +892,8 @@ DBTechGetContact(type1, type2)
*/
bool
DBIsContact(type)
TileType type;
DBIsContact(
TileType type)
{
if (IsContact(type)) return TRUE;
return FALSE;
@ -907,8 +911,8 @@ DBIsContact(type)
*/
PlaneMask
DBLayerPlanes(type)
TileType type;
DBLayerPlanes(
TileType type)
{
return LayerPlaneMask(type);
}
@ -924,8 +928,8 @@ DBLayerPlanes(type)
*/
TileTypeBitMask *
DBResidueMask(type)
TileType type;
DBResidueMask(
TileType type)
{
LayerInfo *li = &dbLayerInfo[type];
return (&li->l_residues);
@ -949,9 +953,9 @@ DBResidueMask(type)
*/
void
DBFullResidueMask(type, rmask)
TileType type;
TileTypeBitMask *rmask;
DBFullResidueMask(
TileType type,
TileTypeBitMask *rmask)
{
TileType t;
TileTypeBitMask *lmask;

View File

@ -101,10 +101,10 @@ DBTechInit()
/*ARGSUSED*/
bool
DBTechSetTech(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechSetTech(
char *sectionName,
int argc,
char *argv[])
{
if (argc != 1)
{
@ -169,10 +169,10 @@ DBTechInitVersion()
/*ARGSUSED*/
bool
DBTechSetVersion(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechSetVersion(
char *sectionName,
int argc,
char *argv[])
{
char *contline;
int n, slen;
@ -307,10 +307,10 @@ DBTechInitConnect()
/*ARGSUSED*/
bool
DBTechAddConnect(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechAddConnect(
char *sectionName,
int argc,
char *argv[])
{
TileTypeBitMask types1, types2;
TileType t1, t2;

View File

@ -61,8 +61,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
TileType
DBTechNameType(typename)
char *typename; /* The name of the type */
DBTechNameType(
char *typename) /* The name of the type */
{
char *slash;
TileType type;
@ -121,8 +121,8 @@ DBTechNameType(typename)
}
TileType
DBTechNameTypeExact(typename)
char *typename; /* The name of the type */
DBTechNameTypeExact(
char *typename) /* The name of the type */
{
char *slash;
ClientData result;
@ -148,9 +148,9 @@ DBTechNameTypeExact(typename)
*/
TileType
DBTechNameTypes(typename, bitmask)
char *typename; /* The name of the type */
TileTypeBitMask *bitmask;
DBTechNameTypes(
char *typename, /* The name of the type */
TileTypeBitMask *bitmask)
{
char *slash;
TileType type;
@ -223,8 +223,8 @@ DBTechNameTypes(typename, bitmask)
*/
TileType
DBTechNoisyNameType(typename)
char *typename; /* The name of the type */
DBTechNoisyNameType(
char *typename) /* The name of the type */
{
TileType type;
@ -262,8 +262,8 @@ DBTechNoisyNameType(typename)
*/
int
DBTechNamePlane(planename)
char *planename; /* The name of the plane */
DBTechNamePlane(
char *planename) /* The name of the plane */
{
return ((spointertype) dbTechNameLookup(planename, &dbPlaneNameLists));
}
@ -287,8 +287,8 @@ DBTechNamePlane(planename)
*/
int
DBTechNoisyNamePlane(planename)
char *planename; /* The name of the plane */
DBTechNoisyNamePlane(
char *planename) /* The name of the plane */
{
int pNum;
@ -387,8 +387,8 @@ DBPlaneShortName(
*/
PlaneMask
DBTechTypesToPlanes(mask)
TileTypeBitMask *mask;
DBTechTypesToPlanes(
TileTypeBitMask *mask)
{
TileType t;
PlaneMask planeMask, noCellMask, retMask;
@ -430,9 +430,9 @@ DBTechTypesToPlanes(mask)
*/
void
DBTechPrintTypes(mask, dolist)
TileTypeBitMask *mask; /* Print layers defined by this mask. */
bool dolist; /* return as a list and don't print aliases */
DBTechPrintTypes(
TileTypeBitMask *mask, /* Print layers defined by this mask. */
bool dolist) /* return as a list and don't print aliases */
{
TileType i;
NameList *p;
@ -595,10 +595,10 @@ DBTechPrintTypes(mask, dolist)
*/
PlaneMask
DBTechNameMask0(layers, mask, noisy)
char *layers; /* String to be parsed. */
TileTypeBitMask *mask; /* Where to store the layer mask. */
bool noisy; /* Whether or not to output errors */
DBTechNameMask0(
char *layers, /* String to be parsed. */
TileTypeBitMask *mask, /* Where to store the layer mask. */
bool noisy) /* Whether or not to output errors */
{
char *p, *p2, c;
TileTypeBitMask m2; /* Each time around the loop, we will
@ -788,17 +788,17 @@ DBTechNameMask0(layers, mask, noisy)
/* Wrappers for DBTechNameMask0() */
PlaneMask
DBTechNoisyNameMask(layers, mask)
char *layers; /* String to be parsed. */
TileTypeBitMask *mask; /* Where to store the layer mask. */
DBTechNoisyNameMask(
char *layers, /* String to be parsed. */
TileTypeBitMask *mask) /* Where to store the layer mask. */
{
return DBTechNameMask0(layers, mask, TRUE);
}
PlaneMask
DBTechNameMask(layers, mask)
char *layers; /* String to be parsed. */
TileTypeBitMask *mask; /* Where to store the layer mask. */
DBTechNameMask(
char *layers, /* String to be parsed. */
TileTypeBitMask *mask) /* Where to store the layer mask. */
{
return DBTechNameMask0(layers, mask, FALSE);
}

View File

@ -96,7 +96,7 @@ DefaultType dbTechDefaultTypes[] =
/* Forward declarations */
char *dbTechNameAdd();
NameList *dbTechNameAddOne();
NameList *dbTechNameAddOne(char *name, ClientData cdata, bool isPrimary, bool isAlias, NameList *ptable);
/*
* ----------------------------------------------------------------------------
@ -312,10 +312,10 @@ DBTechAddPlane(
*/
void
DBTechAddNameToType(newname, ttype, canonical)
char *newname;
TileType ttype;
bool canonical;
DBTechAddNameToType(
char *newname,
TileType ttype,
bool canonical)
{
char *cp;
@ -343,10 +343,10 @@ DBTechAddNameToType(newname, ttype, canonical)
*/
bool
DBTechAddAlias(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechAddAlias(
char *sectionName,
int argc,
char *argv[])
{
char *cp;
int pNum;
@ -419,10 +419,10 @@ DBTechAddAlias(sectionName, argc, argv)
/*ARGSUSED*/
bool
DBTechAddType(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechAddType(
char *sectionName,
int argc,
char *argv[])
{
char *cp;
int pNum;
@ -504,8 +504,9 @@ DBTechAddType(sectionName, argc, argv)
*/
TileType
dbTechNewStackedType(type1, type2)
TileType type1, type2;
dbTechNewStackedType(
TileType type1,
TileType type2)
{
char buf[1024], *cp;
@ -615,9 +616,9 @@ DBTechFinalType()
*/
ClientData
dbTechNameLookupExact(str, table)
char *str; /* The name to be looked up */
NameList *table; /* Table of names to search */
dbTechNameLookupExact(
char *str, /* The name to be looked up */
NameList *table) /* Table of names to search */
{
NameList *top;
@ -650,9 +651,9 @@ dbTechNameLookupExact(str, table)
*/
ClientData
dbTechNameLookup(str, table)
char *str; /* The name to be looked up */
NameList *table; /* Table of names to search */
dbTechNameLookup(
char *str, /* The name to be looked up */
NameList *table) /* Table of names to search */
{
/*
* The search is carried out by using two pointers, one which moves
@ -734,11 +735,11 @@ dbTechNameLookup(str, table)
*/
char *
dbTechNameAdd(name, cdata, ptable, alias)
char *name; /* Comma-separated list of names to be added */
ClientData cdata; /* Value to be stored with each name above */
NameList *ptable; /* Table to which we will add names */
int alias; /* 1 if this is an alias (never make primary) */
dbTechNameAdd(
char *name, /* Comma-separated list of names to be added */
ClientData cdata, /* Value to be stored with each name above */
NameList *ptable, /* Table to which we will add names */
int alias) /* 1 if this is an alias (never make primary) */
{
char *cp;
char onename[BUFSIZ];
@ -797,12 +798,12 @@ dbTechNameAdd(name, cdata, ptable, alias)
*/
NameList *
dbTechNameAddOne(name, cdata, isPrimary, isAlias, ptable)
char *name; /* Name to be added */
ClientData cdata; /* Client value associated with this name */
bool isPrimary; /* TRUE if this is the primary abbreviation */
bool isAlias; /* TRUE if this name is an alias */
NameList *ptable; /* Table of names to which we're adding this */
dbTechNameAddOne(
char *name, /* Name to be added */
ClientData cdata, /* Client value associated with this name */
bool isPrimary, /* TRUE if this is the primary abbreviation */
bool isAlias, /* TRUE if this name is an alias */
NameList *ptable) /* Table of names to which we're adding this */
{
int cmp;
NameList *tbl, *new;

View File

@ -374,28 +374,28 @@ DBTestNMInteract(Rect *rect1,
#define IGNORE_RIGHT 2
int
DBSrPaintNMArea(hintTile, plane, ttype, rect, mask, func, arg)
Tile *hintTile; /* Tile at which to begin search, if not NULL.
DBSrPaintNMArea(
Tile *hintTile, /* Tile at which to begin search, if not NULL.
* If this is NULL, use the hint tile supplied
* with plane.
*/
Plane *plane; /* Plane in which tiles lie. This is used to
Plane *plane, /* Plane in which tiles lie. This is used to
* provide a hint tile in case hintTile == NULL.
* The hint tile in the plane is updated to be
* the last tile visited in the area
* enumeration, if plane is non-NULL.
*/
TileType ttype; /* Information about the non-manhattan area to
TileType ttype, /* Information about the non-manhattan area to
* search; zero if area is manhattan.
*/
Rect *rect; /* Area to search. This area should not be
Rect *rect, /* Area to search. This area should not be
* degenerate. Tiles must OVERLAP the area.
*/
TileTypeBitMask *mask; /* Mask of those paint tiles to be passed to
TileTypeBitMask *mask, /* Mask of those paint tiles to be passed to
* func.
*/
int (*func)(); /* Function to apply at each tile */
ClientData arg; /* Additional argument to pass to (*func)() */
int (*func)(), /* Function to apply at each tile */
ClientData arg) /* Additional argument to pass to (*func)() */
{
Point start;
Tile *tp, *tpnew;
@ -518,25 +518,25 @@ enum_next:
*/
int
DBSrPaintArea(hintTile, plane, rect, mask, func, arg)
Tile *hintTile; /* Tile at which to begin search, if not NULL.
DBSrPaintArea(
Tile *hintTile, /* Tile at which to begin search, if not NULL.
* If this is NULL, use the hint tile supplied
* with plane.
*/
Plane *plane; /* Plane in which tiles lie. This is used to
Plane *plane, /* Plane in which tiles lie. This is used to
* provide a hint tile in case hintTile == NULL.
* The hint tile in the plane is updated to be
* the last tile visited in the area
* enumeration.
*/
Rect *rect; /* Area to search. This area should not be
Rect *rect, /* Area to search. This area should not be
* degenerate. Tiles must OVERLAP the area.
*/
TileTypeBitMask *mask; /* Mask of those paint tiles to be passed to
TileTypeBitMask *mask, /* Mask of those paint tiles to be passed to
* func.
*/
int (*func)(); /* Function to apply at each tile */
ClientData arg; /* Additional argument to pass to (*func)() */
int (*func)(), /* Function to apply at each tile */
ClientData arg) /* Additional argument to pass to (*func)() */
{
Point start;
Tile *tp, *tpnew;
@ -672,28 +672,28 @@ enumerate:
*/
int
DBSrPaintClient(hintTile, plane, rect, mask, client, func, arg)
Tile *hintTile; /* Tile at which to begin search, if not NULL.
DBSrPaintClient(
Tile *hintTile, /* Tile at which to begin search, if not NULL.
* If this is NULL, use the hint tile supplied
* with plane.
*/
Plane *plane; /* Plane in which tiles lie. This is used to
Plane *plane, /* Plane in which tiles lie. This is used to
* provide a hint tile in case hintTile == NULL.
* The hint tile in the plane is updated to be
* the last tile visited in the area
* enumeration.
*/
Rect *rect; /* Area to search. This area should not be
Rect *rect, /* Area to search. This area should not be
* degenerate. Tiles must OVERLAP the area.
*/
TileTypeBitMask *mask; /* Mask of those paint tiles to be passed to
TileTypeBitMask *mask, /* Mask of those paint tiles to be passed to
* func.
*/
ClientData client; /* The ti_client field of each tile must
ClientData client, /* The ti_client field of each tile must
* match this.
*/
int (*func)(); /* Function to apply at each tile */
ClientData arg; /* Additional argument to pass to (*func)() */
int (*func)(), /* Function to apply at each tile */
ClientData arg) /* Additional argument to pass to (*func)() */
{
Point start;
Tile *tp, *tpnew;
@ -817,9 +817,9 @@ enumerate:
*/
void
DBResetTilePlane(plane, cdata)
Plane *plane; /* Plane whose tiles are to be reset */
ClientData cdata;
DBResetTilePlane(
Plane *plane, /* Plane whose tiles are to be reset */
ClientData cdata)
{
Tile *tp, *tpnew;
const Rect *rect = &TiPlaneRect;
@ -890,9 +890,9 @@ enumerate:
*/
void
DBResetTilePlaneSpecial(plane, cdata)
Plane *plane; /* Plane whose tiles are to be reset */
ClientData cdata;
DBResetTilePlaneSpecial(
Plane *plane, /* Plane whose tiles are to be reset */
ClientData cdata)
{
Tile *tp, *tpnew;
const Rect *rect = &TiPlaneRect;
@ -976,8 +976,8 @@ enumerate:
*/
void
DBFreePaintPlane(plane)
Plane *plane; /* Plane whose storage is to be freed */
DBFreePaintPlane(
Plane *plane) /* Plane whose storage is to be freed */
{
Tile *tp, *tpnew;
const Rect *rect = &TiPlaneRect;
@ -1046,8 +1046,8 @@ enumerate:
*/
void
DBClearCellPlane(def)
CellDef *def;
DBClearCellPlane(
CellDef *def)
{
int dbDeleteCellUse(); /* Forward reference */
@ -1142,11 +1142,11 @@ int dbDeleteCellUse(CellUse *use, ClientData arg)
*/
int
DBCheckMaxHStrips(plane, area, proc, cdata)
Plane *plane; /* Search this plane */
Rect *area; /* Process all tiles in this area */
int (*proc)(); /* Filter procedure: see above */
ClientData cdata; /* Passed to (*proc)() */
DBCheckMaxHStrips(
Plane *plane, /* Search this plane */
Rect *area, /* Process all tiles in this area */
int (*proc)(), /* Filter procedure: see above */
ClientData cdata) /* Passed to (*proc)() */
{
struct dbCheck dbc;
@ -1165,10 +1165,10 @@ DBCheckMaxHStrips(plane, area, proc, cdata)
*/
int
dbCheckMaxHFunc(tile, dinfo, dbc)
Tile *tile;
TileType dinfo; /* (unused) */
struct dbCheck *dbc;
dbCheckMaxHFunc(
Tile *tile,
TileType dinfo, /* (unused) */
struct dbCheck *dbc)
{
Tile *tp;
@ -1235,11 +1235,11 @@ dbCheckMaxHFunc(tile, dinfo, dbc)
*/
int
DBCheckMaxVStrips(plane, area, proc, cdata)
Plane *plane; /* Search this plane */
Rect *area; /* Process all tiles in this area */
int (*proc)(); /* Filter procedure: see above */
ClientData cdata; /* Passed to (*proc)() */
DBCheckMaxVStrips(
Plane *plane, /* Search this plane */
Rect *area, /* Process all tiles in this area */
int (*proc)(), /* Filter procedure: see above */
ClientData cdata) /* Passed to (*proc)() */
{
struct dbCheck dbc;
@ -1258,10 +1258,10 @@ DBCheckMaxVStrips(plane, area, proc, cdata)
*/
int
dbCheckMaxVFunc(tile, dinfo, dbc)
Tile *tile;
TileType dinfo; /* (unused) */
struct dbCheck *dbc;
dbCheckMaxVFunc(
Tile *tile,
TileType dinfo, /* (unused) */
struct dbCheck *dbc)
{
Tile *tp;

View File

@ -217,8 +217,8 @@ DBFixMismatch()
*/
void
DBUpdateStamps(def)
CellDef *def;
DBUpdateStamps(
CellDef *def)
{
extern int dbStampFunc();
extern time_t time();
@ -240,9 +240,9 @@ DBUpdateStamps(def)
/*ARGSUSED*/
int
dbStampFunc(cellDef, cdata)
CellDef *cellDef;
ClientData cdata; /* UNUSED */
dbStampFunc(
CellDef *cellDef,
ClientData cdata) /* UNUSED */
{
CellUse *cu;
CellDef *cd;
@ -291,7 +291,7 @@ dbStampFunc(cellDef, cdata)
cd = cu->cu_parent;
if (cd == NULL) continue;
cd->cd_flags |= CDSTAMPSCHANGED;
(void) dbStampFunc(cd);
(void) dbStampFunc(cd, (ClientData) NULL);
}
return 0;
}
@ -328,9 +328,9 @@ dbStampFunc(cellDef, cdata)
*/
void
DBStampMismatch(cellDef, wrongArea)
CellDef *cellDef;
Rect *wrongArea; /* Guess of cell's bounding box that
DBStampMismatch(
CellDef *cellDef,
Rect *wrongArea) /* Guess of cell's bounding box that
* was wrong.
*/
{
@ -349,8 +349,8 @@ DBStampMismatch(cellDef, wrongArea)
*/
void
DBFlagMismatches(checkDef)
CellDef *checkDef;
DBFlagMismatches(
CellDef *checkDef)
{
CellUse *parentUse;

View File

@ -60,7 +60,7 @@ Rule dbSavedRules[NT];
/* Forward declarations */
extern void dbTechBitTypeInit();
extern void dbTechBitTypeInit(TileType *bitToType, int n, int pNum, bool composeFlag);
bool dbTechAddPaintErase();
bool dbTechSaveCompose();
@ -279,10 +279,11 @@ DBTechInitCompose()
*/
void
dbTechBitTypeInit(bitToType, n, pNum, composeFlag)
TileType *bitToType;
int n, pNum;
bool composeFlag;
dbTechBitTypeInit(
TileType *bitToType,
int n,
int pNum,
bool composeFlag)
{
int i, j;
TileType have, type;
@ -305,8 +306,8 @@ dbTechBitTypeInit(bitToType, n, pNum, composeFlag)
/* Returns nonzero if exactly one bit set */
int
dbIsPrimary(n)
int n;
dbIsPrimary(
int n)
{
int bitCount;
@ -349,10 +350,10 @@ dbIsPrimary(n)
/*ARGSUSED*/
bool
DBTechAddCompose(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBTechAddCompose(
char *sectionName,
int argc,
char *argv[])
{
TileType type, r, s;
int pNum, ruleType, i;
@ -459,11 +460,11 @@ DBTechAddCompose(sectionName, argc, argv)
*/
bool
dbTechSaveCompose(ruleType, t, argc, argv)
int ruleType;
TileType t;
int argc;
char *argv[];
dbTechSaveCompose(
int ruleType,
TileType t,
int argc,
char *argv[])
{
TileType r, s;
Rule *rp;
@ -545,10 +546,10 @@ dbTechSaveCompose(ruleType, t, argc, argv)
*/
bool
dbTechCheckImages(t, r, s)
TileType t; /* Type that is composed */
TileType r; /* First constituent */
TileType s; /* Second constituent */
dbTechCheckImages(
TileType t, /* Type that is composed */
TileType r, /* First constituent */
TileType s) /* Second constituent */
{
int pNum;
PlaneMask pMask;
@ -591,11 +592,11 @@ dbTechCheckImages(t, r, s)
*/
bool
dbTechAddPaintErase(type, sectionName, argc, argv)
int type;
char *sectionName;
int argc;
char *argv[];
dbTechAddPaintErase(
int type,
char *sectionName,
int argc,
char *argv[])
{
int pNum;
PlaneMask pMask, rMask;
@ -711,8 +712,8 @@ dbTechAddPaintErase(type, sectionName, argc, argv)
*/
void
dbTechCheckPaint(where)
char *where; /* If non-null, print this as header */
dbTechCheckPaint(
char *where) /* If non-null, print this as header */
{
TileType have, t, result;
bool printedHeader = FALSE;
@ -764,10 +765,10 @@ dbTechCheckPaint(where)
*/
void
dbTechPrintPaint(where, doPaint, contactsOnly)
char *where; /* If non-null, print this as header */
bool doPaint; /* TRUE -> print paint tables, FALSE -> print erase */
bool contactsOnly;
dbTechPrintPaint(
char *where, /* If non-null, print this as header */
bool doPaint, /* TRUE -> print paint tables, FALSE -> print erase */
bool contactsOnly)
{
TileType have, paint, erase, result;
int plane;

View File

@ -351,8 +351,9 @@ dbComposeContacts()
*/
void
dbComposePaintContact(lpImage, lpPaint)
LayerInfo *lpImage, *lpPaint;
dbComposePaintContact(
LayerInfo *lpImage,
LayerInfo *lpPaint)
{
int pNum;
PlaneMask pmask, pshared;
@ -550,9 +551,10 @@ dbComposePaintContact(lpImage, lpPaint)
*/
bool
dbComposeSubsetResidues(lpImage, lpErase, outMask)
LayerInfo *lpImage, *lpErase;
TileTypeBitMask *outMask;
dbComposeSubsetResidues(
LayerInfo *lpImage,
LayerInfo *lpErase,
TileTypeBitMask *outMask)
{
TileTypeBitMask ires;
TileTypeBitMask smask, overlapmask;
@ -623,8 +625,9 @@ dbComposeSubsetResidues(lpImage, lpErase, outMask)
*/
void
dbComposeEraseContact(lpImage, lpErase)
LayerInfo *lpImage, *lpErase;
dbComposeEraseContact(
LayerInfo *lpImage,
LayerInfo *lpErase)
{
int pNum;
PlaneMask pmask;
@ -731,8 +734,8 @@ dbComposeEraseContact(lpImage, lpErase)
*/
void
DBLockContact(ctype)
TileType ctype;
DBLockContact(
TileType ctype)
{
LayerInfo *lpImage, *lpPaint;
TileType c, n, itype, eresult;
@ -774,8 +777,8 @@ DBLockContact(ctype)
*/
void
DBUnlockContact(ctype)
TileType ctype;
DBUnlockContact(
TileType ctype)
{
LayerInfo *lpImage, *lpPaint;
TileType n, itype, eresult;
@ -863,10 +866,10 @@ dbComposeSavedRules()
*/
void
dbComposeDecompose(imageType, componentType, remainingType)
TileType imageType;
TileType componentType;
TileType remainingType;
dbComposeDecompose(
TileType imageType,
TileType componentType,
TileType remainingType)
{
int pNum = DBPlane(imageType);
TileType resultType;
@ -904,10 +907,10 @@ dbComposeDecompose(imageType, componentType, remainingType)
*/
void
dbComposeCompose(imageType, existingType, paintType)
TileType imageType;
TileType existingType;
TileType paintType;
dbComposeCompose(
TileType imageType,
TileType existingType,
TileType paintType)
{
int pNum = DBPlane(imageType);

View File

@ -69,7 +69,6 @@ void dbUndoCellForw(), dbUndoCellBack();
*** of an undo/redo command.
***/
void dbUndoInit();
CellUse *findUse();
/***
*** The following points to the CellDef specified in the most
@ -194,8 +193,8 @@ DBUndoInit()
*/
void
DBUndoReset(celldef)
CellDef *celldef;
DBUndoReset(
CellDef *celldef)
{
if (celldef == dbUndoLastCell)
{
@ -255,8 +254,8 @@ dbUndoInit()
* ----------------------------------------------------------------------------
*/
void
dbUndoSplitForw(us)
splitUE *us;
dbUndoSplitForw(
splitUE *us)
{
/* Create internal fracture */
if (dbUndoLastCell == NULL) return;
@ -265,8 +264,8 @@ dbUndoSplitForw(us)
}
void
dbUndoSplitBack(us)
splitUE *us;
dbUndoSplitBack(
splitUE *us)
{
Rect srect;
if (dbUndoLastCell == NULL) return;
@ -303,8 +302,8 @@ dbUndoSplitBack(us)
*/
void
dbUndoPaintForw(up)
paintUE *up;
dbUndoPaintForw(
paintUE *up)
{
TileType loctype, dinfo;
if (dbUndoLastCell == NULL) return;
@ -357,8 +356,8 @@ endPaintFor:
}
void
dbUndoPaintBack(up)
paintUE *up;
dbUndoPaintBack(
paintUE *up)
{
TileType loctype, dinfo;
if (dbUndoLastCell == NULL) return;
@ -461,9 +460,9 @@ typedef Label labelUE;
*/
void
DBUndoPutLabel(cellDef, lab)
CellDef *cellDef; /* CellDef being modified */
Label *lab; /* Label being modified */
DBUndoPutLabel(
CellDef *cellDef, /* CellDef being modified */
Label *lab) /* Label being modified */
{
labelUE *lup;
@ -505,9 +504,9 @@ DBUndoPutLabel(cellDef, lab)
*/
void
DBUndoEraseLabel(cellDef, lab)
CellDef *cellDef; /* Cell being modified */
Label *lab; /* Label being modified */
DBUndoEraseLabel(
CellDef *cellDef, /* Cell being modified */
Label *lab) /* Label being modified */
{
labelUE *lup;
@ -550,8 +549,8 @@ DBUndoEraseLabel(cellDef, lab)
*/
void
dbUndoLabelForw(up)
labelUE *up;
dbUndoLabelForw(
labelUE *up)
{
Label *lab;
@ -574,8 +573,8 @@ dbUndoLabelForw(up)
}
void
dbUndoLabelBack(up)
labelUE *up;
dbUndoLabelBack(
labelUE *up)
{
if (dbUndoLastCell == NULL) return;
(void) DBEraseLabelsByContent(dbUndoLastCell, &up->lue_rect,
@ -617,6 +616,9 @@ dbUndoLabelBack(up)
char cue_id[4];
} cellUE;
/* Forward declaration (cellUE must be defined first) */
extern CellUse *findUse(cellUE *up, bool matchName);
/*
* Compute the size of a cellUE, with sufficient space
* at the end to store the use id.
@ -651,9 +653,9 @@ dbUndoLabelBack(up)
*/
void
DBUndoCellUse(use, action)
CellUse *use;
int action;
DBUndoCellUse(
CellUse *use,
int action)
{
cellUE *up;
@ -692,8 +694,8 @@ DBUndoCellUse(use, action)
*/
void
dbUndoCellForw(up)
cellUE *up;
dbUndoCellForw(
cellUE *up)
{
CellUse *use;
@ -740,7 +742,7 @@ dbUndoCellForw(up)
/*
* The following is a hack.
* We clear out the use id of the cell so that
* findUse() will find it on the next time around,
* findUse(cellUE *up, bool matchName) will find it on the next time around,
* which should be when we process a UNDO_CELL_SETID
* event.
*/
@ -761,8 +763,8 @@ dbUndoCellForw(up)
}
void
dbUndoCellBack(up)
cellUE *up;
dbUndoCellBack(
cellUE *up)
{
CellUse *use;
@ -815,7 +817,7 @@ dbUndoCellBack(up)
/*
* The following is a hack.
* We clear out the use id of the cell so that
* findUse() will find it on the next time around,
* findUse(cellUE *up, bool matchName) will find it on the next time around,
* which should be when we process a UNDO_CELL_SETID
* event.
*/
@ -861,9 +863,9 @@ dbUndoCellBack(up)
*/
CellUse *
findUse(up, matchName)
cellUE *up;
bool matchName;
findUse(
cellUE *up,
bool matchName)
{
CellUse *use;
@ -923,8 +925,8 @@ findUse(up, matchName)
*/
void
dbUndoEdit(new)
CellDef *new;
dbUndoEdit(
CellDef *new)
{
editUE *up;
CellDef *old = dbUndoLastCell;
@ -970,8 +972,8 @@ dbUndoEdit(new)
*/
void
dbUndoOpenCell(eup)
editUE *eup;
dbUndoOpenCell(
editUE *eup)
{
CellDef *newDef;

View File

@ -25,6 +25,15 @@
#ifndef _MAGIC__DATABASE__DATABASE_H
#define _MAGIC__DATABASE__DATABASE_H
/* Forward declaration to avoid circular include with windows/windows.h */
struct WIND_S1;
typedef struct WIND_S1 MagWindow;
/* Forward declaration so prototypes can refer to FontChar without pulling
* in database/fonts.h (which depends on this header). */
struct fontchar;
typedef struct fontchar FontChar;
#ifndef _MAGIC__TILES__TILE_H
#include "tiles/tile.h"
#endif
@ -784,7 +793,7 @@ typedef struct
extern void DBPaint();
extern void DBErase();
extern int DBSrPaintArea();
extern int DBPaintPlane0();
extern int DBPaintPlane0(Plane *plane, Rect *area, const PaintResultType *resultTbl, PaintUndoInfo *undo, unsigned char method);
extern int DBPaintPlaneActive();
extern int DBPaintPlaneWrapper();
extern int DBPaintPlaneMark();
@ -804,20 +813,20 @@ extern int DBNMPaintPlane0();
#define DBNMPaintPlane(a, b, c, d, e) DBNMPaintPlane0(a, b, c, d, e, PAINT_NORMAL)
/* I/O */
extern bool DBCellRead();
extern bool DBCellRead(CellDef *cellDef, bool ignoreTech, bool dereference, int *errptr);
extern bool DBTestOpen();
extern char *DBGetTech();
extern bool DBCellWrite();
extern CellDef *DBCellReadArea();
extern CellDef *DBCellReadArea(CellUse *rootUse, Rect *rootRect, bool halt_on_error);
extern void DBFileRecovery();
extern bool DBWriteBackup();
extern bool DBReadBackup();
extern bool DBWriteBackup(char *filename, bool archive, bool doforall);
extern bool DBReadBackup(char *name, bool archive, bool usederef);
extern void DBRemoveBackup();
extern void DBPathSubstitute();
/* Labels */
extern Label *DBPutLabel();
extern Label *DBPutFontLabel();
extern Label *DBPutLabel(CellDef *cellDef, Rect *rect, int align, char *text, TileType type, unsigned short flags, unsigned int port);
extern Label *DBPutFontLabel(CellDef *cellDef, Rect *rect, int font, int size, int rot, Point *offset, int align, char *text, TileType type, unsigned short flags, unsigned int port);
extern void DBFontLabelSetBBox();
extern bool DBEraseGlobLabel();
extern bool DBEraseLabel();
@ -856,9 +865,9 @@ extern void DBTechInitConnect();
/* Cell symbol table */
extern void DBCellInit();
extern void DBCellPrint();
extern void DBUsePrint();
extern void DBTopPrint();
extern void DBCellPrint(char *CellName, int who, bool dolist);
extern void DBUsePrint(char *CellName, int who, bool dolist);
extern void DBTopPrint(MagWindow *mw, bool dolist);
extern CellDef *DBCellLookDef();
extern CellDef *DBCellNewDef();
extern CellDef *DBCellDefAlloc();
@ -869,10 +878,10 @@ extern int DBCellSrDefs();
extern CellUse *DBCellNewUse();
extern bool DBCellDeleteUse();
extern CellUse *DBCellFindDup();
extern void DBLockUse();
extern void DBLockUse(char *UseName, bool bval);
extern void DBUnlockUse();
extern void DBOrientUse();
extern void DBAbutmentUse();
extern void DBOrientUse(char *UseName, bool dodef);
extern void DBAbutmentUse(char *UseName, bool dolist);
/* Cell selection */
extern CellUse *DBSelectCell();
@ -935,24 +944,24 @@ extern bool DBIsAncestor();
extern void DBCellSetAvail();
extern void DBCellClearAvail();
extern bool DBCellGetModified();
extern void DBCellSetModified();
extern void DBCellSetModified(CellDef *cellDef, bool ismod);
extern void DBFixMismatch();
extern void DBTreeCopyConnect();
extern void DBTreeCopyConnect(SearchContext *scx, TileTypeBitMask *mask, int xMask, TileTypeBitMask *connect, Rect *area, unsigned char doLabels, CellUse *destUse);
extern void DBSeeTypesAll();
extern void DBUpdateStamps();
extern void DBEnumerateTypes();
extern Plane *DBNewPlane();
extern bool DBDescendSubcell();
extern void DBCellCopyMaskHints();
extern void DBFlattenInPlace();
extern void DBCellFlattenAllCells();
extern void DBFlattenInPlace(CellUse *use, CellUse *dest, int xMask, bool dolabels, bool toplabels, bool doclear);
extern void DBCellFlattenAllCells(SearchContext *scx, CellUse *dest, int xMask, bool dolabels, bool toplabels);
extern PaintResultType (*DBNewPaintTable())[TT_MAXTYPES][TT_MAXTYPES];
typedef int (*IntProc)();
IntProc DBNewPaintPlane();
/* Diagnostic */
extern void DBTechPrintTypes();
extern void DBTechPrintTypes(TileTypeBitMask *mask, bool dolist);
extern void DBTechPrintCanonicalType();
/* Deallocation */
@ -973,7 +982,7 @@ extern void DBPropClearAll();
extern int DBTreeSrTiles();
extern int DBTreeSrUniqueTiles();
extern int DBNoTreeSrTiles();
extern int DBTreeSrLabels();
extern int DBTreeSrLabels(SearchContext *scx, TileTypeBitMask * mask, int xMask, TerminalPath *tpath, unsigned char flags, int (*func)(), ClientData cdarg);
extern int DBTreeSrCells();
extern int DBSrRoots();
extern int DBCellEnum();
@ -990,15 +999,15 @@ extern int dbSrConnectStartFunc(Tile *tile, TileType dinfo, ClientData clientDat
extern void DBEraseValid();
extern void DBPaintValid();
extern void DBTreeCountPaint();
extern void DBOpenOnly();
extern int DBLoadFont();
extern void DBOpenOnly(CellDef *cellDef, char *name, bool setFileName, int *errptr);
extern int DBLoadFont(char *fontfile, float scale);
extern int DBNameToFont();
extern int DBFontChar();
extern int DBFontChar(int font, char ccode, FontChar **clist, Point **coffset, Rect **cbbox);
extern void DBFontInitCurves();
extern void DBUndoEraseLabel();
extern void DBUndoPutLabel();
extern bool DBCellRename();
extern bool DBCellDelete();
extern bool DBCellRename(char *cellname, char *newname, bool doforce);
extern bool DBCellDelete(char *cellname, bool force);
extern int DBCellSrArea();
extern int DBSrCellPlaneArea(BPlane *plane, const Rect *rect, int (*func)(), ClientData arg);
extern int DBMoveCell();
@ -1012,7 +1021,7 @@ extern bool DBScalePoint();
extern int DBScaleCell();
extern TileType DBTechNameTypes();
extern void DBTreeFindUse();
extern void DBGenerateUniqueIds();
extern void DBGenerateUniqueIds(CellDef *def, bool warn);
extern void DBSelectionUniqueIds();
extern TileType DBInvTransformDiagonal();
extern bool DBIsSubcircuit();
@ -1028,7 +1037,7 @@ extern int DBSrCellUses();
extern TileType DBTechNameTypeExact();
extern void dbInstanceUnplace();
extern int dbIsPrimary();
extern void dbTechMatchResidues();
extern void dbTechMatchResidues(TileTypeBitMask *inMask, TileTypeBitMask *outMask, bool contactsOnly);
extern void DBUndoInit();
extern void DBResetTilePlane();
extern void DBResetTilePlaneSpecial();
@ -1038,12 +1047,12 @@ extern int DBSrConnect();
extern char *dbFgets();
extern void DBAdjustLabelsNew();
extern bool DBScaleValue();
extern int DBMergeNMTiles0();
extern int DBMergeNMTiles0(Plane *plane, Rect *area, PaintUndoInfo *undo, bool mergeOnce);
extern int DBSearchLabel();
extern int dbCellUniqueTileSrFunc();
extern void DBWDrawFontLabel();
extern void DBCellCopyManhattanPaint();
extern bool dbScalePlane();
extern bool dbScalePlane(Plane *oldplane, Plane *newplane, int pnum, int scalen, int scaled, bool doCIF);
extern int DBPaintPlaneVert();
/* -------------------------- Layer locking ------------------------------*/

View File

@ -203,7 +203,7 @@ extern void DBUndoEraseLabel();
extern void DBUndoCellUse();
extern void DBStampMismatch();
extern void DBFlagMismatches();
extern void DBTechAddNameToType();
extern void DBTechAddNameToType(char *newname, TileType ttype, bool canonical);
extern void dbComputeBbox();
extern void dbFreeCellPlane();

View File

@ -153,14 +153,14 @@ extern int dbwWindowFunc(), dbwChangedFunc();
*/
void
DBWredisplay(w, rootArea, clipArea)
MagWindow *w; /* Window some of whose contents are to be
DBWredisplay(
MagWindow *w, /* Window some of whose contents are to be
* redisplayed.
*/
Rect *rootArea; /* The area that must be redisplayed, in
Rect *rootArea, /* The area that must be redisplayed, in
* root cell coordinates.
*/
Rect *clipArea; /* The screen area that we should clip to
Rect *clipArea) /* The screen area that we should clip to
*/
{
int i;
@ -572,10 +572,10 @@ DBWredisplay(w, rootArea, clipArea)
*/
int
dbwPaintFunc(tile, dinfo, cxp)
Tile *tile; /* Tile to be redisplayed. */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* From DBTreeSrTiles */
dbwPaintFunc(
Tile *tile, /* Tile to be redisplayed. */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* From DBTreeSrTiles */
{
SearchContext *scx = cxp->tc_scx;
/* Contains pointer to use containing def
@ -683,22 +683,21 @@ dbwPaintFunc(tile, dinfo, cxp)
*/
void
DBWDrawLabel(label, rect, pos, style, labelSize, sizeBox)
Label *label; /* Text to be displayed. */
Rect *rect; /* labrect, clipped to the visible window
DBWDrawLabel(
Label *label, /* Text to be displayed. */
Rect *rect, /* labrect, clipped to the visible window
*/
int pos; /* Position of text relative to rect (e.g.
int pos, /* Position of text relative to rect (e.g.
* GEO_NORTH) in screen coordinates.
*/
int style; /* Style to use for redisplay; if -1 then
int style, /* Style to use for redisplay; if -1 then
* this has already been set by the caller
* and we shouldn't call GrSetStuff.
*/
int labelSize; /* Size to use for drawing labels. If < 0 then
int labelSize, /* Size to use for drawing labels. If < 0 then
* no text is drawn: only the box.
*/
Rect *sizeBox; /* Expanded if necessary to include the
Rect *sizeBox) /* Expanded if necessary to include the
* screen area of the text for this label.
*/
{
@ -783,11 +782,11 @@ DBWDrawLabel(label, rect, pos, style, labelSize, sizeBox)
*/
void
DBWDrawFontLabel(label, window, trans, style)
Label *label;
MagWindow *window;
Transform *trans;
int style; /* If -1, style is already set */
DBWDrawFontLabel(
Label *label,
MagWindow *window,
Transform *trans,
int style) /* If -1, style is already set */
{
Point *p, newcorner, scrncorners[4], labOrigin;
Rect rootArea, labrect;
@ -923,14 +922,14 @@ DBWDrawFontLabel(label, window, trans, style)
*/
int
dbwLabelFunc(scx, label, tpath, clientData)
SearchContext *scx; /* Contains pointer to use containing def in
dbwLabelFunc(
SearchContext *scx, /* Contains pointer to use containing def in
* which label appears, and transform to
* screen coordinates.
*/
Label *label; /* Label to be displayed. */
TerminalPath *tpath; /* Contains pointer to full pathname of label */
ClientData clientData; /* Used for mask for dbw_visibleLayers */
Label *label, /* Label to be displayed. */
TerminalPath *tpath, /* Contains pointer to full pathname of label */
ClientData clientData) /* Used for mask for dbw_visibleLayers */
{
Rect labRect, tmp;
int screenPos, screenRot, newStyle;
@ -1027,8 +1026,8 @@ dbwLabelFunc(scx, label, tpath, clientData)
*/
int
dbwBBoxFunc(scx)
SearchContext *scx; /* Describes context of cell. */
dbwBBoxFunc(
SearchContext *scx) /* Describes context of cell. */
{
Rect r, r2;
char idName[100];
@ -1077,10 +1076,10 @@ dbwBBoxFunc(scx)
*/
int
dbwTileFunc(tile, dinfo, clientdata)
Tile *tile; /* A tile to be redisplayed. */
TileType dinfo; /* Split tile information (unused) */
ClientData clientdata; /* (unused) */
dbwTileFunc(
Tile *tile, /* A tile to be redisplayed. */
TileType dinfo, /* Split tile information (unused) */
ClientData clientdata) /* (unused) */
{
Rect r, r2;
int xoffset, yoffset;
@ -1292,13 +1291,13 @@ static TileTypeBitMask *dbwLayersChanged;
/* DBWAreaChanged's "layers" parameter. */
void
DBWAreaChanged(cellDef, defArea, expandMask, layers)
CellDef *cellDef; /* The cell definition that was modified. */
Rect *defArea; /* The area of the definition that changed. */
int expandMask; /* We're only interested these windows.
DBWAreaChanged(
CellDef *cellDef, /* The cell definition that was modified. */
Rect *defArea, /* The area of the definition that changed. */
int expandMask, /* We're only interested these windows.
* Use DBW_ALLWINDOWS for all windows.
*/
TileTypeBitMask *layers; /* Indicates which layers were modified. If
TileTypeBitMask *layers) /* Indicates which layers were modified. If
* NULL, it means that labels were deleted
* from defArea in addition to paint. We'll
* have to redisplay a larger area in order
@ -1443,9 +1442,9 @@ DBWAreaChanged(cellDef, defArea, expandMask, layers)
*/
int
dbwChangedFunc(w, area)
MagWindow *w; /* Window in which to record area. */
Rect *area; /* (Client data) Area to be redisplayed, in
dbwChangedFunc(
MagWindow *w, /* Window in which to record area. */
Rect *area) /* (Client data) Area to be redisplayed, in
* coordinates of the root definition.
*/
{
@ -1523,10 +1522,10 @@ dbwChangedFunc(w, area)
extern int dbwLabelChangedFunc(); /* Function to call for each label. */
void
DBWLabelChanged(cellDef, lab, mask)
CellDef *cellDef; /* Cell definition containing label. */
Label *lab; /* The label structure */
int mask; /* Mask of windows where changes should be
DBWLabelChanged(
CellDef *cellDef, /* Cell definition containing label. */
Label *lab, /* The label structure */
int mask) /* Mask of windows where changes should be
* reflected (DBW_ALLWINDOWS selects all
* windows, and is usually the right value.)
*/
@ -1596,9 +1595,9 @@ DBWLabelChanged(cellDef, lab, mask)
}
int
dbwLabelChangedFunc(w, lab)
MagWindow *w; /* Window in which label is displayed. */
Label *lab; /* Label being changed. */
dbwLabelChangedFunc(
MagWindow *w, /* Window in which label is displayed. */
Label *lab) /* Label being changed. */
{
Rect screenArea, textArea;
int size;
@ -1685,8 +1684,8 @@ DBWTechInitStyles()
*/
int
DBWTechParseStyle(stylestr)
char *stylestr;
DBWTechParseStyle(
char *stylestr)
{
int sidx, style;
@ -1724,10 +1723,10 @@ DBWTechParseStyle(stylestr)
*/
bool
DBWTechAddStyle(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
DBWTechAddStyle(
char *sectionName,
int argc,
char *argv[])
{
TileType t, r;
TileTypeBitMask *rMask;

View File

@ -101,10 +101,10 @@ static CellDef *dbwelemRootDef; /* To pass root cell definition from
*/
void
AppendString(oldstr, newstr, postfix)
char **oldstr;
const char *newstr;
const char *postfix;
AppendString(
char **oldstr,
const char *newstr,
const char *postfix)
{
char *tmpstr;
int olen = 0;
@ -175,10 +175,10 @@ AppendFlag(
*/
char *
DBWPrintElements(cellDef, flagmask, reducer)
CellDef *cellDef;
unsigned char flagmask;
int reducer;
DBWPrintElements(
CellDef *cellDef,
unsigned char flagmask,
int reducer)
{
DBWElement *elem;
HashSearch hs;
@ -287,8 +287,9 @@ DBWPrintElements(cellDef, flagmask, reducer)
*/
void
DBWScaleElements(n, d)
int n, d;
DBWScaleElements(
int n,
int d)
{
DBWElement *elem;
HashSearch hs;
@ -333,9 +334,9 @@ DBWScaleElements(n, d)
*/
void
DBWElementRedraw(window, plane)
MagWindow *window; /* Window in which to redraw. */
Plane *plane; /* Non-space tiles on this plane mark what
DBWElementRedraw(
MagWindow *window, /* Window in which to redraw. */
Plane *plane) /* Non-space tiles on this plane mark what
* needs to be redrawn.
*/
{
@ -495,9 +496,9 @@ DBWElementRedraw(window, plane)
*/
void
dbwElementUndraw(mw, elem)
MagWindow *mw;
DBWElement *elem; /* The element to erase */
dbwElementUndraw(
MagWindow *mw,
DBWElement *elem) /* The element to erase */
{
CellDef *windowRoot;
Rect screenArea, textArea;
@ -567,7 +568,9 @@ dbwElementUndraw(mw, elem)
*/
void
DBWElementDelete(MagWindow *w, char *name)
DBWElementDelete(
MagWindow *w,
char *name)
{
DBWElement *elem;
CellDef *currentRoot;
@ -669,8 +672,8 @@ DBWElementNames()
*/
void
DBWElementInbox(area)
Rect *area;
DBWElementInbox(
Rect *area)
{
DBWElement *elem;
HashSearch hs;
@ -726,14 +729,14 @@ DBWElementInbox(area)
/* Set up everything is generic to all element types */
DBWElement *
DBWElementAdd(w, name, area, cellDef, style)
MagWindow *w;
char *name; /* Name of this element for the hash table */
Rect *area; /* The area of the element */
CellDef *cellDef; /* The cellDef in whose coordinates area
DBWElementAdd(
MagWindow *w,
char *name, /* Name of this element for the hash table */
Rect *area, /* The area of the element */
CellDef *cellDef, /* The cellDef in whose coordinates area
* is given.
*/
int style; /* An initial display style to use */
int style) /* An initial display style to use */
{
Transform transform;
DBWElement *elem;
@ -779,14 +782,14 @@ DBWElementAdd(w, name, area, cellDef, style)
}
void
DBWElementAddRect(w, name, area, cellDef, style)
MagWindow *w;
char *name; /* Name of this element for the hash table */
Rect *area; /* The area to be highlighted. */
CellDef *cellDef; /* The cellDef in whose coordinates area
DBWElementAddRect(
MagWindow *w,
char *name, /* Name of this element for the hash table */
Rect *area, /* The area to be highlighted. */
CellDef *cellDef, /* The cellDef in whose coordinates area
* is given.
*/
int style; /* An initial display style to use */
int style) /* An initial display style to use */
{
DBWElement *elem;
@ -796,14 +799,14 @@ DBWElementAddRect(w, name, area, cellDef, style)
}
void
DBWElementAddLine(w, name, area, cellDef, style)
MagWindow *w;
char *name; /* Name of this element for the hash table */
Rect *area; /* The area to be highlighted. */
CellDef *cellDef; /* The cellDef in whose coordinates area
DBWElementAddLine(
MagWindow *w,
char *name, /* Name of this element for the hash table */
Rect *area, /* The area to be highlighted. */
CellDef *cellDef, /* The cellDef in whose coordinates area
* is given.
*/
int style; /* An initial display style to use */
int style) /* An initial display style to use */
{
DBWElement *elem;
@ -813,15 +816,16 @@ DBWElementAddLine(w, name, area, cellDef, style)
}
void
DBWElementAddText(w, name, x, y, text, cellDef, style)
MagWindow *w;
char *name; /* Name of this element for the hash table */
int x, y; /* Point of origin (x, y coordinates) */
char *text; /* The text of the label */
CellDef *cellDef; /* The cellDef in whose coordinates area
DBWElementAddText(
MagWindow *w,
char *name, /* Name of this element for the hash table */
int x,
int y,
char *text, /* The text of the label */
CellDef *cellDef, /* The cellDef in whose coordinates area
* is given.
*/
int style; /* An initial display style to use */
int style) /* An initial display style to use */
{
DBWElement *elem;
Rect area;
@ -847,12 +851,12 @@ DBWElementAddText(w, name, x, y, text, cellDef, style)
*/
int
dbwelemGetTransform(use, transform, cdarg)
CellUse *use; /* A root use that is an ancestor
dbwelemGetTransform(
CellUse *use, /* A root use that is an ancestor
* of cellDef in DBWElementAdd.
*/
Transform *transform; /* Transform up from cellDef to use. */
Transform *cdarg; /* Place to store transform from
Transform *transform, /* Transform up from cellDef to use. */
Transform *cdarg) /* Place to store transform from
* cellDef to its root def.
*/
{
@ -869,9 +873,9 @@ dbwelemGetTransform(use, transform, cdarg)
/*ARGSUSED*/
int
dbwElementAlways1(w, clientData)
MagWindow *w; /* UNUSED */
ClientData clientData; /* UNUSED */
dbwElementAlways1(
MagWindow *w, /* UNUSED */
ClientData clientData) /* UNUSED */
{
return 1;
}
@ -894,7 +898,10 @@ dbwElementAlways1(w, clientData)
*/
void
DBWElementText(MagWindow *w, char *ename, char *text)
DBWElementText(
MagWindow *w,
char *ename,
char *text)
{
DBWElement *elem;
HashEntry *entry;
@ -949,7 +956,10 @@ DBWElementText(MagWindow *w, char *ename, char *text)
*/
void
DBWElementParseFlags(MagWindow *w, char *ename, char *flagstr)
DBWElementParseFlags(
MagWindow *w,
char *ename,
char *flagstr)
{
DBWElement *elem;
HashEntry *entry;
@ -1097,7 +1107,11 @@ DBWElementParseFlags(MagWindow *w, char *ename, char *flagstr)
*/
void
DBWElementStyle(MagWindow *w, char *ename, int style, bool add)
DBWElementStyle(
MagWindow *w,
char *ename,
int style,
bool add)
{
DBWElement *elem;
HashEntry *entry;
@ -1206,7 +1220,10 @@ DBWElementStyle(MagWindow *w, char *ename, int style, bool add)
*/
void
DBWElementPos(MagWindow *w, char *ename, Rect *crect)
DBWElementPos(
MagWindow *w,
char *ename,
Rect *crect)
{
DBWElement *elem;
HashEntry *entry;
@ -1273,8 +1290,8 @@ DBWElementPos(MagWindow *w, char *ename, Rect *crect)
*/
void
DBWElementClearDef(cellDef)
CellDef *cellDef;
DBWElementClearDef(
CellDef *cellDef)
{
DBWElement *elem;
HashEntry *entry;

View File

@ -120,9 +120,9 @@ static CellDef *dbwfbRootDef; /* To pass root cell definition from
*/
void
DBWFeedbackRedraw(window, plane)
MagWindow *window; /* Window in which to redraw. */
Plane *plane; /* Non-space tiles on this plane mark what
DBWFeedbackRedraw(
MagWindow *window, /* Window in which to redraw. */
Plane *plane) /* Non-space tiles on this plane mark what
* needs to be redrawn.
*/
{
@ -276,8 +276,8 @@ dbwFeedbackAlways1(
*/
void
DBWFeedbackClear(text)
char *text;
DBWFeedbackClear(
char *text)
{
int i, oldCount;
Feedback *fb, *fl, *fe;
@ -377,13 +377,13 @@ DBWFeedbackClear(text)
*/
void
DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
Rect *area; /* The area to be highlighted. */
char *text; /* Text associated with the area. */
CellDef *cellDef; /* The cellDef in whose coordinates area
DBWFeedbackAdd(
Rect *area, /* The area to be highlighted. */
char *text, /* Text associated with the area. */
CellDef *cellDef, /* The cellDef in whose coordinates area
* is given.
*/
int scaleFactor; /* The coordinates provided for feedback
int scaleFactor, /* The coordinates provided for feedback
* areas are divided by this to produce
* coordinates in Magic database units.
* This will probably be 1 most of the time.
@ -394,7 +394,7 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
* exactly the same coordinates as other Magic
* stuff.
*/
int style; /* A display style to use for the feedback.
int style) /* A display style to use for the feedback.
* Use one of:
* STYLE_OUTLINEHIGHLIGHTS: solid outlines
* STYLE_DOTTEDHIGHLIGHTS: dotted outlines
@ -505,12 +505,12 @@ DBWFeedbackAdd(area, text, cellDef, scaleFactor, style)
*/
int
dbwfbGetTransform(use, transform, cdarg)
CellUse *use; /* A root use that is an ancestor
dbwfbGetTransform(
CellUse *use, /* A root use that is an ancestor
* of cellDef in DBWFeedbackAdd.
*/
Transform *transform; /* Transform up from cellDef to use. */
Transform *cdarg; /* Place to store transform from
Transform *transform, /* Transform up from cellDef to use. */
Transform *cdarg) /* Place to store transform from
* cellDef to its root def.
*/
{
@ -533,9 +533,9 @@ dbwfbGetTransform(use, transform, cdarg)
/*ARGSUSED*/
int
dbwfbWindFunc(w, clientData)
MagWindow *w; /* UNUSED */
ClientData clientData; /* UNUSED */
dbwfbWindFunc(
MagWindow *w, /* UNUSED */
ClientData clientData) /* UNUSED */
{
return 1;
}
@ -630,18 +630,18 @@ DBWFeedbackShow()
*/
char *
DBWFeedbackNth(nth, area, pRootDef, pStyle)
int nth; /* Selects which feedback area to return
DBWFeedbackNth(
int nth, /* Selects which feedback area to return
* stuff from. (0 <= nth < DBWFeedbackCount)
*/
Rect *area; /* To be filled in with area of feedback, in
Rect *area, /* To be filled in with area of feedback, in
* rounded-outward Magic coordinates.
*/
CellDef **pRootDef; /* *pRootDef gets filled in with root def for
CellDef **pRootDef, /* *pRootDef gets filled in with root def for
* this feedback area. If pRootDef is NULL,
* nothing is touched.
*/
int *pStyle; /* *pStyle gets filled in with the display
int *pStyle) /* *pStyle gets filled in with the display
* style for this feedback area. If NULL,
* nothing is touched.
*/

View File

@ -81,10 +81,10 @@ static int (*dbwButtonHandler)() = NULL;
*/
bool
DBWcreate(window, argc, argv)
MagWindow *window;
int argc;
char *argv[];
DBWcreate(
MagWindow *window,
int argc,
char *argv[])
{
int bitMask, newBitMask, expand;
DBWclientRec *crec;
@ -171,8 +171,8 @@ DBWcreate(window, argc, argv)
*/
bool
DBWdelete(window)
MagWindow *window;
DBWdelete(
MagWindow *window)
{
DBWclientRec *cr;
@ -207,9 +207,9 @@ DBWdelete(window)
*/
int
dbwLoadFunc(w, clientData)
MagWindow *w; /* A window found in the search. */
MagWindow *clientData; /* Window to ignore (passed as ClientData). */
dbwLoadFunc(
MagWindow *w, /* A window found in the search. */
MagWindow *clientData) /* Window to ignore (passed as ClientData). */
{
if (w == clientData) return 0;
if (((CellUse *) w->w_surfaceID)->cu_def == EditRootDef)
@ -237,8 +237,8 @@ dbwLoadFunc(w, clientData)
*/
void
DBWreload(name)
char *name;
DBWreload(
char *name)
{
int dbwReloadFunc();
@ -247,9 +247,9 @@ DBWreload(name)
}
int
dbwReloadFunc(w, name)
MagWindow *w;
char *name;
dbwReloadFunc(
MagWindow *w,
char *name)
{
DBWloadWindow(w, name, DBW_LOAD_IGNORE_TECH);
return (0);
@ -283,10 +283,10 @@ dbwReloadFunc(w, name)
*/
void
DBWloadWindow(window, name, flags)
MagWindow *window; /* Identifies window to which cell is to be bound */
char *name; /* Name of new cell to be bound to this window */
unsigned char flags; /* See flags below */
DBWloadWindow(
MagWindow *window, /* Identifies window to which cell is to be bound */
char *name, /* Name of new cell to be bound to this window */
unsigned char flags) /* See flags below */
{
CellDef *newEditDef, *deleteDef;
CellUse *newEditUse;
@ -623,9 +623,9 @@ DBWloadWindow(window, name, flags)
*/
int
UnexpandFunc(use, windowMask)
CellUse *use; /* Use that was just unexpanded. */
int windowMask; /* Window where it was unexpanded. */
UnexpandFunc(
CellUse *use, /* Use that was just unexpanded. */
int windowMask) /* Window where it was unexpanded. */
{
if (use->cu_parent == NULL) return 0;
DBWAreaChanged(use->cu_parent, &use->cu_bbox, windowMask,
@ -980,9 +980,9 @@ DBWPrintCIFSqValue(int value, /* value to print, in internal units */
*/
void
DBWcommands(w, cmd)
MagWindow *w;
TxCommand *cmd;
DBWcommands(
MagWindow *w,
TxCommand *cmd)
{
int cmdNum;

View File

@ -111,13 +111,13 @@ extern int DBWToolDraw();
*/
MagWindow *
toolFindPoint(p, rootPoint, rootArea)
Point *p; /* The point to find, in the current window. */
Point *rootPoint; /* Modified to contain coordinates of point
toolFindPoint(
Point *p, /* The point to find, in the current window. */
Point *rootPoint, /* Modified to contain coordinates of point
* in root cell coordinates. Is unchanged
* if NULL is returned.
*/
Rect *rootArea; /* Modified to contain box around point. Is
Rect *rootArea) /* Modified to contain box around point. Is
* unchanged when NULL is returned.
*/
{
@ -158,12 +158,12 @@ toolFindPoint(p, rootPoint, rootArea)
*/
MagWindow *
ToolGetPoint(rootPoint, rootArea)
Point *rootPoint; /* Modified to contain coordinates of point
ToolGetPoint(
Point *rootPoint, /* Modified to contain coordinates of point
* in root cell coordinates. Is unchanged
* if NULL is returned.
*/
Rect *rootArea; /* Modified to contain box around point. Is
Rect *rootArea) /* Modified to contain box around point. Is
* unchanged when NULL is returned.
*/
{
@ -193,9 +193,9 @@ ToolGetPoint(rootPoint, rootArea)
*/
bool
ToolGetBox(rootDef, rootArea)
CellDef **rootDef; /* Filled in with the root def of the box */
Rect *rootArea; /* Filled in with area of box. Will be
ToolGetBox(
CellDef **rootDef, /* Filled in with the root def of the box */
Rect *rootArea) /* Filled in with area of box. Will be
* unchanged when NULL is returned.
*/
{
@ -210,9 +210,9 @@ ToolGetBox(rootDef, rootArea)
/* ToolScaleBox --- Simple scaling of the root area box, no update needed */
void
ToolScaleBox(scalen, scaled)
int scalen;
int scaled;
ToolScaleBox(
int scalen,
int scaled)
{
DBScalePoint(&boxRootArea.r_ll, scalen, scaled);
DBScalePoint(&boxRootArea.r_ur, scalen, scaled);
@ -245,11 +245,11 @@ ToolScaleBox(scalen, scaled)
static int toolMask; /* Shared between these two routines. */
MagWindow *
ToolGetBoxWindow(rootArea, pMask)
Rect *rootArea; /* Filled in with area of box. Will be
ToolGetBoxWindow(
Rect *rootArea, /* Filled in with area of box. Will be
* unchanged when NULL is returned.
*/
int *pMask; /* Filled in with mask of all windows
int *pMask) /* Filled in with mask of all windows
* containing box.
*/
{
@ -275,9 +275,9 @@ ToolGetBoxWindow(rootArea, pMask)
}
int
toolWindowSave(window, clientData)
MagWindow *window; /* Window that matched in some search. */
ClientData clientData; /* Contains the address of a location
toolWindowSave(
MagWindow *window, /* Window that matched in some search. */
ClientData clientData) /* Contains the address of a location
* to be filled in with the window address.
*/
{
@ -311,8 +311,8 @@ toolWindowSave(window, clientData)
*/
bool
ToolGetEditBox(rect)
Rect *rect;
ToolGetEditBox(
Rect *rect)
{
CellDef *editDef;
@ -370,9 +370,8 @@ ToolGetEditBox(rect)
*/
int
ToolGetCorner(screenPoint)
Point *screenPoint;
ToolGetCorner(
Point *screenPoint)
{
Point p;
MagWindow *w;
@ -447,9 +446,9 @@ dbwCrosshairInit()
*/
void
dbwRecordCrosshairYPos(def, erase)
CellDef *def;
bool erase; /* TRUE means crossair is being erased from its
dbwRecordCrosshairYPos(
CellDef *def,
bool erase) /* TRUE means crossair is being erased from its
* current position. FALSE means the crosshair
* is being added at a new position.
*/
@ -463,9 +462,9 @@ dbwRecordCrosshairYPos(def, erase)
}
void
dbwRecordCrosshairXPos(def, erase)
CellDef *def;
bool erase; /* TRUE means crossair is being erased from its
dbwRecordCrosshairXPos(
CellDef *def,
bool erase) /* TRUE means crossair is being erased from its
* current position. FALSE means the crosshair
* is being added at a new position.
*/
@ -497,9 +496,9 @@ dbwRecordCrosshairXPos(def, erase)
*/
void
DBWDrawCrosshair(window, plane)
MagWindow *window; /* Window in which to redraw box. */
Plane *plane; /* Non-space tiles on this plane indicate
DBWDrawCrosshair(
MagWindow *window, /* Window in which to redraw box. */
Plane *plane) /* Non-space tiles on this plane indicate
* which highlight areas must be redrawn.
*/
{
@ -532,9 +531,9 @@ DBWDrawCrosshair(window, plane)
/* DBWScaleCrosshair --- Simple scaling of the crosshair point, no update needed */
void
DBWScaleCrosshair(scalen, scaled)
int scalen;
int scaled;
DBWScaleCrosshair(
int scalen,
int scaled)
{
DBScalePoint(&(curCrosshair.pos), scalen, scaled);
}
@ -554,9 +553,9 @@ DBWScaleCrosshair(scalen, scaled)
*/
void
DBWSetCrosshair(window, pos)
MagWindow *window;
Point *pos; /* New crosshair location in coords of rootDef. */
DBWSetCrosshair(
MagWindow *window,
Point *pos) /* New crosshair location in coords of rootDef. */
{
bool needUpdate = FALSE;
@ -617,8 +616,8 @@ DBWSetCrosshair(window, pos)
*/
void
dbwRecordBoxArea(erase)
bool erase; /* TRUE means box is being erased from its
dbwRecordBoxArea(
bool erase) /* TRUE means box is being erased from its
* current area. FALSE means box is being
* added to a new area.
*/
@ -666,9 +665,9 @@ dbwRecordBoxArea(erase)
*/
void
DBWDrawBox(window, plane)
MagWindow *window; /* Window in which to redraw box. */
Plane *plane; /* Non-space tiles on this plane indicate
DBWDrawBox(
MagWindow *window, /* Window in which to redraw box. */
Plane *plane) /* Non-space tiles on this plane indicate
* which highlight areas must be redrawn.
*/
{
@ -797,12 +796,12 @@ dbwBoxAlways1(
*/
void
DBWSetBox(rootDef, rect)
CellDef *rootDef; /* Root definition in whose coordinate system
DBWSetBox(
CellDef *rootDef, /* Root definition in whose coordinate system
* the box is defined. It will appear in all
* windows with this as root cell.
*/
Rect *rect; /* New box location in coords of rootDef. */
Rect *rect) /* New box location in coords of rootDef. */
{
/* Record the old and area of the box for redisplay. */
@ -841,7 +840,8 @@ DBWSetBox(rootDef, rect)
*/
void
DBWResetBox(CellDef *def)
DBWResetBox(
CellDef *def)
{
if (def == boxRootDef)
boxRootDef = NULL;
@ -873,17 +873,17 @@ DBWResetBox(CellDef *def)
*/
void
ToolMoveBox(corner, point, screenCoords, rootDef)
int corner; /* Specifies a corner in the format
ToolMoveBox(
int corner, /* Specifies a corner in the format
* returned by ToolGetCorner.
*/
Point *point; /* New position of corner, in screen
Point *point, /* New position of corner, in screen
* coordinates.
*/
int screenCoords; /* TRUE means point is in screen coordinates,
int screenCoords, /* TRUE means point is in screen coordinates,
* FALSE means root cell coordinates.
*/
CellDef *rootDef; /* Used only when screenCoords = FALSE, to
CellDef *rootDef) /* Used only when screenCoords = FALSE, to
* give root cell def.
*/
{
@ -977,17 +977,17 @@ ToolMoveBox(corner, point, screenCoords, rootDef)
*/
void
ToolMoveCorner(corner, point, screenCoords, rootDef)
int corner; /* The corner to be moved, in format
ToolMoveCorner(
int corner, /* The corner to be moved, in format
* returned by ToolGetCorner.
*/
Point *point; /* Destination of corner. */
int screenCoords; /* TRUE means point is in screen coordinates,
Point *point, /* Destination of corner. */
int screenCoords, /* TRUE means point is in screen coordinates,
* we look up window and translate to root
* cell coordinates. FALSE means point is in
* coordinates of rootDef.
*/
CellDef *rootDef; /* Root cell Def if screenCoords = FALSE,
CellDef *rootDef) /* Root cell Def if screenCoords = FALSE,
* unused otherwise.
*/
{
@ -1089,10 +1089,10 @@ ToolMoveCorner(corner, point, screenCoords, rootDef)
*/
void
ToolSnapToGrid(w, p, rEnclose)
MagWindow *w;
Point *p;
Rect *rEnclose;
ToolSnapToGrid(
MagWindow *w,
Point *p,
Rect *rEnclose)
{
DBWclientRec *crec = (DBWclientRec *) w->w_clientData;
Rect *r;

View File

@ -137,10 +137,11 @@ dbwUndoInit()
*/
void
DBWUndoOldEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans)
CellUse *editUse;
CellDef *editRootDef;
Transform *editToRootTrans, *rootToEditTrans;
DBWUndoOldEdit(
CellUse *editUse,
CellDef *editRootDef,
Transform *editToRootTrans,
Transform *rootToEditTrans)
{
char *useid = editUse->cu_id;
editUE *ep;
@ -159,10 +160,11 @@ DBWUndoOldEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans)
}
void
DBWUndoNewEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans)
CellUse *editUse;
CellDef *editRootDef;
Transform *editToRootTrans, *rootToEditTrans;
DBWUndoNewEdit(
CellUse *editUse,
CellDef *editRootDef,
Transform *editToRootTrans,
Transform *rootToEditTrans)
{
char *useid = editUse->cu_id;
editUE *ep;
@ -202,8 +204,8 @@ DBWUndoNewEdit(editUse, editRootDef, editToRootTrans, rootToEditTrans)
*/
void
dbwUndoChangeEdit(ep)
editUE *ep;
dbwUndoChangeEdit(
editUE *ep)
{
Rect area;
CellUse *use;
@ -262,11 +264,11 @@ dbwUndoChangeEdit(ep)
*/
void
DBWUndoBox(oldDef, oldArea, newDef, newArea)
CellDef *oldDef; /* Celldef containing old box. */
Rect *oldArea; /* Area of old box in oldDef coords. */
CellDef *newDef; /* Celldef containing new box. */
Rect *newArea; /* Area of new box in newDef coords. */
DBWUndoBox(
CellDef *oldDef, /* Celldef containing old box. */
Rect *oldArea, /* Area of old box in oldDef coords. */
CellDef *newDef, /* Celldef containing new box. */
Rect *newArea) /* Area of new box in newDef coords. */
{
BoxUndoEvent *bue;
@ -298,15 +300,15 @@ DBWUndoBox(oldDef, oldArea, newDef, newArea)
*/
void
dbwUndoBoxForw(bue)
BoxUndoEvent *bue; /* Event to be redone. */
dbwUndoBoxForw(
BoxUndoEvent *bue) /* Event to be redone. */
{
DBWSetBox(bue->bue_newDef, &bue->bue_newArea);
}
void
dbwUndoBoxBack(bue)
BoxUndoEvent *bue; /* Event to be undone. */
dbwUndoBoxBack(
BoxUndoEvent *bue) /* Event to be undone. */
{
DBWSetBox(bue->bue_oldDef, &bue->bue_oldArea);
}

View File

@ -219,7 +219,7 @@ extern void ToolSnapToGrid();
extern bool ToolGetEditBox(Rect *);
extern void ToolMoveBox(), ToolMoveCorner();
extern int ToolGetCorner();
extern void DBWloadWindow(), DBWxloadWindow();
extern void DBWloadWindow(MagWindow *window, char *name, unsigned char flags), DBWxloadWindow();
extern void DBWSetBox();
extern void DBWResetBox();
extern void DBWUndoOldEdit();
@ -260,7 +260,7 @@ extern void DBWElementNames();
extern void DBWElementInbox();
extern void DBWElementClearDef();
extern void DBWElementParseFlags();
extern char *DBWPrintElements();
extern char *DBWPrintElements(CellDef *cellDef, unsigned char flagmask, int reducer);
extern void DBWScaleElements();
extern void DBWScaleCrosshair();

View File

@ -68,8 +68,8 @@ extern struct debugClient debugClients[];
#define DebugIsSet(cid, f) debugClients[(spointertype) cid].dc_flags[f].df_value
/* procedures */
extern void HistCreate(const char *name, int ptrKeys, int low, int step, int bins);
extern void HistAdd(const char *name, int ptrKeys, int value);
extern void HistCreate(const char *name, bool ptrKeys, int low, int step, int bins);
extern void HistAdd(const char *name, bool ptrKeys, int value);
extern void HistPrint(const char *name);
extern ClientData DebugAddClient(const char *name, int maxflags);
extern int DebugAddFlag(ClientData clientID, const char *name);

View File

@ -56,9 +56,9 @@ int debugNumClients = 0;
*/
ClientData
DebugAddClient(name, maxflags)
const char *name;
int maxflags;
DebugAddClient(
const char *name,
int maxflags)
{
struct debugClient *dc;
@ -112,9 +112,9 @@ DebugAddClient(name, maxflags)
*/
int
DebugAddFlag(clientID, name)
ClientData clientID; /* Client identifier from DebugAddClient */
const char *name; /* Name of debugging flag */
DebugAddFlag(
ClientData clientID, /* Client identifier from DebugAddClient */
const char *name) /* Name of debugging flag */
{
int id = (int) CD2INT(clientID);
struct debugClient *dc;
@ -156,8 +156,8 @@ DebugAddFlag(clientID, name)
*/
void
DebugShow(clientID)
ClientData clientID;
DebugShow(
ClientData clientID)
{
int id = (int) CD2INT(clientID);
struct debugClient *dc;
@ -195,11 +195,11 @@ DebugShow(clientID)
*/
void
DebugSet(clientID, argc, argv, value)
ClientData clientID;
int argc;
char *argv[];
bool value;
DebugSet(
ClientData clientID,
int argc,
char *argv[],
int value)
{
bool badFlag = FALSE;
int id = (int) CD2INT(clientID);

View File

@ -50,9 +50,9 @@ Histogram * hist_list = (Histogram *) NULL;
* ----------------------------------------------------------------------------
*/
Histogram *
histFind(name, ptrKeys)
const char * name;
bool ptrKeys;
histFind(
const char * name,
bool ptrKeys)
{
Histogram * h;
for(h=hist_list; h!=(Histogram *) NULL; h=h->hi_next)
@ -81,12 +81,12 @@ histFind(name, ptrKeys)
* ----------------------------------------------------------------------------
*/
void
HistCreate(name, ptrKeys, low, step, bins)
const char * name; /* Name for histogram add and print */
bool ptrKeys; /* TRUE if name is a character pointer*/
int low; /* The lowest value for the histogram */
int step; /* The increment for each bin */
int bins; /* The numbe of bins in the histogram */
HistCreate(
const char * name, /* Name for histogram add and print */
bool ptrKeys, /* TRUE if name is a character pointer*/
int low, /* The lowest value for the histogram */
int step, /* The increment for each bin */
int bins) /* The numbe of bins in the histogram */
{
Histogram * new;
int i;
@ -134,10 +134,10 @@ HistCreate(name, ptrKeys, low, step, bins)
* ----------------------------------------------------------------------------
*/
void
HistAdd(name, ptrKeys, value)
const char * name; /* Identifier for the histogram */
bool ptrKeys; /* TRUE if the name is a pointer*/
int value; /* Value to index the column */
HistAdd(
const char * name, /* Identifier for the histogram */
bool ptrKeys, /* TRUE if the name is a pointer*/
int value) /* Value to index the column */
{
Histogram * h;
@ -176,8 +176,8 @@ HistAdd(name, ptrKeys, value)
* ----------------------------------------------------------------------------
*/
void
HistPrint(name)
const char * name;
HistPrint(
const char * name)
{
FILE * fp, * fopen();
Histogram * h;

View File

@ -108,10 +108,13 @@ drcFoundOneFunc(Tile *tile,
*/
long
drcCifPointToSegment(px, py, s1x, s1y, s2x, s2y)
int px, py; /* The position of the point */
int s1x, s1y; /* One endpoint of the line segment */
int s2x, s2y; /* The other endpoint of the line segment */
drcCifPointToSegment(
int px,
int py,
int s1x,
int s1y,
int s2x,
int s2y)
{
long x, y;
long a, b, c, frac;
@ -170,10 +173,10 @@ drcCifPointToSegment(px, py, s1x, s1y, s2x, s2y)
*/
int
areaCheck(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
struct drcClientData *arg;
areaCheck(
Tile *tile,
TileType dinfo,
struct drcClientData *arg)
{
Rect rect; /* Area where error is to be recorded. */
@ -337,10 +340,10 @@ areaCheck(tile, dinfo, arg)
*/
int
areaNMReject(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
ClientData *arg;
areaNMReject(
Tile *tile,
TileType dinfo,
ClientData *arg)
{
Tile *checktile = (Tile *)arg;
@ -369,10 +372,10 @@ areaNMReject(tile, dinfo, arg)
*/
int
areaNMCheck(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
struct drcClientData *arg;
areaNMCheck(
Tile *tile,
TileType dinfo,
struct drcClientData *arg)
{
Rect rect; /* Area where error is to be recorded. */
@ -460,14 +463,14 @@ areaNMCheck(tile, dinfo, arg)
*/
int
DRCBasicCheck (celldef, checkRect, clipRect, function, cdata)
CellDef *celldef; /* CellDef being checked */
Rect *checkRect; /* Check rules in this area -- usually two Haloes
DRCBasicCheck(
CellDef *celldef, /* CellDef being checked */
Rect *checkRect, /* Check rules in this area -- usually two Haloes
* larger than the area where changes were made.
*/
Rect *clipRect; /* Clip error tiles against this area. */
void (*function)(); /* Function to apply for each error found. */
ClientData cdata; /* Passed to function as argument. */
Rect *clipRect, /* Clip error tiles against this area. */
void (*function)(), /* Function to apply for each error found. */
ClientData cdata) /* Passed to function as argument. */
{
struct drcClientData arg;
int errors;
@ -553,10 +556,10 @@ DRCBasicCheck (celldef, checkRect, clipRect, function, cdata)
*/
int
drcTile (tile, dinfo, arg)
Tile *tile; /* Tile being examined */
TileType dinfo; /* Split tile information */
struct drcClientData *arg;
drcTile(
Tile *tile, /* Tile being examined */
TileType dinfo, /* Split tile information */
struct drcClientData *arg)
{
DRCCookie *cptr; /* Current design rule on list */
Rect *rect = arg->dCD_rect; /* Area being checked */

View File

@ -112,9 +112,9 @@ char *drcNeedStyle = NULL;
*/
int
drcCifSetStyle(argc, argv)
int argc;
char *argv[];
drcCifSetStyle(
int argc,
char *argv[])
{
CIFKeep *new;
@ -178,9 +178,9 @@ drcCifWarning()
*/
int
drcCifWidth(argc, argv)
int argc;
char *argv[];
drcCifWidth(
int argc,
char *argv[])
{
char *layername = argv[1];
int scalefactor;
@ -239,9 +239,9 @@ drcCifWidth(argc, argv)
*/
int
drcCifSpacing(argc, argv)
int argc;
char *argv[];
drcCifSpacing(
int argc,
char *argv[])
{
char *adjacency = argv[4];
int why = drcWhyCreate(argv[5]);
@ -385,7 +385,9 @@ drcCifSpacing(argc, argv)
*/
void
drcCifScale(int n, int d)
drcCifScale(
int n,
int d)
{
DRCCookie *dp;
int i, j;
@ -512,8 +514,8 @@ drcCifFinal()
*/
void
drcCifCheck(arg)
struct drcClientData *arg;
drcCifCheck(
struct drcClientData *arg)
{
Rect *checkRect = arg->dCD_rect;
Rect cifrect;
@ -603,10 +605,10 @@ drcCifCheck(arg)
*/
int
drcCifTile (tile, dinfo, arg)
Tile *tile; /* Tile being examined */
TileType dinfo; /* Split tile information */
struct drcClientData *arg;
drcCifTile(
Tile *tile, /* Tile being examined */
TileType dinfo, /* Split tile information */
struct drcClientData *arg)
{
DRCCookie *cptr; /* Current design rule on list */
Tile *tp; /* Used for corner checks */
@ -1032,10 +1034,10 @@ tbcheck:
*/
int
areaCifCheck(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
struct drcClientData *arg;
areaCifCheck(
Tile *tile,
TileType dinfo,
struct drcClientData *arg)
{
Rect rect; /* Area where error is to be recorded. */
Rect cifrect; /* rect, in CIF coordinates */
@ -1174,9 +1176,9 @@ areaCifCheck(tile, dinfo, arg)
*/
int
drcCifArea(argc, argv)
int argc;
char *argv[];
drcCifArea(
int argc,
char *argv[])
{
char *layers = argv[1];
int centiarea = atoi(argv[2]);
@ -1235,9 +1237,9 @@ drcCifArea(argc, argv)
*/
int
drcCifMaxwidth(argc, argv)
int argc;
char *argv[];
drcCifMaxwidth(
int argc,
char *argv[])
{
char *layers = argv[1];
int centidistance = atoi(argv[2]);
@ -1308,10 +1310,10 @@ drcCifMaxwidth(argc, argv)
*/
void
drcCheckCifArea(starttile, arg, cptr)
Tile *starttile;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckCifArea(
Tile *starttile,
struct drcClientData *arg,
DRCCookie *cptr)
{
int arealimit = cptr->drcc_cdist;
long area = 0L;
@ -1434,11 +1436,10 @@ forgetit:
*/
void
drcCheckCifMaxwidth(starttile, arg, cptr)
Tile *starttile;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckCifMaxwidth(
Tile *starttile,
struct drcClientData *arg,
DRCCookie *cptr)
{
int edgelimit = cptr->drcc_dist;
Rect boundrect;

View File

@ -181,12 +181,12 @@ extern TileType DRCErrorType;
/* ARGSUSED */
void
DRCCheckThis (celldef, operation, area)
CellDef * celldef; /* Allows check areas to propagate
DRCCheckThis(
CellDef * celldef, /* Allows check areas to propagate
* up from EditCell.
*/
TileType operation; /* TT_CHECKPAINT or TT_CHECKSUBCELL */
Rect * area; /* Area that changed. */
TileType operation, /* TT_CHECKPAINT or TT_CHECKSUBCELL */
Rect * area) /* Area that changed. */
{
CellUse * cu; /* Ptr to uses of the given CellDef */
Rect transRect; /* Area in coords of parent CellDefs,
@ -318,8 +318,8 @@ DRCCheckThis (celldef, operation, area)
*/
void
DRCRemovePending(def)
CellDef *def;
DRCRemovePending(
CellDef *def)
{
DRCPendingCookie *p, *plast;
@ -639,10 +639,10 @@ checkDone:
/* ARGSUSED */
int
drcCheckTile(tile, dinfo, arg)
Tile *tile; /* Tile in DRC_CHECK plane */
TileType dinfo; /* Split tile information (unused) */
ClientData arg; /* Not used. */
drcCheckTile(
Tile *tile, /* Tile in DRC_CHECK plane */
TileType dinfo, /* Split tile information (unused) */
ClientData arg) /* Not used. */
{
Rect square; /* Square area of the checkerboard
* being processed right now.
@ -768,10 +768,10 @@ drcCheckTile(tile, dinfo, arg)
*/
int
drcXorFunc(tile, dinfo, clientdata)
Tile *tile;
TileType dinfo;
ClientData clientdata;
drcXorFunc(
Tile *tile,
TileType dinfo,
ClientData clientdata)
{
Rect area;
@ -785,10 +785,10 @@ drcXorFunc(tile, dinfo, clientdata)
*/
int
drcPutBackFunc(tile, dinfo, cellDef)
Tile *tile; /* Error tile, from drcTempPlane. */
TileType dinfo; /* Split tile information */
CellDef *cellDef; /* Celldef in which to paint error. */
drcPutBackFunc(
Tile *tile, /* Error tile, from drcTempPlane. */
TileType dinfo, /* Split tile information */
CellDef *cellDef) /* Celldef in which to paint error. */
{
Rect area;
@ -820,10 +820,10 @@ drcPutBackFunc(tile, dinfo, cellDef)
*/
int
drcIncludeArea(tile, dinfo, rect)
Tile *tile;
TileType dinfo; /* (unused) */
Rect *rect; /* Rectangle in which to record total area. */
drcIncludeArea(
Tile *tile,
TileType dinfo, /* (unused) */
Rect *rect) /* Rectangle in which to record total area. */
{
Rect dum;

View File

@ -48,10 +48,10 @@ Stack *DRCstack = (Stack *)NULL;
void
drcCheckAngles(tile, arg, cptr)
Tile *tile;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckAngles(
Tile *tile,
struct drcClientData *arg,
DRCCookie *cptr)
{
Rect rect;
bool ortho = (cptr->drcc_flags & DRC_ANGLES_45) ? FALSE : TRUE;
@ -84,10 +84,10 @@ drcCheckAngles(tile, arg, cptr)
*/
void
drcCheckOffGrid(edgeRect, arg, cptr)
Rect *edgeRect;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckOffGrid(
Rect *edgeRect,
struct drcClientData *arg,
DRCCookie *cptr)
{
Rect rect;
int gtest;
@ -128,11 +128,10 @@ drcCheckOffGrid(edgeRect, arg, cptr)
*/
void
drcCheckArea(starttile,arg,cptr)
Tile *starttile;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckArea(
Tile *starttile,
struct drcClientData *arg,
DRCCookie *cptr)
{
int arealimit;
long area = 0L;
@ -257,11 +256,11 @@ forgetit:
*/
int
drcCheckMaxwidth(starttile,arg,cptr,both)
Tile *starttile;
struct drcClientData *arg;
DRCCookie *cptr;
bool both;
drcCheckMaxwidth(
Tile *starttile,
struct drcClientData *arg,
DRCCookie *cptr,
bool both)
{
int width;
int height;
@ -395,10 +394,10 @@ drcCheckMaxwidth(starttile,arg,cptr,both)
*/
void
drcCheckRectSize(starttile, arg, cptr)
Tile *starttile;
struct drcClientData *arg;
DRCCookie *cptr;
drcCheckRectSize(
Tile *starttile,
struct drcClientData *arg,
DRCCookie *cptr)
{
int maxsize, even;
TileTypeBitMask *oktypes = &cptr->drcc_mask;
@ -510,12 +509,12 @@ MaxRectsExclude(
*/
MaxRectsData *
drcCanonicalMaxwidth(starttile, dir, arg, cptr, mrdptr)
Tile *starttile;
int dir; /* direction of rule */
struct drcClientData *arg;
DRCCookie *cptr;
MaxRectsData **mrdptr;
drcCanonicalMaxwidth(
Tile *starttile,
int dir, /* direction of rule */
struct drcClientData *arg,
DRCCookie *cptr,
MaxRectsData **mrdptr)
{
int s, edgelimit;
Tile *tile,*tp;

View File

@ -145,11 +145,11 @@ LinkedIndex *DRCIgnoreRules = NULL;
*/
void
drcPaintError(celldef, rect, cptr, plane)
CellDef * celldef; /* CellDef being checked */
Rect * rect; /* Area of error */
DRCCookie * cptr; /* Design rule violated -- not used */
Plane * plane; /* Where to paint error tiles. */
drcPaintError(
CellDef * celldef, /* CellDef being checked */
Rect * rect, /* Area of error */
DRCCookie * cptr, /* Design rule violated -- not used */
Plane * plane) /* Where to paint error tiles. */
{
PaintUndoInfo ui;
@ -180,8 +180,8 @@ drcPaintError(celldef, rect, cptr, plane)
*/
char *
drcSubstitute (cptr)
DRCCookie * cptr; /* Design rule violated */
drcSubstitute(
DRCCookie * cptr) /* Design rule violated */
{
static char *why_out = NULL;
char *whyptr, *sptr, *wptr, *vptr;
@ -282,11 +282,11 @@ drcSubstitute (cptr)
*/
void
drcPrintError (celldef, rect, cptr, scx)
CellDef * celldef; /* CellDef being checked -- not used here */
Rect * rect; /* Area of error */
DRCCookie * cptr; /* Design rule violated */
SearchContext * scx; /* Only errors in scx->scx_area get reported. */
drcPrintError(
CellDef * celldef, /* CellDef being checked -- not used here */
Rect * rect, /* Area of error */
DRCCookie * cptr, /* Design rule violated */
SearchContext * scx) /* Only errors in scx->scx_area get reported. */
{
HashEntry *h;
int i;
@ -343,11 +343,11 @@ drcPrintError (celldef, rect, cptr, scx)
#ifdef MAGIC_WRAPPER
void
drcListError (celldef, rect, cptr, scx)
CellDef * celldef; /* CellDef being checked -- not used here */
Rect * rect; /* Area of error */
DRCCookie * cptr; /* Design rule violated */
SearchContext * scx; /* Only errors in scx->scx_area get reported */
drcListError(
CellDef * celldef, /* CellDef being checked -- not used here */
Rect * rect, /* Area of error */
DRCCookie * cptr, /* Design rule violated */
SearchContext * scx) /* Only errors in scx->scx_area get reported */
{
HashEntry *h;
int i;
@ -400,11 +400,11 @@ drcListError (celldef, rect, cptr, scx)
/* along with position information. */
void
drcListallError (celldef, rect, cptr, scx)
CellDef * celldef; /* CellDef being checked -- not used here */
Rect * rect; /* Area of error */
DRCCookie * cptr; /* Design rule violated */
SearchContext * scx; /* Only errors in scx->scx_area get reported. */
drcListallError(
CellDef * celldef, /* CellDef being checked -- not used here */
Rect * rect, /* Area of error */
DRCCookie * cptr, /* Design rule violated */
SearchContext * scx) /* Only errors in scx->scx_area get reported. */
{
Tcl_Obj *lobj, *pobj;
HashEntry *h;
@ -566,17 +566,17 @@ DRCPrintStats()
*/
bool
DRCWhy(dolist, use, area, findonly)
bool dolist; /*
DRCWhy(
bool dolist, /*
* Generate Tcl list for value
*/
CellUse *use; /* Use in whose definition to start
CellUse *use, /* Use in whose definition to start
* the hierarchical check.
*/
Rect *area; /* Area, in def's coordinates, that
Rect *area, /* Area, in def's coordinates, that
* is to be checked.
*/
bool findonly; /* If TRUE, contents of DRCIgnoreRules
bool findonly) /* If TRUE, contents of DRCIgnoreRules
* are inverted; that is, flag only
* the marked rules instead of ignoring
* them.
@ -643,14 +643,14 @@ DRCWhy(dolist, use, area, findonly)
#ifdef MAGIC_WRAPPER
void
DRCWhyAll(use, area, fout)
CellUse *use; /* Use in whose definition to start
DRCWhyAll(
CellUse *use, /* Use in whose definition to start
* the hierarchical check.
*/
Rect *area; /* Area, in def's coordinates, that
Rect *area, /* Area, in def's coordinates, that
* is to be checked.
*/
FILE *fout; /*
FILE *fout) /*
* Write formatted output to fout
*/
{
@ -732,9 +732,9 @@ DRCWhyAll(use, area, fout)
/* ARGSUSED */
void
drcWhyFunc(scx, cdarg)
SearchContext *scx; /* Describes current state of search. */
ClientData cdarg; /* Used to hold boolean value "dolist" */
drcWhyFunc(
SearchContext *scx, /* Describes current state of search. */
ClientData cdarg) /* Used to hold boolean value "dolist" */
{
CellDef *def = scx->scx_use->cu_def;
bool dolist = (bool)((pointertype)cdarg);
@ -748,9 +748,9 @@ drcWhyFunc(scx, cdarg)
#ifdef MAGIC_WRAPPER
int
drcWhyAllFunc(scx, cdarg)
SearchContext *scx; /* Describes current state of search. */
ClientData cdarg; /* Unused */
drcWhyAllFunc(
SearchContext *scx, /* Describes current state of search. */
ClientData cdarg) /* Unused */
{
CellDef *def = scx->scx_use->cu_def;
@ -781,9 +781,9 @@ drcWhyAllFunc(scx, cdarg)
*/
void
DRCCheck(use, area)
CellUse *use; /* Top-level use of hierarchy. */
Rect *area; /* This area is rechecked everywhere in the
DRCCheck(
CellUse *use, /* Top-level use of hierarchy. */
Rect *area) /* This area is rechecked everywhere in the
* hierarchy underneath use.
*/
{
@ -809,9 +809,9 @@ DRCCheck(use, area)
/* ARGSUSED */
int
drcCheckFunc(scx, cdarg)
SearchContext *scx;
ClientData cdarg; /* Not used. */
drcCheckFunc(
SearchContext *scx,
ClientData cdarg) /* Not used. */
{
Rect cellArea;
CellDef *def;
@ -867,10 +867,10 @@ drcCheckFunc(scx, cdarg)
*/
DRCCountList *
DRCCount(use, area, recurse)
CellUse *use; /* Top-level use of hierarchy. */
Rect *area; /* Area in which violations are counted. */
bool recurse; /* If TRUE, count errors in all subcells */
DRCCount(
CellUse *use, /* Top-level use of hierarchy. */
Rect *area, /* Area in which violations are counted. */
bool recurse) /* If TRUE, count errors in all subcells */
{
DRCCountList *dcl, *newdcl;
HashTable dupTable;
@ -930,9 +930,9 @@ DRCCount(use, area, recurse)
}
int
drcCountFunc(scx, dupTable)
SearchContext *scx;
HashTable *dupTable; /* Passed as client data, used to
drcCountFunc(
SearchContext *scx,
HashTable *dupTable) /* Passed as client data, used to
* avoid searching any cell twice.
*/
{
@ -977,10 +977,10 @@ drcCountFunc(scx, dupTable)
}
int
drcCountFunc2(tile, dinfo, countptr)
Tile *tile; /* Tile found in error plane. */
TileType dinfo; /* Split tile information (unused) */
int *countptr; /* Address of count word. */
drcCountFunc2(
Tile *tile, /* Tile found in error plane. */
TileType dinfo, /* Split tile information (unused) */
int *countptr) /* Address of count word. */
{
if (TiGetType(tile) != (TileType) TT_SPACE) (*countptr)++;
return 0;
@ -1053,11 +1053,11 @@ typedef struct {
} Sindx;
int
DRCFind(use, area, rect, indx)
CellUse *use; /* Cell use to check. */
Rect *area; /* Area of search */
Rect *rect; /* Rectangle to fill in with tile location. */
int indx; /* Go to this error. */
DRCFind(
CellUse *use, /* Cell use to check. */
Rect *area, /* Area of search */
Rect *rect, /* Rectangle to fill in with tile location. */
int indx) /* Go to this error. */
{
SearchContext scx;
Sindx finddata;
@ -1098,9 +1098,9 @@ DRCFind(use, area, rect, indx)
}
int
drcFindFunc(scx, finddata)
SearchContext *scx;
Sindx *finddata;
drcFindFunc(
SearchContext *scx,
Sindx *finddata)
{
CellDef *def;
HashEntry *h;
@ -1127,11 +1127,10 @@ drcFindFunc(scx, finddata)
}
int
drcFindFunc2(tile, dinfo, finddata)
Tile *tile; /* Tile in error plane. */
TileType dinfo; /* Split tile information (unused) */
Sindx *finddata; /* Information about error to find */
drcFindFunc2(
Tile *tile, /* Tile in error plane. */
TileType dinfo, /* Split tile information (unused) */
Sindx *finddata) /* Information about error to find */
{
if (TiGetType(tile) == (TileType) TT_SPACE) return 0;
if (++finddata->current == finddata->target)

View File

@ -53,9 +53,9 @@ extern const char *DBTypeShortName(TileType type);
*/
char *
drcGetName(layer, string)
int layer;
char *string; /* Used to hold name. Must have length >= 8 */
drcGetName(
int layer,
char *string) /* Used to hold name. Must have length >= 8 */
{
(void) strncpy(string, DBTypeShortName(layer), 8);
string[8] = '\0';
@ -79,8 +79,8 @@ drcGetName(layer, string)
*/
void
DRCPrintRulesTable (fp)
FILE *fp;
DRCPrintRulesTable(
FILE *fp)
{
int i, j, k;
DRCCookie * dp;
@ -163,8 +163,8 @@ DRCPrintRulesTable (fp)
}
char *
maskToPrint (mask)
TileTypeBitMask *mask;
maskToPrint(
TileTypeBitMask *mask)
{
int i;
int gotSome = FALSE;

View File

@ -130,9 +130,9 @@ struct drcSubcellArg {
*/
int
drcFindOtherCells(use, dlu)
CellUse *use;
struct drcLinkedUse *dlu;
drcFindOtherCells(
CellUse *use,
struct drcLinkedUse *dlu)
{
if (use != dlu->dlu_use)
GeoInclude(&use->cu_bbox, &dlu->dlu_area);
@ -158,10 +158,10 @@ drcFindOtherCells(use, dlu)
*/
int
drcSubCopyErrors(tile, dinfo, cxp)
Tile *tile;
TileType dinfo; /* (unused) */
TreeContext *cxp;
drcSubCopyErrors(
Tile *tile,
TileType dinfo, /* (unused) */
TreeContext *cxp)
{
Rect area;
Rect destArea;
@ -206,9 +206,9 @@ drcSubCopyErrors(tile, dinfo, cxp)
*/
int
drcSubCopyFunc(scx, cdarg)
SearchContext *scx;
ClientData cdarg;
drcSubCopyFunc(
SearchContext *scx,
ClientData cdarg)
{
TileTypeBitMask drcMask;
@ -246,9 +246,9 @@ drcSubCopyFunc(scx, cdarg)
*/
int
drcSubcellFunc(subUse, dsa)
CellUse *subUse; /* Subcell instance found in area. */
struct drcSubcellArg *dsa; /* Information needed for funtion and to pass
drcSubcellFunc(
CellUse *subUse, /* Subcell instance found in area. */
struct drcSubcellArg *dsa) /* Information needed for funtion and to pass
* back to the caller.
*/
{
@ -349,11 +349,11 @@ drcAlwaysOne(Tile *tile,
*/
int
drcSubCheckPaint(scx, curUse)
SearchContext *scx; /* Contains information about the celluse
drcSubCheckPaint(
SearchContext *scx, /* Contains information about the celluse
* that was found.
*/
CellUse **curUse; /* Points to a celluse, or NULL, or -1. -1
CellUse **curUse) /* Points to a celluse, or NULL, or -1. -1
* means paint was found in the root cell,
* and non-NULL means some other celluse had
* paint in it. If we find another celluse
@ -403,17 +403,17 @@ drcSubCheckPaint(scx, curUse)
*/
int
DRCFindInteractions(def, area, radius, interaction)
CellDef *def; /* Cell to check for interactions. */
Rect *area; /* Area of def to check for interacting
DRCFindInteractions(
CellDef *def, /* Cell to check for interactions. */
Rect *area, /* Area of def to check for interacting
* material.
*/
int radius; /* How close two pieces of material must be
int radius, /* How close two pieces of material must be
* to be considered interacting. Two pieces
* radius apart do NOT interact, but if they're
* close than this they do.
*/
Rect *interaction; /* Gets filled in with the bounding box of
Rect *interaction) /* Gets filled in with the bounding box of
* the interaction area, if any. Doesn't
* have a defined value when FALSE is returned.
*/
@ -539,10 +539,10 @@ DRCFindInteractions(def, area, radius, interaction)
*/
int
drcExactOverlapCheck(tile, dinfo, arg)
Tile *tile; /* Tile to check. */
TileType dinfo; /* Split tile information (unused) */
struct drcClientData *arg; /* How to detect and process errors. */
drcExactOverlapCheck(
Tile *tile, /* Tile to check. */
TileType dinfo, /* Split tile information (unused) */
struct drcClientData *arg) /* How to detect and process errors. */
{
Rect rect;
@ -579,10 +579,10 @@ drcExactOverlapCheck(tile, dinfo, arg)
*/
int
drcExactOverlapTile(tile, dinfo, cxp)
Tile *tile; /* Tile that must overlap exactly. */
TileType dinfo; /* Split tile information (unused) */
TreeContext *cxp; /* Tells how to translate out of subcell.
drcExactOverlapTile(
Tile *tile, /* Tile that must overlap exactly. */
TileType dinfo, /* Split tile information (unused) */
TreeContext *cxp) /* Tells how to translate out of subcell.
* The client data must be a drcClientData
* record, and the caller must have filled
* in the celldef, clip, errors, function,
@ -720,8 +720,8 @@ drcExactOverlapTile(tile, dinfo, cxp)
*/
void
DRCOffGridError(rect)
Rect *rect; /* Area of error */
DRCOffGridError(
Rect *rect) /* Area of error */
{
if (drcSubFunc == NULL) return;
(*drcSubFunc)(DRCErrorDef, rect, &drcOffGridCookie, drcSubClientData);
@ -763,12 +763,12 @@ DRCOffGridError(rect)
*/
int
DRCInteractionCheck(def, area, erasebox, func, cdarg)
CellDef *def; /* Definition in which to do check. */
Rect *area; /* Area in which all errors are to be found. */
Rect *erasebox; /* Smaller area containing DRC check tiles */
void (*func)(); /* Function to call for each error. */
ClientData cdarg; /* Extra info to be passed to func. */
DRCInteractionCheck(
CellDef *def, /* Definition in which to do check. */
Rect *area, /* Area in which all errors are to be found. */
Rect *erasebox, /* Smaller area containing DRC check tiles */
void (*func)(), /* Function to call for each error. */
ClientData cdarg) /* Extra info to be passed to func. */
{
int oldTiles, count, x, y, errorSaveType;
Rect intArea, square, cliparea, subArea;
@ -966,9 +966,9 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
}
void
DRCFlatCheck(use, area)
CellUse *use;
Rect *area;
DRCFlatCheck(
CellUse *use,
Rect *area)
{
int x, y;
Rect chunk;
@ -1012,11 +1012,11 @@ DRCFlatCheck(use, area)
}
void
drcIncCount(def, area, rule, count)
CellDef *def;
Rect *area;
DRCCookie *rule;
int *count;
drcIncCount(
CellDef *def,
Rect *area,
DRCCookie *rule,
int *count)
{
(*count)++;
}

View File

@ -110,9 +110,9 @@ void drcTechFinalStyle();
*/
PlaneMask
CoincidentPlanes(typeMask, pmask)
TileTypeBitMask *typeMask; /* Mask of types to check coincidence */
PlaneMask pmask; /* Mask of all possible planes of types */
CoincidentPlanes(
TileTypeBitMask *typeMask, /* Mask of types to check coincidence */
PlaneMask pmask) /* Mask of all possible planes of types */
{
PlaneMask planes = pmask;
TileType i;
@ -135,7 +135,8 @@ CoincidentPlanes(typeMask, pmask)
*/
int
LowestMaskBit(PlaneMask pmask)
LowestMaskBit(
PlaneMask pmask)
{
PlaneMask pset = pmask;
int plane = 0;
@ -167,8 +168,10 @@ LowestMaskBit(PlaneMask pmask)
*/
void
DRCPrintStyle(dolist, doforall, docurrent)
bool dolist, doforall, docurrent;
DRCPrintStyle(
bool dolist,
bool doforall,
bool docurrent)
{
DRCKeep *style;
@ -231,8 +234,8 @@ DRCPrintStyle(dolist, doforall, docurrent)
*/
void
DRCSetStyle(name)
char *name;
DRCSetStyle(
char *name)
{
DRCKeep *style, *match;
int length;
@ -365,8 +368,8 @@ drcTechNewStyle()
*/
int
drcWhyCreate(whystring)
char *whystring;
drcWhyCreate(
char *whystring)
{
HashEntry *he;
@ -417,8 +420,8 @@ drcWhyCreate(whystring)
*/
unsigned char
drcExceptionCreate(name)
char *name;
drcExceptionCreate(
char *name)
{
int i;
char **newlist;
@ -473,8 +476,10 @@ drcExceptionCreate(name)
*/
DRCCookie *
drcFindBucket(i, j, distance)
int i, j, distance;
drcFindBucket(
int i,
int j,
int distance)
{
DRCCookie *dp;
@ -516,8 +521,8 @@ drcFindBucket(i, j, distance)
*/
void
drcLoadStyle(stylename)
char *stylename;
drcLoadStyle(
char *stylename)
{
SectionID invdrc;
@ -757,10 +762,10 @@ DRCTechStyleInit()
*/
bool
DRCTechLine(sectionName, argc, argv)
char *sectionName; /* The name of this section */
int argc; /* Number of fields on the line */
char *argv[]; /* Values of the fields */
DRCTechLine(
char *sectionName, /* The name of this section */
int argc, /* Number of fields on the line */
char *argv[]) /* Values of the fields */
{
int j, l;
DRCKeep *newStyle, *p;
@ -1009,13 +1014,17 @@ DRCTechLine(sectionName, argc, argv)
}
void
drcCifAssign(cookie, dist, next, mask, corner, tag, cdist, flags, planeto, planefrom)
DRCCookie *cookie, *next;
int dist, cdist;
TileTypeBitMask *mask, *corner;
int tag;
unsigned short flags;
int planeto, planefrom;
drcCifAssign(
DRCCookie *cookie,
int dist,
DRCCookie *next,
TileTypeBitMask *mask,
TileTypeBitMask *corner,
int tag,
int cdist,
unsigned short flags,
int planeto,
int planefrom)
{
(cookie)->drcc_dist = dist;
(cookie)->drcc_next = next;
@ -1035,13 +1044,17 @@ drcCifAssign(cookie, dist, next, mask, corner, tag, cdist, flags, planeto, plane
// planefrom
void
drcAssign(cookie, dist, next, mask, corner, why, cdist, flags, planeto, planefrom)
DRCCookie *cookie, *next;
int dist, cdist;
TileTypeBitMask *mask, *corner;
int why;
unsigned short flags;
int planeto, planefrom;
drcAssign(
DRCCookie *cookie,
int dist,
DRCCookie *next,
TileTypeBitMask *mask,
TileTypeBitMask *corner,
int why,
int cdist,
unsigned short flags,
int planeto,
int planefrom)
{
/* Diagnostic */
if (planeto >= DBNumPlanes)
@ -1090,10 +1103,10 @@ drcAssign(cookie, dist, next, mask, corner, why, cdist, flags, planeto, planefro
/* ARGSUSED */
bool
DRCTechAddRule(sectionName, argc, argv)
char *sectionName; /* Unused */
int argc;
char *argv[];
DRCTechAddRule(
char *sectionName, /* Unused */
int argc,
char *argv[])
{
int which, distance, mdist;
const char *fmt;
@ -1217,9 +1230,9 @@ DRCTechAddRule(sectionName, argc, argv)
*/
int
drcExtend(argc, argv)
int argc;
char *argv[];
drcExtend(
int argc,
char *argv[])
{
char *layers1 = argv[1];
char *layers2 = argv[2];
@ -1393,9 +1406,9 @@ drcExtend(argc, argv)
*/
int
drcWidth(argc, argv)
int argc;
char *argv[];
drcWidth(
int argc,
char *argv[])
{
char *layers = argv[1];
int distance = atoi(argv[2]);
@ -1504,9 +1517,9 @@ drcWidth(argc, argv)
*/
int
drcArea(argc, argv)
int argc;
char *argv[];
drcArea(
int argc,
char *argv[])
{
char *layers = argv[1];
int distance = atoi(argv[2]);
@ -1584,9 +1597,9 @@ drcArea(argc, argv)
*/
int
drcOffGrid(argc, argv)
int argc;
char *argv[];
drcOffGrid(
int argc,
char *argv[])
{
char *layers = argv[1];
int pitch = atoi(argv[2]);
@ -1689,9 +1702,9 @@ drcOffGrid(argc, argv)
*/
int
drcMaxwidth(argc, argv)
int argc;
char *argv[];
drcMaxwidth(
int argc,
char *argv[])
{
char *layers = argv[1];
int distance = atoi(argv[2]);
@ -1816,9 +1829,9 @@ drcMaxwidth(argc, argv)
*/
int
drcAngles(argc, argv)
int argc;
char *argv[];
drcAngles(
int argc,
char *argv[])
{
char *layers = argv[1];
char *endptr;
@ -1996,9 +2009,9 @@ drcAngles(argc, argv)
*/
int
drcSpacing3(argc, argv)
int argc;
char *argv[];
drcSpacing3(
int argc,
char *argv[])
{
char *layers1 = argv[1], *layers2 = argv[2];
char *layers3 = argv[5];
@ -2091,16 +2104,18 @@ drcSpacing3(argc, argv)
*/
int
drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
why, widerule, runlength, multiplane)
TileTypeBitMask *set1, *set2;
PlaneMask pmask1, pmask2;
int wwidth, distance;
char *adjacency;
int why;
bool widerule;
int runlength;
bool multiplane;
drcMaskSpacing(
TileTypeBitMask *set1,
TileTypeBitMask *set2,
PlaneMask pmask1,
PlaneMask pmask2,
int wwidth,
int distance,
char *adjacency,
int why,
bool widerule,
int runlength,
bool multiplane)
{
TileTypeBitMask tmp1, tmp2, setR, setRreverse;
int plane, plane2;
@ -2600,9 +2615,9 @@ drcMaskSpacing(set1, set2, pmask1, pmask2, wwidth, distance, adjacency,
*/
int
drcSpacing(argc, argv)
int argc;
char *argv[];
drcSpacing(
int argc,
char *argv[])
{
char *layers1 = argv[1], *layers2;
char *adjacency;
@ -2775,9 +2790,9 @@ drcSpacing(argc, argv)
*/
int
drcEdge(argc, argv)
int argc;
char *argv[];
drcEdge(
int argc,
char *argv[])
{
char *layers1 = argv[1], *layers2 = argv[2];
int distance = atoi(argv[3]);
@ -2956,9 +2971,9 @@ drcEdge(argc, argv)
*/
int
drcOverhang(argc, argv)
int argc;
char *argv[];
drcOverhang(
int argc,
char *argv[])
{
char *layers2 = argv[1], *layers1 = argv[2];
int distance = atoi(argv[3]);
@ -3093,9 +3108,9 @@ drcOverhang(argc, argv)
*/
int
drcRectOnly(argc, argv)
int argc;
char *argv[];
drcRectOnly(
int argc,
char *argv[])
{
char *layers = argv[1];
int why = drcWhyCreate(argv[2]);
@ -3198,9 +3213,9 @@ drcRectOnly(argc, argv)
*/
int
drcSurround(argc, argv)
int argc;
char *argv[];
drcSurround(
int argc,
char *argv[])
{
char *layers1 = argv[1], *layers2 = argv[2], *endptr;
int distance = atoi(argv[3]);
@ -3498,9 +3513,9 @@ drcSurround(argc, argv)
*/
int
drcNoOverlap(argc, argv)
int argc;
char *argv[];
drcNoOverlap(
int argc,
char *argv[])
{
char *layers1 = argv[1], *layers2 = argv[2];
TileTypeBitMask set1, set2;
@ -3552,9 +3567,9 @@ drcNoOverlap(argc, argv)
*/
int
drcExactOverlap(argc, argv)
int argc;
char *argv[];
drcExactOverlap(
int argc,
char *argv[])
{
char *layers = argv[1];
TileTypeBitMask set;
@ -3596,9 +3611,9 @@ drcExactOverlap(argc, argv)
*/
int
drcRectangle(argc, argv)
int argc;
char *argv[];
drcRectangle(
int argc,
char *argv[])
{
char *layers = argv[1];
int why = drcWhyCreate(argv[4]);
@ -3738,9 +3753,9 @@ drcRectangle(argc, argv)
*/
int
drcException(argc, argv)
int argc;
char *argv[];
drcException(
int argc,
char *argv[])
{
int i;
@ -3756,9 +3771,9 @@ drcException(argc, argv)
}
int
drcExemption(argc, argv)
int argc;
char *argv[];
drcExemption(
int argc,
char *argv[])
{
int i;
@ -3797,9 +3812,9 @@ drcExemption(argc, argv)
*/
int
drcOption(argc, argv)
int argc;
char *argv[];
drcOption(
int argc,
char *argv[])
{
int i;
@ -3844,9 +3859,9 @@ drcOption(argc, argv)
*/
int
drcStepSize(argc, argv)
int argc;
char *argv[];
drcStepSize(
int argc,
char *argv[])
{
if (DRCCurStyle == NULL) return 0;
@ -3922,9 +3937,9 @@ DRCTechFinal()
*/
void
drcScaleDown(style, scalefactor)
DRCStyle *style;
int scalefactor;
drcScaleDown(
DRCStyle *style,
int scalefactor)
{
TileType i, j;
DRCCookie *dp;
@ -3991,9 +4006,9 @@ drcScaleDown(style, scalefactor)
*/
void
drcScaleUp(style, scalefactor)
DRCStyle *style;
int scalefactor;
drcScaleUp(
DRCStyle *style,
int scalefactor)
{
TileType i, j;
DRCCookie *dp;
@ -4060,8 +4075,8 @@ drcScaleUp(style, scalefactor)
*/
void
drcTechFinalStyle(style)
DRCStyle *style;
drcTechFinalStyle(
DRCStyle *style)
{
TileTypeBitMask tmpMask, nextMask;
DRCCookie *dummy, *dp, *next, *dptrig;
@ -4400,8 +4415,9 @@ DRCTechRuleStats()
*/
void
DRCTechScale(scalen, scaled)
int scalen, scaled;
DRCTechScale(
int scalen,
int scaled)
{
DRCCookie *dp;
TileType i, j;
@ -4469,8 +4485,8 @@ DRCTechScale(scalen, scaled)
*/
int
DRCGetDefaultLayerWidth(ttype)
TileType ttype;
DRCGetDefaultLayerWidth(
TileType ttype)
{
int routeWidth = 0;
DRCCookie *cptr;
@ -4535,8 +4551,9 @@ DRCGetDefaultLayerWidth(ttype)
*/
int
DRCGetDefaultLayerSpacing(ttype1, ttype2)
TileType ttype1, ttype2;
DRCGetDefaultLayerSpacing(
TileType ttype1,
TileType ttype2)
{
int routeSpacing = 0;
DRCCookie *cptr;
@ -4594,8 +4611,9 @@ DRCGetDefaultLayerSpacing(ttype1, ttype2)
*/
int
DRCGetDefaultLayerSurround(ttype1, ttype2)
TileType ttype1, ttype2;
DRCGetDefaultLayerSurround(
TileType ttype1,
TileType ttype2)
{
int layerSurround = 0;
DRCCookie *cptr;
@ -4668,8 +4686,9 @@ DRCGetDefaultLayerSurround(ttype1, ttype2)
*/
int
DRCGetDirectionalLayerSurround(ttype1, ttype2)
TileType ttype1, ttype2;
DRCGetDirectionalLayerSurround(
TileType ttype1,
TileType ttype2)
{
int layerSurround = 0;
DRCCookie *cptr, *cnext;
@ -4720,9 +4739,9 @@ DRCGetDirectionalLayerSurround(ttype1, ttype2)
*/
int
DRCGetDefaultWideLayerSpacing(ttype, twidth)
TileType ttype;
int twidth;
DRCGetDefaultWideLayerSpacing(
TileType ttype,
int twidth)
{
int routeSpacing = 0;
DRCCookie *cptr;

View File

@ -259,8 +259,8 @@ extern void drcPrintError();
extern int drcIncludeArea();
extern int drcExactOverlapTile();
extern void drcInitRulesTbl();
extern void drcAssign();
extern void drcCifAssign();
extern void drcAssign(DRCCookie *cookie, int dist, DRCCookie *next, TileTypeBitMask *mask, TileTypeBitMask *corner, int why, int cdist, unsigned short flags, int planeto, int planefrom);
extern void drcCifAssign(DRCCookie *cookie, int dist, DRCCookie *next, TileTypeBitMask *mask, TileTypeBitMask *corner, int tag, int cdist, unsigned short flags, int planeto, int planefrom);
extern int drcWhyCreate();
/*
@ -290,17 +290,17 @@ extern void DRCContinuous();
extern void DRCCheckThis();
extern void DRCRemovePending();
extern void DRCPrintRulesTable();
extern bool DRCWhy();
extern bool DRCWhy(bool dolist, CellUse *use, Rect *area, bool findonly);
extern void DRCPrintStats();
extern void DRCCheck();
extern DRCCountList *DRCCount();
extern DRCCountList *DRCCount(CellUse *use, Rect *area, bool recurse);
extern int DRCFind();
extern void DRCCatchUp();
extern int DRCFindInteractions();
extern int DRCBasicCheck();
extern void DRCOffGridError();
extern void DRCPrintStyle();
extern void DRCPrintStyle(bool dolist, bool doforall, bool docurrent);
extern void DRCSetStyle();
extern void DRCLoadStyle();
@ -315,7 +315,7 @@ extern void drcCifCheck();
extern void drcCifFinal();
extern void drcCheckAngles();
extern void drcCheckArea();
extern int drcCheckMaxwidth();
extern int drcCheckMaxwidth(Tile *starttile, struct drcClientData *arg, DRCCookie *cptr, bool both);
extern void drcCheckRectSize();
extern void drcCheckOffGrid();
extern int LowestMaskBit();

View File

@ -123,9 +123,9 @@ typedef struct _ams {
#define ANTENNACHECK_HELP 2
void
CmdAntennaCheck(w, cmd)
MagWindow *w;
TxCommand *cmd;
CmdAntennaCheck(
MagWindow *w,
TxCommand *cmd)
{
int i, flatFlags;
char *inName;
@ -291,9 +291,9 @@ runantennacheck:
*/
int
antennacheckArgs(pargc, pargv)
int *pargc;
char ***pargv;
antennacheckArgs(
int *pargc,
char ***pargv)
{
char **argv = *pargv, *cp;
int argc = *pargc;
@ -327,9 +327,9 @@ usage:
* ----------------------------------------------------------------------------
*/
EFNode *
AntennaGetNode(prefix, suffix)
HierName *prefix;
HierName *suffix;
AntennaGetNode(
HierName *prefix,
HierName *suffix)
{
HashEntry *he;
@ -754,10 +754,10 @@ antennacheckVisit(
*/
int
areaMarkFunc(tile, dinfo, ams)
Tile *tile;
TileType dinfo;
AntennaMarkStruct *ams;
areaMarkFunc(
Tile *tile,
TileType dinfo,
AntennaMarkStruct *ams)
{
Rect rect;
char msg[200];
@ -779,10 +779,10 @@ areaMarkFunc(tile, dinfo, ams)
*/
int
areaAccumFunc(tile, dinfo, gdas)
Tile *tile;
TileType dinfo;
GateDiffAccumStruct *gdas;
areaAccumFunc(
Tile *tile,
TileType dinfo,
GateDiffAccumStruct *gdas)
{
Rect *rect = &(gdas->r);
int type;
@ -819,10 +819,10 @@ areaAccumFunc(tile, dinfo, gdas)
*/
int
antennaAccumFunc(tile, dinfo, aaptr)
Tile *tile;
TileType dinfo; /* Not used, but should be handled */
AntennaAccumStruct *aaptr;
antennaAccumFunc(
Tile *tile,
TileType dinfo, /* Not used, but should be handled */
AntennaAccumStruct *aaptr)
{
Rect *rect = &(aaptr->r);
Rect *cont = &(aaptr->via);

View File

@ -144,12 +144,12 @@ extern void efLoadSearchPath();
*/
char *
EFArgs(argc, argv, err_result, argsProc, cdata)
int argc; /* Number of command-line args */
char *argv[]; /* Vector of command-line args */
bool *err_result; /* Set to TRUE if error occurs */
bool (*argsProc)(); /* Called for args we don't recognize */
ClientData cdata; /* Passed to (*argsProc)() */
EFArgs(
int argc, /* Number of command-line args */
char *argv[], /* Vector of command-line args */
bool *err_result, /* Set to TRUE if error occurs */
bool (*argsProc)(), /* Called for args we don't recognize */
ClientData cdata) /* Passed to (*argsProc)() */
{
static char libpath[FNSIZE];
char *realIn, line[1024], *inname = NULL, *name, *cp;
@ -362,8 +362,8 @@ usage:
*/
void
efLoadSearchPath(path)
char **path;
efLoadSearchPath(
char **path)
{
PaVisit *pv;
@ -377,9 +377,9 @@ efLoadSearchPath(path)
}
int
efLoadPathFunc(line, ppath)
char *line;
char **ppath;
efLoadPathFunc(
char *line,
char **ppath)
{
char *cp, *dp, c;
char path[BUFSIZ];

View File

@ -140,18 +140,18 @@ extern float locScale;
*/
void
efBuildNode(def, isSubsnode, isDevSubsnode, isExtNode, nodeName, nodeCap,
x, y, layerName, av, ac)
Def *def; /* Def to which this connection is to be added */
bool isSubsnode; /* TRUE if the node is the global substrate */
bool isDevSubsnode; /* TRUE if the node is a device body connection */
bool isExtNode; /* TRUE if this was a "node" or "substrate" in .ext */
char *nodeName; /* One of the names for this node */
double nodeCap; /* Capacitance of this node to ground */
int x; int y; /* Location of a point inside this node */
char *layerName; /* Name of tile type */
char **av; /* Pairs of area, perimeter strings */
int ac; /* Number of strings in av */
efBuildNode(
Def *def, /* Def to which this connection is to be added */
bool isSubsnode, /* TRUE if the node is the global substrate */
bool isDevSubsnode, /* TRUE if the node is a device body connection */
bool isExtNode, /* TRUE if this was a "node" or "substrate" in .ext */
char *nodeName, /* One of the names for this node */
double nodeCap, /* Capacitance of this node to ground */
int x,
int y, /* Location of a point inside this node */
char *layerName, /* Name of tile type */
char **av, /* Pairs of area, perimeter strings */
int ac) /* Number of strings in av */
{
EFNodeName *newname;
EFNode *newnode;
@ -333,10 +333,10 @@ efBuildNode(def, isSubsnode, isDevSubsnode, isExtNode, nodeName, nodeCap,
*/
void
efAdjustSubCap(def, nodeName, nodeCapAdjust)
Def *def; /* Def to which this connection is to be added */
char *nodeName; /* One of the names for this node */
double nodeCapAdjust; /* Substrate capacitance adjustment */
efAdjustSubCap(
Def *def, /* Def to which this connection is to be added */
char *nodeName, /* One of the names for this node */
double nodeCapAdjust) /* Substrate capacitance adjustment */
{
EFNodeName *nodename;
EFNode *node;
@ -375,12 +375,12 @@ efAdjustSubCap(def, nodeName, nodeCapAdjust)
*/
void
efBuildAttr(def, nodeName, r, layerName, text)
Def *def;
char *nodeName;
Rect *r;
char *layerName;
char *text;
efBuildAttr(
Def *def,
char *nodeName,
Rect *r,
char *layerName,
char *text)
{
HashEntry *he;
EFNodeName *nn;
@ -431,13 +431,12 @@ efBuildAttr(def, nodeName, r, layerName, text)
*/
void
efBuildDist(def, driver, receiver, min, max)
Def *def; /* Def for which we're adding a new Distance */
char *driver; /* Source terminal */
char *receiver; /* Destination terminal */
int min, max; /* Minimum and maximum acyclic distance from source
* to destination.
*/
efBuildDist(
Def *def, /* Def for which we're adding a new Distance */
char *driver, /* Source terminal */
char *receiver, /* Destination terminal */
int min,
int max)
{
Distance *dist, distKey;
HierName *hn1, *hn2;
@ -506,9 +505,9 @@ efBuildDist(def, driver, receiver, min, max)
*/
void
efBuildKill(def, name)
Def *def; /* Def for which we're adding a new Kill */
char *name; /* Name of node to die */
efBuildKill(
Def *def, /* Def for which we're adding a new Kill */
char *name) /* Name of node to die */
{
Kill *kill;
@ -538,14 +537,14 @@ efBuildKill(def, name)
*/
void
efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
Def *def; /* Def for which we're adding a new node name */
char *nodeName1; /* One of node names to be made equivalent */
char *nodeName2; /* Other name to be made equivalent. One of nodeName1
efBuildEquiv(
Def *def, /* Def for which we're adding a new node name */
char *nodeName1, /* One of node names to be made equivalent */
char *nodeName2, /* Other name to be made equivalent. One of nodeName1
* or nodeName2 must already be known.
*/
bool resist; /* True if "extresist on" option was selected */
bool isspice; /* Passed from EFReadFile(), is only TRUE when
bool resist, /* True if "extresist on" option was selected */
bool isspice) /* Passed from EFReadFile(), is only TRUE when
* running ext2spice. Indicates that nodes are
* case-insensitive.
*/
@ -750,8 +749,8 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
*/
DevParam *
efGetDeviceParams(name)
char *name;
efGetDeviceParams(
char *name)
{
HashEntry *he;
DevParam *plist = NULL;
@ -774,10 +773,10 @@ efGetDeviceParams(name)
*/
void
efBuildDeviceParams(name, argc, argv)
char *name;
int argc;
char *argv[];
efBuildDeviceParams(
char *name,
int argc,
char *argv[])
{
HashEntry *he;
DevParam *plist = NULL, *newparm;
@ -1328,13 +1327,14 @@ efBuildDevice(
*/
void
efBuildPortNode(def, name, idx, x, y, layername, toplevel)
Def *def; /* Def to which this connection is to be added */
char *name; /* One of the names for this node */
int idx; /* Port number (order) */
int x; int y; /* Location of a point inside this node */
char *layername; /* Name of tile type */
bool toplevel; /* 1 if the cell def is the top level cell */
efBuildPortNode(
Def *def, /* Def to which this connection is to be added */
char *name, /* One of the names for this node */
int idx, /* Port number (order) */
int x,
int y, /* Location of a point inside this node */
char *layername, /* Name of tile type */
bool toplevel) /* 1 if the cell def is the top level cell */
{
HashEntry *he;
EFNodeName *nn;
@ -1375,8 +1375,8 @@ efBuildPortNode(def, name, idx, x, y, layername, toplevel)
*/
int
EFGetPortMax(def)
Def *def;
EFGetPortMax(
Def *def)
{
EFNode *snode;
EFNodeName *nodeName;
@ -1480,11 +1480,11 @@ efBuildDevNode(
*/
int
efBuildAddStr(table, pMax, size, str)
char *table[]; /* Table to search */
int *pMax; /* Increment this if we add an entry */
int size; /* Maximum size of table */
char *str; /* String to add */
efBuildAddStr(
char *table[], /* Table to search */
int *pMax, /* Increment this if we add an entry */
int size, /* Maximum size of table */
char *str) /* String to add */
{
int n, max;
@ -1530,12 +1530,16 @@ efBuildAddStr(table, pMax, size, str)
*/
void
efBuildUse(def, subDefName, subUseId, ta, tb, tc, td, te, tf)
Def *def; /* Def to which this connection is to be added */
char *subDefName; /* Def of which this a use */
char *subUseId; /* Use identifier for the def 'subDefName' */
int ta, tb, tc,
td, te, tf; /* Elements of a transform from coordinates of
efBuildUse(
Def *def, /* Def to which this connection is to be added */
char *subDefName, /* Def of which this a use */
char *subUseId, /* Use identifier for the def 'subDefName' */
int ta,
int tb,
int tc,
int td,
int te,
int tf) /* Elements of a transform from coordinates of
* subDefName up to def.
*/
{
@ -1613,7 +1617,8 @@ efBuildUse(def, subDefName, subUseId, ta, tb, tc, td, te, tf)
*/
void
efConnectionFreeLinkedList(Connection *conn)
efConnectionFreeLinkedList(
Connection *conn)
{
while (conn)
{
@ -1641,7 +1646,8 @@ efConnectionFreeLinkedList(Connection *conn)
*/
void
efConnPointFreeLinkedList(ConnectionPoint *connpt)
efConnPointFreeLinkedList(
ConnectionPoint *connpt)
{
while (connpt)
{
@ -1677,12 +1683,15 @@ efConnPointFreeLinkedList(ConnectionPoint *connpt)
*/
void
efBuildConnect(def, llx, lly, urx, ury, layerName, upnodeName, downnodeName)
Def *def;
int llx, lly, urx, ury;
char *layerName;
char *upnodeName;
char *downnodeName;
efBuildConnect(
Def *def,
int llx,
int lly,
int urx,
int ury,
char *layerName,
char *upnodeName,
char *downnodeName)
{
int tnew;
ConnectionPoint *connpt;
@ -1759,13 +1768,13 @@ efBuildConnect(def, llx, lly, urx, ury, layerName, upnodeName, downnodeName)
*/
void
efBuildMerge(def, nodeName1, nodeName2, deltaC, av, ac)
Def *def; /* Def to which this connection is to be added */
char *nodeName1; /* Name of first node in connection */
char *nodeName2; /* Name of other node in connection */
double deltaC; /* Adjustment in capacitance */
char **av; /* Strings for area, perimeter adjustment */
int ac; /* Number of strings in av */
efBuildMerge(
Def *def, /* Def to which this connection is to be added */
char *nodeName1, /* Name of first node in connection */
char *nodeName2, /* Name of other node in connection */
double deltaC, /* Adjustment in capacitance */
char **av, /* Strings for area, perimeter adjustment */
int ac) /* Number of strings in av */
{
int n;
Connection *conn;
@ -1878,11 +1887,11 @@ efBuildMerge(def, nodeName1, nodeName2, deltaC, av, ac)
*/
void
efBuildResistor(def, nodeName1, nodeName2, resistance)
Def *def; /* Def to which this connection is to be added */
char *nodeName1; /* Name of first node in resistor */
char *nodeName2; /* Name of second node in resistor */
float resistance; /* Resistor value */
efBuildResistor(
Def *def, /* Def to which this connection is to be added */
char *nodeName1, /* Name of first node in resistor */
char *nodeName2, /* Name of second node in resistor */
float resistance) /* Resistor value */
{
Connection *conn;
@ -1915,11 +1924,11 @@ efBuildResistor(def, nodeName1, nodeName2, resistance)
*/
void
efBuildCap(def, nodeName1, nodeName2, cap)
Def *def; /* Def to which this connection is to be added */
char *nodeName1; /* Name of first node in capacitor */
char *nodeName2; /* Name of second node in capacitor */
double cap; /* Capacitor value */
efBuildCap(
Def *def, /* Def to which this connection is to be added */
char *nodeName1, /* Name of first node in capacitor */
char *nodeName2, /* Name of second node in capacitor */
double cap) /* Capacitor value */
{
Connection *conn;
@ -1951,9 +1960,10 @@ efBuildCap(def, nodeName1, nodeName2, cap)
*/
bool
efConnInitSubs(conn, nodeName1, nodeName2)
Connection *conn;
char *nodeName1, *nodeName2;
efConnInitSubs(
Connection *conn,
char *nodeName1,
char *nodeName2)
{
ConnName *c1, *c2;
int n;
@ -2009,9 +2019,9 @@ bad:
*/
bool
efConnBuildName(cnp, name)
ConnName *cnp;
char *name;
efConnBuildName(
ConnName *cnp,
char *name)
{
char *srcp, *dstp, *cp, *dp;
int nsubs;
@ -2116,11 +2126,11 @@ again:
*/
void
efNodeAddName(node, he, hn, isNew)
EFNode *node;
HashEntry *he;
HierName *hn;
bool isNew; // If TRUE, added name is never the preferred name.
efNodeAddName(
EFNode *node,
HashEntry *he,
HierName *hn,
bool isNew) // If TRUE, added name is never the preferred name.
{
EFNodeName *newnn;
EFNodeName *oldnn;
@ -2182,8 +2192,9 @@ efNodeAddName(node, he, hn, isNew)
*/
EFNode *
efNodeMerge(node1ptr, node2ptr)
EFNode **node1ptr, **node2ptr; /* Pointers to hierarchical nodes */
efNodeMerge(
EFNode **node1ptr,
EFNode **node2ptr)
{
EFNodeName *nn, *nnlast;
EFAttr *ap;
@ -2408,8 +2419,8 @@ efNodeMerge(node1ptr, node2ptr)
*/
void
efFreeUseTable(table)
HashTable *table;
efFreeUseTable(
HashTable *table)
{
HashSearch hs;
HashEntry *he;
@ -2438,8 +2449,8 @@ efFreeUseTable(table)
*/
void
efFreeDevTable(table)
HashTable *table;
efFreeDevTable(
HashTable *table)
{
Dev *dev;
HashSearch hs;
@ -2481,8 +2492,8 @@ efFreeDevTable(table)
*/
void
efFreeNodeTable(table)
HashTable *table;
efFreeNodeTable(
HashTable *table)
{
HashSearch hs;
HashEntry *he;
@ -2536,9 +2547,9 @@ efFreeNodeTable(table)
*/
void
efFreeNodeList(head, func)
EFNode *head;
int (*func)();
efFreeNodeList(
EFNode *head,
int (*func)())
{
EFNode *node;
EFAttr *ap;
@ -2590,8 +2601,8 @@ efFreeNodeList(head, func)
*/
void
efFreeConn(conn)
Connection *conn;
efFreeConn(
Connection *conn)
{
if (conn->conn_name1) freeMagic(conn->conn_name1);
if (conn->conn_name2) freeMagic(conn->conn_name2);

View File

@ -95,8 +95,8 @@ EFInit()
*/
void
EFDone(func)
int (*func)();
EFDone(
int (*func)())
{
Connection *conn;
HashSearch hs;
@ -204,8 +204,8 @@ EFDone(func)
*/
Def *
efDefLook(name)
char *name;
efDefLook(
char *name)
{
HashEntry *he;
@ -233,8 +233,8 @@ efDefLook(name)
*/
Def *
efDefNew(name)
char *name;
efDefNew(
char *name)
{
HashEntry *he;
Def *newdef;

View File

@ -101,9 +101,9 @@ int efAddOneConn(HierContext *hc, char *name1, char *name2, Connection *conn, in
*/
void
EFFlatBuild(name, flags)
char *name; /* Name of root def being flattened */
int flags; /* Say what to flatten; see above */
EFFlatBuild(
char *name, /* Name of root def being flattened */
int flags) /* Say what to flatten; see above */
{
efFlatRootDef = efDefLook(name);
if (efHNStats) efHNPrintSizes("before building flattened table");
@ -180,9 +180,9 @@ EFFlatBuild(name, flags)
/*----------------------------------------------------------------------*/
HierContext *
EFFlatBuildOneLevel(def, flags)
Def *def; /* root def being flattened */
int flags;
EFFlatBuildOneLevel(
Def *def, /* root def being flattened */
int flags)
{
int usecount, savecount;
Use *use;
@ -262,8 +262,8 @@ EFFlatBuildOneLevel(def, flags)
*/
void
EFFlatDone(func)
int (*func)();
EFFlatDone(
int (*func)())
{
#ifdef MALLOCTRACE
/* Hash table statistics */
@ -317,9 +317,9 @@ EFFlatDone(func)
*/
int
efFlatNodes(hc, clientData)
HierContext *hc;
ClientData clientData;
efFlatNodes(
HierContext *hc,
ClientData clientData)
{
int flags = (int)CD2INT(clientData);
int hierflags = 0;
@ -382,8 +382,8 @@ efFlatNodes(hc, clientData)
*/
int
efFlatNodesStdCell(hc)
HierContext *hc;
efFlatNodesStdCell(
HierContext *hc)
{
if (!(hc->hc_use->use_def->def_flags & DEF_SUBCIRCUIT))
{
@ -402,9 +402,9 @@ efFlatNodesStdCell(hc)
}
int
efFlatNodesDeviceless(hc, cdata)
HierContext *hc;
ClientData cdata;
efFlatNodesDeviceless(
HierContext *hc,
ClientData cdata)
{
int *usecount = (int *)cdata;
int newcount;
@ -874,8 +874,9 @@ efFlatGlobError(
}
bool
efFlatGlobCmp(hierName1, hierName2)
HierName *hierName1, *hierName2;
efFlatGlobCmp(
HierName *hierName1,
HierName *hierName2)
{
if (hierName1 == hierName2)
return FALSE;
@ -887,8 +888,8 @@ efFlatGlobCmp(hierName1, hierName2)
}
char *
efFlatGlobCopy(hierName)
HierName *hierName;
efFlatGlobCopy(
HierName *hierName)
{
HierName *hNew;
int size;
@ -905,8 +906,8 @@ efFlatGlobCopy(hierName)
}
int
efFlatGlobHash(hierName)
HierName *hierName;
efFlatGlobHash(
HierName *hierName)
{
return hierName->hn_hash;
}
@ -931,8 +932,8 @@ efFlatGlobHash(hierName)
*/
int
efFlatKills(hc)
HierContext *hc;
efFlatKills(
HierContext *hc)
{
Def *def = hc->hc_use->use_def;
HashEntry *he;
@ -976,8 +977,8 @@ efFlatKills(hc)
int
efFlatCapsDeviceless(hc)
HierContext *hc;
efFlatCapsDeviceless(
HierContext *hc)
{
Connection *conn;
int newcount;
@ -1040,8 +1041,8 @@ efFlatCapsDeviceless(hc)
*/
int
efFlatCaps(hc)
HierContext *hc;
efFlatCaps(
HierContext *hc)
{
Connection *conn;
@ -1156,8 +1157,8 @@ efFlatSingleCap(
*/
int
efFlatDists(hc)
HierContext *hc;
efFlatDists(
HierContext *hc)
{
Distance *dist, *distFlat, distKey;
HashEntry *he, *heFlat;
@ -1227,9 +1228,9 @@ HashEntry *he;
*
*/
void
CapHashSetValue(he, c)
HashEntry *he;
double c;
CapHashSetValue(
HashEntry *he,
double c)
{
EFCapValue *capp = (EFCapValue *)HashGetValue(he);
if(capp == NULL) {

View File

@ -69,10 +69,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
int
efHierSrUses(hc, func, cdata)
HierContext *hc;
int (*func)();
ClientData cdata;
efHierSrUses(
HierContext *hc,
int (*func)(),
ClientData cdata)
{
int xlo, xhi, ylo, yhi, xbase, ybase, xsep, ysep;
HierContext newhc;
@ -153,11 +153,11 @@ efHierSrUses(hc, func, cdata)
*/
int
efHierSrArray(hc, conn, proc, cdata)
HierContext *hc;
Connection *conn;
int (*proc)();
ClientData cdata;
efHierSrArray(
HierContext *hc,
Connection *conn,
int (*proc)(),
ClientData cdata)
{
char name1[1024], name2[1024];
int i, j, i1lo, i2lo, j1lo, j2lo;
@ -234,10 +234,10 @@ efHierSrArray(hc, conn, proc, cdata)
*/
int
EFHierSrDefs(hc, func, cdata)
HierContext *hc;
int (*func)();
ClientData cdata;
EFHierSrDefs(
HierContext *hc,
int (*func)(),
ClientData cdata)
{
HierContext newhc;
Use *u;
@ -321,10 +321,10 @@ EFHierSrDefs(hc, func, cdata)
*/
int
EFHierVisitSubcircuits(hc, subProc, cdata)
HierContext *hc;
int (*subProc)();
ClientData cdata; /* unused */
EFHierVisitSubcircuits(
HierContext *hc,
int (*subProc)(),
ClientData cdata) /* unused */
{
CallArg ca;
int efHierVisitSubcircuits(); /* Forward declaration */
@ -353,9 +353,9 @@ EFHierVisitSubcircuits(hc, subProc, cdata)
*/
int
efHierVisitSubcircuits(hc, ca)
HierContext *hc;
CallArg *ca;
efHierVisitSubcircuits(
HierContext *hc,
CallArg *ca)
{
/* Visit all children of this def */
Def *def = (Def *)ca->ca_cdata;
@ -385,10 +385,10 @@ efHierVisitSubcircuits(hc, ca)
*/
bool
efHierDevKilled(hc, dev, prefix)
HierContext *hc;
Dev *dev;
HierName *prefix;
efHierDevKilled(
HierContext *hc,
Dev *dev,
HierName *prefix)
{
HierName *suffix;
HashEntry *he;
@ -468,9 +468,9 @@ EFHierVisitDevs(
*/
int
efHierVisitDevs(hc, ca)
HierContext *hc;
CallArg *ca;
efHierVisitDevs(
HierContext *hc,
CallArg *ca)
{
Def *def = hc->hc_use->use_def;
Dev *dev;
@ -678,10 +678,10 @@ efHierVisitResists(
*/
int
EFHierVisitCaps(hc, capProc, cdata)
HierContext *hc;
int (*capProc)();
ClientData cdata;
EFHierVisitCaps(
HierContext *hc,
int (*capProc)(),
ClientData cdata)
{
HashSearch hs;
HashEntry *he;
@ -737,10 +737,10 @@ EFHierVisitCaps(hc, capProc, cdata)
*/
int
EFHierVisitNodes(hc, nodeProc, cdata)
HierContext *hc;
int (*nodeProc)();
ClientData cdata;
EFHierVisitNodes(
HierContext *hc,
int (*nodeProc)(),
ClientData cdata)
{
Def *def = hc->hc_use->use_def;
EFCapValue cap;

View File

@ -319,12 +319,12 @@ extern void CapHashSetValue();
that some ANSI C compilers introduce */
extern DevParam *efGetDeviceParams();
extern void efBuildNode();
extern void efBuildNode(Def *def, bool isSubsnode, bool isDevSubsnode, bool isExtNode, char *nodeName, double nodeCap, int x, int y, char *layerName, char **av, int ac);
extern void efConnectionFreeLinkedList(Connection *conn);
extern void efConnPointFreeLinkedList(ConnectionPoint *conn);
extern void efBuildConnect();
extern void efBuildMerge();
extern void efBuildResistor();
extern void efBuildResistor(Def *def, char *nodeName1, char *nodeName2, float resistance);
extern void efBuildCap();
extern HierContext *EFFlatBuildOneLevel();

View File

@ -98,8 +98,8 @@ extern void efHNRecord();
*/
bool
EFHNIsGlob(hierName)
HierName *hierName;
EFHNIsGlob(
HierName *hierName)
{
#ifdef MAGIC_WRAPPER
char *retstr;
@ -134,8 +134,8 @@ EFHNIsGlob(hierName)
*/
bool
EFHNIsGND(hierName)
HierName *hierName;
EFHNIsGND(
HierName *hierName)
{
#ifdef MAGIC_WRAPPER
char *retstr;
@ -171,9 +171,9 @@ EFHNIsGND(hierName)
*/
HierName *
EFHNConcat(prefix, suffix)
HierName *prefix; /* Components of name on root side */
HierName *suffix; /* Components of name on leaf side */
EFHNConcat(
HierName *prefix, /* Components of name on root side */
HierName *suffix) /* Components of name on leaf side */
{
HierName *new, *prev;
HierName *firstNew;
@ -220,9 +220,9 @@ EFHNConcat(prefix, suffix)
*/
HierName *
EFStrToHN(prefix, suffixStr)
HierName *prefix; /* Components of name on side of root */
char *suffixStr; /* Leaf part of name (may have /'s) */
EFStrToHN(
HierName *prefix, /* Components of name on side of root */
char *suffixStr) /* Leaf part of name (may have /'s) */
{
char *cp;
HashEntry *he;
@ -281,8 +281,8 @@ EFStrToHN(prefix, suffixStr)
*/
char *
EFHNToStr(hierName)
HierName *hierName; /* Name to be converted */
EFHNToStr(
HierName *hierName) /* Name to be converted */
{
static char namebuf[2048];
@ -308,9 +308,9 @@ EFHNToStr(hierName)
*/
char *
efHNToStrFunc(hierName, dstp)
HierName *hierName; /* Name to be converted */
char *dstp; /* Store name here */
efHNToStrFunc(
HierName *hierName, /* Name to be converted */
char *dstp) /* Store name here */
{
char *srcp;
@ -359,10 +359,10 @@ efHNToStrFunc(hierName, dstp)
*/
HashEntry *
EFHNLook(prefix, suffixStr, errorStr)
HierName *prefix; /* Components of name on root side */
char *suffixStr; /* Part of name on leaf side */
char *errorStr; /* Explanatory string for errors */
EFHNLook(
HierName *prefix, /* Components of name on root side */
char *suffixStr, /* Part of name on leaf side */
char *errorStr) /* Explanatory string for errors */
{
HierName *hierName, *hn;
bool dontFree = FALSE;
@ -413,10 +413,10 @@ EFHNLook(prefix, suffixStr, errorStr)
*/
HashEntry *
EFHNConcatLook(prefix, suffix, errorStr)
HierName *prefix; /* Components of name on root side */
HierName *suffix; /* Part of name on leaf side */
char *errorStr; /* Explanatory string for errors */
EFHNConcatLook(
HierName *prefix, /* Components of name on root side */
HierName *suffix, /* Part of name on leaf side */
char *errorStr) /* Explanatory string for errors */
{
HashEntry *he;
HierName *hn;
@ -463,9 +463,10 @@ EFHNConcatLook(prefix, suffix, errorStr)
*/
void
EFHNFree(hierName, prefix, type)
HierName *hierName, *prefix;
int type; /* HN_ALLOC, HN_CONCAT, etc */
EFHNFree(
HierName *hierName,
HierName *prefix,
int type) /* HN_ALLOC, HN_CONCAT, etc */
{
HierName *hn;
@ -507,8 +508,9 @@ EFHNFree(hierName, prefix, type)
*/
bool
EFHNBest(hierName1, hierName2)
HierName *hierName1, *hierName2;
EFHNBest(
HierName *hierName1,
HierName *hierName2)
{
int ncomponents1, ncomponents2, len1, len2;
HierName *np1, *np2;
@ -591,8 +593,9 @@ EFHNBest(hierName1, hierName2)
*/
int
efHNLexOrder(hierName1, hierName2)
HierName *hierName1, *hierName2;
efHNLexOrder(
HierName *hierName1,
HierName *hierName2)
{
int i;
@ -628,9 +631,9 @@ efHNLexOrder(hierName1, hierName2)
*/
HierName *
efHNFromUse(hc, prefix)
HierContext *hc; /* Contains use and array information */
HierName *prefix; /* Root part of name */
efHNFromUse(
HierContext *hc, /* Contains use and array information */
HierName *prefix) /* Root part of name */
{
char *srcp, *dstp;
char name[2048], *namePtr;
@ -725,8 +728,9 @@ efHNFromUse(hc, prefix)
*/
bool
efHNUseCompare(hierName1, hierName2)
HierName *hierName1, *hierName2;
efHNUseCompare(
HierName *hierName1,
HierName *hierName2)
{
return ((bool)(hierName1->hn_parent != hierName2->hn_parent
|| strcmp(hierName1->hn_name, hierName2->hn_name)
@ -734,8 +738,8 @@ efHNUseCompare(hierName1, hierName2)
}
int
efHNUseHash(hierName)
HierName *hierName;
efHNUseHash(
HierName *hierName)
{
return hierName->hn_hash + (spointertype) hierName->hn_parent;
}
@ -760,10 +764,10 @@ efHNUseHash(hierName)
*/
void
efHNInit(hierName, cp, endp)
HierName *hierName; /* Fill in fields of this HierName */
char *cp; /* Start of name to be stored in hn_name */
char *endp; /* End of name if non-NULL; else, see above */
efHNInit(
HierName *hierName, /* Fill in fields of this HierName */
char *cp, /* Start of name to be stored in hn_name */
char *endp) /* End of name if non-NULL; else, see above */
{
unsigned hashsum;
char *dstp;
@ -817,8 +821,9 @@ efHNInit(hierName, cp, endp)
*/
int
efHNCompare(hierName1, hierName2)
HierName *hierName1, *hierName2;
efHNCompare(
HierName *hierName1,
HierName *hierName2)
{
while (hierName1)
{
@ -837,8 +842,8 @@ efHNCompare(hierName1, hierName2)
}
int
efHNHash(hierName)
HierName *hierName;
efHNHash(
HierName *hierName)
{
int n;
@ -877,8 +882,9 @@ efHNHash(hierName)
*/
bool
efHNDistCompare(dist1, dist2)
Distance *dist1, *dist2;
efHNDistCompare(
Distance *dist1,
Distance *dist2)
{
return ((bool)(efHNCompare(dist1->dist_1, dist2->dist_1)
|| efHNCompare(dist1->dist_2, dist2->dist_2)
@ -886,8 +892,8 @@ efHNDistCompare(dist1, dist2)
}
char *
efHNDistCopy(dist)
Distance *dist;
efHNDistCopy(
Distance *dist)
{
Distance *distNew;
@ -897,16 +903,16 @@ efHNDistCopy(dist)
}
int
efHNDistHash(dist)
Distance *dist;
efHNDistHash(
Distance *dist)
{
return efHNHash(dist->dist_1) + efHNHash(dist->dist_2);
}
void
efHNDistKill(dist)
Distance *dist;
efHNDistKill(
Distance *dist)
{
HierName *hn;
@ -936,10 +942,10 @@ efHNDistKill(dist)
*/
void
efHNBuildDistKey(prefix, dist, distKey)
HierName *prefix;
Distance *dist;
Distance *distKey;
efHNBuildDistKey(
HierName *prefix,
Distance *dist,
Distance *distKey)
{
HierName *hn1, *hn2;
@ -1002,16 +1008,16 @@ efHNDump()
int efHNSizes[4];
void
efHNRecord(size, type)
int size;
int type;
efHNRecord(
int size,
int type)
{
efHNSizes[type] += size;
}
void
efHNPrintSizes(when)
char *when;
efHNPrintSizes(
char *when)
{
int total, i;

View File

@ -94,8 +94,8 @@ efSymInit()
*/
bool
efSymAddFile(name)
char *name;
efSymAddFile(
char *name)
{
char line[1024], *cp;
int lineNum;
@ -140,8 +140,8 @@ efSymAddFile(name)
*/
bool
efSymAdd(str)
char *str;
efSymAdd(
char *str)
{
HashEntry *he;
char *value;
@ -191,9 +191,9 @@ efSymAdd(str)
*/
bool
efSymLook(name, pValue)
char *name;
int *pValue;
efSymLook(
char *name,
int *pValue)
{
HashEntry *he;

View File

@ -90,9 +90,9 @@ bool efDevKilled();
*/
int
EFVisitSubcircuits(subProc, cdata)
int (*subProc)();
ClientData cdata;
EFVisitSubcircuits(
int (*subProc)(),
ClientData cdata)
{
CallArg ca;
HierContext *hc;
@ -129,9 +129,9 @@ EFVisitSubcircuits(subProc, cdata)
*/
int
efVisitSubcircuits(hc, ca)
HierContext *hc;
CallArg *ca;
efVisitSubcircuits(
HierContext *hc,
CallArg *ca)
{
/* Look for children of this def which are defined */
/* as subcircuits via the DEF_SUBCIRCUIT flag. */
@ -172,10 +172,10 @@ efVisitSubcircuits(hc, ca)
*/
void
EFGetLengthAndWidth(dev, lptr, wptr)
Dev *dev;
int *lptr;
int *wptr;
EFGetLengthAndWidth(
Dev *dev,
int *lptr,
int *wptr)
{
DevTerm *gate, *source, *drain;
int area, perim, l, w;
@ -300,9 +300,9 @@ EFVisitDevs(
*/
int
efVisitDevs(hc, ca)
HierContext *hc;
CallArg *ca;
efVisitDevs(
HierContext *hc,
CallArg *ca)
{
Def *def = hc->hc_use->use_def;
Dev *dev;
@ -355,9 +355,9 @@ efVisitDevs(hc, ca)
*/
bool
efDevKilled(dev, prefix)
Dev *dev;
HierName *prefix;
efDevKilled(
Dev *dev,
HierName *prefix)
{
HierName *suffix;
HashEntry *he;
@ -399,9 +399,10 @@ efDevKilled(dev, prefix)
*/
void
efDevFixLW(attrs, pL, pW)
char *attrs;
int *pL, *pW;
efDevFixLW(
char *attrs,
int *pL,
int *pW)
{
char *cp, *ep;
char attrName, savec;
@ -512,9 +513,9 @@ extern int efVisitSingleResist(HierContext *hc, const char *name1, const char *n
Connection *res, ClientData cdata); /* @typedef cb_extflat_hiersrarray_t (CallArg*) */
int
efVisitResists(hc, ca)
HierContext *hc;
CallArg *ca;
efVisitResists(
HierContext *hc,
CallArg *ca)
{
Def *def = hc->hc_use->use_def;
Connection *res;
@ -626,9 +627,9 @@ efVisitSingleResist(
*/
int
EFVisitCaps(capProc, cdata)
int (*capProc)();
ClientData cdata;
EFVisitCaps(
int (*capProc)(),
ClientData cdata)
{
HashSearch hs;
HashEntry *he;
@ -682,9 +683,9 @@ EFVisitCaps(capProc, cdata)
*/
int
EFVisitNodes(nodeProc, cdata)
int (*nodeProc)();
ClientData cdata;
EFVisitNodes(
int (*nodeProc)(),
ClientData cdata)
{
EFNode *node;
EFNodeName *nn;
@ -780,8 +781,8 @@ EFVisitNodes(nodeProc, cdata)
*/
int
EFNodeResist(node)
EFNode *node;
EFNodeResist(
EFNode *node)
{
int n, perim, area;
float s, fperim;
@ -829,9 +830,11 @@ EFNodeResist(node)
*/
bool
EFLookDist(hn1, hn2, pMinDist, pMaxDist)
HierName *hn1, *hn2;
int *pMinDist, *pMaxDist;
EFLookDist(
HierName *hn1,
HierName *hn2,
int *pMinDist,
int *pMaxDist)
{
Distance distKey, *dist;
HashEntry *he;
@ -875,9 +878,9 @@ EFLookDist(hn1, hn2, pMinDist, pMaxDist)
*/
void
EFHNOut(hierName, outf)
HierName *hierName;
FILE *outf;
EFHNOut(
HierName *hierName,
FILE *outf)
{
bool trimGlob, trimLocal, convComma, convBrackets;
char *cp, c;
@ -923,9 +926,9 @@ EFHNOut(hierName, outf)
}
void
efHNOutPrefix(hierName, outf)
HierName *hierName;
FILE *outf;
efHNOutPrefix(
HierName *hierName,
FILE *outf)
{
char *cp, c;

View File

@ -80,9 +80,9 @@ extern void efBuildAttr();
extern int efBuildDevice(Def *def, char class, char *type, const Rect *r, int argc, char *argv[]);
extern void efBuildDeviceParams();
extern void efBuildDist();
extern void efBuildEquiv();
extern void efBuildEquiv(Def *def, char *nodeName1, char *nodeName2, bool resist, bool isspice);
extern void efBuildKill();
extern void efBuildPortNode();
extern void efBuildPortNode(Def *def, char *name, int idx, int x, int y, char *layername, bool toplevel);
extern void efBuildUse();
extern int efFlatCaps();
extern int efFlatDists();

View File

@ -60,8 +60,8 @@ ExtTree *extArrayPrimary; /* Primary array element */
/* Forward declarations */
int extArrayFunc();
int extArrayPrimaryFunc(), extArrayInterFunc();
char *extArrayRange();
char *extArrayTileToNode();
char *extArrayRange(char *dstp, int lo, int hi, bool prevRange, bool followRange);
char *extArrayTileToNode(Tile *tp, TileType dinfo, int pNum, ExtTree *et, HierExtractArg *ha, bool doHard);
LabRegion *extArrayHardNode();
char *extArrayNodeName();
@ -85,9 +85,9 @@ void extArrayHardSearch();
*/
void
extOutputGeneratedLabels(parentUse, f)
CellUse *parentUse;
FILE *f;
extOutputGeneratedLabels(
CellUse *parentUse,
FILE *f)
{
CellDef *parentDef;
Label *lab;
@ -147,9 +147,9 @@ extOutputGeneratedLabels(parentUse, f)
*/
void
extArray(parentUse, f)
CellUse *parentUse;
FILE *f;
extArray(
CellUse *parentUse,
FILE *f)
{
SearchContext scx;
HierExtractArg ha;
@ -161,7 +161,7 @@ extArray(parentUse, f)
*/
ha.ha_outf = f;
ha.ha_parentUse = parentUse;
ha.ha_nodename = extArrayTileToNode;
ha.ha_nodename = (char *(*)()) extArrayTileToNode;
ha.ha_cumFlat.et_use = extYuseCum;
HashInit(&ha.ha_connHash, 32, 0);
@ -232,9 +232,9 @@ extArray(parentUse, f)
*/
int
extArrayFunc(scx, ha)
SearchContext *scx; /* Describes first element of array */
HierExtractArg *ha; /* Extraction context */
extArrayFunc(
SearchContext *scx, /* Describes first element of array */
HierExtractArg *ha) /* Extraction context */
{
int xsep, ysep; /* X, Y separation in parent coordinates */
int xsize, ysize; /* X, Y sizes in parent coordinates */
@ -358,9 +358,9 @@ extArrayFunc(scx, ha)
*/
void
extArrayProcess(ha, primary)
HierExtractArg *ha;
Rect *primary; /* Area guaranteed to contain only the primary
extArrayProcess(
HierExtractArg *ha,
Rect *primary) /* Area guaranteed to contain only the primary
* element of the array, against which we will
* extract all other elements that overlap the
* area 'ha->ha_interArea'.
@ -421,13 +421,14 @@ done:
*/
int
extArrayPrimaryFunc(use, trans, x, y, ha)
CellUse *use; /* Use of which this is an array element */
Transform *trans; /* Transform from coordinates of use->cu_def to those
extArrayPrimaryFunc(
CellUse *use, /* Use of which this is an array element */
Transform *trans, /* Transform from coordinates of use->cu_def to those
* in use->cu_parent, for the array element (x, y).
*/
int x, y; /* X, Y indices of this array element */
HierExtractArg *ha;
int x,
int y,
HierExtractArg *ha)
{
CellDef *primDef;
HierYank hy;
@ -493,13 +494,14 @@ extArrayPrimaryFunc(use, trans, x, y, ha)
*/
int
extArrayInterFunc(use, trans, x, y, ha)
CellUse *use; /* Use of which this is an array element */
Transform *trans; /* Transform from use->cu_def to use->cu_parent
extArrayInterFunc(
CellUse *use, /* Use of which this is an array element */
Transform *trans, /* Transform from use->cu_def to use->cu_parent
* coordinates, for the array element (x, y).
*/
int x, y; /* X, Y of this array element in use->cu_def coords */
HierExtractArg *ha;
int x,
int y,
HierExtractArg *ha)
{
CellUse *cumUse = ha->ha_cumFlat.et_use;
CellDef *cumDef = cumUse->cu_def;
@ -654,9 +656,10 @@ extArrayInterFunc(use, trans, x, y, ha)
}
void
extArrayAdjust(ha, et1, et2)
HierExtractArg *ha;
ExtTree *et1, *et2;
extArrayAdjust(
HierExtractArg *ha,
ExtTree *et1,
ExtTree *et2)
{
CapValue cap; /* value of capacitance WAS: int */
NodeRegion *np;
@ -707,10 +710,11 @@ extArrayAdjust(ha, et1, et2)
}
char *
extArrayNodeName(np, ha, et1, et2)
NodeRegion *np;
HierExtractArg *ha;
ExtTree *et1, *et2;
extArrayNodeName(
NodeRegion *np,
HierExtractArg *ha,
ExtTree *et1,
ExtTree *et2)
{
Tile *tp;
TileType dinfo;
@ -769,13 +773,13 @@ extArrayNodeName(np, ha, et1, et2)
*/
char *
extArrayTileToNode(tp, dinfo, pNum, et, ha, doHard)
Tile *tp;
TileType dinfo;
int pNum;
ExtTree *et;
HierExtractArg *ha;
bool doHard; /* If TRUE, we look up this node's name the hard way
extArrayTileToNode(
Tile *tp,
TileType dinfo,
int pNum,
ExtTree *et,
HierExtractArg *ha,
bool doHard) /* If TRUE, we look up this node's name the hard way
* if we can't find it any other way; otherwise, we
* return NULL if we can't find the node's name.
*/
@ -885,11 +889,12 @@ done:
*/
char *
extArrayRange(dstp, lo, hi, prevRange, followRange)
char *dstp;
int lo, hi;
bool prevRange; /* TRUE if preceded by a range */
bool followRange; /* TRUE if followed by a range */
extArrayRange(
char *dstp,
int lo,
int hi,
bool prevRange, /* TRUE if preceded by a range */
bool followRange) /* TRUE if followed by a range */
{
if (!prevRange) *dstp++ = '[';
if (hi < lo)
@ -936,12 +941,12 @@ extArrayRange(dstp, lo, hi, prevRange, followRange)
*/
LabRegion *
extArrayHardNode(tp, dinfo, pNum, def, ha)
Tile *tp;
TileType dinfo;
int pNum;
CellDef *def;
HierExtractArg *ha;
extArrayHardNode(
Tile *tp,
TileType dinfo,
int pNum,
CellDef *def,
HierExtractArg *ha)
{
TileType type;
char labelBuf[4096];
@ -1010,11 +1015,11 @@ extArrayHardNode(tp, dinfo, pNum, def, ha)
*/
void
extArrayHardSearch(def, arg, scx, proc)
CellDef *def;
HardWay *arg;
SearchContext *scx;
int (*proc)();
extArrayHardSearch(
CellDef *def,
HardWay *arg,
SearchContext *scx,
int (*proc)())
{
Transform tinv;

View File

@ -154,7 +154,7 @@ void extTermAPFunc();
int extAnnularTileFunc(Tile *, TileType, int, FindRegion *); /* UNUSED */
int extResistorTileFunc(Tile *, TileType, int, FindRegion *); /* UNUSED */
int extSpecialPerimFunc();
int extSpecialPerimFunc(Boundary *bp, bool sense);
void extFindDuplicateLabels();
void extOutputDevices();
@ -170,10 +170,10 @@ bool extLabType();
/* that is not in the topmost def of the search. */
int
extFoundFunc(tile, dinfo, cxp)
Tile *tile;
TileType dinfo; // Unused
TreeContext *cxp;
extFoundFunc(
Tile *tile,
TileType dinfo, // Unused
TreeContext *cxp)
{
CellDef *def = (CellDef *)cxp->tc_filter->tf_arg;
return (def == cxp->tc_scx->scx_use->cu_def) ? 0 : 1;
@ -213,11 +213,11 @@ extFoundFunc(tile, dinfo, cxp)
*/
NodeRegion *
extBasic(def, outFile)
CellDef *def; /* Cell being extracted */
FILE *outFile; /* Output file */
extBasic(
CellDef *def, /* Cell being extracted */
FILE *outFile) /* Output file */
{
NodeRegion *nodeList, *extFindNodes();
NodeRegion *nodeList, *extFindNodes(CellDef *def, Rect *clipArea, bool subonly);
bool coupleInitialized = FALSE;
TransRegion *transList, *reg;
HashTable extCoupleHash;
@ -620,8 +620,8 @@ extBasic(def, outFile)
*/
void
extSetResist(reg)
NodeRegion *reg;
extSetResist(
NodeRegion *reg)
{
int n, perim;
dlong area;
@ -678,9 +678,9 @@ extSetResist(reg)
*/
void
extOutputNodes(nodeList, outFile)
NodeRegion *nodeList; /* Nodes */
FILE *outFile; /* Output file */
extOutputNodes(
NodeRegion *nodeList, /* Nodes */
FILE *outFile) /* Output file */
{
ResValue rround = ExtCurStyle->exts_resistScale / 2;
CapValue finC;
@ -883,8 +883,8 @@ extOutputNodes(nodeList, outFile)
*/
char *
extSubsName(node)
LabRegion *node;
extSubsName(
LabRegion *node)
{
char *subsName;
@ -939,9 +939,9 @@ extSubsName(node)
*/
void
extMakeNodeNumPrint(buf, lreg)
char *buf;
LabRegion *lreg;
extMakeNodeNumPrint(
char *buf,
LabRegion *lreg)
{
int plane = lreg->lreg_pnum;
Point *p = &lreg->lreg_ll;
@ -990,8 +990,8 @@ extMakeNodeNumPrint(buf, lreg)
*/
char *
extNodeName(node)
LabRegion *node;
extNodeName(
LabRegion *node)
{
static char namebuf[256]; /* Big enough to hold a generated nodename */
LabelList *ll;
@ -1026,9 +1026,9 @@ extNodeName(node)
*/
void
extFindDuplicateLabels(def, nreg)
CellDef *def;
NodeRegion *nreg;
extFindDuplicateLabels(
CellDef *def,
NodeRegion *nreg)
{
static char *badmesg =
"Label \"%s\" attached to more than one unconnected node: %s";
@ -1112,9 +1112,9 @@ extFindDuplicateLabels(def, nreg)
*/
void
ExtSortTerminals(tran, ll)
struct transRec *tran;
LabelList *ll;
ExtSortTerminals(
struct transRec *tran,
LabelList *ll)
{
int nsd, changed;
TermTilePos *p1, *p2;
@ -1204,8 +1204,9 @@ ExtSortTerminals(tran, ll)
*/
bool
extComputeCapLW(rlengthptr, rwidthptr)
int *rlengthptr, *rwidthptr;
extComputeCapLW(
int *rlengthptr,
int *rwidthptr)
{
LinkedBoundary *lb;
Rect bbox;
@ -1256,10 +1257,11 @@ extComputeCapLW(rlengthptr, rwidthptr)
*/
void
extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop)
int *rlengthptr, *rwidthptr;
int numregions;
float chop;
extComputeEffectiveLW(
int *rlengthptr,
int *rwidthptr,
int numregions,
float chop)
{
int i, j, p, jmax;
LinkedBoundary *lb, *lb2;
@ -1578,8 +1580,8 @@ extComputeEffectiveLW(rlengthptr, rwidthptr, numregions, chop)
*/
void
extSeparateBounds(nterm)
int nterm; /* last terminal (# terminals - 1) */
extSeparateBounds(
int nterm) /* last terminal (# terminals - 1) */
{
Rect lbrect;
LinkedBoundary *lb, *lbstart, *lbend, *lblast, *lbnext;
@ -1694,10 +1696,10 @@ extSeparateBounds(nterm)
*/
void
extOutputParameters(def, transList, outFile)
CellDef *def; /* Cell being extracted */
TransRegion *transList; /* Transistor regions built up in first pass */
FILE *outFile; /* Output file */
extOutputParameters(
CellDef *def, /* Cell being extracted */
TransRegion *transList, /* Transistor regions built up in first pass */
FILE *outFile) /* Output file */
{
ParamList *plist;
TransRegion *reg;
@ -1842,14 +1844,14 @@ extOutputParameters(def, transList, outFile)
*/
void
extOutputDevParams(reg, devptr, outFile, length, width, areavec, perimvec)
TransRegion *reg;
ExtDevice *devptr;
FILE *outFile;
int length;
int width;
int *areavec;
int *perimvec;
extOutputDevParams(
TransRegion *reg,
ExtDevice *devptr,
FILE *outFile,
int length,
int width,
int *areavec,
int *perimvec)
{
ParamList *chkParam;
HashEntry *he;
@ -2057,10 +2059,10 @@ typedef struct _extareaperimdata {
*/
ExtDevice *
extDevFindParamMatch(devptr, length, width)
ExtDevice *devptr;
int length; /* Computed effective length of device */
int width; /* Computed effective width of device */
extDevFindParamMatch(
ExtDevice *devptr,
int length, /* Computed effective length of device */
int width) /* Computed effective width of device */
{
ExtDevice *newdevptr, *nextdev;
int i;
@ -2206,11 +2208,11 @@ extDevFindParamMatch(devptr, length, width)
*/
/*ARGSUSED*/
int
extSDTileFunc(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo; /* UNUSED */
int pNum;
FindRegion *arg; /* UNUSED */
extSDTileFunc(
Tile *tile,
TileType dinfo, /* UNUSED */
int pNum,
FindRegion *arg) /* UNUSED */
{
LinkedTile *newdevtile;
@ -2238,10 +2240,10 @@ extSDTileFunc(tile, dinfo, pNum, arg)
* ----------------------------------------------------------------------------
*/
int
extTransFindTermArea(tile, dinfo, eapd)
Tile *tile;
TileType dinfo;
ExtAreaPerimData *eapd;
extTransFindTermArea(
Tile *tile,
TileType dinfo,
ExtAreaPerimData *eapd)
{
extEnumTerminal(tile, dinfo, DBConnectTbl, extTermAPFunc, (ClientData)eapd);
return 1;
@ -2279,10 +2281,10 @@ extTransFindTermArea(tile, dinfo, eapd)
*/
void
extOutputDevices(def, transList, outFile)
CellDef *def; /* Cell being extracted */
TransRegion *transList; /* Transistor regions built up in first pass */
FILE *outFile; /* Output file */
extOutputDevices(
CellDef *def, /* Cell being extracted */
TransRegion *transList, /* Transistor regions built up in first pass */
FILE *outFile) /* Output file */
{
NodeRegion *node, *subsNode;
TransRegion *reg;
@ -3308,13 +3310,13 @@ typedef struct _node_type {
} NodeAndType;
int
extTransFindSubs(tile, dinfo, mask, def, sn, layerptr)
Tile *tile;
TileType dinfo;
TileTypeBitMask *mask;
CellDef *def;
NodeRegion **sn;
TileType *layerptr;
extTransFindSubs(
Tile *tile,
TileType dinfo,
TileTypeBitMask *mask,
CellDef *def,
NodeRegion **sn,
TileType *layerptr)
{
Rect tileArea, tileAreaPlus;
int pNum;
@ -3357,10 +3359,10 @@ extTransFindSubs(tile, dinfo, mask, def, sn, layerptr)
}
int
extTransFindSubsFunc1(tile, dinfo, noderecptr)
Tile *tile;
TileType dinfo;
NodeAndType *noderecptr;
extTransFindSubsFunc1(
Tile *tile,
TileType dinfo,
NodeAndType *noderecptr)
{
TileType type;
@ -3392,12 +3394,12 @@ extTransFindSubsFunc1(tile, dinfo, noderecptr)
}
int
extTransFindId(tile, dinfo, mask, def, idtypeptr)
Tile *tile;
TileType dinfo;
TileTypeBitMask *mask;
CellDef *def;
TileType *idtypeptr;
extTransFindId(
Tile *tile,
TileType dinfo,
TileTypeBitMask *mask,
CellDef *def,
TileType *idtypeptr)
{
TileType type;
Rect tileArea;
@ -3420,10 +3422,10 @@ extTransFindId(tile, dinfo, mask, def, idtypeptr)
}
int
extTransFindIdFunc1(tile, dinfo, idtypeptr)
Tile *tile;
TileType dinfo;
TileType *idtypeptr;
extTransFindIdFunc1(
Tile *tile,
TileType dinfo,
TileType *idtypeptr)
{
/*
* ID Layer found overlapping device area, so return 1 to halt search.
@ -3454,9 +3456,9 @@ extTransFindIdFunc1(tile, dinfo, idtypeptr)
*/
ExtDevice *
extDevFindMatch(deventry, t)
ExtDevice *deventry;
TileType t;
extDevFindMatch(
ExtDevice *deventry,
TileType t)
{
ExtDevice *devptr;
int i, j, k, matchflags;
@ -3539,11 +3541,11 @@ extDevFindMatch(deventry, t)
*/
int
extTransTileFunc(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo;
int pNum;
FindRegion *arg;
extTransTileFunc(
Tile *tile,
TileType dinfo,
int pNum,
FindRegion *arg)
{
TileTypeBitMask mask, cmask, *smask;
TileType loctype, idlayer, sublayer;
@ -3755,9 +3757,9 @@ extTransTileFunc(tile, dinfo, pNum, arg)
*/
void
extAddSharedDevice(eapd, node)
ExtAreaPerimData *eapd;
NodeRegion *node;
extAddSharedDevice(
ExtAreaPerimData *eapd,
NodeRegion *node)
{
ExtNodeList *nl, *newnl;
@ -3797,10 +3799,10 @@ extAddSharedDevice(eapd, node)
*/
void
extTermAPFunc(tile, dinfo, eapd)
Tile *tile; /* Tile extending a device terminal */
TileType dinfo; /* Split tile information */
ExtAreaPerimData *eapd; /* Area and perimeter totals for terminal */
extTermAPFunc(
Tile *tile, /* Tile extending a device terminal */
TileType dinfo, /* Split tile information */
ExtAreaPerimData *eapd) /* Area and perimeter totals for terminal */
{
TileType type, tpdi;
Tile *tp;
@ -3946,9 +3948,9 @@ extTermAPFunc(tile, dinfo, eapd)
/*ARGSUSED*/
int
extTransPerimFunc(bp, cdata)
Boundary *bp;
ClientData cdata; /* UNUSED */
extTransPerimFunc(
Boundary *bp,
ClientData cdata) /* UNUSED */
{
TileType tinside, toutside, dinfo;
Tile *tile;
@ -4226,11 +4228,11 @@ extTransPerimFunc(bp, cdata)
/*ARGSUSED*/
int
extAnnularTileFunc(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo;
int pNum;
FindRegion *arg; /* UNUSED */
extAnnularTileFunc(
Tile *tile,
TileType dinfo,
int pNum,
FindRegion *arg) /* UNUSED */
{
TileTypeBitMask mask;
TileType loctype;
@ -4248,7 +4250,7 @@ extAnnularTileFunc(tile, dinfo, pNum, arg)
mask = ExtCurStyle->exts_deviceConn[loctype];
TTMaskCom(&mask);
extEnumTilePerim(tile, dinfo, &mask, pNum, extSpecialPerimFunc, (ClientData) TRUE);
extEnumTilePerim(tile, dinfo, &mask, pNum, (int (*)())extSpecialPerimFunc, (ClientData) TRUE);
return (0);
}
@ -4278,11 +4280,11 @@ extAnnularTileFunc(tile, dinfo, pNum, arg)
/*ARGSUSED*/
int
extResistorTileFunc(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo;
int pNum;
FindRegion *arg; /* UNUSED */
extResistorTileFunc(
Tile *tile,
TileType dinfo,
int pNum,
FindRegion *arg) /* UNUSED */
{
TileTypeBitMask mask;
TileType loctype;
@ -4309,7 +4311,7 @@ extResistorTileFunc(tile, dinfo, pNum, arg)
TTMaskSetMask(&mask, &devptr->exts_deviceSDTypes[0]);
TTMaskCom(&mask);
extEnumTilePerim(tile, dinfo, &mask, pNum, extSpecialPerimFunc, (ClientData)FALSE);
extEnumTilePerim(tile, dinfo, &mask, pNum, (int (*)())extSpecialPerimFunc, (ClientData)FALSE);
if (extSpecialBounds[0] != NULL) break;
devptr = devptr->exts_next;
@ -4326,9 +4328,9 @@ extResistorTileFunc(tile, dinfo, pNum, arg)
/*----------------------------------------------------------------------*/
int
extSpecialPerimFunc(bp, sense)
Boundary *bp;
bool sense;
extSpecialPerimFunc(
Boundary *bp,
bool sense)
{
TileType tinside, toutside, termdinfo;
NodeRegion *termNode;
@ -4586,17 +4588,17 @@ extSpecialPerimFunc(bp, sense)
*/
void
extTransOutTerminal(lreg, ll, whichTerm, len, area, perim, shared, outFile)
LabRegion *lreg; /* Node connected to terminal */
LabelList *ll; /* Gate's label list */
int whichTerm; /* Which terminal we are processing. The gate
extTransOutTerminal(
LabRegion *lreg, /* Node connected to terminal */
LabelList *ll, /* Gate's label list */
int whichTerm, /* Which terminal we are processing. The gate
* is indicated by LL_GATEATTR.
*/
int len; /* Length of perimeter along terminal */
int area; /* Total area of terminal */
int perim; /* Total perimeter of terminal (includes len) */
int shared; /* Number of devices sharing the terminal */
FILE *outFile; /* Output file */
int len, /* Length of perimeter along terminal */
int area, /* Total area of terminal */
int perim, /* Total perimeter of terminal (includes len) */
int shared, /* Number of devices sharing the terminal */
FILE *outFile) /* Output file */
{
char *cp;
int n;
@ -4652,10 +4654,10 @@ extTransOutTerminal(lreg, ll, whichTerm, len, area, perim, shared, outFile)
*/
void
extTransBad(def, tp, mesg)
CellDef *def;
Tile *tp;
char *mesg;
extTransBad(
CellDef *def,
Tile *tp,
char *mesg)
{
Rect r;
@ -4686,9 +4688,9 @@ extTransBad(def, tp, mesg)
*/
bool
extLabType(text, typeMask)
char *text;
int typeMask;
extLabType(
char *text,
int typeMask)
{
if (*text == '\0')
return (FALSE);
@ -4905,11 +4907,11 @@ Tile *extNodeToTile(np, et, dinfo)
*/
void
extSetNodeNum(reg, plane, tile, dinfo)
LabRegion *reg;
int plane;
Tile *tile;
TileType dinfo;
extSetNodeNum(
LabRegion *reg,
int plane,
Tile *tile,
TileType dinfo)
{
TileType type;
@ -4973,10 +4975,10 @@ extSetNodeNum(reg, plane, tile, dinfo)
*/
ExtRegion *
extTransFirst(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
FindRegion *arg;
extTransFirst(
Tile *tile,
TileType dinfo,
FindRegion *arg)
{
TransRegion *reg;
@ -5006,11 +5008,11 @@ extTransFirst(tile, dinfo, arg)
/*ARGSUSED*/
int
extTransEach(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo; /* unused, should be handled */
int pNum;
FindRegion *arg;
extTransEach(
Tile *tile,
TileType dinfo, /* unused, should be handled */
int pNum,
FindRegion *arg)
{
TransRegion *reg = (TransRegion *) arg->fra_region;
int area = TILEAREA(tile);
@ -5054,12 +5056,12 @@ Stack *extNodeStack = NULL;
Rect *extNodeClipArea = NULL;
NodeRegion *
extFindNodes(def, clipArea, subonly)
CellDef *def; /* Def whose nodes are being found */
Rect *clipArea; /* If non-NULL, ignore perimeter and area that extend
extFindNodes(
CellDef *def, /* Def whose nodes are being found */
Rect *clipArea, /* If non-NULL, ignore perimeter and area that extend
* outside this rectangle.
*/
bool subonly; /* If true, only find the substrate node, and return */
bool subonly) /* If true, only find the substrate node, and return */
{
int extNodeAreaFunc();
int extSubsFunc();
@ -5208,10 +5210,10 @@ extFindNodes(def, clipArea, subonly)
}
int
extSubsFunc(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
FindRegion *arg;
extSubsFunc(
Tile *tile,
TileType dinfo,
FindRegion *arg)
{
int pNum;
Rect tileArea;
@ -5245,10 +5247,10 @@ extSubsFunc(tile, dinfo, arg)
}
int
extSubsFunc2(tile, dinfo, arg)
Tile *tile;
TileType dinfo; // Unused
FindRegion *arg;
extSubsFunc2(
Tile *tile,
TileType dinfo, // Unused
FindRegion *arg)
{
int pNum;
Rect tileArea;
@ -5285,20 +5287,20 @@ extSubsFunc2(tile, dinfo, arg)
}
int
extSubsFunc3(tile, dinfo, clientdata)
Tile *tile; /* (unused) */
TileType dinfo; /* (unused) */
ClientData clientdata; /* (unused) */
extSubsFunc3(
Tile *tile, /* (unused) */
TileType dinfo, /* (unused) */
ClientData clientdata) /* (unused) */
{
/* Stops the search because something that was not space was found */
return 1;
}
int
extNodeAreaFunc(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
FindRegion *arg;
extNodeAreaFunc(
Tile *tile,
TileType dinfo,
FindRegion *arg)
{
int tilePlaneNum, pNum, len, resistClass, n, nclasses;
dlong area;
@ -5761,9 +5763,9 @@ donesides:
*/
void
extSetCapValue(he, value)
HashEntry *he;
CapValue value;
extSetCapValue(
HashEntry *he,
CapValue value)
{
if (HashGetValue(he) == NULL)
HashSetValue(he, (CapValue *) mallocMagic(sizeof(CapValue)));
@ -5771,8 +5773,8 @@ extSetCapValue(he, value)
}
CapValue
extGetCapValue(he)
HashEntry *he;
extGetCapValue(
HashEntry *he)
{
if (HashGetValue(he) == NULL)
extSetCapValue(he, (CapValue) 0);
@ -5795,8 +5797,8 @@ extGetCapValue(he)
*/
void
extCapHashKill(ht)
HashTable *ht;
extCapHashKill(
HashTable *ht)
{
HashSearch hs;
HashEntry *he;

View File

@ -51,7 +51,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
/* Forward declarations */
int extOutputUsesFunc();
Plane* extCellFile();
Plane* extCellFile(CellDef *def, FILE *f, bool isTop);
void extHeader();
/*
@ -76,10 +76,10 @@ void extHeader();
*/
Plane *
ExtCell(def, outName, isTop)
CellDef *def; /* Cell being extracted */
char *outName; /* Name of output file; if NULL, derive from def name */
bool isTop; /* If TRUE, cell is the top level cell */
ExtCell(
CellDef *def, /* Cell being extracted */
char *outName, /* Name of output file; if NULL, derive from def name */
bool isTop) /* If TRUE, cell is the top level cell */
{
char *filename;
FILE *f = NULL;
@ -150,16 +150,16 @@ ExtCell(def, outName, isTop)
*/
FILE *
ExtFileOpen(def, file, mode, prealfile)
CellDef *def; /* Cell whose .ext file is to be written */
char *file; /* If non-NULL, open 'name'.ext; otherwise,
ExtFileOpen(
CellDef *def, /* Cell whose .ext file is to be written */
char *file, /* If non-NULL, open 'name'.ext; otherwise,
* derive filename from 'def' as described
* above.
*/
char *mode; /* Either "r" or "w", the mode in which the .ext
char *mode, /* Either "r" or "w", the mode in which the .ext
* file is to be opened.
*/
char **prealfile; /* If this is non-NULL, it gets set to point to
char **prealfile) /* If this is non-NULL, it gets set to point to
* a string holding the name of the .ext file.
*/
{
@ -287,8 +287,8 @@ ExtFileOpen(def, file, mode, prealfile)
*/
Plane *
extPrepSubstrate(def)
CellDef *def;
extPrepSubstrate(
CellDef *def)
{
SearchContext scx;
CellUse dummy;
@ -363,8 +363,8 @@ extPrepSubstrate(def)
*/
Plane *
extResPrepSubstrate(def)
CellDef *def;
extResPrepSubstrate(
CellDef *def)
{
SearchContext scx;
CellUse dummy;
@ -436,9 +436,9 @@ extResPrepSubstrate(def)
void
ExtRevertSubstrate(def, savePlane)
CellDef *def;
Plane *savePlane;
ExtRevertSubstrate(
CellDef *def,
Plane *savePlane)
{
int pNum;
Plane *subPlane;
@ -472,10 +472,10 @@ ExtRevertSubstrate(def, savePlane)
*/
Plane *
extCellFile(def, f, isTop)
CellDef *def; /* Def to be extracted */
FILE *f; /* Output to this file */
bool isTop; /* TRUE if the cell is the top level cell */
extCellFile(
CellDef *def, /* Def to be extracted */
FILE *f, /* Output to this file */
bool isTop) /* TRUE if the cell is the top level cell */
{
NodeRegion *reg;
Plane *saveSub;
@ -559,9 +559,9 @@ extCellFile(def, f, isTop)
*/
void
extHeader(def, f)
CellDef *def; /* Cell being extracted */
FILE *f; /* Write to this file */
extHeader(
CellDef *def, /* Cell being extracted */
FILE *f) /* Write to this file */
{
int n;
bool propfound;
@ -650,9 +650,9 @@ extHeader(def, f)
*/
int
extOutputUsesFunc(cu, outf)
CellUse *cu;
FILE *outf;
extOutputUsesFunc(
CellUse *cu,
FILE *outf)
{
Transform *t = &cu->cu_transform;

View File

@ -166,10 +166,10 @@ void extAdjustCouple(he, c, str)
*/
void
extFindCoupling(def, table, clipArea)
CellDef *def;
HashTable *table;
Rect *clipArea;
extFindCoupling(
CellDef *def,
HashTable *table,
Rect *clipArea)
{
const Rect *searchArea;
int pNum;
@ -208,9 +208,9 @@ extFindCoupling(def, table, clipArea)
*/
void
extRelocateSubstrateCoupling(table, subsnode)
HashTable *table; /* Coupling capacitance hash table */
NodeRegion *subsnode; /* Node record for substrate */
extRelocateSubstrateCoupling(
HashTable *table, /* Coupling capacitance hash table */
NodeRegion *subsnode) /* Node record for substrate */
{
HashEntry *he;
CoupleKey *ck;
@ -265,9 +265,9 @@ extRelocateSubstrateCoupling(table, subsnode)
*/
void
extOutputCoupling(table, outFile)
HashTable *table; /* Coupling capacitance hash table */
FILE *outFile; /* Output file */
extOutputCoupling(
HashTable *table, /* Coupling capacitance hash table */
FILE *outFile) /* Output file */
{
HashEntry *he;
CoupleKey *ck;
@ -312,10 +312,10 @@ extOutputCoupling(table, outFile)
*/
int
extBasicOverlap(tile, dinfo, ecs)
Tile *tile;
TileType dinfo;
extCapStruct *ecs;
extBasicOverlap(
Tile *tile,
TileType dinfo,
extCapStruct *ecs)
{
int thisType;
int pNum;
@ -413,10 +413,10 @@ struct sideoverlap
};
int
extAddOverlap(tbelow, dinfo, ecpls)
Tile *tbelow;
TileType dinfo; /* unused, but needs to be handled */
extCoupleStruct *ecpls;
extAddOverlap(
Tile *tbelow,
TileType dinfo, /* unused, but needs to be handled */
extCoupleStruct *ecpls)
{
int extSubtractOverlap(), extSubtractOverlap2();
NodeRegion *rabove, *rbelow;
@ -551,10 +551,10 @@ extAddOverlap(tbelow, dinfo, ecpls)
/* Simple overlap. The area of overlap is subtracted from ov->o_area */
int
extSubtractOverlap(tile, dinfo, ov)
Tile *tile;
TileType dinfo; /* (unused) */
struct overlap *ov;
extSubtractOverlap(
Tile *tile,
TileType dinfo, /* (unused) */
struct overlap *ov)
{
Rect r;
int area;
@ -575,10 +575,10 @@ extSubtractOverlap(tile, dinfo, ov)
/* shielding plane. */
int
extSubtractOverlap2(tile, dinfo, ov)
Tile *tile;
TileType dinfo; /* (unused) */
struct overlap *ov;
extSubtractOverlap2(
Tile *tile,
TileType dinfo, /* (unused) */
struct overlap *ov)
{
TileType ttype;
struct overlap ovnew;
@ -637,10 +637,10 @@ extSubtractOverlap2(tile, dinfo, ov)
*/
int
extSubtractSideOverlap(tile, dinfo, sov)
Tile *tile;
TileType dinfo; /* (unused) */
struct sideoverlap *sov;
extSubtractSideOverlap(
Tile *tile,
TileType dinfo, /* (unused) */
struct sideoverlap *sov)
{
Rect r;
int area, dnear, dfar, length;
@ -715,10 +715,10 @@ extSubtractSideOverlap(tile, dinfo, sov)
/* shielding plane. */
int
extSubtractSideOverlap2(tile, dinfo, sov)
Tile *tile;
TileType dinfo;
struct sideoverlap *sov;
extSubtractSideOverlap2(
Tile *tile,
TileType dinfo,
struct sideoverlap *sov)
{
TileType ttype;
struct sideoverlap sovnew;
@ -795,10 +795,10 @@ extSubtractSideOverlap2(tile, dinfo, sov)
*/
int
extBasicCouple(tile, dinfo, ecs)
Tile *tile;
TileType dinfo;
extCapStruct *ecs;
extBasicCouple(
Tile *tile,
TileType dinfo,
extCapStruct *ecs)
{
TileType ttype;
@ -1070,9 +1070,9 @@ extGetBoundaryRegions(int bdir,
*/
int
extAddCouple(bp, ecs)
Boundary *bp; /* Boundary being considered */
extCapStruct *ecs;
extAddCouple(
Boundary *bp, /* Boundary being considered */
extCapStruct *ecs)
{
TileType tin, tout;
int pNum;
@ -1203,10 +1203,10 @@ extAddCouple(bp, ecs)
*/
void
extRemoveSubcap(bp, clip, esws)
Boundary *bp; /* Boundary with fringe capacitance */
Rect *clip; /* Area not being blocked */
extSidewallStruct *esws; /* Overlapping edge and plane information */
extRemoveSubcap(
Boundary *bp, /* Boundary with fringe capacitance */
Rect *clip, /* Area not being blocked */
extSidewallStruct *esws) /* Overlapping edge and plane information */
{
int dnear, length;
double snear, cfrac;
@ -1277,10 +1277,10 @@ extRemoveSubcap(bp, clip, esws)
int
extFindOverlap(tp, area, esws)
Tile *tp; /* Overlapped tile */
Rect *area; /* Area to check for coupling */
extSidewallStruct *esws; /* Overlapping edge and plane information */
extFindOverlap(
Tile *tp, /* Overlapped tile */
Rect *area, /* Area to check for coupling */
extSidewallStruct *esws) /* Overlapping edge and plane information */
{
PlaneMask pMask;
int pNum;
@ -1345,10 +1345,10 @@ extFindOverlap(tp, area, esws)
*/
int
extSideOverlapHalo(tp, dinfo, esws)
Tile *tp; /* Overlapped tile */
TileType dinfo; /* Split tile information */
extSidewallStruct *esws; /* Overlapping edge and plane information */
extSideOverlapHalo(
Tile *tp, /* Overlapped tile */
TileType dinfo, /* Split tile information */
extSidewallStruct *esws) /* Overlapping edge and plane information */
{
Boundary *bp = esws->bp; /* Overlapping edge */
NodeRegion *rtp = (NodeRegion *) ExtGetRegion(tp, dinfo);
@ -1576,10 +1576,10 @@ extSideOverlapHalo(tp, dinfo, esws)
*/
int
extSideOverlap(tp, dinfo, esws)
Tile *tp; /* Overlapped tile */
TileType dinfo; /* Split tile information */
extSidewallStruct *esws; /* Overlapping edge and plane information */
extSideOverlap(
Tile *tp, /* Overlapped tile */
TileType dinfo, /* Split tile information */
extSidewallStruct *esws) /* Overlapping edge and plane information */
{
Boundary *bp = esws->bp; /* Overlapping edge */
NodeRegion *rtp = (NodeRegion *) ExtGetRegion(tp, dinfo);
@ -1757,12 +1757,12 @@ extSideOverlap(tp, dinfo, esws)
*/
int
extWalkTop(area, mask, func, bp, esws)
Rect *area;
TileTypeBitMask *mask;
int (*func)();
Boundary *bp;
extSidewallStruct *esws;
extWalkTop(
Rect *area,
TileTypeBitMask *mask,
int (*func)(),
Boundary *bp,
extSidewallStruct *esws)
{
Tile *tile, *tp;
TileType ttype;
@ -1865,12 +1865,12 @@ extWalkTop(area, mask, func, bp, esws)
*/
int
extWalkBottom(area, mask, func, bp, esws)
Rect *area;
TileTypeBitMask *mask;
int (*func)();
Boundary *bp;
extSidewallStruct *esws;
extWalkBottom(
Rect *area,
TileTypeBitMask *mask,
int (*func)(),
Boundary *bp,
extSidewallStruct *esws)
{
Tile *tile, *tp;
TileType ttype;
@ -1973,12 +1973,12 @@ extWalkBottom(area, mask, func, bp, esws)
*/
int
extWalkRight(area, mask, func, bp, esws)
Rect *area;
TileTypeBitMask *mask;
int (*func)();
Boundary *bp;
extSidewallStruct *esws;
extWalkRight(
Rect *area,
TileTypeBitMask *mask,
int (*func)(),
Boundary *bp,
extSidewallStruct *esws)
{
Tile *tile, *tp;
TileType ttype;
@ -2081,12 +2081,12 @@ extWalkRight(area, mask, func, bp, esws)
*/
int
extWalkLeft(area, mask, func, bp, esws)
Rect *area;
TileTypeBitMask *mask;
int (*func)();
Boundary *bp;
extSidewallStruct *esws;
extWalkLeft(
Rect *area,
TileTypeBitMask *mask,
int (*func)(),
Boundary *bp,
extSidewallStruct *esws)
{
Tile *tile, *tp;
TileType ttype;
@ -2194,10 +2194,10 @@ extWalkLeft(area, mask, func, bp, esws)
*/
int
extSideLeft(tpfar, bp, esws)
Tile *tpfar;
Boundary *bp;
extSidewallStruct *esws;
extSideLeft(
Tile *tpfar,
Boundary *bp,
extSidewallStruct *esws)
{
NodeRegion *rinside, *rfar;
Tile *tpnear;
@ -2246,10 +2246,10 @@ extSideLeft(tpfar, bp, esws)
*/
int
extSideRight(tpfar, bp, esws)
Tile *tpfar;
Boundary *bp;
extSidewallStruct *esws;
extSideRight(
Tile *tpfar,
Boundary *bp,
extSidewallStruct *esws)
{
NodeRegion *rinside, *rfar;
Tile *tpnear;
@ -2298,10 +2298,10 @@ extSideRight(tpfar, bp, esws)
*/
int
extSideTop(tpfar, bp, esws)
Tile *tpfar;
Boundary *bp;
extSidewallStruct *esws;
extSideTop(
Tile *tpfar,
Boundary *bp,
extSidewallStruct *esws)
{
NodeRegion *rinside, *rfar;
Tile *tpnear;
@ -2350,10 +2350,10 @@ extSideTop(tpfar, bp, esws)
*/
int
extSideBottom(tpfar, bp, esws)
Tile *tpfar;
Boundary *bp;
extSidewallStruct *esws;
extSideBottom(
Tile *tpfar,
Boundary *bp,
extSidewallStruct *esws)
{
NodeRegion *rinside, *rfar;
Tile *tpnear;
@ -2403,14 +2403,15 @@ extSideBottom(tpfar, bp, esws)
*/
void
extSideCommon(rinside, rfar, tpnear, tpfar, bdir, overlap, sep, extCoupleList)
NodeRegion *rinside, *rfar; /* Both must be valid */
Tile *tpnear, *tpfar; /* Tiles on near and far side of edge */
int bdir; /* Boundary direction */
int overlap, sep; /* Overlap of this edge with original one,
* and distance between the two.
*/
EdgeCap *extCoupleList; /* List of sidewall capacitance rules */
extSideCommon(
NodeRegion *rinside,
NodeRegion *rfar,
Tile *tpnear,
Tile *tpfar,
int bdir, /* Boundary direction */
int overlap,
int sep,
EdgeCap *extCoupleList) /* List of sidewall capacitance rules */
{
TileType near, far;
HashEntry *he;

View File

@ -71,10 +71,10 @@ bool extHardSetLabel();
*/
ExtRegion *
extLabFirst(tile, dinfo, arg)
Tile *tile;
TileType dinfo; /* (unused) */
FindRegion *arg;
extLabFirst(
Tile *tile,
TileType dinfo, /* (unused) */
FindRegion *arg)
{
TransRegion *reg;
reg = (TransRegion *) mallocMagic((unsigned) (sizeof (TransRegion)));
@ -97,11 +97,11 @@ extLabFirst(tile, dinfo, arg)
/*ARGSUSED*/
int
extLabEach(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo; /* (unused) */
int pNum;
FindRegion *arg;
extLabEach(
Tile *tile,
TileType dinfo, /* (unused) */
int pNum,
FindRegion *arg)
{
TransRegion *reg = (TransRegion *) arg->fra_region;
@ -157,9 +157,9 @@ extLabEach(tile, dinfo, pNum, arg)
*/
int
extHardProc(scx, arg)
SearchContext *scx; /* Context of the search to this cell */
HardWay *arg; /* See above; this structure provides both
extHardProc(
SearchContext *scx, /* Context of the search to this cell */
HardWay *arg) /* See above; this structure provides both
* options to govern how we generate labels
* and a place to store the label we return.
*/
@ -294,13 +294,13 @@ done:
*/
bool
extHardSetLabel(scx, reg, arg)
SearchContext *scx; /* We use scx->scx_trans to transform label
extHardSetLabel(
SearchContext *scx, /* We use scx->scx_trans to transform label
* coordinates in the def scx->scx_use->cu_def
* up to root coordinates.
*/
TransRegion *reg; /* ExtRegion with a label list */
HardWay *arg; /* We will set arg->hw_label if a node
TransRegion *reg, /* ExtRegion with a label list */
HardWay *arg) /* We will set arg->hw_label if a node
* label is found on the label list of 'reg'.
*/
{
@ -408,15 +408,15 @@ extHardSetLabel(scx, reg, arg)
*/
bool
extHardGenerateLabel(scx, reg, arg)
SearchContext *scx; /* We use scx->scx_trans to transform the
extHardGenerateLabel(
SearchContext *scx, /* We use scx->scx_trans to transform the
* generated label's coordinates up to
* root coordinates.
*/
TransRegion *reg; /* ExtRegion whose treg_ll and treg_pnum we use
TransRegion *reg, /* ExtRegion whose treg_ll and treg_pnum we use
* to generate a new label name.
*/
HardWay *arg; /* We set arg->hw_label to the new label */
HardWay *arg) /* We set arg->hw_label to the new label */
{
TerminalPath *tpath = &arg->hw_tpath;
char *srcp, *dstp;
@ -480,9 +480,9 @@ extHardGenerateLabel(scx, reg, arg)
*/
void
extHardFreeAll(def, tReg)
CellDef *def;
TransRegion *tReg;
extHardFreeAll(
CellDef *def,
TransRegion *tReg)
{
TransRegion *reg;
LabelList *ll;

View File

@ -124,10 +124,10 @@ bool extTestNMInteract(Tile *t1, TileType di1, Tile *t2, TileType di2)
*/
int
extHierSubShieldFunc(tile, dinfo, clientdata)
Tile *tile; /* (unused) */
TileType dinfo; /* (unused) */
ClientData clientdata; /* (unused) */
extHierSubShieldFunc(
Tile *tile, /* (unused) */
TileType dinfo, /* (unused) */
ClientData clientdata) /* (unused) */
{
return 1;
}
@ -149,10 +149,11 @@ extHierSubShieldFunc(tile, dinfo, clientdata)
*/
void
extHierSubstrate(ha, use, x, y)
HierExtractArg *ha; // Contains parent def and hash table
CellUse *use; // Child use
int x, y; // Array subscripts, or -1 if not an array
extHierSubstrate(
HierExtractArg *ha, // Contains parent def and hash table
CellUse *use, // Child use
int x,
int y)
{
NodeRegion *nodeList;
HashTable *table = &ha->ha_connHash;
@ -164,7 +165,7 @@ extHierSubstrate(ha, use, x, y)
Rect subArea;
int pNum;
NodeRegion *extFindNodes();
NodeRegion *extFindNodes(CellDef *def, Rect *clipArea, bool subonly);
/* Backwards compatibility with tech files that don't */
/* define a substrate plane or substrate connections. */
@ -336,9 +337,10 @@ extHierSubstrate(ha, use, x, y)
*/
void
extHierConnections(ha, cumFlat, oneFlat)
HierExtractArg *ha;
ExtTree *cumFlat, *oneFlat;
extHierConnections(
HierExtractArg *ha,
ExtTree *cumFlat,
ExtTree *oneFlat)
{
int pNum;
CellDef *sourceDef = oneFlat->et_use->cu_def;
@ -399,10 +401,10 @@ extHierConnections(ha, cumFlat, oneFlat)
*/
int
extHierConnectFunc1(oneTile, dinfo, ha)
Tile *oneTile; /* Comes from 'oneFlat' in extHierConnections */
TileType dinfo; /* Split tile information (unused) */
HierExtractArg *ha; /* Extraction context */
extHierConnectFunc1(
Tile *oneTile, /* Comes from 'oneFlat' in extHierConnections */
TileType dinfo, /* Split tile information (unused) */
HierExtractArg *ha) /* Extraction context */
{
CellDef *cumDef = extHierCumFlat->et_use->cu_def;
Rect r;
@ -613,10 +615,10 @@ extHierFindTopNode(Tile *tile,
*/
int
extHierConnectFunc2(cum, dinfo, ha)
Tile *cum; /* Comes from extHierCumFlat->et_use->cu_def */
TileType dinfo; /* Split tile information */
HierExtractArg *ha; /* Extraction context */
extHierConnectFunc2(
Tile *cum, /* Comes from extHierCumFlat->et_use->cu_def */
TileType dinfo, /* Split tile information */
HierExtractArg *ha) /* Extraction context */
{
HashTable *table = &ha->ha_connHash;
Node *node1, *node2;
@ -799,10 +801,10 @@ extHierConnectFunc2(cum, dinfo, ha)
*/
int
extHierConnectFunc3(cum, dinfo, ha)
Tile *cum; /* Comes from extHierCumFlat->et_use->cu_def */
TileType dinfo; /* Split tile information */
HierExtractArg *ha; /* Extraction context */
extHierConnectFunc3(
Tile *cum, /* Comes from extHierCumFlat->et_use->cu_def */
TileType dinfo, /* Split tile information */
HierExtractArg *ha) /* Extraction context */
{
HashTable *table = &ha->ha_connHash;
Node *node1, *node2;
@ -953,9 +955,11 @@ extHierConnectFunc3(cum, dinfo, ha)
*/
void
extHierAdjustments(ha, cumFlat, oneFlat, lookFlat)
HierExtractArg *ha;
ExtTree *cumFlat, *oneFlat, *lookFlat;
extHierAdjustments(
HierExtractArg *ha,
ExtTree *cumFlat,
ExtTree *oneFlat,
ExtTree *lookFlat)
{
HashEntry *he, *heCum;
int n;
@ -1050,9 +1054,9 @@ extHierAdjustments(ha, cumFlat, oneFlat, lookFlat)
*/
void
extOutputConns(table, outf)
HashTable *table;
FILE *outf;
extOutputConns(
HashTable *table,
FILE *outf)
{
CapValue c; /* cap value */
NodeName *nn, *nnext;
@ -1149,8 +1153,8 @@ extOutputConns(table, outf)
*/
Node *
extHierNewNode(he)
HashEntry *he;
extHierNewNode(
HashEntry *he)
{
int n, nclasses;
NodeName *nn;
@ -1199,10 +1203,10 @@ extHierNewNode(he)
/*ARGSUSED*/
ExtRegion *
extHierLabFirst(tile, dinfo, arg)
Tile *tile;
TileType dinfo; /* (unused) */
FindRegion *arg;
extHierLabFirst(
Tile *tile,
TileType dinfo, /* (unused) */
FindRegion *arg)
{
LabRegion *new;
@ -1220,11 +1224,11 @@ extHierLabFirst(tile, dinfo, arg)
/*ARGSUSED*/
int
extHierLabEach(tile, dinfo, pNum, arg)
Tile *tile;
TileType dinfo;
int pNum;
FindRegion *arg;
extHierLabEach(
Tile *tile,
TileType dinfo,
int pNum,
FindRegion *arg)
{
LabRegion *reg;
@ -1307,8 +1311,8 @@ extHierNewOne()
*/
void
extHierFreeOne(et)
ExtTree *et;
extHierFreeOne(
ExtTree *et)
{
if (ExtOptions & EXT_DOCOUPLING)
extCapHashKill(&et->et_coupleHash);

View File

@ -87,13 +87,13 @@ int extInterSubtreePaint();
*/
void
ExtFindInteractions(def, halo, bloatby, resultPlane)
CellDef *def; /* Find interactions among children of def */
int halo; /* Interaction is elements closer than halo */
int bloatby; /* Bloat each interaction area by this amount when
ExtFindInteractions(
CellDef *def, /* Find interactions among children of def */
int halo, /* Interaction is elements closer than halo */
int bloatby, /* Bloat each interaction area by this amount when
* painting into resultPlane.
*/
Plane *resultPlane; /* Paint interaction areas into this plane */
Plane *resultPlane) /* Paint interaction areas into this plane */
{
SearchContext scx;
@ -129,9 +129,9 @@ ExtFindInteractions(def, halo, bloatby, resultPlane)
}
int
extInterSubtreePaint(scx, def)
SearchContext *scx;
CellDef *def;
extInterSubtreePaint(
SearchContext *scx,
CellDef *def)
{
Rect r;
int pNum;
@ -165,8 +165,8 @@ extInterSubtreePaint(scx, def)
*/
int
extInterSubtree(scx)
SearchContext *scx;
extInterSubtree(
SearchContext *scx)
{
CellUse *oldUse = extInterUse;
SearchContext parentScx;
@ -185,8 +185,9 @@ extInterSubtree(scx)
}
int
extInterSubtreeClip(overlapScx, scx)
SearchContext *overlapScx, *scx;
extInterSubtreeClip(
SearchContext *overlapScx,
SearchContext *scx)
{
Rect r, r2;
@ -227,11 +228,12 @@ extInterSubtreeClip(overlapScx, scx)
*/
int
extInterSubtreeElement(use, trans, x, y, r)
CellUse *use;
Transform *trans;
int x, y;
Rect *r;
extInterSubtreeElement(
CellUse *use,
Transform *trans,
int x,
int y,
Rect *r)
{
SearchContext scx;
Transform tinv;
@ -270,10 +272,10 @@ extInterSubtreeElement(use, trans, x, y, r)
*/
int
extInterSubtreeTile(tile, dinfo, cxp)
Tile *tile;
TileType dinfo; /* (unused) */
TreeContext *cxp;
extInterSubtreeTile(
Tile *tile,
TileType dinfo, /* (unused) */
TreeContext *cxp)
{
SearchContext newscx;
Rect r;
@ -312,8 +314,8 @@ extInterSubtreeTile(tile, dinfo, cxp)
*/
int
extInterOverlapSubtree(scx)
SearchContext *scx;
extInterOverlapSubtree(
SearchContext *scx)
{
if (extInterUse == scx->scx_use)
return (2);
@ -343,10 +345,10 @@ extInterOverlapSubtree(scx)
*/
int
extInterOverlapTile(tile, dinfo, cxp)
Tile *tile;
TileType dinfo; /* (unused) */
TreeContext *cxp;
extInterOverlapTile(
Tile *tile,
TileType dinfo, /* (unused) */
TreeContext *cxp)
{
SearchContext *scx = cxp->tc_scx;
Rect r, rootr;
@ -410,14 +412,14 @@ extInterOverlapTile(tile, dinfo, cxp)
*/
int
extTreeSrPaintArea(scx, func, cdarg)
SearchContext *scx; /* Pointer to search context specifying
extTreeSrPaintArea(
SearchContext *scx, /* Pointer to search context specifying
* a cell use to search, an area in the
* coordinates of the cell's def, and a
* transform back to "root" coordinates.
*/
int (*func)(); /* Function to apply at each qualifying tile */
ClientData cdarg; /* Client data for above function */
int (*func)(), /* Function to apply at each qualifying tile */
ClientData cdarg) /* Client data for above function */
{
int extTreeSrFunc();
CellDef *def = scx->scx_use->cu_def;
@ -455,9 +457,9 @@ extTreeSrPaintArea(scx, func, cdarg)
*/
int
extTreeSrFunc(scx, fp)
SearchContext *scx;
TreeFilter *fp;
extTreeSrFunc(
SearchContext *scx,
TreeFilter *fp)
{
CellDef *def = scx->scx_use->cu_def;
TreeContext context;

View File

@ -144,8 +144,8 @@ void extPathFloodTile();
*/
void
ExtSetDriver(name)
char *name;
ExtSetDriver(
char *name)
{
HashEntry *he;
@ -154,8 +154,8 @@ ExtSetDriver(name)
}
void
ExtSetReceiver(name)
char *name;
ExtSetReceiver(
char *name)
{
HashEntry *he;
@ -238,12 +238,12 @@ extLengthInit()
*/
void
extLength(rootUse, f)
CellUse *rootUse; /* The names stored in the driver and receiver tables
extLength(
CellUse *rootUse, /* The names stored in the driver and receiver tables
* should all be relative to this root cell. It is
* the responsibility of the caller to ensure this.
*/
FILE *f; /* Open output file */
FILE *f) /* Open output file */
{
Label *dList, *rList, *dLab, *rLab;
int min, max;
@ -346,9 +346,9 @@ extLength(rootUse, f)
*/
Label *
extLengthYank(use, labList)
CellUse *use; /* Cell whose material is to be traced */
Label *labList; /* List of labels whose attached net is to be traced */
extLengthYank(
CellUse *use, /* Cell whose material is to be traced */
Label *labList) /* List of labels whose attached net is to be traced */
{
SearchContext scx;
char mesg[512];
@ -434,10 +434,10 @@ extLengthYank(use, labList)
*/
int
extLengthLabels(tile, dinfo, rootUse)
Tile *tile; /* Some tile in extPathDef */
TileType dinfo; /* Split tile information (unused) */
CellUse *rootUse; /* The original root cell */
extLengthLabels(
Tile *tile, /* Some tile in extPathDef */
TileType dinfo, /* Split tile information (unused) */
CellUse *rootUse) /* The original root cell */
{
char name[MAXNAMESIZE];
TileTypeBitMask mask;
@ -486,10 +486,10 @@ extLengthLabels(tile, dinfo, rootUse)
*/
int
extLengthLabelsFunc(scx, label, tpath)
SearchContext *scx; /* Where in the search tree we are */
Label *label; /* The label itself */
TerminalPath *tpath; /* Identifies hierarchical prefix for label.
extLengthLabelsFunc(
SearchContext *scx, /* Where in the search tree we are */
Label *label, /* The label itself */
TerminalPath *tpath) /* Identifies hierarchical prefix for label.
* The full hierarchical pathname will be the
* concatenation of the string tpath->tp_first
* and the string label->lab_text.
@ -544,9 +544,9 @@ extLengthLabelsFunc(scx, label, tpath)
*/
Label *
extPathLabel(use, text)
CellUse *use;
char *text;
extPathLabel(
CellUse *use,
char *text)
{
int extPathLabelFunc();
Label *lab;
@ -578,11 +578,11 @@ extPathLabel(use, text)
*/
int
extPathLabelFunc(rect, text, childLab, pLabList)
Rect *rect; /* Transformed location of the label */
char *text; /* Full hierarchical name of the label */
Label *childLab; /* The label itself */
Label **pLabList; /* Cons the newly allocated label onto the front of
extPathLabelFunc(
Rect *rect, /* Transformed location of the label */
char *text, /* Full hierarchical name of the label */
Label *childLab, /* The label itself */
Label **pLabList) /* Cons the newly allocated label onto the front of
* this list.
*/
{
@ -630,9 +630,11 @@ extPathLabelFunc(rect, text, childLab, pLabList)
*/
void
extPathPairDistance(lab1, lab2, pMin, pMax)
Label *lab1, *lab2;
int *pMin, *pMax;
extPathPairDistance(
Label *lab1,
Label *lab2,
int *pMin,
int *pMax)
{
struct extPathArg epa;
TileTypeBitMask mask;
@ -694,8 +696,8 @@ extPathPairDistance(lab1, lab2, pMin, pMax)
*/
int
extPathResetClient(tile)
Tile *tile;
extPathResetClient(
Tile *tile)
{
TiSetClient(tile, CLIENTDEFAULT);
return (0);
@ -728,10 +730,10 @@ extPathResetClient(tile)
*/
int
extPathPairFunc(tile, dinfo, epa)
Tile *tile;
TileType dinfo; // Unused
struct extPathArg *epa;
extPathPairFunc(
Tile *tile,
TileType dinfo, // Unused
struct extPathArg *epa)
{
Point startPoint;
Rect r;
@ -772,11 +774,11 @@ extPathPairFunc(tile, dinfo, epa)
*/
void
extPathFlood(tile, p, distance, epa)
Tile *tile; /* Tile whose neighbors we are to visit */
Point *p; /* Usually at center of 'tile' */
int distance; /* Distance to 'p' */
struct extPathArg *epa; /* Update epa_min and epa_max when we reach
extPathFlood(
Tile *tile, /* Tile whose neighbors we are to visit */
Point *p, /* Usually at center of 'tile' */
int distance, /* Distance to 'p' */
struct extPathArg *epa) /* Update epa_min and epa_max when we reach
* the destination epa_lab2.
*/
{
@ -911,10 +913,10 @@ extPathFlood(tile, p, distance, epa)
}
int
extPathFloodFunc(dstTile, dinfo, epfa)
Tile *dstTile;
TileType dinfo; // Unused
struct extPathFloodArg *epfa;
extPathFloodFunc(
Tile *dstTile,
TileType dinfo, // Unused
struct extPathFloodArg *epfa)
{
Rect srcRect, dstRect;
Point dstPoint, *p;
@ -970,12 +972,12 @@ extPathFloodFunc(dstTile, dinfo, epfa)
*/
void
extPathFloodTile(srcTile, srcPoint, srcDist, dstTile, epa)
Tile *srcTile; /* Tile through which we're propagating */
Point *srcPoint; /* Point inside or on srcTile */
int srcDist; /* Distance to srcPoint so far */
Tile *dstTile; /* Tile on border of srcTile */
struct extPathArg *epa;
extPathFloodTile(
Tile *srcTile, /* Tile through which we're propagating */
Point *srcPoint, /* Point inside or on srcTile */
int srcDist, /* Distance to srcPoint so far */
Tile *dstTile, /* Tile on border of srcTile */
struct extPathArg *epa)
{
Rect srcRect, dstRect;
Point dstPoint;
@ -1017,10 +1019,11 @@ extPathFloodTile(srcTile, srcPoint, srcDist, dstTile, epa)
*/
int
extPathTileDist(p1, p2, tile, oldDist)
Point *p1, *p2;
Tile *tile;
int oldDist;
extPathTileDist(
Point *p1,
Point *p2,
Tile *tile,
int oldDist)
{
int newDist;

View File

@ -88,10 +88,10 @@ Stack *extDefStack;
int extDefInitFunc(CellDef *, ClientData); /* UNUSED */
void extDefPush();
void extDefIncremental();
void extParents();
void extParents(CellUse *use, bool doExtract);
void extDefParentFunc();
void extDefParentAreaFunc();
void extExtractStack();
void extExtractStack(Stack *stack, bool doExtract, CellDef *rootDef);
bool extContainsGeometry();
int extContainsCellFunc(CellUse *use, ClientData cdata); /* cb_database_srcellplanearea_t (const CellUse *allButUse) */
@ -173,9 +173,9 @@ ExtInit()
*/
int
extIsUsedFunc(use, clientData)
CellUse *use;
ClientData clientData; /* unused */
extIsUsedFunc(
CellUse *use,
ClientData clientData) /* unused */
{
CellDef *def = use->cu_def;
@ -197,10 +197,10 @@ extIsUsedFunc(use, clientData)
*/
int
extEnumFunc(tile, dinfo, clientdata)
Tile *tile; /* (unused) */
TileType dinfo; /* (unused) */
ClientData clientdata; /* (unused) */
extEnumFunc(
Tile *tile, /* (unused) */
TileType dinfo, /* (unused) */
ClientData clientdata) /* (unused) */
{
return 1;
}
@ -212,9 +212,9 @@ extEnumFunc(tile, dinfo, clientdata)
*/
int
extDefListFunc(use, defList)
CellUse *use;
LinkedDef **defList;
extDefListFunc(
CellUse *use,
LinkedDef **defList)
{
CellDef *def = use->cu_def;
LinkedDef *newLD;
@ -270,9 +270,9 @@ extDefListFunc(use, defList)
*/
int
extDefListFuncIncremental(use, defList)
CellUse *use;
LinkedDef **defList;
extDefListFuncIncremental(
CellUse *use,
LinkedDef **defList)
{
CellDef *def = use->cu_def;
LinkedDef *newLD;
@ -346,8 +346,8 @@ extDefListFuncIncremental(use, defList)
*/
void
ExtAll(rootUse)
CellUse *rootUse;
ExtAll(
CellUse *rootUse)
{
LinkedDef *defList = NULL;
CellDef *err_def;
@ -397,9 +397,9 @@ ExtAll(rootUse)
*/
/*ARGSUSED*/
int
extDefInitFunc(def, cdata)
CellDef *def;
ClientData cdata; /* UNUSED */
extDefInitFunc(
CellDef *def,
ClientData cdata) /* UNUSED */
{
def->cd_client = (ClientData) 0;
return (0);
@ -411,8 +411,8 @@ extDefInitFunc(def, cdata)
*/
void
extDefPush(defList)
LinkedDef *defList;
extDefPush(
LinkedDef *defList)
{
while (defList != NULL)
{
@ -452,9 +452,9 @@ extDefPush(defList)
*/
void
ExtUnique(rootUse, option)
CellUse *rootUse;
int option;
ExtUnique(
CellUse *rootUse,
int option)
{
CellDef *def, *err_def;
LinkedDef *defList = NULL;
@ -545,23 +545,23 @@ ExtUnique(rootUse, option)
*/
void
ExtParents(use)
CellUse *use;
ExtParents(
CellUse *use)
{
extParents(use, TRUE);
}
void
ExtShowParents(use)
CellUse *use;
ExtShowParents(
CellUse *use)
{
extParents(use, FALSE);
}
void
extParents(use, doExtract)
CellUse *use;
bool doExtract; /* If TRUE, we extract; if FALSE, we print */
extParents(
CellUse *use,
bool doExtract) /* If TRUE, we extract; if FALSE, we print */
{
LinkedDef *defList = NULL;
CellDef *def;
@ -632,8 +632,8 @@ extParents(use, doExtract)
*/
void
extDefParentFunc(def)
CellDef *def;
extDefParentFunc(
CellDef *def)
{
CellUse *parent;
@ -667,10 +667,10 @@ extDefParentFunc(def)
*/
void
ExtParentArea(use, changedArea, doExtract)
CellUse *use; /* Use->cu_def changed; extract its affected parents */
Rect *changedArea; /* Area changed in use->cu_def coordinates */
bool doExtract; /* If TRUE, we extract; if FALSE, we just print names
ExtParentArea(
CellUse *use, /* Use->cu_def changed; extract its affected parents */
Rect *changedArea, /* Area changed in use->cu_def coordinates */
bool doExtract) /* If TRUE, we extract; if FALSE, we just print names
* of the cells we would extract.
*/
{
@ -704,11 +704,11 @@ ExtParentArea(use, changedArea, doExtract)
*/
void
extDefParentAreaFunc(def, baseDef, allButUse, area)
CellDef *def;
CellDef *baseDef;
CellUse *allButUse;
Rect *area;
extDefParentAreaFunc(
CellDef *def,
CellDef *baseDef,
CellUse *allButUse,
Rect *area)
{
int x, y, xoff, yoff;
CellUse *parent;
@ -758,10 +758,10 @@ extDefParentAreaFunc(def, baseDef, allButUse, area)
*/
void
ExtractOneCell(def, outName, doLength)
CellDef *def; /* Cell being extracted */
char *outName; /* Name of output file; if NULL, derive from def name */
bool doLength; /* If TRUE, extract pathlengths from drivers to
ExtractOneCell(
CellDef *def, /* Cell being extracted */
char *outName, /* Name of output file; if NULL, derive from def name */
bool doLength) /* If TRUE, extract pathlengths from drivers to
* receivers (the names are stored in ExtLength.c).
* Should only be TRUE for the root cell in a
* hierarchy.
@ -842,10 +842,10 @@ ExtractOneCell(def, outName, doLength)
/* ------------------------------------------------------------------------- */
bool
extContainsGeometry(def, allButUse, area)
CellDef *def;
CellUse *allButUse;
Rect *area;
extContainsGeometry(
CellDef *def,
CellUse *allButUse,
Rect *area)
{
int extContainsPaintFunc();
int pNum;
@ -904,8 +904,8 @@ extContainsPaintFunc(
*/
void
ExtIncremental(rootUse)
CellUse *rootUse;
ExtIncremental(
CellUse *rootUse)
{
LinkedDef *defList = NULL;
CellDef *err_def;
@ -954,8 +954,8 @@ ExtIncremental(rootUse)
*/
bool
extTimestampMisMatch(def)
CellDef *def;
extTimestampMisMatch(
CellDef *def)
{
char line[256];
FILE *extFile;
@ -1002,10 +1002,10 @@ closeit:
*/
void
extExtractStack(stack, doExtract, rootDef)
Stack *stack;
bool doExtract;
CellDef *rootDef;
extExtractStack(
Stack *stack,
bool doExtract,
CellDef *rootDef)
{
int errorcnt = 0, warnings = 0;
bool first = TRUE;

View File

@ -71,11 +71,11 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
int
ExtFindNeighbors(tile, dinfo, tilePlaneNum, arg)
Tile *tile;
TileType dinfo;
int tilePlaneNum;
FindRegion *arg;
ExtFindNeighbors(
Tile *tile,
TileType dinfo,
int tilePlaneNum,
FindRegion *arg)
{
TileTypeBitMask *connTo = arg->fra_connectsTo;
Tile *tp;
@ -376,10 +376,10 @@ fail:
*/
int
extNbrPushFunc(tile, dinfo, pla)
Tile *tile;
TileType dinfo;
PlaneAndArea *pla;
extNbrPushFunc(
Tile *tile,
TileType dinfo,
PlaneAndArea *pla)
{
Rect *tileArea;
Rect r;

View File

@ -139,13 +139,13 @@ ExtGetRegion(Tile *tp, /* Tile to get region record from */
*/
ExtRegion *
ExtFindRegions(def, area, mask, connectsTo, first, each)
CellDef *def; /* Cell definition being searched */
Rect *area; /* Area to search initially for tiles */
TileTypeBitMask *mask; /* In the initial area search, only visit
ExtFindRegions(
CellDef *def, /* Cell definition being searched */
Rect *area, /* Area to search initially for tiles */
TileTypeBitMask *mask, /* In the initial area search, only visit
* tiles whose types are in this mask.
*/
TileTypeBitMask *connectsTo;/* Connectivity table for determining regions.
TileTypeBitMask *connectsTo,/* Connectivity table for determining regions.
* If t1 and t2 are the types of adjacent
* tiles, then t1 and t2 belong to the same
* region iff:
@ -155,8 +155,8 @@ ExtFindRegions(def, area, mask, connectsTo, first, each)
* so this is the same as:
* TTMaskHasType(&connectsTo[t2], t1)
*/
ExtRegion * (*first)(); /* Applied to first tile in region */
int (*each)(); /* Applied to each tile in region */
ExtRegion * (*first)(), /* Applied to first tile in region */
int (*each)()) /* Applied to each tile in region */
{
FindRegion arg;
int extRegionAreaFunc();
@ -206,10 +206,10 @@ ExtFindRegions(def, area, mask, connectsTo, first, each)
*/
int
extRegionAreaFunc(tile, dinfo, arg)
Tile *tile;
TileType dinfo;
FindRegion *arg;
extRegionAreaFunc(
Tile *tile,
TileType dinfo,
FindRegion *arg)
{
/* Allocate a new region */
if (arg->fra_first)
@ -251,11 +251,11 @@ extRegionAreaFunc(tile, dinfo, arg)
*/
LabelList *
ExtLabelRegions(def, connTo, nodeList, clipArea)
CellDef *def; /* Cell definition being labelled */
TileTypeBitMask *connTo; /* Connectivity table (see above) */
NodeRegion **nodeList; /* Node list to add to (or NULL) */
Rect *clipArea; /* Area to search for sticky labels */
ExtLabelRegions(
CellDef *def, /* Cell definition being labelled */
TileTypeBitMask *connTo, /* Connectivity table (see above) */
NodeRegion **nodeList, /* Node list to add to (or NULL) */
Rect *clipArea) /* Area to search for sticky labels */
{
static Point offsets[] = { { 0, 0 }, { 0, -1 }, { -1, -1 }, { -1, 0 } };
LabelList *ll;
@ -431,10 +431,10 @@ ExtLabelRegions(def, connTo, nodeList, clipArea)
*/
void
ExtLabelOneRegion(def, connTo, reg)
CellDef *def; /* Cell definition being labelled */
TileTypeBitMask *connTo; /* Connectivity table (see above) */
NodeRegion *reg; /* The region whose labels we want */
ExtLabelOneRegion(
CellDef *def, /* Cell definition being labelled */
TileTypeBitMask *connTo, /* Connectivity table (see above) */
NodeRegion *reg) /* The region whose labels we want */
{
static Point offsets[] = { { 0, 0 }, { 0, -1 }, { -1, -1 }, { -1, 0 } };
LabelList *ll;
@ -519,9 +519,9 @@ ExtLabelOneRegion(def, connTo, reg)
*/
void
ExtResetTiles(def, resetTo)
CellDef *def;
ClientData resetTo; /* New value for ti_client */
ExtResetTiles(
CellDef *def,
ClientData resetTo) /* New value for ti_client */
{
int pNum;
@ -553,8 +553,8 @@ ExtResetTiles(def, resetTo)
*/
void
ExtFreeRegions(regList)
ExtRegion *regList; /* List of regions to be freed */
ExtFreeRegions(
ExtRegion *regList) /* List of regions to be freed */
{
ExtRegion *reg;
@ -565,8 +565,8 @@ ExtFreeRegions(regList)
}
void
ExtFreeLabRegions(regList)
LabRegion *regList; /* List of regions to be freed */
ExtFreeLabRegions(
LabRegion *regList) /* List of regions to be freed */
{
LabRegion *lreg;
LabelList *ll;
@ -584,8 +584,8 @@ ExtFreeLabRegions(regList)
}
void
ExtFreeHierLabRegions(regList)
ExtRegion *regList; /* List of regions to be freed */
ExtFreeHierLabRegions(
ExtRegion *regList) /* List of regions to be freed */
{
ExtRegion *reg;
LabelList *ll;

View File

@ -90,7 +90,7 @@ bool extFirstPass;
ExtTree *extSubList = (ExtTree *) NULL;
/* Forward declarations of filter functions */
char *extSubtreeTileToNode();
char *extSubtreeTileToNode(Tile *tp, TileType dinfo, int pNum, ExtTree *et, HierExtractArg *ha, bool doHard);
int extSubtreeFunc();
int extSubstrateFunc();
int extConnFindFunc();
@ -115,9 +115,9 @@ void extSubtreeHardSearch();
*/
int
extClearUseFlags(use, clientData)
CellUse *use;
ClientData clientData;
extClearUseFlags(
CellUse *use,
ClientData clientData)
{
use->cu_flags &= ~CU_SUB_EXTRACTED;
return 0;
@ -161,10 +161,10 @@ extClearUseFlags(use, clientData)
#define RECTAREA(r) (((r)->r_xtop-(r)->r_xbot) * ((r)->r_ytop-(r)->r_ybot))
void
extSubtree(parentUse, reg, f)
CellUse *parentUse;
NodeRegion *reg; /* Node regions of the parent cell */
FILE *f;
extSubtree(
CellUse *parentUse,
NodeRegion *reg, /* Node regions of the parent cell */
FILE *f)
{
int extSubtreeInterFunc();
CellDef *def = parentUse->cu_def;
@ -200,7 +200,7 @@ extSubtree(parentUse, reg, f)
ha.ha_outf = f;
ha.ha_parentUse = parentUse;
ha.ha_parentReg = reg;
ha.ha_nodename = extSubtreeTileToNode;
ha.ha_nodename = (char *(*)()) extSubtreeTileToNode;
ha.ha_interArea = GeoNullRect;
ha.ha_cumFlat.et_use = extYuseCum;
HashInit(&ha.ha_connHash, 32, 0);
@ -361,10 +361,10 @@ done:
#ifdef exactinteractions
int
extSubtreeCopyPlane(tile, dinfo, plane)
Tile *tile;
TileType dinfo;
Plane *plane;
extSubtreeCopyPlane(
Tile *tile,
TileType dinfo,
Plane *plane)
{
Rect r;
@ -375,10 +375,10 @@ extSubtreeCopyPlane(tile, dinfo, plane)
}
int
extSubtreeShrinkPlane(tile, dinfo, plane)
Tile *tile;
TileType dinfo;
Plane *plane;
extSubtreeShrinkPlane(
Tile *tile,
TileType dinfo,
Plane *plane)
{
Rect r;
@ -392,10 +392,10 @@ extSubtreeShrinkPlane(tile, dinfo, plane)
}
int
extSubtreeInterFunc(tile, dinfo, ha)
Tile *tile;
TileType dinfo;
HierExtractArg *ha;
extSubtreeInterFunc(
Tile *tile,
TileType dinfo,
HierExtractArg *ha)
{
TITORECT(tile, &ha->ha_interArea);
ha->ha_clipArea = ha->ha_interArea;
@ -450,8 +450,8 @@ extSubtreeInterFunc(tile, dinfo, ha)
*/
void
extSubtreeInteraction(ha)
HierExtractArg *ha; /* Context for hierarchical extraction */
extSubtreeInteraction(
HierExtractArg *ha) /* Context for hierarchical extraction */
{
CellDef *oneDef, *cumDef = ha->ha_cumFlat.et_use->cu_def;
ExtTree *oneFlat, *nextFlat;
@ -638,8 +638,8 @@ extSubtreeInteraction(ha)
*/
void
extSubtreeAdjustInit(ha)
HierExtractArg *ha;
extSubtreeAdjustInit(
HierExtractArg *ha)
{
NodeRegion *np;
NodeName *nn;
@ -690,8 +690,8 @@ extSubtreeAdjustInit(ha)
*/
void
extSubtreeOutputCoupling(ha)
HierExtractArg *ha;
extSubtreeOutputCoupling(
HierExtractArg *ha)
{
CapValue cap;
CoupleKey *ck;
@ -736,10 +736,10 @@ extSubtreeOutputCoupling(ha)
*/
int
extFoundProc(tile, dinfo, clientData)
Tile *tile;
TileType dinfo;
ClientData clientData;
extFoundProc(
Tile *tile,
TileType dinfo,
ClientData clientData)
{
return 1;
}
@ -767,9 +767,9 @@ extFoundProc(tile, dinfo, clientData)
*/
int
extSubtreeFunc(scx, ha)
SearchContext *scx;
HierExtractArg *ha;
extSubtreeFunc(
SearchContext *scx,
HierExtractArg *ha)
{
CellUse *cumUse = ha->ha_cumFlat.et_use;
CellUse *use = scx->scx_use;
@ -985,9 +985,9 @@ extSubtreeFunc(scx, ha)
*/
int
extSubstrateFunc(scx, ha)
SearchContext *scx;
HierExtractArg *ha;
extSubstrateFunc(
SearchContext *scx,
HierExtractArg *ha)
{
CellUse *use = scx->scx_use;
int x, y;
@ -1065,13 +1065,13 @@ extSubstrateFunc(scx, ha)
*/
char *
extSubtreeTileToNode(tp, dinfo, pNum, et, ha, doHard)
Tile *tp; /* Tile whose node name is to be found */
TileType dinfo; /* Split tile information */
int pNum; /* Plane of the tile */
ExtTree *et; /* Yank buffer to search */
HierExtractArg *ha; /* Extraction context */
bool doHard; /* If TRUE, we look up this node's name the hard way
extSubtreeTileToNode(
Tile *tp, /* Tile whose node name is to be found */
TileType dinfo, /* Split tile information */
int pNum, /* Plane of the tile */
ExtTree *et, /* Yank buffer to search */
HierExtractArg *ha, /* Extraction context */
bool doHard) /* If TRUE, we look up this node's name the hard way
* if we can't find it any other way; otherwise, we
* return NULL if we can't find the node's name.
*/
@ -1175,10 +1175,10 @@ extSubtreeTileToNode(tp, dinfo, pNum, et, ha, doHard)
*/
int
extConnFindFunc(tp, dinfo, preg)
Tile *tp;
TileType dinfo; // Unused, but needs to be handled
LabRegion **preg;
extConnFindFunc(
Tile *tp,
TileType dinfo, // Unused, but needs to be handled
LabRegion **preg)
{
if (extHasRegion(tp, CLIENTDEFAULT))
{
@ -1220,12 +1220,12 @@ extConnFindFunc(tp, dinfo, preg)
*/
LabRegion *
extSubtreeHardNode(tp, dinfo, pNum, et, ha)
Tile *tp;
TileType dinfo;
int pNum;
ExtTree *et;
HierExtractArg *ha;
extSubtreeHardNode(
Tile *tp,
TileType dinfo,
int pNum,
ExtTree *et,
HierExtractArg *ha)
{
LabRegion *lreg = (LabRegion *) ExtGetRegion(tp, dinfo);
CellDef *def = et->et_use->cu_def;
@ -1301,9 +1301,9 @@ extSubtreeHardNode(tp, dinfo, pNum, et, ha)
*/
void
extSubtreeHardSearch(et, arg)
ExtTree *et;
HardWay *arg;
extSubtreeHardSearch(
ExtTree *et,
HardWay *arg)
{
HierExtractArg *ha = arg->hw_ha;
ExtTree *oneFlat;
@ -1352,13 +1352,14 @@ extSubtreeHardSearch(et, arg)
*/
int
extSubtreeHardUseFunc(use, trans, x, y, arg)
CellUse *use; /* Use that is the root of the subtree being searched */
Transform *trans; /* Transform from coordinates of use->cu_def to those
extSubtreeHardUseFunc(
CellUse *use, /* Use that is the root of the subtree being searched */
Transform *trans, /* Transform from coordinates of use->cu_def to those
* in use->cu_parent, for the array element (x, y).
*/
int x, y; /* Indices of this array element */
HardWay *arg; /* Context passed down to filter functions */
int x,
int y,
HardWay *arg) /* Context passed down to filter functions */
{
SearchContext scx;
Transform tinv;

View File

@ -275,8 +275,8 @@ static const keydesc devTable[] = {
*/
bool
ExtCompareStyle(stylename)
char *stylename;
ExtCompareStyle(
char *stylename)
{
ExtKeep *style;
@ -335,15 +335,14 @@ ExtCompareStyle(stylename)
*/
bool
ExtGetDevInfo(idx, devnameptr, devtypeptr, s_rclassptr, d_rclassptr,
sub_rclassptr, subnameptr)
int idx;
char **devnameptr; /* Name of extracted device model */
TileType *devtypeptr; /* Magic tile type of device */
short *s_rclassptr; /* Source (1st terminal) type only */
short *d_rclassptr; /* Drain (2nd terminal) type only */
short *sub_rclassptr;
char **subnameptr;
ExtGetDevInfo(
int idx,
char **devnameptr, /* Name of extracted device model */
TileType *devtypeptr, /* Magic tile type of device */
short *s_rclassptr, /* Source (1st terminal) type only */
short *d_rclassptr, /* Drain (2nd terminal) type only */
short *sub_rclassptr,
char **subnameptr)
{
TileType t;
TileTypeBitMask *rmask, *tmask;
@ -477,8 +476,8 @@ ExtGetDevInfo(idx, devnameptr, devtypeptr, s_rclassptr, d_rclassptr,
*/
TileType
extGetDevType(devname)
char *devname;
extGetDevType(
char *devname)
{
TileType t;
ExtDevice *devptr;
@ -503,8 +502,8 @@ extGetDevType(devname)
*/
int
ExtGetGateTypesMask(mask)
TileTypeBitMask *mask;
ExtGetGateTypesMask(
TileTypeBitMask *mask)
{
TileType ttype;
@ -540,8 +539,8 @@ ExtGetGateTypesMask(mask)
*/
int
ExtGetDiffTypesMask(mask)
TileTypeBitMask *mask;
ExtGetDiffTypesMask(
TileTypeBitMask *mask)
{
TileType ttype;
@ -573,9 +572,10 @@ ExtGetDiffTypesMask(mask)
*/
void
ExtGetZAxis(tile, height, thick)
Tile *tile;
float *height, *thick;
ExtGetZAxis(
Tile *tile,
float *height,
float *thick)
{
TileType ttype;
@ -610,8 +610,8 @@ ExtGetZAxis(tile, height, thick)
*/
void
ExtPrintPath(dolist)
bool dolist;
ExtPrintPath(
bool dolist)
{
if (ExtLocalPath == NULL)
{
@ -659,8 +659,8 @@ ExtPrintPath(dolist)
*/
void
ExtSetPath(path)
char *path;
ExtSetPath(
char *path)
{
if (path != NULL)
{
@ -692,10 +692,10 @@ ExtSetPath(path)
*/
void
ExtPrintStyle(dolist, doforall, docurrent)
bool dolist;
bool doforall;
bool docurrent;
ExtPrintStyle(
bool dolist,
bool doforall,
bool docurrent)
{
ExtKeep *style;
@ -759,8 +759,8 @@ ExtPrintStyle(dolist, doforall, docurrent)
*/
void
ExtSetStyle(name)
char *name;
ExtSetStyle(
char *name)
{
ExtKeep *style, *match;
int length;
@ -826,8 +826,8 @@ extTechStyleAlloc()
*/
void
extTechStyleInit(style)
ExtStyle *style;
extTechStyleInit(
ExtStyle *style)
{
TileType r, s;
@ -1017,8 +1017,8 @@ extTechStyleNew()
*/
CapValue
aToCap(str)
char *str;
aToCap(
char *str)
{
CapValue capVal;
if (sscanf(str, "%lf", &capVal) != 1) {
@ -1044,8 +1044,8 @@ aToCap(str)
*/
ResValue
aToRes(str)
char *str;
aToRes(
char *str)
{
ResValue resVal;
if (sscanf(str, "%d", &resVal) != 1) {
@ -1072,8 +1072,8 @@ aToRes(str)
* ----------------------------------------------------------------------------
*/
void
ExtLoadStyle(stylename)
char *stylename;
ExtLoadStyle(
char *stylename)
{
SectionID invext;
@ -1177,9 +1177,9 @@ ExtTechInit()
*/
void
ExtTechSimpleAreaCap(argc, argv)
int argc;
char *argv[];
ExtTechSimpleAreaCap(
int argc,
char *argv[])
{
TileType s, t;
TileTypeBitMask types, subtypes, shields;
@ -1355,9 +1355,9 @@ ExtTechSimpleAreaCap(argc, argv)
*/
void
ExtTechSimplePerimCap(argc, argv)
int argc;
char *argv[];
ExtTechSimplePerimCap(
int argc,
char *argv[])
{
TileType r, s, t;
TileTypeBitMask types, nottypes, subtypes, shields;
@ -1541,9 +1541,9 @@ ExtTechSimplePerimCap(argc, argv)
*/
void
ExtTechSimpleSidewallCap(argc, argv)
int argc;
char *argv[];
ExtTechSimpleSidewallCap(
int argc,
char *argv[])
{
/* Like ExtTechLine, but with near = types2 and far = types1 */
@ -1626,8 +1626,8 @@ ExtTechSimpleSidewallCap(argc, argv)
*/
void
ExtTechSimpleOverlapCap(argv)
char *argv[];
ExtTechSimpleOverlapCap(
char *argv[])
{
TileType s, t;
TileTypeBitMask types1, types2, shields;
@ -1724,8 +1724,8 @@ ExtTechSimpleOverlapCap(argv)
*/
void
ExtTechSimpleSideOverlapCap(argv)
char *argv[];
ExtTechSimpleSideOverlapCap(
char *argv[])
{
TileType r, s, t;
TileTypeBitMask types, nottypes, ov, notov, shields;
@ -1981,10 +1981,10 @@ ExtTechSimpleSideOverlapCap(argv)
/*ARGSUSED*/
bool
ExtTechLine(sectionName, argc, argv)
char *sectionName;
int argc;
char *argv[];
ExtTechLine(
char *sectionName,
int argc,
char *argv[])
{
int n, l, i, j, size, val, p1, p2, p3, nterm, iterm, class;
PlaneMask pshield, pov;
@ -3575,8 +3575,8 @@ ExtTechFinal()
void
extTechFinalStyle(style)
ExtStyle *style;
extTechFinalStyle(
ExtStyle *style)
{
TileTypeBitMask maskBits;
TileType r, s, t;
@ -3944,9 +3944,9 @@ zinit:
*/
void
ExtTechScale(scalen, scaled)
int scalen; /* Scale numerator */
int scaled; /* Scale denominator */
ExtTechScale(
int scalen, /* Scale numerator */
int scaled) /* Scale denominator */
{
ExtStyle *style = ExtCurStyle;
EdgeCap *ec;

View File

@ -105,9 +105,9 @@ void extShowConnect(char *, TileTypeBitMask *, FILE *);
*/
void
ExtractTest(w, cmd)
MagWindow *w;
TxCommand *cmd;
ExtractTest(
MagWindow *w,
TxCommand *cmd)
{
extern long extSubtreeTotalArea;
extern long extSubtreeInteractionArea;
@ -316,10 +316,10 @@ ExtractTest(w, cmd)
}
int
extShowInter(tile, dinfo, clientdata)
Tile *tile;
TileType dinfo; /* (unused) */
ClientData clientdata; /* (unused) */
extShowInter(
Tile *tile,
TileType dinfo, /* (unused) */
ClientData clientdata) /* (unused) */
{
Rect r;
@ -351,8 +351,8 @@ extShowInter(tile, dinfo, clientdata)
*/
void
extShowTech(name)
char *name;
extShowTech(
char *name)
{
FILE *out;
TileType t, s;
@ -489,10 +489,10 @@ extShowTech(name)
}
void
extShowTrans(name, mask, out)
char *name;
TileTypeBitMask *mask;
FILE *out;
extShowTrans(
char *name,
TileTypeBitMask *mask,
FILE *out)
{
TileType t;
@ -518,10 +518,10 @@ extShowTrans(name, mask, out)
}
void
extShowConnect(hdr, connectsTo, out)
char *hdr;
TileTypeBitMask *connectsTo;
FILE *out;
extShowConnect(
char *hdr,
TileTypeBitMask *connectsTo,
FILE *out)
{
TileType t;
@ -536,9 +536,9 @@ extShowConnect(hdr, connectsTo, out)
}
void
extShowMask(m, out)
TileTypeBitMask *m;
FILE *out;
extShowMask(
TileTypeBitMask *m,
FILE *out)
{
TileType t;
bool first = TRUE;
@ -554,9 +554,9 @@ extShowMask(m, out)
}
void
extShowPlanes(m, out)
PlaneMask m;
FILE *out;
extShowPlanes(
PlaneMask m,
FILE *out)
{
int pNum;
bool first = TRUE;
@ -589,9 +589,9 @@ extShowPlanes(m, out)
*/
void
extDispInit(def, w)
CellDef *def;
MagWindow *w;
extDispInit(
CellDef *def,
MagWindow *w)
{
extDebugWindow = w;
extCellDef = def;
@ -618,9 +618,9 @@ extDispInit(def, w)
*/
void
extShowEdge(s, bp)
char *s;
Boundary *bp;
extShowEdge(
char *s,
Boundary *bp)
{
Rect extScreenRect, edgeRect;
int style = STYLE_PURPLE1;
@ -679,10 +679,10 @@ extShowEdge(s, bp)
*/
void
extShowTile(tile, s, style_index)
Tile *tile;
char *s;
int style_index;
extShowTile(
Tile *tile,
char *s,
int style_index)
{
Rect tileRect;
static int styles[] = { STYLE_PALEHIGHLIGHTS, STYLE_DOTTEDHIGHLIGHTS };
@ -697,9 +697,9 @@ extShowTile(tile, s, style_index)
}
bool
extShowRect(r, style)
Rect *r;
int style;
extShowRect(
Rect *r,
int style)
{
Rect extScreenRect;
@ -731,10 +731,10 @@ extMore()
}
void
extNewYank(name, puse, pdef)
char *name;
CellUse **puse;
CellDef **pdef;
extNewYank(
char *name,
CellUse **puse,
CellDef **pdef)
{
DBNewYank(name, puse, pdef);
}
@ -746,8 +746,8 @@ extNewYank(name, puse, pdef)
*/
void
ExtDumpCapsToFile(f)
FILE *f;
ExtDumpCapsToFile(
FILE *f)
{
TileType t, s, r;
EdgeCap *e;
@ -1093,8 +1093,8 @@ ExtDumpCapsToFile(f)
*/
void
ExtDumpCaps(filename)
char *filename;
ExtDumpCaps(
char *filename)
{
TileType t, s, r;
EdgeCap *e;

View File

@ -162,9 +162,9 @@ extern int extDefInitFunc();
*/
void
ExtTimes(rootUse, f)
CellUse *rootUse;
FILE *f;
ExtTimes(
CellUse *rootUse,
FILE *f)
{
double clip, inter;
HashSearch hs;
@ -290,9 +290,9 @@ ExtTimes(rootUse, f)
/*ARGSUSED*/
int
extTimesInitFunc(use, cdata)
CellUse *use;
ClientData cdata; /* UNUSED */
extTimesInitFunc(
CellUse *use,
ClientData cdata) /* UNUSED */
{
CellDef *def = use->cu_def;
struct cellStats *cs;
@ -345,8 +345,8 @@ extTimesInitFunc(use, cdata)
*/
void
extTimesCellFunc(cs)
struct cellStats *cs;
extTimesCellFunc(
struct cellStats *cs)
{
extern long extSubtreeTotalArea;
extern long extSubtreeInteractionArea;
@ -398,10 +398,10 @@ extTimesCellFunc(cs)
*/
int
extCountTiles(tile, dinfo, cs)
Tile *tile; /* (unused) */
TileType dinfo; /* (unused) */
struct cellStats *cs;
extCountTiles(
Tile *tile, /* (unused) */
TileType dinfo, /* (unused) */
struct cellStats *cs)
{
cs->cs_rects++;
return (0);
@ -432,8 +432,8 @@ extCountTiles(tile, dinfo, cs)
*/
void
extTimesIncrFunc(cs)
struct cellStats *cs;
extTimesIncrFunc(
struct cellStats *cs)
{
/*
* Visit all of our parents recursively.
@ -481,9 +481,9 @@ extTimesIncrFunc(cs)
*/
void
extTimesSummaryFunc(cs, f)
struct cellStats *cs;
FILE *f;
extTimesSummaryFunc(
struct cellStats *cs,
FILE *f)
{
double tpaint, tcell, thier, tincr;
double fetspaint, rectspaint;
@ -590,9 +590,9 @@ extTimesSummaryFunc(cs, f)
*/
void
extTimesParentFunc(def, cs)
CellDef *def;
struct cellStats *cs;
extTimesParentFunc(
CellDef *def,
struct cellStats *cs)
{
struct cellStats *csForDef;
CellUse *parent;
@ -643,9 +643,9 @@ extTimesParentFunc(def, cs)
*/
int
extTimesHierFunc(def, cs)
CellDef *def;
struct cellStats *cs;
extTimesHierFunc(
CellDef *def,
struct cellStats *cs)
{
int extTimesHierUse();
struct cellStats *csForDef;
@ -679,9 +679,9 @@ extTimesHierFunc(def, cs)
}
int
extTimesHierUse(use, cs)
CellUse *use;
struct cellStats *cs;
extTimesHierUse(
CellUse *use,
struct cellStats *cs)
{
return (extTimesHierFunc(use->cu_def, cs));
}
@ -707,9 +707,9 @@ extTimesHierUse(use, cs)
*/
int
extTimesFlatFunc(def, cs)
CellDef *def;
struct cellStats *cs;
extTimesFlatFunc(
CellDef *def,
struct cellStats *cs)
{
struct cellStats *csForDef;
int extTimesFlatUse();
@ -728,9 +728,9 @@ extTimesFlatFunc(def, cs)
}
int
extTimesFlatUse(use, cs)
CellUse *use;
struct cellStats *cs;
extTimesFlatUse(
CellUse *use,
struct cellStats *cs)
{
struct cellStats dummyCS;
int nx, ny, nel;
@ -781,10 +781,10 @@ extTimesFlatUse(use, cs)
*/
void
extTimeProc(proc, def, tv)
int (*proc)();
CellDef *def;
struct timeval *tv;
extTimeProc(
int (*proc)(),
CellDef *def,
struct timeval *tv)
{
int secs, usecs, i;
@ -839,8 +839,8 @@ extTimeProc(proc, def, tv)
*/
void
extPaintOnly(def)
CellDef *def;
extPaintOnly(
CellDef *def)
{
NodeRegion *reg;
@ -867,8 +867,8 @@ extPaintOnly(def)
*/
void
extHierCell(def)
CellDef *def;
extHierCell(
CellDef *def)
{
extCellFile(def, extDevNull, FALSE);
}
@ -890,8 +890,8 @@ extHierCell(def)
*/
void
extCumInit(cum)
struct cumStats *cum;
extCumInit(
struct cumStats *cum)
{
cum->cums_min = (double) INFINITY;
cum->cums_max = (double) MINFINITY;
@ -917,10 +917,10 @@ extCumInit(cum)
*/
void
extCumOutput(str, cum, f)
char *str; /* Prefix string */
struct cumStats *cum;
FILE *f;
extCumOutput(
char *str, /* Prefix string */
struct cumStats *cum,
FILE *f)
{
double mean, var;
@ -961,9 +961,9 @@ extCumOutput(str, cum, f)
*/
void
extCumAdd(cum, v)
struct cumStats *cum;
double v;
extCumAdd(
struct cumStats *cum,
double v)
{
if (v < cum->cums_min) cum->cums_min = v;
if (v > cum->cums_max) cum->cums_max = v;
@ -989,8 +989,8 @@ extCumAdd(cum, v)
*/
struct cellStats *
extGetStats(def)
CellDef *def;
extGetStats(
CellDef *def)
{
HashEntry *he;
@ -1024,10 +1024,10 @@ int extInterCountHalo;
CellDef *extInterCountDef;
void
ExtInterCount(rootUse, halo, f)
CellUse *rootUse;
int halo;
FILE *f;
ExtInterCount(
CellUse *rootUse,
int halo,
FILE *f)
{
double inter;
CellDef *err_def;
@ -1073,9 +1073,9 @@ ExtInterCount(rootUse, halo, f)
}
int
extInterAreaFunc(use, f)
CellUse *use;
FILE *f;
extInterAreaFunc(
CellUse *use,
FILE *f)
{
static Plane *interPlane = (Plane *) NULL;
CellDef *def = use->cu_def;
@ -1118,10 +1118,10 @@ extInterAreaFunc(use, f)
}
int
extInterCountFunc(tile, dinfo, pArea)
Tile *tile;
TileType dinfo; /* (unused) */
int *pArea;
extInterCountFunc(
Tile *tile,
TileType dinfo, /* (unused) */
int *pArea)
{
Rect r;

View File

@ -80,9 +80,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
int
extUniqueCell(def, option)
CellDef *def;
int option;
extUniqueCell(
CellDef *def,
int option)
{
NodeRegion *nodeList;
LabRegion *lregList, *lastreg, processedLabel;
@ -95,7 +95,7 @@ extUniqueCell(def, option)
int nwarn;
bool isabstract;
NodeRegion *extFindNodes(); /* Forward reference */
NodeRegion *extFindNodes(CellDef *def, Rect *clipArea, bool subonly); /* Forward reference */
nwarn = 0;
@ -201,12 +201,13 @@ extUniqueCell(def, option)
}
int
extMakeUnique(def, ll, lreg, lregList, labelHash, option)
CellDef *def;
LabelList *ll;
LabRegion *lreg, *lregList;
HashTable *labelHash;
int option;
extMakeUnique(
CellDef *def,
LabelList *ll,
LabRegion *lreg,
LabRegion *lregList,
HashTable *labelHash,
int option)
{
static char *badmesg =
"Non-global label \"%s\" attached to more than one unconnected node: %s";
@ -366,7 +367,8 @@ makeUnique:
*/
void
ExtRevertUniqueCell(CellDef *def)
ExtRevertUniqueCell(
CellDef *def)
{
Label *lab, *tlab;
char *uptr;

View File

@ -70,8 +70,9 @@ int extHierLabelFunc();
*/
void
extHierCopyLabels(sourceDef, targetDef)
CellDef *sourceDef, *targetDef;
extHierCopyLabels(
CellDef *sourceDef,
CellDef *targetDef)
{
Label *lab, *newlab, *firstLab, *lastLab;
unsigned n;
@ -115,8 +116,8 @@ extHierCopyLabels(sourceDef, targetDef)
*/
void
extHierFreeLabels(def)
CellDef *def;
extHierFreeLabels(
CellDef *def)
{
Label *lab;
@ -156,13 +157,14 @@ extHierFreeLabels(def)
*/
int
extHierYankFunc(use, trans, x, y, hy)
CellUse *use; /* Use that is the root of the subtree being yanked */
Transform *trans; /* Transform from coordinates of use->cu_def to those
extHierYankFunc(
CellUse *use, /* Use that is the root of the subtree being yanked */
Transform *trans, /* Transform from coordinates of use->cu_def to those
* in use->cu_parent, for the array element (x, y).
*/
int x, y; /* Indices of this array element */
HierYank *hy; /* See comments in procedure header */
int x,
int y,
HierYank *hy) /* See comments in procedure header */
{
char labelBuf[4096];
TerminalPath tpath;
@ -201,11 +203,11 @@ extHierYankFunc(use, trans, x, y, hy)
}
int
extHierLabelFunc(scx, label, tpath, targetDef)
SearchContext *scx;
Label *label;
TerminalPath *tpath;
CellDef *targetDef;
extHierLabelFunc(
SearchContext *scx,
Label *label,
TerminalPath *tpath,
CellDef *targetDef)
{
char *srcp, *dstp;
Label *newlab;

View File

@ -93,12 +93,12 @@ extern bool ExtTechLine();
extern void ExtTechInit();
extern void ExtTechFinal();
extern void ExtSetStyle();
extern void ExtPrintStyle();
extern void ExtPrintStyle(bool dolist, bool doforall, bool docurrent);
extern void ExtSetPath();
extern void ExtPrintPath();
extern void ExtPrintPath(bool dolist);
extern void ExtRevertSubstrate();
extern Plane *ExtCell();
extern void ExtractOneCell();
extern Plane *ExtCell(CellDef *def, char *outName, bool isTop);
extern void ExtractOneCell(CellDef *def, char *outName, bool doLength);
extern int ExtGetGateTypesMask();
extern int ExtGetDiffTypesMask();

View File

@ -1087,7 +1087,7 @@ extern Tile *extNodeToTile();
extern char *extNodeName();
extern NodeRegion *extBasic();
extern NodeRegion *extFindNodes();
extern NodeRegion *extFindNodes(CellDef *def, Rect *clipArea, bool subonly);
extern ExtTree *extHierNewOne();
extern int extNbrPushFunc();
extern TileType extGetDevType();
@ -1116,12 +1116,12 @@ extern void ExtFindInteractions();
extern void ExtInterCount();
extern void ExtInterCount();
extern void ExtTimes();
extern void ExtParentArea();
extern void ExtParentArea(CellUse *use, Rect *changedArea, bool doExtract);
extern void extHierCopyLabels();
extern int extTimesInitFunc();
extern int extTimesHierFunc();
extern int extTimesFlatFunc();
extern Plane *extCellFile();
extern Plane *extCellFile(CellDef *def, FILE *f, bool isTop);
extern int extInterAreaFunc();
extern int extTreeSrPaintArea();
extern int extMakeUnique();

View File

@ -154,9 +154,9 @@ GAClearChannels()
*/
bool
GADefineChannel(chanType, r)
int chanType;
Rect *r;
GADefineChannel(
int chanType,
Rect *r)
{
int length, width, halfGrid = RtrGridSpacing / 2;
GCRChannel *ch;
@ -257,10 +257,10 @@ GADefineChannel(chanType, r)
*/
void
gaChannelInit(list, routeUse, netList)
GCRChannel *list; /* List of channels to process */
CellUse *routeUse; /* Cell being routed (searched for obstacles) */
NLNetList *netList; /* Netlist being routed */
gaChannelInit(
GCRChannel *list, /* List of channels to process */
CellUse *routeUse, /* Cell being routed (searched for obstacles) */
NLNetList *netList) /* Netlist being routed */
{
GCRChannel *ch;
@ -356,8 +356,8 @@ gaChannelInit(list, routeUse, netList)
}
void
gaChannelStats(list)
GCRChannel *list;
gaChannelStats(
GCRChannel *list)
{
GCRChannel *ch;
int *tot, *clear, numTot, numClear;
@ -407,10 +407,11 @@ gaChannelStats(list)
}
void
gaPinStats(pins, nPins, pTot, pClear)
GCRPin *pins;
int nPins;
int *pTot, *pClear;
gaPinStats(
GCRPin *pins,
int nPins,
int *pTot,
int *pClear)
{
GCRPin *pin, *pend;
@ -449,8 +450,8 @@ gaPinStats(pins, nPins, pTot, pClear)
*/
void
gaPropagateBlockages(list)
GCRChannel *list;
gaPropagateBlockages(
GCRChannel *list)
{
GCRChannel *ch;
bool changed;
@ -482,10 +483,10 @@ gaPropagateBlockages(list)
*/
int
gaSetClient(tile, dinfo, cdata)
Tile *tile;
TileType dinfo; /* (unused) */
ClientData cdata;
gaSetClient(
Tile *tile,
TileType dinfo, /* (unused) */
ClientData cdata)
{
tile->ti_client = (ClientData) cdata;
return (0);
@ -512,10 +513,10 @@ gaSetClient(tile, dinfo, cdata)
*/
int
gaSplitTile(tile, dinfo, r)
Tile *tile;
TileType dinfo; /* (unused) */
Rect *r;
gaSplitTile(
Tile *tile,
TileType dinfo, /* (unused) */
Rect *r)
{
Tile *tp;
ASSERT(TiGetType(tile) == TT_SPACE, "gaSplitTile");
@ -574,9 +575,9 @@ gaSplitTile(tile, dinfo, r)
*/
void
gaInitRiverBlockages(routeUse, ch)
CellUse *routeUse;
GCRChannel *ch;
gaInitRiverBlockages(
CellUse *routeUse,
GCRChannel *ch)
{
GCRPin *p1, *p2;
int n, nPins, coord;
@ -634,7 +635,10 @@ gaInitRiverBlockages(routeUse, ch)
}
int
gaAlwaysOne(Tile *tile, TileType dinfo, ClientData clientdata)
gaAlwaysOne(
Tile *tile,
TileType dinfo,
ClientData clientdata)
{
return (1);
}

View File

@ -258,9 +258,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
int
GARouteCmd(routeUse, netListName)
CellUse *routeUse;
char *netListName;
GARouteCmd(
CellUse *routeUse,
char *netListName)
{
int errs = -1;
NLNetList netList;
@ -329,10 +329,10 @@ done:
*/
int
GARoute(list, routeUse, netList)
GCRChannel *list; /* List of channels */
CellUse *routeUse; /* Cell being routed */
NLNetList *netList; /* List of nets to route */
GARoute(
GCRChannel *list, /* List of channels */
CellUse *routeUse, /* Cell being routed */
NLNetList *netList) /* List of nets to route */
{
int feedCount = DBWFeedbackCount, errs;
GCRChannel *ch;
@ -432,10 +432,10 @@ done:
*/
int
gaBuildNetList(netListName, routeUse, netList)
char *netListName;
CellUse *routeUse;
NLNetList *netList;
gaBuildNetList(
char *netListName,
CellUse *routeUse,
NLNetList *netList)
{
CellDef *routeDef = routeUse->cu_def;
int numNets;

View File

@ -84,12 +84,12 @@ extern int gaContactClear;
*/
bool
gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple)
CellUse *routeUse; /* Search this cell for obstacles */
NLTermLoc *term; /* Route from term->nloc_rect */
Point *pinPoint; /* Crossing point to reach */
int pinSide; /* Direction of pin from term. */
SimpleStem *simple; /* Fill this in */
gaStemSimpleInit(
CellUse *routeUse, /* Search this cell for obstacles */
NLTermLoc *term, /* Route from term->nloc_rect */
Point *pinPoint, /* Crossing point to reach */
int pinSide, /* Direction of pin from term. */
SimpleStem *simple) /* Fill this in */
{
SimpleWire *sMetal = &simple->ss_metalWire;
@ -530,10 +530,10 @@ gaStemSimpleInit(routeUse, term, pinPoint, pinSide, simple)
*/
bool
gaIsClear(use, r, mask)
CellUse *use;
Rect *r;
TileTypeBitMask *mask;
gaIsClear(
CellUse *use,
Rect *r,
TileTypeBitMask *mask)
{
int gaIsClearFunc();
SearchContext scx;
@ -572,10 +572,10 @@ gaIsClear(use, r, mask)
*/
int
gaIsClearFunc(tile, dinfo, cxp)
Tile *tile;
TileType dinfo;
TreeContext *cxp;
gaIsClearFunc(
Tile *tile,
TileType dinfo,
TreeContext *cxp)
{
return 1;
}
@ -600,10 +600,10 @@ gaIsClearFunc(tile, dinfo, cxp)
*/
bool
gaStemSimpleRoute(simple, pinLayer, def)
SimpleStem *simple; /* Describes the route */
TileType pinLayer; /* Connect to pin on this layer */
CellDef *def; /* If non-NULL, paint to this def */
gaStemSimpleRoute(
SimpleStem *simple, /* Describes the route */
TileType pinLayer, /* Connect to pin on this layer */
CellDef *def) /* If non-NULL, paint to this def */
{
SimpleWire *wPin, *wOther;

View File

@ -83,12 +83,12 @@ int gaNumSimplePaint, gaNumMazePaint, gaNumExtPaint;
/* Forward declarations */
int gaStemContainingChannelFunc();
bool gaStemAssign();
bool gaStemAssign(CellUse *routeUse, bool doWarn, NLTermLoc *loc, NLTerm *term, NLNet *net, NLNetList *netList);
int gaStemGridRange();
void gaStemPaint();
bool gaStemNetClear();
bool gaStemInternalFunc();
bool gaStemInternal();
bool gaStemInternal(CellUse *routeUse, bool doWarn, NLTermLoc *loc, NLNet *net, GCRChannel *ch, NLNetList *netList);
bool gaStemGrow();
@ -120,9 +120,9 @@ bool gaStemGrow();
*/
void
gaStemAssignAll(routeUse, netList)
CellUse *routeUse;
NLNetList *netList;
gaStemAssignAll(
CellUse *routeUse,
NLNetList *netList)
{
TileType t;
@ -165,7 +165,7 @@ gaStemAssignAll(routeUse, netList)
gaMaxBelow = RtrContactOffset;
/* Assign the stems (gaStemAssign() does the real work) */
RtrStemProcessAll(routeUse, netList, GAStemWarn, gaStemAssign);
RtrStemProcessAll(routeUse, netList, GAStemWarn, (bool (*)()) gaStemAssign);
if (DebugIsSet(gaDebugID, gaDebVerbose))
{
@ -206,13 +206,13 @@ gaStemAssignAll(routeUse, netList)
*/
bool
gaStemAssign(routeUse, doWarn, loc, term, net, netList)
CellUse *routeUse; /* Cell being routed */
bool doWarn; /* If TRUE, leave feedback for each error */
NLTermLoc *loc; /* Location considered */
NLTerm *term; /* Terminal of which loc is a location */
NLNet *net; /* Net to which it belongs */
NLNetList *netList; /* Netlist (searched for blocking terminals) */
gaStemAssign(
CellUse *routeUse, /* Cell being routed */
bool doWarn, /* If TRUE, leave feedback for each error */
NLTermLoc *loc, /* Location considered */
NLTerm *term, /* Terminal of which loc is a location */
NLNet *net, /* Net to which it belongs */
NLNetList *netList) /* Netlist (searched for blocking terminals) */
{
GCRChannel *ch;
@ -276,10 +276,10 @@ fail:
*/
GCRChannel *
gaStemContainingChannel(routeUse, doWarn, loc)
CellUse *routeUse; /* For errors */
bool doWarn; /* If TRUE, leave feedback if error */
NLTermLoc *loc; /* Find a channel for this terminal */
gaStemContainingChannel(
CellUse *routeUse, /* For errors */
bool doWarn, /* If TRUE, leave feedback if error */
NLTermLoc *loc) /* Find a channel for this terminal */
{
GCRChannel *ch;
Rect area;
@ -342,10 +342,10 @@ overlap:
*/
int
gaStemContainingChannelFunc(tile, dinfo, pCh)
Tile *tile;
TileType dinfo; /* (unused) */
GCRChannel **pCh;
gaStemContainingChannelFunc(
Tile *tile,
TileType dinfo, /* (unused) */
GCRChannel **pCh)
{
GCRChannel *ch;
@ -386,8 +386,8 @@ gaStemContainingChannelFunc(tile, dinfo, pCh)
*/
bool
gaStemGrow(area)
Rect *area;
gaStemGrow(
Rect *area)
{
Rect r;
GCRChannel *ch;
@ -445,13 +445,13 @@ gaStemGrow(area)
*/
bool
gaStemInternal(routeUse, doWarn, loc, net, ch, netList)
CellUse *routeUse; /* Cell being routed */
bool doWarn; /* If TRUE, leave feedback on all errors */
NLTermLoc *loc; /* Terminal being processed */
NLNet *net; /* Used for marking pins */
GCRChannel *ch; /* Channel containing loc */
NLNetList *netList; /* Netlist (searched for blocking terminals) */
gaStemInternal(
CellUse *routeUse, /* Cell being routed */
bool doWarn, /* If TRUE, leave feedback on all errors */
NLTermLoc *loc, /* Terminal being processed */
NLNet *net, /* Used for marking pins */
GCRChannel *ch, /* Channel containing loc */
NLNetList *netList) /* Netlist (searched for blocking terminals) */
{
int min, max, start, lo, hi;
@ -519,13 +519,13 @@ gaStemInternal(routeUse, doWarn, loc, net, ch, netList)
*/
bool
gaStemInternalFunc(routeUse, loc, net, ch, gridLine, netList)
CellUse *routeUse;
NLTermLoc *loc;
NLNet *net;
GCRChannel *ch;
int gridLine;
NLNetList *netList;
gaStemInternalFunc(
CellUse *routeUse,
NLTermLoc *loc,
NLNet *net,
GCRChannel *ch,
int gridLine,
NLNetList *netList)
{
GCRPin *pin1, *pin2;
NLTermLoc *loc2;
@ -642,13 +642,13 @@ gaStemInternalFunc(routeUse, loc, net, ch, gridLine, netList)
*/
GCRPin *
gaStemCheckPin(routeUse, terminalLoc, ch, side, gridPoint, netList)
CellUse *routeUse; /* Cell being routed */
NLTermLoc *terminalLoc; /* Terminal */
GCRChannel *ch; /* Channel whose pin we are to use */
int side; /* Direction 'gridPoint' lies relative to 'loc' */
Point *gridPoint; /* Crossing point to use */
NLNetList *netList; /* Searched for obstructing terminals */
gaStemCheckPin(
CellUse *routeUse, /* Cell being routed */
NLTermLoc *terminalLoc, /* Terminal */
GCRChannel *ch, /* Channel whose pin we are to use */
int side, /* Direction 'gridPoint' lies relative to 'loc' */
Point *gridPoint, /* Crossing point to use */
NLNetList *netList) /* Searched for obstructing terminals */
{
TileTypeBitMask destMask;
GCRPin *pin;
@ -785,11 +785,11 @@ hardway:
*/
bool
gaStemNetClear(termArea, point, side, netList)
Rect *termArea; /* Area of the starting terminal */
Point *point; /* Crossing point where we want to end up */
int side; /* Direction of point relative to termArea */
NLNetList *netList; /* Netlist to check for terminals to avoid */
gaStemNetClear(
Rect *termArea, /* Area of the starting terminal */
Point *point, /* Crossing point where we want to end up */
int side, /* Direction of point relative to termArea */
NLNetList *netList) /* Netlist to check for terminals to avoid */
{
int min, max, start, type, grid;
NLTermLoc *loc;
@ -883,10 +883,12 @@ gaStemNetClear(termArea, point, side, netList)
*/
int
gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart)
int type;
Rect *r;
int *pMinGrid, *pMaxGrid, *pStart;
gaStemGridRange(
int type,
Rect *r,
int *pMinGrid,
int *pMaxGrid,
int *pStart)
{
int min, max, start;
@ -948,9 +950,9 @@ gaStemGridRange(type, r, pMinGrid, pMaxGrid, pStart)
*/
void
gaStemPaintAll(routeUse, netList)
CellUse *routeUse;
NLNetList *netList;
gaStemPaintAll(
CellUse *routeUse,
NLNetList *netList)
{
NLTermLoc *loc;
NLTerm *term;
@ -1008,9 +1010,9 @@ out:
*/
void
gaStemPaint(routeUse, terminalLoc)
CellUse *routeUse;
NLTermLoc *terminalLoc;
gaStemPaint(
CellUse *routeUse,
NLTermLoc *terminalLoc)
{
TileTypeBitMask terminalLayerMask; /* Possible layers for stem at
terminal */

View File

@ -87,9 +87,9 @@ void GAInit();
*/
void
GATest(w, cmd)
MagWindow *w;
TxCommand *cmd;
GATest(
MagWindow *w,
TxCommand *cmd)
{
int n;
typedef enum { CLRDEBUG, SETDEBUG, SHOWDEBUG} cmdType;
@ -159,12 +159,12 @@ badCmd:
*/
void
GAGenChans(chanType, area, f)
int chanType;
Rect *area;
FILE *f;
GAGenChans(
int chanType,
Rect *area,
FILE *f)
{
extern int DBPaintPlane0(), DBPaintPlaneVert();
extern int DBPaintPlane0(Plane *plane, Rect *area, const PaintResultType *resultTbl, PaintUndoInfo *undo, unsigned char method), DBPaintPlaneVert();
int gaSplitFunc(), gaSplitOut();
static CellDef *genDef = (CellDef *) NULL;
static CellUse *genUse = (CellUse *) NULL;
@ -185,7 +185,7 @@ GAGenChans(chanType, area, f)
switch (chanType)
{
case CHAN_HRIVER:
gaSplitPaintPlane = DBPaintPlane0;
gaSplitPaintPlane = (int (*)()) DBPaintPlane0;
area->r_ytop = RTR_GRIDDOWN(area->r_ytop - halfUp, RtrOrigin.p_y)
+ halfUp;
area->r_ybot = RTR_GRIDUP(area->r_ybot + halfDown, RtrOrigin.p_y)
@ -254,10 +254,10 @@ GAGenChans(chanType, area, f)
*/
int
gaSplitOut(tile, dinfo, f)
Tile *tile;
TileType dinfo; /* (unused) */
FILE *f;
gaSplitOut(
Tile *tile,
TileType dinfo, /* (unused) */
FILE *f)
{
Rect r;
@ -303,9 +303,9 @@ gaSplitOut(tile, dinfo, f)
*/
int
gaSplitFunc(scx, plane)
SearchContext *scx;
Plane *plane;
gaSplitFunc(
SearchContext *scx,
Plane *plane)
{
int halfUp, halfDown;
CellDef *def = scx->scx_use->cu_def;

View File

@ -86,7 +86,7 @@ extern ClientData gaDebugID; /* Our identity with the debugging module */
#include "gaDebug.h" /* Can add flags without total recompile */
/* Internal procedures */
extern GCRChannel *gaStemContainingChannel();
extern GCRChannel *gaStemContainingChannel(CellUse *routeUse, bool doWarn, NLTermLoc *loc);
extern GCRPin *gaStemCheckPin();
extern int gaAlwaysOne();
extern bool gaMazeRoute(CellUse *routeUse, NLTermLoc *terminalLoc, Point *pinPoint,

View File

@ -358,12 +358,12 @@ extern void gcrCheckCol();
extern int gcrClass();
extern void gcrCollapse();
extern int gcrDensity();
extern void gcrDumpResult();
extern void gcrDumpResult(GCRChannel *ch, bool showResult);
extern void gcrFeasible();
extern void gcrInitCol();
extern void gcrInitCollapse();
extern int gcrLook();
extern void gcrMakeRuns();
extern int gcrLook(GCRChannel * ch, int track, bool canCover);
extern void gcrMakeRuns(GCRChannel * ch, int column, GCRNet ** list, int count, bool riseFall);
extern void gcrMarkWanted();
extern void gcrPickBest();
extern void gcrPrintCol();
@ -372,7 +372,7 @@ extern void gcrReduceRange();
extern bool gcrRiverRoute();
extern void gcrSetEndDist();
extern void gcrSetFlags();
extern void gcrShellSort();
extern void gcrShellSort(GCRNet **v, int n, bool isUp);
extern int gcrTryRun();
extern void gcrUncollapse();
extern void gcrVacate();

View File

@ -60,12 +60,12 @@ void gcrEvalPat();
*/
void
gcrCollapse(col, width, bot, top, freed)
GCRColEl ** col;
int width;
int bot;
int top;
int freed;
gcrCollapse(
GCRColEl ** col,
int width,
int bot,
int top,
int freed)
{
int i, to;
GCRNet * net;
@ -139,8 +139,8 @@ gcrCollapse(col, width, bot, top, freed)
*/
void
gcrInitCollapse(size)
int size; /* Number of tracks in column. */
gcrInitCollapse(
int size) /* Number of tracks in column. */
{
gcrBestFreed = 0;
gcrSplitNets = -1;
@ -176,12 +176,12 @@ gcrInitCollapse(size)
*/
void
gcrEvalPat(col, freed, size)
GCRColEl ** col; /* Describes column in which to collapse. */
int freed; /* We've already found a set of collapsing
gcrEvalPat(
GCRColEl ** col, /* Describes column in which to collapse. */
int freed, /* We've already found a set of collapsing
* jogs that frees at least this many tracks.
*/
int size; /* Number of tracks in column. */
int size) /* Number of tracks in column. */
{
int i, n, newDist, oldWiring, newWiring;
@ -266,10 +266,10 @@ gcrEvalPat(col, freed, size)
*/
int
gcrNextSplit(col, size, i)
GCRColEl * col;
int size;
int i;
gcrNextSplit(
GCRColEl * col,
int size,
int i)
{
for(i++; i<size/2; i++)
if( ((col[i].gcr_hi!= EMPTY)&&(col[i].gcr_lo== EMPTY)) ||
@ -294,8 +294,8 @@ gcrNextSplit(col, size, i)
*/
void
gcrPickBest(ch)
GCRChannel * ch;
gcrPickBest(
GCRChannel * ch)
{
ASSERT(gcrBestCol!=(GCRColEl *) NULL, "gcrPickBest");
ASSERT(ch->gcr_lCol==(GCRColEl *) NULL, "gcrPickBest");
@ -321,9 +321,9 @@ gcrPickBest(ch)
*/
void
gcrReduceRange(col, width)
GCRColEl * col;
int width;
gcrReduceRange(
GCRColEl * col,
int width)
{
int i, j;
int farthest;

View File

@ -41,7 +41,7 @@ bool GcrShowMap = FALSE;
int gcrStandalone=FALSE; /*Flag to control standalone/integrated operation*/
/* Forward declarations */
void gcrDumpResult();
void gcrDumpResult(GCRChannel *ch, bool showResult);
void gcrStats();
void gcrShowMap();
bool gcrMakeChannel();
@ -67,8 +67,8 @@ void gcrPrintCol(GCRChannel *, int, int);
*/
GCRChannel *
GCRRouteFromFile(fname)
char *fname;
GCRRouteFromFile(
char *fname)
{
static Point initOrigin = { 0, 0 };
struct tms tbuf1, tbuf2;
@ -131,9 +131,9 @@ GCRRouteFromFile(fname)
*/
bool
gcrMakeChannel(ch, fp)
GCRChannel *ch;
FILE *fp;
gcrMakeChannel(
GCRChannel *ch,
FILE *fp)
{
GCRPin *gcrMakePinLR();
unsigned lenWds, widWds;
@ -238,9 +238,10 @@ gcrMakeChannel(ch, fp)
}
GCRPin *
gcrMakePinLR(fp, x, size)
FILE *fp;
int x, size;
gcrMakePinLR(
FILE *fp,
int x,
int size)
{
GCRPin *result;
int i;
@ -281,8 +282,8 @@ gcrMakePinLR(fp, x, size)
*/
void
gcrSaveChannel(ch)
GCRChannel *ch;
gcrSaveChannel(
GCRChannel *ch)
{
FILE *fp;
char name[128];
@ -367,9 +368,9 @@ gcrSaveChannel(ch)
*/
void
gcrPrDensity(ch, chanDensity)
GCRChannel *ch;
int chanDensity;
gcrPrDensity(
GCRChannel *ch,
int chanDensity)
{
int i, diff;
char name[256];
@ -444,8 +445,8 @@ gcrPrDensity(ch, chanDensity)
*/
void
gcrDumpPins(ch)
GCRChannel *ch;
gcrDumpPins(
GCRChannel *ch)
{
int i;
GCRPin * pinArray;
@ -501,9 +502,9 @@ gcrDumpPins(ch)
*/
void
gcrDumpPinList(pin, dir)
GCRPin *pin;
bool dir;
gcrDumpPinList(
GCRPin *pin,
bool dir)
{
if (pin)
{
@ -532,9 +533,9 @@ gcrDumpPinList(pin, dir)
*/
void
gcrDumpCol(col, size)
GCRColEl *col;
int size;
gcrDumpCol(
GCRColEl *col,
int size)
{
int i;
@ -566,9 +567,9 @@ gcrDumpCol(col, size)
*/
void
gcrDumpResult(ch, showResult)
GCRChannel *ch;
bool showResult;
gcrDumpResult(
GCRChannel *ch,
bool showResult)
{
int j;
@ -791,8 +792,8 @@ void gcrPrintCol(ch, i, showResult)
*/
void
gcrStats(ch)
GCRChannel * ch;
gcrStats(
GCRChannel * ch)
{
int wireLength=0, viaCount=0, row, col;
short **res, mask, code, code2;
@ -872,10 +873,10 @@ gcrStats(ch)
*/
void
gcrCheckCol(ch, c, where)
GCRChannel *ch;
int c;
char *where;
gcrCheckCol(
GCRChannel *ch,
int c,
char *where)
{
int i, j;
GCRColEl * col;
@ -965,8 +966,8 @@ gcrCheckCol(ch, c, where)
*/
void
gcrShowMap(ch)
GCRChannel * ch;
gcrShowMap(
GCRChannel * ch)
{
int i, j, field;
short ** res;

View File

@ -47,9 +47,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
*/
void
gcrWanted(ch, track, column)
GCRChannel *ch;
int track, column;
gcrWanted(
GCRChannel *ch,
int track,
int column)
{
GCRColEl *col = ch->gcr_lCol;
GCRPin *pin, *next;
@ -99,8 +100,8 @@ gcrWanted(ch, track, column)
*/
void
gcrMarkWanted(ch)
GCRChannel *ch;
gcrMarkWanted(
GCRChannel *ch)
{
GCRColEl *col = ch->gcr_lCol;
GCRPin *pin = ch->gcr_rPins;
@ -133,12 +134,13 @@ gcrMarkWanted(ch)
*/
void
gcrUncollapse(ch, col, width, bot, top, split)
GCRChannel *ch; /* Channel being processed */
GCRColEl **col;
int width; /* Size of array pointed to by *col */
int bot, top; /* Consider tracks between bot .. top inclusive */
int split; /* Somewhere between 0 and width inclusive */
gcrUncollapse(
GCRChannel *ch, /* Channel being processed */
GCRColEl **col,
int width, /* Size of array pointed to by *col */
int bot,
int top,
int split) /* Somewhere between 0 and width inclusive */
{
int i, to, type, extra, flags;
GCRColEl *newCol, *gcrCopyCol();

View File

@ -69,8 +69,8 @@ void gcrLinkPin();
*/
void
gcrSetEndDist(ch)
GCRChannel *ch; /* The channel to be routed */
gcrSetEndDist(
GCRChannel *ch) /* The channel to be routed */
{
int rightTotal, multiTotal;
GCRNet *net;
@ -118,8 +118,8 @@ gcrSetEndDist(ch)
*/
void
gcrBuildNets(ch)
GCRChannel * ch;
gcrBuildNets(
GCRChannel * ch)
{
HashTable ht;
int i;
@ -165,10 +165,10 @@ gcrBuildNets(ch)
*/
void
gcrLinkPin(pin, ht, ch)
GCRPin *pin;
HashTable *ht;
GCRChannel *ch;
gcrLinkPin(
GCRPin *pin,
HashTable *ht,
GCRChannel *ch)
{
GCRNet *net;
GCRNet *gcrNewNet();
@ -231,8 +231,8 @@ gcrLinkPin(pin, ht, ch)
*/
void
gcrUnlinkPin(pin)
GCRPin *pin;
gcrUnlinkPin(
GCRPin *pin)
{
GCRNet *net;
@ -268,8 +268,8 @@ gcrUnlinkPin(pin)
*/
int
gcrDensity(ch)
GCRChannel *ch;
gcrDensity(
GCRChannel *ch)
{
int density, i, last, maxVal;
unsigned lenWds;
@ -340,9 +340,9 @@ gcrDensity(ch)
*/
void
gcrInitCol(ch, edgeArray)
GCRChannel *ch;
GCRPin *edgeArray; /* Nets at left edge of channel if non-NULL */
gcrInitCol(
GCRChannel *ch,
GCRPin *edgeArray) /* Nets at left edge of channel if non-NULL */
{
GCRNet *net;
GCRColEl *col;

View File

@ -49,14 +49,14 @@ void gcrUnlinkTrack();
*/
bool
gcrBlocked(col, i, net, last)
GCRColEl *col; /* Current column information */
int i; /* Which element */
GCRNet *net; /* Net we're interested in processing: locations
gcrBlocked(
GCRColEl *col, /* Current column information */
int i, /* Which element */
GCRNet *net, /* Net we're interested in processing: locations
* that already contain this net aren't considered
* to be blocked; all others are.
*/
int last;
int last)
{
GCRColEl *colptr = &col[i];
@ -100,11 +100,11 @@ gcrBlocked(col, i, net, last)
*/
void
gcrMoveTrack(column, net, from, to)
GCRColEl * column;
GCRNet * net; /* Net to be assigned to a track */
int from;
int to;
gcrMoveTrack(
GCRColEl * column,
GCRNet * net, /* Net to be assigned to a track */
int from,
int to)
{
int i, last;
@ -261,9 +261,9 @@ gcrMoveTrack(column, net, from, to)
*/
void
gcrUnlinkTrack(col, toUnlink)
GCRColEl *col;
int toUnlink;
gcrUnlinkTrack(
GCRColEl *col,
int toUnlink)
{
GCRColEl *colPtr = &col[toUnlink];
@ -293,10 +293,10 @@ gcrUnlinkTrack(col, toUnlink)
*/
void
gcrShellSort(v, n, isUp)
GCRNet **v;
int n;
bool isUp;
gcrShellSort(
GCRNet **v,
int n,
bool isUp)
{
int gap, i, j, a1, a2;
GCRNet * net;
@ -343,10 +343,10 @@ gcrShellSort(v, n, isUp)
*/
bool
gcrVertClear(col, from, to)
GCRColEl * col;
int from;
int to;
gcrVertClear(
GCRColEl * col,
int from,
int to)
{
int i, flags;
GCRNet * net;
@ -393,9 +393,9 @@ gcrVertClear(col, from, to)
*/
GCRColEl *
gcrCopyCol(col, size)
GCRColEl *col;
int size;
gcrCopyCol(
GCRColEl *col,
int size)
{
GCRColEl * result;
int i, limit;
@ -425,10 +425,11 @@ gcrCopyCol(col, size)
*/
void
gcrLinkTrack(col, net, track, width)
GCRColEl *col;
GCRNet *net;
int track, width;
gcrLinkTrack(
GCRColEl *col,
GCRNet *net,
int track,
int width)
{
int i;

View File

@ -54,8 +54,8 @@ bool gcrOverCellHoriz();
*/
bool
gcrRiverRoute(ch)
GCRChannel *ch;
gcrRiverRoute(
GCRChannel *ch)
{
switch (ch->gcr_type)
{
@ -99,8 +99,8 @@ gcrRiverRoute(ch)
((pin)->gcr_pId != (GCRNet *) 0 && (pin)->gcr_pId != (GCRNet *) -1)
bool
gcrOverCellHoriz(ch)
GCRChannel *ch;
gcrOverCellHoriz(
GCRChannel *ch)
{
short **result = ch->gcr_result;
int col, row;
@ -139,8 +139,8 @@ gcrOverCellHoriz(ch)
}
bool
gcrOverCellVert(ch)
GCRChannel *ch;
gcrOverCellVert(
GCRChannel *ch)
{
short **result = ch->gcr_result;
int col, row;

View File

@ -62,8 +62,8 @@ void gcrExtend();
*/
int
GCRroute(ch)
GCRChannel *ch;
GCRroute(
GCRChannel *ch)
{
int i, density, netId;
char mesg[256];
@ -154,9 +154,9 @@ bottom:
*/
void
gcrRouteCol(ch, indx)
GCRChannel *ch;
int indx; /* Index of column being routed. */
gcrRouteCol(
GCRChannel *ch,
int indx) /* Index of column being routed. */
{
GCRNet **gcrClassify(), **list;
GCRColEl *col;
@ -228,9 +228,9 @@ gcrRouteCol(ch, indx)
*/
void
gcrExtend(ch, currentCol)
GCRChannel *ch; /* Channel being routed */
int currentCol; /* Column that has just been completed */
gcrExtend(
GCRChannel *ch, /* Channel being routed */
int currentCol) /* Column that has just been completed */
{
short *res = ch->gcr_result[currentCol];
GCRColEl *col = ch->gcr_lCol;

View File

@ -88,9 +88,9 @@ CellDef * gcrShowCell = (CellDef *) NULL;
*/
void
GCRShow(point, arg)
Point * point;
char * arg;
GCRShow(
Point * point,
char * arg)
{
GCRChannel * ch;
HashEntry * he;
@ -200,8 +200,8 @@ GCRShow(point, arg)
*/
void
gcrDumpChannel(ch)
GCRChannel * ch;
gcrDumpChannel(
GCRChannel * ch)
{
char name[32];
int track, col, netCount = 0, gcrNetName();
@ -255,10 +255,10 @@ gcrDumpChannel(ch)
}
int
gcrNetName(netNames, netCount, net)
GCRNet * netNames[];
int * netCount;
GCRNet * net;
gcrNetName(
GCRNet * netNames[],
int * netCount,
GCRNet * net)
{
int i;
for(i=0; i<= *netCount; i++)

View File

@ -32,7 +32,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
/* Forward declarations */
void gcrMakeRuns();
void gcrMakeRuns(GCRChannel * ch, int column, GCRNet ** list, int count, bool riseFall);
/*
@ -56,9 +56,9 @@ void gcrMakeRuns();
*/
void
gcrVacate(ch, column)
GCRChannel * ch;
int column;
gcrVacate(
GCRChannel * ch,
int column)
{
int i;
int to, count, gcrIsGreater();
@ -142,10 +142,10 @@ gcrVacate(ch, column)
*/
int
gcrLook(ch, track, canCover)
GCRChannel * ch;
int track;
bool canCover;
gcrLook(
GCRChannel * ch,
int track,
bool canCover)
{
int up, dn, dir, bestUp= EMPTY, bestDn= EMPTY, uplim, dnlim;
int target, upLength, dnLength;
@ -273,9 +273,9 @@ gcrLook(ch, track, canCover)
*/
GCRNet **
gcrClassify(ch, count)
GCRChannel * ch;
int * count;
gcrClassify(
GCRChannel * ch,
int * count)
{
GCRColEl * col;
GCRPin * pin, * next;
@ -355,9 +355,10 @@ gcrClassify(ch, count)
*/
int
gcrRealDist(col, i, dist)
GCRColEl * col;
int i, dist;
gcrRealDist(
GCRColEl * col,
int i,
int dist)
{
int j, last;
GCRNet * net=col[i].gcr_h;
@ -388,9 +389,9 @@ gcrRealDist(col, i, dist)
*/
int
gcrClass(net, track)
GCRNet * net;
int track;
gcrClass(
GCRNet * net,
int track)
{
GCRPin * pin, * next;
int dist;
@ -446,12 +447,12 @@ gcrClass(net, track)
*/
void
gcrMakeRuns(ch, column, list, count, riseFall)
GCRChannel * ch;
int column;
GCRNet ** list;
int count;
bool riseFall;
gcrMakeRuns(
GCRChannel * ch,
int column,
GCRNet ** list,
int count,
bool riseFall)
{
int j, from, to, runTo;
int distToTarget;
@ -526,10 +527,12 @@ gcrMakeRuns(ch, column, list, count, riseFall)
*/
int
gcrTryRun(ch, net, from, to, column)
GCRChannel * ch;
GCRNet * net;
int from, to, column;
gcrTryRun(
GCRChannel * ch,
GCRNet * net,
int from,
int to,
int column)
{
GCRColEl * col;
GCRNet * vnet, * hnet;

View File

@ -84,16 +84,16 @@ bool W3Ddelete();
/* ------------------------Low-Level Routines--------------------------------- */
void
w3dLock(w)
MagWindow *w;
w3dLock(
MagWindow *w)
{
grSimpleLock(w, TRUE);
w3dSetProjection(w);
}
void
w3dUnlock(w)
MagWindow *w;
w3dUnlock(
MagWindow *w)
{
glFlush();
glFinish();
@ -111,11 +111,11 @@ w3dUnlock(w)
/* -------------------Low-Level Drawing Routines------------------------------ */
void
w3dFillEdge(bbox, r, ztop, zbot)
Rect *bbox; /* tile bounding box */
Rect *r;
float ztop;
float zbot;
w3dFillEdge(
Rect *bbox, /* tile bounding box */
Rect *r,
float ztop,
float zbot)
{
float ztmp;
float xbot = (float)r->r_xbot;
@ -142,11 +142,11 @@ w3dFillEdge(bbox, r, ztop, zbot)
}
void
w3dFillPolygon(p, np, zval, istop)
Point *p;
int np;
float zval;
bool istop;
w3dFillPolygon(
Point *p,
int np,
float zval,
bool istop)
{
int i;
@ -162,10 +162,10 @@ w3dFillPolygon(p, np, zval, istop)
}
void
w3dFillTile(r, zval, istop)
Rect *r;
float zval;
bool istop;
w3dFillTile(
Rect *r,
float zval,
bool istop)
{
float xbot, ybot, xtop, ytop;
@ -192,8 +192,12 @@ w3dFillTile(r, zval, istop)
}
void
w3dFillXSide(xstart, xend, yval, ztop, zbot)
float xstart, xend, yval, ztop, zbot;
w3dFillXSide(
float xstart,
float xend,
float yval,
float ztop,
float zbot)
{
glBegin(GL_POLYGON);
glVertex3f(xstart, yval, zbot);
@ -204,8 +208,12 @@ w3dFillXSide(xstart, xend, yval, ztop, zbot)
}
void
w3dFillYSide(xval, ystart, yend, ztop, zbot)
float xval, ystart, yend, ztop, zbot;
w3dFillYSide(
float xval,
float ystart,
float yend,
float ztop,
float zbot)
{
glBegin(GL_POLYGON);
glVertex3f(xval, ystart, zbot);
@ -219,8 +227,13 @@ w3dFillYSide(xval, ystart, yend, ztop, zbot)
/* counterclockwise direction with respect to the tile interior. */
void
w3dFillDiagonal(x1, y1, x2, y2, ztop, zbot)
float x1, y1, x2, y2, ztop, zbot;
w3dFillDiagonal(
float x1,
float y1,
float x2,
float y2,
float ztop,
float zbot)
{
glBegin(GL_POLYGON);
glVertex3f(x1, y1, zbot);
@ -231,13 +244,13 @@ w3dFillDiagonal(x1, y1, x2, y2, ztop, zbot)
}
void
w3dFillOps(trans, tile, dinfo, cliprect, ztop, zbot)
Transform *trans;
Tile *tile;
TileType dinfo;
Rect *cliprect;
float ztop;
float zbot;
w3dFillOps(
Transform *trans,
Tile *tile,
TileType dinfo,
Rect *cliprect,
float ztop,
float zbot)
{
LinkedRect *tilesegs, *segptr;
Rect r, r2;
@ -381,11 +394,11 @@ w3dFillOps(trans, tile, dinfo, cliprect, ztop, zbot)
}
void
w3dRenderVolume(tile, dinfo, trans, cliprect)
Tile *tile;
TileType dinfo;
Transform *trans;
Rect *cliprect;
w3dRenderVolume(
Tile *tile,
TileType dinfo,
Transform *trans,
Rect *cliprect)
{
float zbot, ztop;
float ftop = 0.0, fthk = 0.0;
@ -413,11 +426,11 @@ w3dRenderVolume(tile, dinfo, trans, cliprect)
}
void
w3dRenderCIF(tile, dinfo, layer, trans)
Tile *tile;
TileType dinfo;
CIFLayer *layer;
Transform *trans;
w3dRenderCIF(
Tile *tile,
TileType dinfo,
CIFLayer *layer,
Transform *trans)
{
float zbot, ztop;
float ftop, fthk;
@ -468,8 +481,8 @@ w3dClear()
/* -------------------High-Level Drawing Routines------------------------------ */
void
w3dSetProjection(w)
MagWindow *w;
w3dSetProjection(
MagWindow *w)
{
W3DclientRec *crec;
Window wind;
@ -546,10 +559,10 @@ w3dSetProjection(w)
/* Magic layer tile painting function */
int
w3dPaintFunc(tile, dinfo, cxp)
Tile *tile; /* Tile to be displayed */
TileType dinfo; /* Split tile information */
TreeContext *cxp; /* From DBTreeSrTiles */
w3dPaintFunc(
Tile *tile, /* Tile to be displayed */
TileType dinfo, /* Split tile information */
TreeContext *cxp) /* From DBTreeSrTiles */
{
SearchContext *scx = cxp->tc_scx;
@ -593,10 +606,10 @@ w3dPaintFunc(tile, dinfo, cxp)
/* CIF layer tile painting function */
int
w3dCIFPaintFunc(tile, dinfo, arg)
Tile *tile; /* Tile to be displayed */
TileType dinfo; /* Split tile information */
ClientData *arg; /* is NULL */
w3dCIFPaintFunc(
Tile *tile, /* Tile to be displayed */
TileType dinfo, /* Split tile information */
ClientData *arg) /* is NULL */
{
CIFLayer *layer = (CIFLayer *)arg;
@ -648,9 +661,9 @@ w3dCIFPaintFunc(tile, dinfo, arg)
*/
void
w3dHelp(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dHelp(
MagWindow *w,
TxCommand *cmd)
{
const char * const *msg;
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -679,9 +692,9 @@ w3dHelp(w, cmd)
*/
void
w3dCutBox(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dCutBox(
MagWindow *w,
TxCommand *cmd)
{
bool hide = FALSE;
int lidx = 1, num_layers;
@ -768,9 +781,9 @@ w3dCutBox(w, cmd)
*/
void
w3dSeeLayers(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dSeeLayers(
MagWindow *w,
TxCommand *cmd)
{
bool hide = FALSE;
int lidx = 1, num_layers;
@ -821,9 +834,9 @@ w3dSeeLayers(w, cmd)
*/
void
w3dClose(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dClose(
MagWindow *w,
TxCommand *cmd)
{
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -844,9 +857,9 @@ w3dClose(w, cmd)
*/
void
w3dRescale(crec, scalefactor)
W3DclientRec *crec;
float scalefactor;
w3dRescale(
W3DclientRec *crec,
float scalefactor)
{
crec->scale_xy /= scalefactor;
crec->prescale_z /= scalefactor;
@ -867,9 +880,9 @@ w3dRescale(crec, scalefactor)
*/
void
w3dToggleCIF(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dToggleCIF(
MagWindow *w,
TxCommand *cmd)
{
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -906,9 +919,9 @@ w3dToggleCIF(w, cmd)
*/
void
w3dLevel(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dLevel(
MagWindow *w,
TxCommand *cmd)
{
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -946,8 +959,8 @@ w3dLevel(w, cmd)
*/
void
w3drefreshFunc(mw)
MagWindow *mw;
w3drefreshFunc(
MagWindow *mw)
{
W3DclientRec *crec = (W3DclientRec *) mw->w_clientData;
Rect screenRect;
@ -972,9 +985,9 @@ w3drefreshFunc(mw)
*/
void
w3dDefaults(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dDefaults(
MagWindow *w,
TxCommand *cmd)
{
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -998,9 +1011,9 @@ w3dDefaults(w, cmd)
*/
void
w3dRefresh(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dRefresh(
MagWindow *w,
TxCommand *cmd)
{
W3DclientRec *crec = (W3DclientRec *) w->w_clientData;
@ -1022,9 +1035,9 @@ w3dRefresh(w, cmd)
*/
void
w3dView(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dView(
MagWindow *w,
TxCommand *cmd)
{
bool relative = FALSE;
int argc = cmd->tx_argc;
@ -1094,9 +1107,9 @@ w3dView(w, cmd)
*/
void
w3dScroll(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dScroll(
MagWindow *w,
TxCommand *cmd)
{
bool relative = FALSE;
int argc = cmd->tx_argc;
@ -1167,9 +1180,9 @@ w3dScroll(w, cmd)
*/
void
w3dZoom(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dZoom(
MagWindow *w,
TxCommand *cmd)
{
bool relative = FALSE;
int argc = cmd->tx_argc;
@ -1244,9 +1257,9 @@ w3dZoom(w, cmd)
*/
void
w3dRenderValues(w, cmd)
MagWindow *w;
TxCommand *cmd;
w3dRenderValues(
MagWindow *w,
TxCommand *cmd)
{
int lidx;
CIFLayer *layer;
@ -1329,9 +1342,9 @@ badusage:
*/
void
Set3DDefaults(mw, crec)
MagWindow *mw;
W3DclientRec *crec;
Set3DDefaults(
MagWindow *mw,
W3DclientRec *crec)
{
int height, width;
int centerx, centery;
@ -1399,9 +1412,9 @@ Set3DDefaults(mw, crec)
*/
bool
W3DloadWindow(window, name)
MagWindow *window;
char *name;
W3DloadWindow(
MagWindow *window,
char *name)
{
CellDef *newEditDef;
CellUse *newEditUse;
@ -1444,10 +1457,10 @@ W3DloadWindow(window, name)
*/
bool
W3Dcreate(window, argc, argv)
MagWindow *window;
int argc;
char *argv[];
W3Dcreate(
MagWindow *window,
int argc,
char *argv[])
{
W3DclientRec *crec;
Tk_Window tkwind, tktop;
@ -1614,8 +1627,8 @@ W3Dcreate(window, argc, argv)
*/
bool
W3Ddelete(window)
MagWindow *window;
W3Ddelete(
MagWindow *window)
{
W3DclientRec *cr;
Tk_Window xw;
@ -1647,10 +1660,10 @@ W3Ddelete(window)
*/
void
W3Dredisplay(w, rootArea, clipArea)
MagWindow *w; /* The window containing the area. */
Rect *rootArea; /* Ignore this---area defined by window with box */
Rect *clipArea; /* Ignore this, too */
W3Dredisplay(
MagWindow *w, /* The window containing the area. */
Rect *rootArea, /* Ignore this---area defined by window with box */
Rect *clipArea) /* Ignore this, too */
{
W3DclientRec *crec;
CellDef *cellDef;
@ -1724,10 +1737,10 @@ W3Dredisplay(w, rootArea, clipArea)
*/
void
W3DCIFredisplay(w, rootArea, clipArea)
MagWindow *w; /* The window containing the area. */
Rect *rootArea; /* Ignore this---area defined by window with box */
Rect *clipArea; /* Ignore this, too */
W3DCIFredisplay(
MagWindow *w, /* The window containing the area. */
Rect *rootArea, /* Ignore this---area defined by window with box */
Rect *clipArea) /* Ignore this, too */
{
W3DclientRec *crec;
SearchContext scx;
@ -1801,9 +1814,9 @@ W3DCIFredisplay(w, rootArea, clipArea)
*/
void
W3Dcommand(w, cmd)
MagWindow *w;
TxCommand *cmd;
W3Dcommand(
MagWindow *w,
TxCommand *cmd)
{
int cmdNum;

View File

@ -70,9 +70,9 @@ sigRetVal MapWindow();
#define TIMEOUT 10 /* timeout period (minutes) */
int
main (argc, argv)
int argc;
char **argv;
main(
int argc,
char **argv)
{
XEvent xevent;
@ -126,8 +126,8 @@ main (argc, argv)
*/
void
ParseEvent (event)
XEvent *event;
ParseEvent(
XEvent *event)
{
if (event->type == KeyPress)
{
@ -269,7 +269,8 @@ SetTimeOut()
*/
sigRetVal
TimeOut(int signo)
TimeOut(
int signo)
{
int tmpid;
@ -293,7 +294,8 @@ TimeOut(int signo)
*/
sigRetVal
MapWindow(int signo)
MapWindow(
int signo)
{
Window window;
@ -315,7 +317,9 @@ MapWindow(int signo)
*/
void
sigSetAction(int signo, sigRetVal (*handler)(int))
sigSetAction(
int signo,
sigRetVal (*handler)(int))
{
#if defined(SYSV) || defined(CYGWIN)
struct sigaction sa;

View File

@ -102,11 +102,11 @@ GrResetCMap()
*/
bool
GrReadCMap(techStyle, dispType, monType, path, libPath)
char *techStyle; /* The type of dstyle file requested by
GrReadCMap(
char *techStyle, /* The type of dstyle file requested by
* the current technology.
*/
char *dispType; /* A class of color map files for one or
char *dispType, /* A class of color map files for one or
* more display types. Usually this
* is defaulted to NULL, in which case the
* type required by the current driver is
@ -115,11 +115,11 @@ char *dispType; /* A class of color map files for one or
* needed at all (it's a black-and-white
* display), so nothing is loaded.
*/
char *monType; /* The class of monitors being used. Usually
char *monType, /* The class of monitors being used. Usually
* given as "std".
*/
char *path; /* a search path */
char *libPath; /* a library search path */
char *path, /* a search path */
char *libPath) /* a library search path */
{
int max, red, green, blue, newmax, argc, i;
@ -244,21 +244,21 @@ cleanup:
*/
bool
GrSaveCMap(techStyle, dispType, monType, path, libPath)
char *techStyle; /* The type of dstyle file requested by
GrSaveCMap(
char *techStyle, /* The type of dstyle file requested by
* the current technology.
*/
char *dispType; /* A class of color map files for one or
char *dispType, /* A class of color map files for one or
* more display types. Usually this
* is defaulted to NULL, in which case the
* type required by the current driver is
* used.
*/
char *monType; /* The class of monitors being used. Usually
char *monType, /* The class of monitors being used. Usually
* given as "std".
*/
char *path; /* a search path */
char *libPath; /* a library search path */
char *path, /* a search path */
char *libPath) /* a library search path */
{
FILE *f;
@ -319,8 +319,8 @@ char *libPath; /* a library search path */
*/
int
GrNameToColor(colorname)
char *colorname;
GrNameToColor(
char *colorname)
{
int i;
colorEntry *ce;
@ -351,9 +351,11 @@ GrNameToColor(colorname)
*/
bool
GrGetColor(color, red, green, blue)
int color; /* Color to be read. */
int *red, *green, *blue; /* Pointers to values of color elements. */
GrGetColor(
int color, /* Color to be read. */
int *red,
int *green,
int *blue)
{
colorEntry *ce;
@ -381,9 +383,11 @@ GrGetColor(color, red, green, blue)
*/
bool
GrPutColor(color, red, green, blue)
int color; /* Color to be changed. */
int red, green, blue; /* New intensities for color. */
GrPutColor(
int color, /* Color to be changed. */
int red,
int green,
int blue)
{
colorEntry *ce;
@ -425,15 +429,16 @@ GrPutColor(color, red, green, blue)
*/
void
GrPutManyColors(color, red, green, blue, opaqueBit)
int color; /* A specification of colors to be modified. */
int red, green, blue; /* New intensity values. */
int opaqueBit; /* The opaque/transparent bit. It is assumed
GrPutManyColors(
int color, /* A specification of colors to be modified. */
int red,
int green,
int blue,
int opaqueBit) /* The opaque/transparent bit. It is assumed
* that the opaque layer colors or
* transparent layer bits lie to the right
* of the opaque/transparent bit.
*/
{
int i;
int mask = color;

View File

@ -39,7 +39,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
/* Forward declaration: */
extern bool GrDisjoint();
extern void GrClipTriangle();
extern void GrClipTriangle(Rect *r, Rect *c, bool clipped, TileType dinfo, Point *points, int *np);
/* The following rectangle defines the size of the cross drawn for
* zero-size rectangles. This must be all on one line to keep
@ -83,8 +83,8 @@ int grCurOutline, grCurFill, grCurColor;
bool grDriverInformed = TRUE;
void
GrSetStuff(style)
int style;
GrSetStuff(
int style)
{
grCurDStyle = style;
grCurWMask = GrStyleTable[style].mask;
@ -136,11 +136,11 @@ grInformDriver()
*/
void
grClipAgainst(startllr, clip)
LinkedRect **startllr; /* A pointer to the pointer that heads
grClipAgainst(
LinkedRect **startllr, /* A pointer to the pointer that heads
* the list .
*/
Rect *clip; /* The rectangle to clip against */
Rect *clip) /* The rectangle to clip against */
{
extern bool grClipAddFunc(); /* forward declaration */
LinkedRect **llr, *lr;
@ -185,8 +185,8 @@ bool grClipAddFunc(box, cd)
void
grObsBox(r)
Rect *r;
grObsBox(
Rect *r)
{
LinkedRect *ob;
LinkedRect *ar;
@ -231,18 +231,17 @@ grObsBox(r)
*/
bool
grClipPoints(line, box, p1, p1OK, p2, p2OK)
Rect *line; /* Actually a line from line->r_ll to
grClipPoints(
Rect *line, /* Actually a line from line->r_ll to
* line->r_ur. It is assumed that r_ll is to
* the left of r_ur, but we don't assume that
* r_ll is below r_ur.
*/
Rect *box; /* A box to check intersections with */
Point *p1, *p2; /* To be filled in with 0, 1, or 2 points
* that are on the border of the box as well as
* on the line.
*/
bool *p1OK, *p2OK; /* Says if the point was filled in */
Rect *box, /* A box to check intersections with */
Point *p1,
bool *p1OK,
Point *p2,
bool *p2OK)
{
int tmp, delx, dely;
bool delyneg;
@ -376,8 +375,11 @@ grClipPoints(line, box, p1, p1OK, p2, p2OK)
*/
void
GrClipLine(x1, y1, x2, y2)
int x1, y1, x2, y2;
GrClipLine(
int x1,
int y1,
int x2,
int y2)
{
LinkedRect **ar;
LinkedRect *ob;
@ -527,9 +529,12 @@ deleteit: {
*/
void
grAddSegment(llx, lly, urx, ury, segments)
int llx, lly, urx, ury;
LinkedRect **segments;
grAddSegment(
int llx,
int lly,
int urx,
int ury,
LinkedRect **segments)
{
LinkedRect *curseg;
@ -571,10 +576,10 @@ grAddSegment(llx, lly, urx, ury, segments)
*/
bool
GrBoxOutline(tile, dinfo, tilesegs)
Tile *tile;
TileType dinfo;
LinkedRect **tilesegs;
GrBoxOutline(
Tile *tile,
TileType dinfo,
LinkedRect **tilesegs)
{
Rect rect;
TileType ttype;
@ -774,7 +779,11 @@ GrBoxOutline(tile, dinfo, tilesegs)
*---------------------------------------------------------
*/
void
GrBox(MagWindow *mw, Transform *trans, Tile *tile, TileType dinfo)
GrBox(
MagWindow *mw,
Transform *trans,
Tile *tile,
TileType dinfo)
{
Rect r, r2, clipr;
bool needClip, needObscure, simpleBox;
@ -984,11 +993,11 @@ GrBox(MagWindow *mw, Transform *trans, Tile *tile, TileType dinfo)
*/
void
GrDrawFastBox(prect, scale)
Rect *prect; /* The rectangle to be drawn, given in
GrDrawFastBox(
Rect *prect, /* The rectangle to be drawn, given in
* screen coordinates.
*/
int scale; /* If < 0, we reduce the cross size for
int scale) /* If < 0, we reduce the cross size for
* points according to the (negative) scale,
* so point labels don't dominate a top-level
* layout.
@ -1156,13 +1165,13 @@ GrDrawFastBox(prect, scale)
#define yround(d) (int)(((((d % width) << 1) >= width) ? 1 : 0) + (d / width))
void
GrClipTriangle(r, c, clipped, dinfo, points, np)
Rect *r; /* Bounding box of triangle, in screen coords */
Rect *c; /* Clipping rectangle */
bool clipped; /* Boolean, if bounding box is clipped */
TileType dinfo; /* Split side and direction information */
Point *points; /* Point array (up to 5 points) to fill */
int *np; /* Number of points in the clipped polygon */
GrClipTriangle(
Rect *r, /* Bounding box of triangle, in screen coords */
Rect *c, /* Clipping rectangle */
bool clipped, /* Boolean, if bounding box is clipped */
TileType dinfo, /* Split side and direction information */
Point *points, /* Point array (up to 5 points) to fill */
int *np) /* Number of points in the clipped polygon */
{
if (!(dinfo & TT_SIDE))
{
@ -1419,9 +1428,9 @@ GrClipTriangle(r, c, clipped, dinfo, points, np)
*/
void
GrDrawTriangleEdge(r, dinfo)
Rect *r; /* Bounding box of triangle, in screen coords */
TileType dinfo;
GrDrawTriangleEdge(
Rect *r, /* Bounding box of triangle, in screen coords */
TileType dinfo)
{
Point tpoints[5];
int tnum, i, j;
@ -1460,11 +1469,11 @@ GrDrawTriangleEdge(r, dinfo)
*/
void
GrDiagonal(prect, dinfo)
Rect *prect; /* The rectangle to be drawn, given in
GrDiagonal(
Rect *prect, /* The rectangle to be drawn, given in
* screen coordinates.
*/
TileType dinfo; /* split and direction information */
TileType dinfo) /* split and direction information */
{
Rect *r;
bool needClip, needObscure;
@ -1541,9 +1550,9 @@ GrDiagonal(prect, dinfo)
*/
void
GrFillPolygon(polyp, np)
Point *polyp; /* Array of points defining polygon */
int np; /* number of points in array polyp */
GrFillPolygon(
Point *polyp, /* Array of points defining polygon */
int np) /* number of points in array polyp */
{
if (grFillPolygonPtr != NULL)
{
@ -1567,11 +1576,11 @@ GrFillPolygon(polyp, np)
*/
void
GrClipBox(prect, style)
Rect *prect; /* The rectangle to be drawn, given in
GrClipBox(
Rect *prect, /* The rectangle to be drawn, given in
* screen coordinates.
*/
int style; /* The style to be used in drawing it. */
int style) /* The style to be used in drawing it. */
{
GrSetStuff(style);
GrFastBox(prect);
@ -1603,11 +1612,11 @@ GrClipBox(prect, style)
* ----------------------------------------------------------------------------
*/
bool
GrDisjoint(area, clipBox, func, cdarg)
Rect * area;
Rect * clipBox;
bool (*func) ();
ClientData cdarg;
GrDisjoint(
Rect * area,
Rect * clipBox,
bool (*func) (),
ClientData cdarg)
{
Rect ok, rArea;
bool result;

View File

@ -102,10 +102,10 @@ GR_STYLE_LINE *GrStyleTable;
bool
GrDrawGlyphNum(num, xoff, yoff)
int num;
int xoff;
int yoff;
GrDrawGlyphNum(
int num,
int xoff,
int yoff)
{
Point p;
@ -133,8 +133,8 @@ GrDrawGlyphNum(num, xoff, yoff)
*/
int
GrGetStyleFromName(stylename)
char *stylename;
GrGetStyleFromName(
char *stylename)
{
int style;
int maxstyles = TECHBEGINSTYLES + (DBWNumStyles * 2);
@ -196,9 +196,9 @@ GrResetStyles()
*/
bool
styleBuildDisplayStyle(line, version)
char *line;
int version;
styleBuildDisplayStyle(
char *line,
int version)
{
bool res;
int argsread;
@ -284,9 +284,9 @@ styleBuildDisplayStyle(line, version)
*/
bool
styleBuildStipplesStyle(line, version)
char *line;
int version;
styleBuildStipplesStyle(
char *line,
int version)
{
bool res;
int ord;
@ -360,9 +360,9 @@ styleBuildStipplesStyle(line, version)
*/
bool
GrLoadCursors(path, libPath)
char *path;
char *libPath;
GrLoadCursors(
char *path,
char *libPath)
{
if (grCursorGlyphs != (GrGlyphs *) NULL)
{
@ -402,8 +402,8 @@ char *libPath;
*/
int
GrLoadStyles(techType, path, libPath)
char *techType; /* Type of styles wanted by the technology
GrLoadStyles(
char *techType, /* Type of styles wanted by the technology
* file (usually "std"). We tack two things
* onto this name: the type of styles
* wanted by the display, and a version
@ -411,8 +411,8 @@ char *techType; /* Type of styles wanted by the technology
* to look up the actual display styles
* file.
*/
char *path;
char *libPath;
char *path,
char *libPath)
{
FILE *inp;
int res = 0;

View File

@ -54,8 +54,8 @@ extern void (*grFreeCursorPtr)();
*/
void
GrFreeGlyphs(g)
GrGlyphs *g;
GrFreeGlyphs(
GrGlyphs *g)
{
int i;
ASSERT(g != NULL, "GrFreeGlyphs");
@ -94,10 +94,11 @@ GrFreeGlyphs(g)
*/
bool
GrReadGlyphs(filename, path, libPath, gl)
char *filename;
char *path, *libPath; /* paths to search in for the file */
GrGlyphs **gl; /* To be filled in with a malloc'ed structure
GrReadGlyphs(
char *filename,
char *path,
char *libPath,
GrGlyphs **gl) /* To be filled in with a malloc'ed structure
* This structure must be freed by the caller
* if it is not to live forever.
*/

View File

@ -63,8 +63,8 @@ LinkedRect * grCurObscure; /* A list of obscuring areas */
*/
static char *
grWindName(w)
MagWindow *w;
grWindName(
MagWindow *w)
{
if (w == NULL) return "<NULL>";
if (w == GR_LOCK_SCREEN) return "<FULL-SCREEN>";
@ -92,11 +92,11 @@ grWindName(w)
*/
void
grSimpleLock(w, inside)
MagWindow *w; /* The window to lock, or GR_LOCK_SCREEN if the
grSimpleLock(
MagWindow *w, /* The window to lock, or GR_LOCK_SCREEN if the
* whole screen.
*/
bool inside; /* If TRUE, clip to inside of window, otherwise clip
bool inside) /* If TRUE, clip to inside of window, otherwise clip
* to outside of window.
*/
{
@ -128,8 +128,8 @@ grSimpleLock(w, inside)
void
grSimpleUnlock(w)
MagWindow *w;
grSimpleUnlock(
MagWindow *w)
{
ASSERT(w != NULL, "grSimpleUnlock");
if (grTraceLocks) TxError("--- Unlock %s\n", grWindName(w));
@ -160,8 +160,8 @@ grSimpleUnlock(w)
*/
void
GrClipTo(r)
Rect *r;
GrClipTo(
Rect *r)
{
if (grLockedWindow == NULL) return;
if (grLockScreen)

View File

@ -243,13 +243,12 @@ void (*GrResumePtr)() = grNullProc;
*/
bool
GrSetDisplay(type, outName, mouseName)
char *type; /* Name of the display type. */
char *outName; /* Filename used for communciation with
GrSetDisplay(
char *type, /* Name of the display type. */
char *outName, /* Filename used for communciation with
* display. */
char *mouseName; /* Filename used for communciation
char *mouseName) /* Filename used for communciation
* with tablet. */
{
char **ptr;
char *cp;
@ -326,8 +325,9 @@ char *mouseName; /* Filename used for communciation
* ----------------------------------------------------------------------------
*/
bool
GrIsDisplay(disp1, disp2)
char *disp1, *disp2;
GrIsDisplay(
char *disp1,
char *disp2)
{
char **ptr1, **ptr2;
int i, j;
@ -379,11 +379,11 @@ GrIsDisplay(disp1, disp2)
*/
void
GrGuessDisplayType(graphics, mouse, display, monitor)
char **graphics; /* default device for sending out graphics */
char **mouse; /* default device for reading mouse (tablet) */
char **display; /* default type of device (OGL, etc...) */
char **monitor; /* default type of monitor (pale, std) */
GrGuessDisplayType(
char **graphics, /* default device for sending out graphics */
char **mouse, /* default device for reading mouse (tablet) */
char **display, /* default type of device (OGL, etc...) */
char **monitor) /* default type of monitor (pale, std) */
{
bool onSun; /* Are we on a Sun? */
bool haveX; /* are we running under X? */
@ -443,11 +443,11 @@ GrGuessDisplayType(graphics, mouse, display, monitor)
*/
char *
grFgets(str, n, stream, name)
char *str;
int n;
FILE *stream;
char *name; /* The user name of the stream, for the error msg */
grFgets(
char *str,
int n,
FILE *stream,
char *name) /* The user name of the stream, for the error msg */
{
fd_set fn;
char *newstr;

View File

@ -71,28 +71,42 @@ nullDoNothing()
/* 1-argument stub (int or pointer) */
static void
nullDoNothingI(int a)
nullDoNothingI(
int a)
{
(void) a;
}
/* 2-argument stub */
static void
nullDoNothingII(int a, int b)
nullDoNothingII(
int a,
int b)
{
(void) a; (void) b;
}
/* 4-argument stub */
static void
nullDoNothingIIII(int a, int b, int c, int d)
nullDoNothingIIII(
int a,
int b,
int c,
int d)
{
(void) a; (void) b; (void) c; (void) d;
}
/* 7-argument stub (for grFontTextPtr) */
static void
nullDoNothingIIIIIII(int a, int b, int c, int d, int e, int f, int g)
nullDoNothingIIIIIII(
int a,
int b,
int c,
int d,
int e,
int f,
int g)
{
(void) a; (void) b; (void) c; (void) d; (void) e; (void) f; (void) g;
}
@ -100,14 +114,17 @@ nullDoNothingIIIIIII(int a, int b, int c, int d, int e, int f, int g)
/* bool-returning stubs — return FALSE so callers treat backing store / window
* creation as unavailable, which is correct for the headless null driver. */
static bool
nullReturnFalseI(int a)
nullReturnFalseI(
int a)
{
(void) a;
return FALSE;
}
static bool
nullReturnFalseII(int a, int b)
nullReturnFalseII(
int a,
int b)
{
(void) a; (void) b;
return FALSE;
@ -115,7 +132,10 @@ nullReturnFalseII(int a, int b)
/* 3-argument bool-returning stub (for grDrawGridPtr) */
static bool
nullReturnFalseIII(int a, int b, int c)
nullReturnFalseIII(
int a,
int b,
int c)
{
(void) a; (void) b; (void) c;
return FALSE;
@ -123,7 +143,8 @@ nullReturnFalseIII(int a, int b, int c)
/* 1-argument int-returning stub (for GrWindowIdPtr) */
static int
nullReturnZeroI(int a)
nullReturnZeroI(
int a)
{
(void) a;
return 0;
@ -214,10 +235,10 @@ NullInit()
*/
int
NullTextSize(text, size, r)
char *text;
int size;
Rect *r;
NullTextSize(
char *text,
int size,
Rect *r)
{
ASSERT(r != NULL, "nullTextSize");
r->r_xbot = 0;
@ -307,10 +328,10 @@ NullBitBlt()
*/
bool
nullSetDisplay(dispType, outFileName, mouseFileName)
char *dispType;
char *outFileName;
char *mouseFileName;
nullSetDisplay(
char *dispType,
char *outFileName,
char *mouseFileName)
{
TxPrintf("Using NULL graphics device.\n");

Some files were not shown because too many files have changed in this diff Show More