diff --git a/commands/CmdCD.c b/commands/CmdCD.c index c93153787..be44f0ecf 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -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[] = diff --git a/database/DBbound.c b/database/DBbound.c index 12cd9001c..d37e1d907 100644 --- a/database/DBbound.c +++ b/database/DBbound.c @@ -53,10 +53,10 @@ typedef struct dbcellboundstruct */ int -DBBoundCellPlane(def, extended, rect) - CellDef *def; - Rect *extended; - Rect *rect; +DBBoundCellPlane( + CellDef *def, + Rect *extended, + Rect *rect) { TreeFilter filter; DBCellBoundStruct cbs; @@ -79,9 +79,9 @@ DBBoundCellPlane(def, extended, rect) } int -dbCellBoundFunc(use, fp) - CellUse *use; - TreeFilter *fp; +dbCellBoundFunc( + CellUse *use, + TreeFilter *fp) { DBCellBoundStruct *cbs; @@ -124,9 +124,9 @@ dbCellBoundFunc(use, fp) */ bool -DBBoundPlane(plane, rect) - Plane *plane; - Rect *rect; +DBBoundPlane( + Plane *plane, + Rect *rect) { Tile *left, *right, *top, *bottom, *tp; @@ -205,9 +205,9 @@ DBBoundPlane(plane, rect) */ bool -DBBoundPlaneVert(plane, rect) - Plane *plane; - Rect *rect; +DBBoundPlaneVert( + Plane *plane, + Rect *rect) { Tile *left, *right, *top, *bottom, *tp; diff --git a/database/DBcell.c b/database/DBcell.c index 9977d728d..f947c1814 100644 --- a/database/DBcell.c +++ b/database/DBcell.c @@ -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"); diff --git a/database/DBcellbox.c b/database/DBcellbox.c index 82f659089..a42105972 100644 --- a/database/DBcellbox.c +++ b/database/DBcellbox.c @@ -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; diff --git a/database/DBcellcopy.c b/database/DBcellcopy.c index 3e0ae3347..a3b34cde0 100644 --- a/database/DBcellcopy.c +++ b/database/DBcellcopy.c @@ -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 @@ dbCopyAllPaint(tile, dinfo, cxp) */ 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; diff --git a/database/DBcellname.c b/database/DBcellname.c index 2b296cc3b..c0c5f9a8c 100644 --- a/database/DBcellname.c +++ b/database/DBcellname.c @@ -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 @@ dbGenerateUniqueIdsFunc(use, parentDef) */ 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) diff --git a/database/DBcellsrch.c b/database/DBcellsrch.c index 476b6ef78..944c5adbf 100644 --- a/database/DBcellsrch.c +++ b/database/DBcellsrch.c @@ -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 @@ dbCellLabelSrFunc(scx, fp) */ 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 @@ dbScaleCell(cellDef, scalen, scaled) */ 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; diff --git a/database/DBcellsubr.c b/database/DBcellsubr.c index 3b60a00aa..f3f7523e1 100644 --- a/database/DBcellsubr.c +++ b/database/DBcellsubr.c @@ -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; diff --git a/database/DBconnect.c b/database/DBconnect.c index a9c7bfdb1..1a941e3f8 100644 --- a/database/DBconnect.c +++ b/database/DBconnect.c @@ -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 @@ dbSrConnectFunc( /** @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. */ diff --git a/database/DBcount.c b/database/DBcount.c index fb4d03d60..96f156d61 100644 --- a/database/DBcount.c +++ b/database/DBcount.c @@ -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; diff --git a/database/DBexpand.c b/database/DBexpand.c index d547cf5f2..04cc6795f 100644 --- a/database/DBexpand.c +++ b/database/DBexpand.c @@ -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 diff --git a/database/DBio.c b/database/DBio.c index 828289079..717f9855b 100644 --- a/database/DBio.c +++ b/database/DBio.c @@ -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 @@ dbReadUse(cellDef, line, len, f, scalen, scaled, dereference, dbUseTable) */ 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 @@ dbReadProperties(cellDef, line, len, f, scalen, scaled) */ 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 @@ dbReadElements(cellDef, line, len, f, scalen, scaled) */ 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 @@ dbReadLabels(cellDef, line, len, f, scalen, scaled) */ 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 @@ DBCellWriteCommandFile(cellDef, f) */ 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 @@ DBCellWrite(cellDef, fileName) */ 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 @@ DBGetTech(cellName) } /* 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; diff --git a/database/DBlabel.c b/database/DBlabel.c index f8e0f58ad..30ffbb079 100644 --- a/database/DBlabel.c +++ b/database/DBlabel.c @@ -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[] = { diff --git a/database/DBlabel2.c b/database/DBlabel2.c index 9396af1fb..1d9d5b32c 100644 --- a/database/DBlabel2.c +++ b/database/DBlabel2.c @@ -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). */ { diff --git a/database/DBpaint.c b/database/DBpaint.c index 751c2e91f..4b154ddf8 100644 --- a/database/DBpaint.c +++ b/database/DBpaint.c @@ -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 @@ DBPaintPlane0(plane, area, resultTbl, undo, method) */ 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 @@ DBFracturePlane(plane, area, resultTbl, undo) */ 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 @@ DBMergeNMTiles0(plane, area, undo, mergeOnce) */ 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 @@ DBNMPaintPlane0(plane, exacttype, area, resultTbl, undo, method) */ 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 @@ DBPaintType(plane, area, resultTbl, client, undo, tileMask) */ 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 @@ DBPaintPlaneVert(plane, area, resultTbl, undo) */ 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); diff --git a/database/DBpaint2.c b/database/DBpaint2.c index 8a90cb018..da8535153 100644 --- a/database/DBpaint2.c +++ b/database/DBpaint2.c @@ -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 */ { diff --git a/database/DBtcontact.c b/database/DBtcontact.c index 3a6b1fb0c..b0b6a964c 100644 --- a/database/DBtcontact.c +++ b/database/DBtcontact.c @@ -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; diff --git a/database/DBtech.c b/database/DBtech.c index 47f8b8186..cbbefa048 100644 --- a/database/DBtech.c +++ b/database/DBtech.c @@ -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; diff --git a/database/DBtechname.c b/database/DBtechname.c index 85a898a1b..f738dd816 100644 --- a/database/DBtechname.c +++ b/database/DBtechname.c @@ -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); } diff --git a/database/DBtechtype.c b/database/DBtechtype.c index 411d5d553..b1590ea44 100644 --- a/database/DBtechtype.c +++ b/database/DBtechtype.c @@ -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; diff --git a/database/DBtiles.c b/database/DBtiles.c index 69fbba9e1..4c12882af 100644 --- a/database/DBtiles.c +++ b/database/DBtiles.c @@ -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 @@ DBSrPaintNMArea(hintTile, plane, ttype, rect, mask, func, arg) */ 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 @@ DBSrPaintArea(hintTile, plane, rect, mask, func, arg) */ 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 @@ DBSrPaintClient(hintTile, plane, rect, mask, client, func, arg) */ 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 @@ DBResetTilePlane(plane, cdata) */ 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 @@ DBResetTilePlaneSpecial(plane, cdata) */ 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 @@ DBFreePaintPlane(plane) */ 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; diff --git a/database/DBtimestmp.c b/database/DBtimestmp.c index 954f286e5..8801ee440 100644 --- a/database/DBtimestmp.c +++ b/database/DBtimestmp.c @@ -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; diff --git a/database/DBtpaint.c b/database/DBtpaint.c index 189a17a55..d48796305 100644 --- a/database/DBtpaint.c +++ b/database/DBtpaint.c @@ -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; diff --git a/database/DBtpaint2.c b/database/DBtpaint2.c index c7cb0cf67..28d42f995 100644 --- a/database/DBtpaint2.c +++ b/database/DBtpaint2.c @@ -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); diff --git a/database/DBundo.c b/database/DBundo.c index 73b984149..50f3a8214 100644 --- a/database/DBundo.c +++ b/database/DBundo.c @@ -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 @@ dbUndoPaintForw(up) } 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; diff --git a/database/database.h.in b/database/database.h.in index 3f184c10e..b21198b7d 100644 --- a/database/database.h.in +++ b/database/database.h.in @@ -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 ------------------------------*/ diff --git a/database/databaseInt.h b/database/databaseInt.h index d8f5c7368..7e4f0c6b2 100644 --- a/database/databaseInt.h +++ b/database/databaseInt.h @@ -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(); diff --git a/dbwind/DBWdisplay.c b/dbwind/DBWdisplay.c index 444df16cb..75ab8ad2d 100644 --- a/dbwind/DBWdisplay.c +++ b/dbwind/DBWdisplay.c @@ -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; diff --git a/dbwind/DBWelement.c b/dbwind/DBWelement.c index fee521a7d..ca0c09148 100644 --- a/dbwind/DBWelement.c +++ b/dbwind/DBWelement.c @@ -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; diff --git a/dbwind/DBWfdback.c b/dbwind/DBWfdback.c index 74aa3ef31..47abaecc3 100644 --- a/dbwind/DBWfdback.c +++ b/dbwind/DBWfdback.c @@ -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. */ diff --git a/dbwind/DBWprocs.c b/dbwind/DBWprocs.c index d9ef59458..efd0f7883 100644 --- a/dbwind/DBWprocs.c +++ b/dbwind/DBWprocs.c @@ -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; diff --git a/dbwind/DBWtools.c b/dbwind/DBWtools.c index 73809b4f8..de01d97fe 100644 --- a/dbwind/DBWtools.c +++ b/dbwind/DBWtools.c @@ -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; diff --git a/dbwind/DBWundo.c b/dbwind/DBWundo.c index 37b78db35..88d3a132a 100644 --- a/dbwind/DBWundo.c +++ b/dbwind/DBWundo.c @@ -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); } diff --git a/dbwind/dbwind.h b/dbwind/dbwind.h index 8faf18911..d2166eb40 100644 --- a/dbwind/dbwind.h +++ b/dbwind/dbwind.h @@ -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(); diff --git a/debug/debug.h b/debug/debug.h index 0e16d5f82..9727cbc02 100644 --- a/debug/debug.h +++ b/debug/debug.h @@ -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); diff --git a/debug/debugFlags.c b/debug/debugFlags.c index 95c6870ee..407063236 100644 --- a/debug/debugFlags.c +++ b/debug/debugFlags.c @@ -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); diff --git a/debug/hist.c b/debug/hist.c index 5ec53800b..723f1882a 100644 --- a/debug/hist.c +++ b/debug/hist.c @@ -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; diff --git a/drc/DRCbasic.c b/drc/DRCbasic.c index 91a974592..2c9d8e1bf 100644 --- a/drc/DRCbasic.c +++ b/drc/DRCbasic.c @@ -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 */ diff --git a/drc/DRCcif.c b/drc/DRCcif.c index 8e32ebb5c..91ee66fb5 100644 --- a/drc/DRCcif.c +++ b/drc/DRCcif.c @@ -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 @@ drcCifTile (tile, dinfo, arg) */ 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 @@ drcCheckCifArea(starttile, arg, cptr) */ 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; diff --git a/drc/DRCcontin.c b/drc/DRCcontin.c index 5501bcc41..8cddc7ced 100644 --- a/drc/DRCcontin.c +++ b/drc/DRCcontin.c @@ -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 @@ DRCContinuous() /* 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; diff --git a/drc/DRCextend.c b/drc/DRCextend.c index 6162070a1..b7b6b07ed 100644 --- a/drc/DRCextend.c +++ b/drc/DRCextend.c @@ -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 @@ drcCheckArea(starttile,arg,cptr) */ 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; diff --git a/drc/DRCmain.c b/drc/DRCmain.c index bd24141ca..5451a68a6 100644 --- a/drc/DRCmain.c +++ b/drc/DRCmain.c @@ -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) diff --git a/drc/DRCprint.c b/drc/DRCprint.c index 0cf1025ac..9aefda6f8 100644 --- a/drc/DRCprint.c +++ b/drc/DRCprint.c @@ -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; diff --git a/drc/DRCsubcell.c b/drc/DRCsubcell.c index 3df40ad70..c753d6e0d 100644 --- a/drc/DRCsubcell.c +++ b/drc/DRCsubcell.c @@ -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)++; } diff --git a/drc/DRCtech.c b/drc/DRCtech.c index e2193ad87..214b92694 100644 --- a/drc/DRCtech.c +++ b/drc/DRCtech.c @@ -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; diff --git a/drc/drc.h b/drc/drc.h index 0e8a83c0f..5d6db683f 100644 --- a/drc/drc.h +++ b/drc/drc.h @@ -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(); diff --git a/extflat/EFantenna.c b/extflat/EFantenna.c index 393ddc4b5..2fb44e1c1 100644 --- a/extflat/EFantenna.c +++ b/extflat/EFantenna.c @@ -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 @@ CmdAntennaCheck(w, cmd) */ int -antennacheckArgs(pargc, pargv) - int *pargc; - char ***pargv; +antennacheckArgs( + int *pargc, + char ***pargv) { char **argv = *pargv, *cp; int argc = *pargc; @@ -327,9 +327,9 @@ antennacheckArgs(pargc, pargv) * ---------------------------------------------------------------------------- */ 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); diff --git a/extflat/EFargs.c b/extflat/EFargs.c index bcdb6c66d..359e47559 100644 --- a/extflat/EFargs.c +++ b/extflat/EFargs.c @@ -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 @@ EFArgs(argc, argv, err_result, argsProc, cdata) */ 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]; diff --git a/extflat/EFbuild.c b/extflat/EFbuild.c index 3f58267d0..291018a61 100644 --- a/extflat/EFbuild.c +++ b/extflat/EFbuild.c @@ -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 @@ efConnInitSubs(conn, nodeName1, nodeName2) */ bool -efConnBuildName(cnp, name) - ConnName *cnp; - char *name; +efConnBuildName( + ConnName *cnp, + char *name) { char *srcp, *dstp, *cp, *dp; int nsubs; @@ -2116,11 +2126,11 @@ efConnBuildName(cnp, name) */ 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); diff --git a/extflat/EFdef.c b/extflat/EFdef.c index bc7b6089f..69bb7d7a3 100644 --- a/extflat/EFdef.c +++ b/extflat/EFdef.c @@ -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; diff --git a/extflat/EFflat.c b/extflat/EFflat.c index 60e303a36..ce79039d9 100644 --- a/extflat/EFflat.c +++ b/extflat/EFflat.c @@ -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) { diff --git a/extflat/EFhier.c b/extflat/EFhier.c index e604823eb..33b097800 100644 --- a/extflat/EFhier.c +++ b/extflat/EFhier.c @@ -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; diff --git a/extflat/EFint.h b/extflat/EFint.h index 9f2231620..6c9d61a5e 100644 --- a/extflat/EFint.h +++ b/extflat/EFint.h @@ -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(); diff --git a/extflat/EFname.c b/extflat/EFname.c index 43c7496ac..e0dafef13 100644 --- a/extflat/EFname.c +++ b/extflat/EFname.c @@ -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; diff --git a/extflat/EFsym.c b/extflat/EFsym.c index 3aeaceba7..77c8ef7f7 100644 --- a/extflat/EFsym.c +++ b/extflat/EFsym.c @@ -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; diff --git a/extflat/EFvisit.c b/extflat/EFvisit.c index c10a2d24f..39001a3d4 100644 --- a/extflat/EFvisit.c +++ b/extflat/EFvisit.c @@ -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; diff --git a/extflat/extflat.h b/extflat/extflat.h index b85b858c4..4bdc306ee 100644 --- a/extflat/extflat.h +++ b/extflat/extflat.h @@ -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(); diff --git a/extract/ExtArray.c b/extract/ExtArray.c index 6e73f59f0..dd8ec46ca 100644 --- a/extract/ExtArray.c +++ b/extract/ExtArray.c @@ -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 @@ extArrayProcess(ha, primary) */ 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 @@ extArrayTileToNode(tp, dinfo, pNum, et, ha, doHard) */ 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; diff --git a/extract/ExtBasic.c b/extract/ExtBasic.c index 0c3763784..ec8284934 100644 --- a/extract/ExtBasic.c +++ b/extract/ExtBasic.c @@ -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 @@ extNodeAreaFunc(tile, dinfo, arg) */ 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; diff --git a/extract/ExtCell.c b/extract/ExtCell.c index 46be433e7..407785c4d 100644 --- a/extract/ExtCell.c +++ b/extract/ExtCell.c @@ -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; diff --git a/extract/ExtCouple.c b/extract/ExtCouple.c index 96b7b1ed7..36a63ad39 100644 --- a/extract/ExtCouple.c +++ b/extract/ExtCouple.c @@ -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; diff --git a/extract/ExtHard.c b/extract/ExtHard.c index e4c182f12..4d845ae3f 100644 --- a/extract/ExtHard.c +++ b/extract/ExtHard.c @@ -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 @@ extHardProc(scx, arg) */ 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; diff --git a/extract/ExtHier.c b/extract/ExtHier.c index 09df8ae59..f4609cee8 100644 --- a/extract/ExtHier.c +++ b/extract/ExtHier.c @@ -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); diff --git a/extract/ExtInter.c b/extract/ExtInter.c index 5148571d9..790e1c15e 100644 --- a/extract/ExtInter.c +++ b/extract/ExtInter.c @@ -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; diff --git a/extract/ExtLength.c b/extract/ExtLength.c index f245107b0..2bac70d56 100644 --- a/extract/ExtLength.c +++ b/extract/ExtLength.c @@ -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; diff --git a/extract/ExtMain.c b/extract/ExtMain.c index ec1f475d8..206a8bd6f 100644 --- a/extract/ExtMain.c +++ b/extract/ExtMain.c @@ -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 @@ extTimestampMisMatch(def) */ 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; diff --git a/extract/ExtNghbors.c b/extract/ExtNghbors.c index fc640c6c6..32e94ebd3 100644 --- a/extract/ExtNghbors.c +++ b/extract/ExtNghbors.c @@ -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 @@ ExtFindNeighbors(tile, dinfo, tilePlaneNum, arg) */ int -extNbrPushFunc(tile, dinfo, pla) - Tile *tile; - TileType dinfo; - PlaneAndArea *pla; +extNbrPushFunc( + Tile *tile, + TileType dinfo, + PlaneAndArea *pla) { Rect *tileArea; Rect r; diff --git a/extract/ExtRegion.c b/extract/ExtRegion.c index ba9f9e134..326d8b639 100644 --- a/extract/ExtRegion.c +++ b/extract/ExtRegion.c @@ -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; diff --git a/extract/ExtSubtree.c b/extract/ExtSubtree.c index 5a4bae1c1..af9c3a444 100644 --- a/extract/ExtSubtree.c +++ b/extract/ExtSubtree.c @@ -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 @@ extSubtree(parentUse, reg, f) #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; diff --git a/extract/ExtTech.c b/extract/ExtTech.c index e48840543..f4791f9fa 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -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 @@ extTechFinalStyle(style) */ 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; diff --git a/extract/ExtTest.c b/extract/ExtTest.c index 80ea15bfd..a1409096e 100644 --- a/extract/ExtTest.c +++ b/extract/ExtTest.c @@ -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; diff --git a/extract/ExtTimes.c b/extract/ExtTimes.c index cf4fe4ac3..b6d4d62a1 100644 --- a/extract/ExtTimes.c +++ b/extract/ExtTimes.c @@ -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; diff --git a/extract/ExtUnique.c b/extract/ExtUnique.c index 82f4772dd..4adc16ec8 100644 --- a/extract/ExtUnique.c +++ b/extract/ExtUnique.c @@ -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 @@ extMakeUnique(def, ll, lreg, lregList, labelHash, option) */ void -ExtRevertUniqueCell(CellDef *def) +ExtRevertUniqueCell( + CellDef *def) { Label *lab, *tlab; char *uptr; diff --git a/extract/ExtYank.c b/extract/ExtYank.c index 18ee79092..8a11ff8a9 100644 --- a/extract/ExtYank.c +++ b/extract/ExtYank.c @@ -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; diff --git a/extract/extract.h b/extract/extract.h index 43cd687ba..d126aa4d9 100644 --- a/extract/extract.h +++ b/extract/extract.h @@ -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(); diff --git a/extract/extractInt.h b/extract/extractInt.h index 97cdcf05c..f3b47468f 100644 --- a/extract/extractInt.h +++ b/extract/extractInt.h @@ -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(); diff --git a/garouter/gaChannel.c b/garouter/gaChannel.c index d1ea44cf7..0df48805e 100644 --- a/garouter/gaChannel.c +++ b/garouter/gaChannel.c @@ -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); } diff --git a/garouter/gaMain.c b/garouter/gaMain.c index 07c9bc4d0..a62185c5f 100644 --- a/garouter/gaMain.c +++ b/garouter/gaMain.c @@ -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 @@ GARouteCmd(routeUse, netListName) */ 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 @@ GARoute(list, routeUse, netList) */ 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; diff --git a/garouter/gaSimple.c b/garouter/gaSimple.c index c3b82e938..851065c45 100644 --- a/garouter/gaSimple.c +++ b/garouter/gaSimple.c @@ -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; diff --git a/garouter/gaStem.c b/garouter/gaStem.c index 88ddaf00d..e4941edd0 100644 --- a/garouter/gaStem.c +++ b/garouter/gaStem.c @@ -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 @@ gaStemAssign(routeUse, doWarn, loc, term, net, netList) */ 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 @@ gaStemContainingChannel(routeUse, doWarn, loc) */ 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 @@ gaStemCheckPin(routeUse, terminalLoc, ch, side, gridPoint, netList) */ 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 @@ gaStemPaintAll(routeUse, netList) */ void -gaStemPaint(routeUse, terminalLoc) - CellUse *routeUse; - NLTermLoc *terminalLoc; +gaStemPaint( + CellUse *routeUse, + NLTermLoc *terminalLoc) { TileTypeBitMask terminalLayerMask; /* Possible layers for stem at terminal */ diff --git a/garouter/gaTest.c b/garouter/gaTest.c index 6fbb020fa..8bcfa8760 100644 --- a/garouter/gaTest.c +++ b/garouter/gaTest.c @@ -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 @@ GATest(w, cmd) */ 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; diff --git a/garouter/garouter.h b/garouter/garouter.h index c1a27619d..3ae859ead 100644 --- a/garouter/garouter.h +++ b/garouter/garouter.h @@ -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, diff --git a/gcr/gcr.h b/gcr/gcr.h index 8e045ee8c..4595875e3 100644 --- a/gcr/gcr.h +++ b/gcr/gcr.h @@ -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(); diff --git a/gcr/gcrColl.c b/gcr/gcrColl.c index 2d04ec271..a5fb45374 100644 --- a/gcr/gcrColl.c +++ b/gcr/gcrColl.c @@ -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++; igcr_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; diff --git a/gcr/gcrDebug.c b/gcr/gcrDebug.c index 6f243dd81..3fe875717 100644 --- a/gcr/gcrDebug.c +++ b/gcr/gcrDebug.c @@ -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; diff --git a/gcr/gcrEdge.c b/gcr/gcrEdge.c index 81994f4d5..024d66b25 100644 --- a/gcr/gcrEdge.c +++ b/gcr/gcrEdge.c @@ -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(); diff --git a/gcr/gcrInit.c b/gcr/gcrInit.c index 9f47e868f..89417a963 100644 --- a/gcr/gcrInit.c +++ b/gcr/gcrInit.c @@ -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; diff --git a/gcr/gcrLib.c b/gcr/gcrLib.c index e7ea697cd..f8adb3e45 100644 --- a/gcr/gcrLib.c +++ b/gcr/gcrLib.c @@ -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; diff --git a/gcr/gcrRiver.c b/gcr/gcrRiver.c index 8ed915a48..0767c1559 100644 --- a/gcr/gcrRiver.c +++ b/gcr/gcrRiver.c @@ -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; diff --git a/gcr/gcrRoute.c b/gcr/gcrRoute.c index f9e13cbc0..96d5cd385 100644 --- a/gcr/gcrRoute.c +++ b/gcr/gcrRoute.c @@ -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 @@ GCRroute(ch) */ 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; diff --git a/gcr/gcrShwFlgs.c b/gcr/gcrShwFlgs.c index 2ce84aa86..e0b596f7a 100644 --- a/gcr/gcrShwFlgs.c +++ b/gcr/gcrShwFlgs.c @@ -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++) diff --git a/gcr/gcrUnsplit.c b/gcr/gcrUnsplit.c index cef28781b..d07bf8d97 100644 --- a/gcr/gcrUnsplit.c +++ b/gcr/gcrUnsplit.c @@ -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; diff --git a/graphics/W3Dmain.c b/graphics/W3Dmain.c index 6b3897dcf..33f5ddab2 100644 --- a/graphics/W3Dmain.c +++ b/graphics/W3Dmain.c @@ -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 @@ w3dRenderValues(w, cmd) */ 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; diff --git a/graphics/X11Helper.c b/graphics/X11Helper.c index 6c601ef40..655755b63 100644 --- a/graphics/X11Helper.c +++ b/graphics/X11Helper.c @@ -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; diff --git a/graphics/grCMap.c b/graphics/grCMap.c index 829c29171..dedad0828 100644 --- a/graphics/grCMap.c +++ b/graphics/grCMap.c @@ -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 @@ char *libPath; /* a library search path */ */ 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; diff --git a/graphics/grClip.c b/graphics/grClip.c index 42378a9df..9f7c4f413 100644 --- a/graphics/grClip.c +++ b/graphics/grClip.c @@ -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; diff --git a/graphics/grDStyle.c b/graphics/grDStyle.c index 4aa9225f8..f593d74ca 100644 --- a/graphics/grDStyle.c +++ b/graphics/grDStyle.c @@ -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; diff --git a/graphics/grGlyphs.c b/graphics/grGlyphs.c index cda3e5e5e..e78f297af 100644 --- a/graphics/grGlyphs.c +++ b/graphics/grGlyphs.c @@ -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. */ diff --git a/graphics/grLock.c b/graphics/grLock.c index 626cd095a..0052f9c7f 100644 --- a/graphics/grLock.c +++ b/graphics/grLock.c @@ -63,8 +63,8 @@ LinkedRect * grCurObscure; /* A list of obscuring areas */ */ static char * -grWindName(w) - MagWindow *w; +grWindName( + MagWindow *w) { if (w == NULL) return ""; if (w == GR_LOCK_SCREEN) return ""; @@ -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) diff --git a/graphics/grMain.c b/graphics/grMain.c index 59480ce51..d6ba496f6 100644 --- a/graphics/grMain.c +++ b/graphics/grMain.c @@ -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; diff --git a/graphics/grNull.c b/graphics/grNull.c index fffd32d5c..521330cfa 100644 --- a/graphics/grNull.c +++ b/graphics/grNull.c @@ -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"); diff --git a/graphics/grOGL1.c b/graphics/grOGL1.c index 154c2c11a..18c88ea96 100644 --- a/graphics/grOGL1.c +++ b/graphics/grOGL1.c @@ -80,9 +80,9 @@ extern void grOGLWStdin(int fd, ClientData cdata); /* cb_textio_input_t (unused) */ void -groglSetWMandC (mask, c) - int mask; /* New value for write mask */ - int c; /* New value for current color */ +groglSetWMandC( + int mask, /* New value for write mask */ + int c) /* New value for current color */ { static int oldMask = -1; static int oldColor = -1; @@ -135,8 +135,8 @@ groglSetWMandC (mask, c) */ void -groglSetLineStyle (style) - int style; /* New stipple pattern for lines. */ +groglSetLineStyle( + int style) /* New stipple pattern for lines. */ { static int oldStyle = -1; GLushort glstyle; @@ -172,9 +172,9 @@ groglSetLineStyle (style) */ void -groglSetSPattern (sttable, numstipples) - int **sttable; /* The table of patterns */ - int numstipples; /* Number of stipples */ +groglSetSPattern( + int **sttable, /* The table of patterns */ + int numstipples) /* Number of stipples */ { int i, j, k, n; GLubyte *pdata; @@ -209,8 +209,8 @@ groglSetSPattern (sttable, numstipples) */ void -groglSetStipple (stipple) - int stipple; /* The stipple number to be used. */ +groglSetStipple( + int stipple) /* The stipple number to be used. */ { static int oldStip = -1; if (stipple == oldStip) return; @@ -358,7 +358,8 @@ GrOGLFlush() /* int -glTransYs(int wy) +glTransYs( + int wy) { int my; GLint vparms[4]; @@ -376,8 +377,11 @@ glTransYs(int wy) *---------------------------------------------------------------------- */ void -oglSetProjection(llx, lly, width, height) - int llx, lly, width, height; +oglSetProjection( + int llx, + int lly, + int width, + int height) { glXMakeCurrent(grXdpy, (GLXDrawable)oglCurrent.window, grXcontext); @@ -612,10 +616,10 @@ pipehandler( */ bool -oglSetDisplay (dispType, outFileName, mouseFileName) - char *dispType; /* arguments not used by X */ - char *outFileName; - char *mouseFileName; +oglSetDisplay( + char *dispType, /* arguments not used by X */ + char *outFileName, + char *mouseFileName) { int fildes[2], fildes2[2]; char *planecount; @@ -801,9 +805,9 @@ grOGLWStdin( */ bool -GrOGLCreate(w, name) - MagWindow *w; - char *name; +GrOGLCreate( + MagWindow *w, + char *name) { Window wind; HashEntry *entry; @@ -912,8 +916,8 @@ GrOGLCreate(w, name) */ void -GrOGLDelete(w) - MagWindow *w; +GrOGLDelete( + MagWindow *w) { int xw; HashEntry *entry; @@ -941,8 +945,8 @@ GrOGLDelete(w) */ void -GrOGLConfigure(w) - MagWindow *w; +GrOGLConfigure( + MagWindow *w) { XMoveResizeWindow(grXdpy,(Window) w->w_grdata, w->w_frameArea.r_xbot, glTransYs(w->w_frameArea.r_ytop), @@ -967,8 +971,8 @@ GrOGLConfigure(w) */ void -GrOGLRaise(w) - MagWindow *w; +GrOGLRaise( + MagWindow *w) { XRaiseWindow(grXdpy, (Window) w->w_grdata ); } @@ -990,8 +994,8 @@ GrOGLRaise(w) */ void -GrOGLLower(w) - MagWindow *w; +GrOGLLower( + MagWindow *w) { XLowerWindow(grXdpy, (Window) w->w_grdata ); } @@ -1013,9 +1017,9 @@ GrOGLLower(w) */ void -GrOGLLock(w, flag) - MagWindow *w; - bool flag; +GrOGLLock( + MagWindow *w, + bool flag) { grSimpleLock(w, flag); if ( w != GR_LOCK_SCREEN ) @@ -1045,8 +1049,8 @@ GrOGLLock(w, flag) */ void -GrOGLUnlock(w) - MagWindow *w; +GrOGLUnlock( + MagWindow *w) { GrOGLFlush(); grSimpleUnlock(w); @@ -1066,9 +1070,9 @@ GrOGLUnlock(w) */ void -GrOGLIconUpdate(w,text) - MagWindow *w; - char *text; +GrOGLIconUpdate( + MagWindow *w, + char *text) { Window wind = (Window) w->w_grdata; XClassHint class; diff --git a/graphics/grOGL2.c b/graphics/grOGL2.c index e1c982758..419691e03 100644 --- a/graphics/grOGL2.c +++ b/graphics/grOGL2.c @@ -71,9 +71,9 @@ int groglNbRects=0; */ void -groglDrawLines(lines, nb) - Rect lines[]; - int nb; +groglDrawLines( + Rect lines[], + int nb) { int i; @@ -109,9 +109,11 @@ groglDrawLines(lines, nb) */ void -groglDrawLine (x1, y1, x2, y2) - int x1, y1; /* Screen coordinates of first point. */ - int x2, y2; /* Screen coordinates of second point. */ +groglDrawLine( + int x1, + int y1, + int x2, + int y2) { if (groglNbLines == OGL_BATCH_SIZE) GR_X_FLUSH_LINES(); groglLines[groglNbLines].r_ll.p_x = x1; @@ -134,9 +136,9 @@ groglDrawLine (x1, y1, x2, y2) */ void -groglFillRects(rects, nb) - OGLRect rects[]; - int nb; +groglFillRects( + OGLRect rects[], + int nb) { int i; @@ -168,8 +170,8 @@ groglFillRects(rects, nb) */ void -groglFillRect(r) - Rect *r; /* Address of a rectangle in screen +groglFillRect( + Rect *r) /* Address of a rectangle in screen * coordinates. */ { @@ -203,9 +205,9 @@ groglFillRect(r) */ void -groglFillPolygon(tp, np) - Point *tp; - int np; +groglFillPolygon( + Point *tp, + int np) { int i; diff --git a/graphics/grOGL3.c b/graphics/grOGL3.c index 8bcb2ee8f..aa86ae684 100644 --- a/graphics/grOGL3.c +++ b/graphics/grOGL3.c @@ -66,15 +66,15 @@ GLuint grXBases[4]; */ bool -groglDrawGrid (prect, outline, clip) - Rect *prect; /* A rectangle that forms the template +groglDrawGrid( + Rect *prect, /* A rectangle that forms the template * for the grid. Note: in order to maintain * precision for the grid, the rectangle * coordinates are specified in units of * screen coordinates multiplied by SUBPIXEL. */ - int outline; /* the outline style */ - Rect *clip; /* a clipping rectangle */ + int outline, /* the outline style */ + Rect *clip) /* a clipping rectangle */ { int xsize, ysize; int x, y; @@ -222,8 +222,8 @@ groglLoadFont() */ void -groglSetCharSize (size) - int size; /* Width of characters */ +groglSetCharSize( + int size) /* Width of characters */ { oglCurrent.fontSize = size; @@ -267,10 +267,10 @@ groglSetCharSize (size) */ int -GrOGLTextSize(text, size, r) - char *text; - int size; - Rect *r; +GrOGLTextSize( + char *text, + int size, + Rect *r) { XCharStruct overall; XFontStruct *font; @@ -324,9 +324,10 @@ GrOGLTextSize(text, size, r) */ int -GrOGLReadPixel (w, x, y) - MagWindow *w; - int x,y; /* the location of a pixel in screen coords */ +GrOGLReadPixel( + MagWindow *w, + int x, + int y) { return 0; } @@ -347,9 +348,9 @@ GrOGLReadPixel (w, x, y) */ void -GrOGLBitBlt(r, p) - Rect *r; - Point *p; +GrOGLBitBlt( + Rect *r, + Point *p) { glCopyPixels(r->r_xbot, r->r_ybot, r->r_xtop - r->r_xbot + 1, r->r_ytop - r->r_ybot + 1, GL_COLOR); @@ -390,10 +391,10 @@ myCombine(GLdouble coords[3], GLdouble *vertex_data[4], */ void -groglDrawCharacter(clist, tc, pixsize) - FontChar *clist; - unsigned char tc; - int pixsize; +groglDrawCharacter( + FontChar *clist, + unsigned char tc, + int pixsize) { Point *tp; int np, nptotal; @@ -468,14 +469,14 @@ groglDrawCharacter(clist, tc, pixsize) */ void -groglFontText(text, font, size, rotate, pos, clip, obscure) - char *text; /* The text to be drawn */ - int font; /* Font to use from fontList */ - int size; /* Pixel size of the font */ - int rotate; /* Text rotation */ - Point *pos; /* Text base position */ - Rect *clip; /* Clipping area */ - LinkedRect *obscure; /* List of obscuring areas */ +groglFontText( + char *text, /* The text to be drawn */ + int font, /* Font to use from fontList */ + int size, /* Pixel size of the font */ + int rotate, /* Text rotation */ + Point *pos, /* Text base position */ + Rect *clip, /* Clipping area */ + LinkedRect *obscure) /* List of obscuring areas */ { char *tptr; Point *coffset; /* vector to next character */ @@ -535,7 +536,8 @@ static GC grXcopyGC = (GC)NULL; */ void -groglFreeBackingStore(MagWindow *window) +groglFreeBackingStore( + MagWindow *window) { Pixmap pmap = (Pixmap)window->w_backingStore; if (pmap == (Pixmap)NULL) return; @@ -561,7 +563,8 @@ groglFreeBackingStore(MagWindow *window) */ void -groglCreateBackingStore(MagWindow *w) +groglCreateBackingStore( + MagWindow *w) { Pixmap pmap; Window wind = (Window)w->w_grdata; @@ -609,7 +612,9 @@ groglCreateBackingStore(MagWindow *w) */ bool -groglGetBackingStore(MagWindow *w, Rect *area) +groglGetBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap; Window wind = (Window)w->w_grdata; @@ -658,7 +663,9 @@ groglGetBackingStore(MagWindow *w, Rect *area) */ bool -groglScrollBackingStore(MagWindow *w, Point *shift) +groglScrollBackingStore( + MagWindow *w, + Point *shift) { Pixmap pmap; unsigned int width, height; @@ -717,7 +724,9 @@ groglScrollBackingStore(MagWindow *w, Point *shift) */ void -groglPutBackingStore(MagWindow *w, Rect *area) +groglPutBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap = (Pixmap)w->w_backingStore; Window wind = (Window)w->w_grdata; @@ -771,14 +780,13 @@ groglPutBackingStore(MagWindow *w, Rect *area) */ void -groglPutText (text, pos, clip, obscure) - char *text; /* The text to be drawn. */ - Point *pos; /* A point located at the leftmost point of +groglPutText( + char *text, /* The text to be drawn. */ + Point *pos, /* A point located at the leftmost point of * the baseline for this string. */ - Rect *clip; /* A rectangle to clip against */ - LinkedRect *obscure; /* A list of obscuring rectangles */ - + Rect *clip, /* A rectangle to clip against */ + LinkedRect *obscure) /* A list of obscuring rectangles */ { Rect location; Rect overlap; @@ -832,10 +840,9 @@ groglPutText (text, pos, clip, obscure) */ void -grOGLGeoSub(r, area) -Rect *r; /* Rectangle to be subtracted from. */ -Rect *area; /* Area to be subtracted. */ - +grOGLGeoSub( +Rect *r, /* Rectangle to be subtracted from. */ +Rect *area) /* Area to be subtracted. */ { if (r->r_xbot == area->r_xbot) r->r_xbot = area->r_xtop; else diff --git a/graphics/grOGL5.c b/graphics/grOGL5.c index 79c8a4d67..16ead3cb9 100644 --- a/graphics/grOGL5.c +++ b/graphics/grOGL5.c @@ -54,9 +54,9 @@ extern Cursor grCursors[MAX_CURSORS]; /* grX11su5.c */ */ void -GrOGLDrawGlyph (gl, p) - GrGlyph *gl; /* A single glyph */ - Point *p; /* screen pos of lower left corner */ +GrOGLDrawGlyph( + GrGlyph *gl, /* A single glyph */ + Point *p) /* screen pos of lower left corner */ { Rect bBox; bool anyObscure; @@ -182,8 +182,8 @@ GrOGLDrawGlyph (gl, p) */ void -groglDefineCursor(glyphs) - GrGlyphs *glyphs; +groglDefineCursor( + GrGlyphs *glyphs) { int glyphnum; Rect oldClip; @@ -298,8 +298,8 @@ groglDefineCursor(glyphs) */ void -GrOGLSetCursor(cursorNum) -int cursorNum; /* The cursor number as defined in the display +GrOGLSetCursor( +int cursorNum) /* The cursor number as defined in the display * styles file. */ { diff --git a/graphics/grTOGL1.c b/graphics/grTOGL1.c index e15d3325b..dd682c45f 100644 --- a/graphics/grTOGL1.c +++ b/graphics/grTOGL1.c @@ -64,7 +64,7 @@ TOGL_CURRENT toglCurrent= {(Tk_Font)0, 0, 0, 0, 0, */ extern void GrTOGLClose(), GrTOGLFlush(); extern void GrTOGLDelete(), GrTOGLConfigure(), GrTOGLRaise(), GrTOGLLower(); -extern void GrTOGLLock(), GrTOGLUnlock(), GrTOGLIconUpdate(); +extern void GrTOGLLock(MagWindow *w, bool flag), GrTOGLUnlock(), GrTOGLIconUpdate(); extern bool GrTOGLInit(); extern bool GrTOGLEventPending(), GrTOGLCreate(), grtoglGetCursorPos(); extern int GrTOGLWindowId(); @@ -87,9 +87,9 @@ extern void toglSetProjection(); */ void -grtoglSetWMandC (mask, c) - int mask; /* New value for write mask */ - int c; /* New value for current color */ +grtoglSetWMandC( + int mask, /* New value for write mask */ + int c) /* New value for current color */ { static int oldColor = -1; static int oldMask = -1; @@ -150,8 +150,8 @@ grtoglSetWMandC (mask, c) */ void -grtoglSetLineStyle (style) - int style; /* New stipple pattern for lines. */ +grtoglSetLineStyle( + int style) /* New stipple pattern for lines. */ { static int oldStyle = -1; GLushort glstyle; @@ -188,9 +188,9 @@ grtoglSetLineStyle (style) */ void -grtoglSetSPattern (sttable, numstipples) - int **sttable; /* The table of patterns */ - int numstipples; /* Number of stipples */ +grtoglSetSPattern( + int **sttable, /* The table of patterns */ + int numstipples) /* Number of stipples */ { int i, j, k, n; GLubyte *pdata; @@ -225,8 +225,8 @@ grtoglSetSPattern (sttable, numstipples) */ void -grtoglSetStipple (stipple) - int stipple; /* The stipple number to be used. */ +grtoglSetStipple( + int stipple) /* The stipple number to be used. */ { static int oldStip = -1; if (stipple == oldStip) return; @@ -402,8 +402,11 @@ static GLXPbuffer pbuffer = None; */ void -toglSetProjection(llx, lly, width, height) - int llx, lly, width, height; +toglSetProjection( + int llx, + int lly, + int width, + int height) { if (toglCurrent.mw->w_flags & WIND_OFFSCREEN) { @@ -485,9 +488,9 @@ toglSetProjection(llx, lly, width, height) */ void -TOGLEventProc(clientData, xevent) - ClientData clientData; - XEvent *xevent; +TOGLEventProc( + ClientData clientData, + XEvent *xevent) { TxInputEvent *event; HashEntry *entry; @@ -979,10 +982,10 @@ toglOnScreen() */ bool -oglSetDisplay (dispType, outFileName, mouseFileName) - char *dispType; - char *outFileName; - char *mouseFileName; +oglSetDisplay( + char *dispType, + char *outFileName, + char *mouseFileName) { char *planecount; char *fullname; @@ -1000,8 +1003,8 @@ oglSetDisplay (dispType, outFileName, mouseFileName) GrPixelCorrect = 0; - GrLockPtr = GrTOGLLock; - GrUnlockPtr = GrTOGLUnlock; + GrLockPtr = (void (*)())GrTOGLLock; + GrUnlockPtr = (void (*)())GrTOGLUnlock; GrInitPtr = GrTOGLInit; GrClosePtr = GrTOGLClose; GrSetCMapPtr = GrTOGLSetCMap; @@ -1095,9 +1098,9 @@ extern void MakeWindowCommand(); */ bool -GrTOGLCreate(w, name) - MagWindow *w; - char *name; +GrTOGLCreate( + MagWindow *w, + char *name) { Tk_Window tkwind, tktop; Window wind; @@ -1244,8 +1247,8 @@ GrTOGLCreate(w, name) */ void -GrTOGLDelete(w) - MagWindow *w; +GrTOGLDelete( + MagWindow *w) { Tk_Window xw; HashEntry *entry; @@ -1274,8 +1277,8 @@ GrTOGLDelete(w) */ void -GrTOGLConfigure(w) - MagWindow *w; +GrTOGLConfigure( + MagWindow *w) { if (w->w_flags & WIND_OFFSCREEN) return; @@ -1302,8 +1305,8 @@ GrTOGLConfigure(w) */ void -GrTOGLRaise(w) - MagWindow *w; +GrTOGLRaise( + MagWindow *w) { Tk_Window tkwind; @@ -1330,8 +1333,8 @@ GrTOGLRaise(w) */ void -GrTOGLLower(w) - MagWindow *w; +GrTOGLLower( + MagWindow *w) { Tk_Window tkwind; @@ -1365,9 +1368,9 @@ extern void TCairoOffScreen(); #endif void -GrTOGLLock(w, flag) - MagWindow *w; - bool flag; +GrTOGLLock( + MagWindow *w, + bool flag) { Window wind; @@ -1421,8 +1424,8 @@ GrTOGLLock(w, flag) */ void -GrTOGLUnlock(w) - MagWindow *w; +GrTOGLUnlock( + MagWindow *w) { #ifdef CAIRO_OFFSCREEN_RENDER @@ -1537,9 +1540,9 @@ GrTOGLEventPending() */ void -GrTOGLIconUpdate(w,text) /* See Blt code */ - MagWindow *w; - char *text; +GrTOGLIconUpdate( + MagWindow *w, + char *text) { Tk_Window tkwind; Window wind; @@ -1592,8 +1595,8 @@ GrTOGLIconUpdate(w,text) /* See Blt code */ */ int -GrTOGLWindowId(tkname) - char *tkname; +GrTOGLWindowId( + char *tkname) { Tk_Window tkwind; MagWindow *mw; diff --git a/graphics/grTOGL2.c b/graphics/grTOGL2.c index 0b01ee9b4..dda17b29f 100644 --- a/graphics/grTOGL2.c +++ b/graphics/grTOGL2.c @@ -66,9 +66,9 @@ int grtoglNbDiagonal = 0; */ void -grtoglDrawLines(lines, nb) - Rect lines[]; - int nb; +grtoglDrawLines( + Rect lines[], + int nb) { #ifdef OGL_SERVER_SIDE_ONLY @@ -103,9 +103,11 @@ grtoglDrawLines(lines, nb) */ void -grtoglDrawLine (x1, y1, x2, y2) - int x1, y1; /* Screen coordinates of first point. */ - int x2, y2; /* Screen coordinates of second point. */ +grtoglDrawLine( + int x1, + int y1, + int x2, + int y2) { /* Treat straight and diagonal lines separately. Some */ /* implementations of OpenGL make straight lines twice as thick */ @@ -143,9 +145,9 @@ grtoglDrawLine (x1, y1, x2, y2) */ void -grtoglFillRects(rects, nb) - TOGLRect rects[]; - int nb; +grtoglFillRects( + TOGLRect rects[], + int nb) { #ifdef OGL_SERVER_SIDE_ONLY @@ -178,8 +180,8 @@ grtoglFillRects(rects, nb) */ void -grtoglFillRect(r) - Rect *r; /* Address of a rectangle in screen +grtoglFillRect( + Rect *r) /* Address of a rectangle in screen * coordinates. */ { @@ -213,9 +215,9 @@ grtoglFillRect(r) */ void -grtoglFillPolygon(tp, np) - Point *tp; - int np; +grtoglFillPolygon( + Point *tp, + int np) { int i; diff --git a/graphics/grTOGL3.c b/graphics/grTOGL3.c index 877d2df36..ee9fe05c2 100644 --- a/graphics/grTOGL3.c +++ b/graphics/grTOGL3.c @@ -61,15 +61,15 @@ typedef struct { */ bool -grtoglDrawGrid (prect, outline, clip) - Rect *prect; /* A rectangle that forms the template +grtoglDrawGrid( + Rect *prect, /* A rectangle that forms the template * for the grid. Note: in order to maintain * precision for the grid, the rectangle * coordinates are specified in units of * screen coordinates multiplied by SUBPIXEL. */ - int outline; /* the outline style */ - Rect *clip; /* a clipping rectangle */ + int outline, /* the outline style */ + Rect *clip) /* a clipping rectangle */ { int xsize, ysize; int x, y; @@ -160,8 +160,8 @@ grtoglLoadFont() */ void -grtoglSetCharSize (size) - int size; /* Width of characters, in pixels (6 or 8). */ +grtoglSetCharSize( + int size) /* Width of characters, in pixels (6 or 8). */ { toglCurrent.fontSize = size; switch (size) @@ -204,10 +204,10 @@ grtoglSetCharSize (size) */ int -GrTOGLTextSize(text, size, r) - char *text; - int size; - Rect *r; +GrTOGLTextSize( + char *text, + int size, + Rect *r) { Tk_FontMetrics overall; Tk_Font font; @@ -252,7 +252,8 @@ GrTOGLTextSize(text, size, r) /* backing store contains valid data or not. */ void -grtoglFreeBackingStore(MagWindow *w) +grtoglFreeBackingStore( + MagWindow *w) { RenderFrame *rf; @@ -265,7 +266,8 @@ grtoglFreeBackingStore(MagWindow *w) } void -grtoglCreateBackingStore(MagWindow *w) +grtoglCreateBackingStore( + MagWindow *w) { RenderFrame *rf; @@ -298,7 +300,9 @@ grtoglCreateBackingStore(MagWindow *w) } bool -grtoglGetBackingStore(MagWindow *w, Rect *area) +grtoglGetBackingStore( + MagWindow *w, + Rect *area) { RenderFrame *rf; unsigned int width, height; @@ -336,7 +340,9 @@ grtoglGetBackingStore(MagWindow *w, Rect *area) bool -grtoglScrollBackingStore(MagWindow *w, Point *shift) +grtoglScrollBackingStore( + MagWindow *w, + Point *shift) { RenderFrame *rf; GLuint FramebufferName, RenderbufferName; @@ -396,7 +402,9 @@ grtoglScrollBackingStore(MagWindow *w, Point *shift) } void -grtoglPutBackingStore(MagWindow *w, Rect *area) +grtoglPutBackingStore( + MagWindow *w, + Rect *area) { RenderFrame *rf; GLuint FramebufferName, RenderbufferName; @@ -452,9 +460,10 @@ grtoglPutBackingStore(MagWindow *w, Rect *area) */ int -GrTOGLReadPixel (w, x, y) - MagWindow *w; - int x,y; /* the location of a pixel in screen coords */ +GrTOGLReadPixel( + MagWindow *w, + int x, + int y) { return 0; /* OpenGL has no such function, so return 0 */ } @@ -475,9 +484,9 @@ GrTOGLReadPixel (w, x, y) */ void -GrTOGLBitBlt(r, p) - Rect *r; - Point *p; +GrTOGLBitBlt( + Rect *r, + Point *p) { glCopyPixels(r->r_xbot, r->r_ybot, r->r_xtop - r->r_xbot + 1, r->r_ytop - r->r_ybot + 1, GL_COLOR); @@ -518,10 +527,10 @@ myCombine(GLdouble coords[3], GLdouble *vertex_data[4], */ void -grtoglDrawCharacter(clist, tc, pixsize) - FontChar *clist; - unsigned char tc; - int pixsize; +grtoglDrawCharacter( + FontChar *clist, + unsigned char tc, + int pixsize) { Point *tp; int np, nptotal; @@ -596,14 +605,14 @@ grtoglDrawCharacter(clist, tc, pixsize) */ void -grtoglFontText(text, font, size, rotate, pos, clip, obscure) - char *text; /* The text to be drawn */ - int font; /* Font to use from fontList */ - int size; /* Pixel size of the font */ - int rotate; /* Text rotation */ - Point *pos; /* Text base position */ - Rect *clip; /* Clipping area */ - LinkedRect *obscure; /* List of obscuring areas */ +grtoglFontText( + char *text, /* The text to be drawn */ + int font, /* Font to use from fontList */ + int size, /* Pixel size of the font */ + int rotate, /* Text rotation */ + Point *pos, /* Text base position */ + Rect *clip, /* Clipping area */ + LinkedRect *obscure) /* List of obscuring areas */ { char *tptr; Point *coffset; /* vector to next character */ @@ -666,14 +675,13 @@ grtoglFontText(text, font, size, rotate, pos, clip, obscure) */ void -grtoglPutText (text, pos, clip, obscure) - char *text; /* The text to be drawn. */ - Point *pos; /* A point located at the leftmost point of +grtoglPutText( + char *text, /* The text to be drawn. */ + Point *pos, /* A point located at the leftmost point of * the baseline for this string. */ - Rect *clip; /* A rectangle to clip against */ - LinkedRect *obscure; /* A list of obscuring rectangles */ - + Rect *clip, /* A rectangle to clip against */ + LinkedRect *obscure) /* A list of obscuring rectangles */ { Rect location; Rect overlap; @@ -726,10 +734,9 @@ grtoglPutText (text, pos, clip, obscure) */ void -grTOGLGeoSub(r, area) -Rect *r; /* Rectangle to be subtracted from. */ -Rect *area; /* Area to be subtracted. */ - +grTOGLGeoSub( +Rect *r, /* Rectangle to be subtracted from. */ +Rect *area) /* Area to be subtracted. */ { if (r->r_xbot == area->r_xbot) r->r_xbot = area->r_xtop; else diff --git a/graphics/grText.c b/graphics/grText.c index f99c51303..684a361b4 100644 --- a/graphics/grText.c +++ b/graphics/grText.c @@ -47,14 +47,14 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ bool -GrFontText(str, style, p, font, size, rotate, clip) - char *str; /* The text to be drawn. */ - int style; /* Display style to use for the text */ - Point *p; /* Point of origin */ - int font; /* Font to use */ - int size; /* Scale */ - int rotate; /* Rotation (in degrees) */ - Rect *clip; /* Clipping area */ +GrFontText( + char *str, /* The text to be drawn. */ + int style, /* Display style to use for the text */ + Point *p, /* Point of origin */ + int font, /* Font to use */ + int size, /* Scale */ + int rotate, /* Rotation (in degrees) */ + Rect *clip) /* Clipping area */ { Rect nClip; Point pstart; @@ -106,29 +106,28 @@ GrFontText(str, style, p, font, size, rotate, clip) */ bool -GrPutText(str, style, p, pos, size, adjust, clip, actual) - char *str; /* The text to be drawn. */ - int style; /* The style for drawing text; if -1 then +GrPutText( + char *str, /* The text to be drawn. */ + int style, /* The style for drawing text; if -1 then * the caller has already set the style * and we don't have to. */ - - Point *p; /* The point to align with */ - int pos; /* The alignment desired (GR_NORTH, + Point *p, /* The point to align with */ + int pos, /* The alignment desired (GR_NORTH, * GR_NORTHEAST, etc.) */ - int size; /* The desired size of the text + int size, /* The desired size of the text * (such as GR_TEXT_MEDIUM). */ - bool adjust; /* TRUE means adjust the text (either by + bool adjust, /* TRUE means adjust the text (either by * sliding it around or using a smaller font) * if that is necessary to make it fit into * the clipping rectangle. FALSE means * display the text exactly as instructed, * clipping it if it doesn't fit. */ - Rect *clip; /* A clipping rectangle for the text */ - Rect *actual; /* To be filled in with the location of the + Rect *clip, /* A clipping rectangle for the text */ + Rect *actual) /* To be filled in with the location of the * text. */ { @@ -315,13 +314,13 @@ GrPutText(str, style, p, pos, size, adjust, clip, actual) */ void -GrLabelSize(text, pos, size, area) - char *text; /* Text of the label. */ - int pos; /* Position of the label relative +GrLabelSize( + char *text, /* Text of the label. */ + int pos, /* Position of the label relative * to its positioning point. */ - int size; /* Text size. */ - Rect *area; /* To be filled in with label size. */ + int size, /* Text size. */ + Rect *area) /* To be filled in with label size. */ { int xoffset, yoffset; /* Offsets due to label position. */ diff --git a/graphics/grTk1.c b/graphics/grTk1.c index de5a59d2b..efb41cc85 100644 --- a/graphics/grTk1.c +++ b/graphics/grTk1.c @@ -100,7 +100,7 @@ extern bool GrTkInstalledCMap; */ extern void GrTkClose(), GrTkFlush(); extern void GrTkDelete(),GrTkConfigure(),GrTkRaise(),GrTkLower(); -extern void GrTkLock(),GrTkUnlock(),GrTkIconUpdate(); +extern void GrTkLock(MagWindow *w, bool flag),GrTkUnlock(),GrTkIconUpdate(); extern bool GrTkInit(); extern bool GrTkEventPending(), GrTkCreate(), grtkGetCursorPos(); extern int GrTkWindowId(); @@ -121,9 +121,9 @@ extern char *GrTkWindowName(); */ void -grtkSetWMandC (mask, c) - long mask; /* New value for write mask */ - int c; /* New value for current color */ +grtkSetWMandC( + long mask, /* New value for write mask */ + int c) /* New value for current color */ { static int oldC = -1; static int oldM = -1; @@ -163,8 +163,8 @@ grtkSetWMandC (mask, c) */ void -grtkSetLineStyle (style) - int style; /* New stipple pattern for lines. */ +grtkSetLineStyle( + int style) /* New stipple pattern for lines. */ { static int oldStyle = -1; LineStyle *linestyle; @@ -258,9 +258,9 @@ grtkSetLineStyle (style) */ void -grtkSetSPattern (sttable, numstipples) - int **sttable; /* The table of patterns */ - int numstipples; /* Number of stipples */ +grtkSetSPattern( + int **sttable, /* The table of patterns */ + int numstipples) /* Number of stipples */ { Tk_Window tkwind; Window xwid; @@ -311,8 +311,8 @@ grtkSetSPattern (sttable, numstipples) */ void -grtkSetStipple (stipple) - int stipple; /* The stipple number to be used. */ +grtkSetStipple( + int stipple) /* The stipple number to be used. */ { static int oldStip = -1; if (stipple == oldStip) return; @@ -345,8 +345,8 @@ grtkSetStipple (stipple) #define visual_table_len 7 bool -GrTkInit(dispType) - char *dispType; +GrTkInit( + char *dispType) { int i,j; XVisualInfo grvisual_info, *grvisual_get, grtemplate; @@ -728,9 +728,9 @@ GrTkFlush () */ void -MagicEventProc(clientData, xevent) - ClientData clientData; - XEvent *xevent; +MagicEventProc( + ClientData clientData, + XEvent *xevent) { HashEntry *entry; Tk_Window wind = (Tk_Window)clientData; @@ -1217,10 +1217,10 @@ MagicEventProc(clientData, xevent) */ bool -x11SetDisplay (dispType, outFileName, mouseFileName) - char *dispType; - char *outFileName; - char *mouseFileName; +x11SetDisplay( + char *dispType, + char *outFileName, + char *mouseFileName) { char *planecount; char *fullname; @@ -1235,8 +1235,8 @@ x11SetDisplay (dispType, outFileName, mouseFileName) /* Set up the procedure values in the indirection table. */ - GrLockPtr = GrTkLock; - GrUnlockPtr = GrTkUnlock; + GrLockPtr = (void (*)())GrTkLock; + GrUnlockPtr = (void (*)())GrTkUnlock; GrInitPtr = GrTkInit; GrClosePtr = GrTkClose; GrSetCMapPtr = GrTkSetCMap; @@ -1321,9 +1321,9 @@ extern void MakeWindowCommand(); */ bool -GrTkCreate(w, name) - MagWindow *w; - char *name; +GrTkCreate( + MagWindow *w, + char *name) { Tk_Window tkwind, tktop; Window wind; @@ -1545,8 +1545,8 @@ GrTkCreate(w, name) */ void -GrTkDelete(w) - MagWindow *w; +GrTkDelete( + MagWindow *w) { Tk_Window xw; HashEntry *entry; @@ -1576,8 +1576,8 @@ GrTkDelete(w) */ void -GrTkConfigure(w) - MagWindow *w; +GrTkConfigure( + MagWindow *w) { if (w->w_flags & WIND_OFFSCREEN) return; @@ -1604,8 +1604,8 @@ GrTkConfigure(w) */ void -GrTkRaise(w) - MagWindow *w; +GrTkRaise( + MagWindow *w) { Tk_Window tkwind; @@ -1632,8 +1632,8 @@ GrTkRaise(w) */ void -GrTkLower(w) - MagWindow *w; +GrTkLower( + MagWindow *w) { Tk_Window tkwind; @@ -1660,9 +1660,9 @@ GrTkLower(w) */ void -GrTkLock(w, flag) - MagWindow *w; - bool flag; +GrTkLock( + MagWindow *w, + bool flag) { grSimpleLock(w, flag); @@ -1699,8 +1699,8 @@ GrTkLock(w, flag) */ void -GrTkUnlock(w) - MagWindow *w; +GrTkUnlock( + MagWindow *w) { GR_TK_FLUSH_BATCH(); grSimpleUnlock(w); @@ -1753,9 +1753,9 @@ GrTkEventPending() */ void -GrTkIconUpdate(w, text) /* See Blt code */ - MagWindow *w; - char *text; +GrTkIconUpdate( + MagWindow *w, + char *text) { Tk_Window tkwind; Window wind; @@ -1806,8 +1806,8 @@ GrTkIconUpdate(w, text) /* See Blt code */ */ int -GrTkWindowId(tkname) - char *tkname; +GrTkWindowId( + char *tkname) { Tk_Window tkwind; MagWindow *mw; diff --git a/graphics/grTk2.c b/graphics/grTk2.c index 013e64447..7af7053ce 100644 --- a/graphics/grTk2.c +++ b/graphics/grTk2.c @@ -192,9 +192,9 @@ int grtkNbRects=0; */ void -grtkDrawLines(lines, nb) - XSegment lines[]; - int nb; +grtkDrawLines( + XSegment lines[], + int nb) { XDrawSegments(grXdpy, grCurrent.windowid, grGCDraw, lines, nb); @@ -213,9 +213,11 @@ grtkDrawLines(lines, nb) */ void -grtkDrawLine (x1, y1, x2, y2) - int x1, y1; /* Screen coordinates of first point. */ - int x2, y2; /* Screen coordinates of second point. */ +grtkDrawLine( + int x1, + int y1, + int x2, + int y2) { if (grtkNbLines == TK_BATCH_SIZE) GR_TK_FLUSH_LINES(); grtkLines[grtkNbLines].x1 = x1; @@ -239,9 +241,9 @@ grtkDrawLine (x1, y1, x2, y2) */ void -grtkFillRects(rects, nb) - XRectangle rects[]; - int nb; +grtkFillRects( + XRectangle rects[], + int nb) { XFillRectangles(grXdpy, grCurrent.windowid, grGCFill, rects, nb); } @@ -259,8 +261,8 @@ grtkFillRects(rects, nb) */ void -grtkFillRect(r) - Rect *r; /* Address of a rectangle in screen +grtkFillRect( + Rect *r) /* Address of a rectangle in screen * coordinates. */ { @@ -289,9 +291,9 @@ grtkFillRect(r) */ void -grtkFillPolygon(tp, np) - Point *tp; - int np; +grtkFillPolygon( + Point *tp, + int np) { XPoint xp[5]; int i; diff --git a/graphics/grTk3.c b/graphics/grTk3.c index 16c9f0b53..92c7a2c7d 100644 --- a/graphics/grTk3.c +++ b/graphics/grTk3.c @@ -52,15 +52,15 @@ #define GR_NUM_GRIDS 64 bool -grtkDrawGrid (prect, outline, clip) - Rect *prect; /* A rectangle that forms the template +grtkDrawGrid( + Rect *prect, /* A rectangle that forms the template * for the grid. Note: in order to maintain * precision for the grid, the rectangle * coordinates are specified in units of * screen coordinates multiplied by SUBPIXEL. */ - int outline; /* the outline style */ - Rect *clip; /* a clipping rectangle */ + int outline, /* the outline style */ + Rect *clip) /* a clipping rectangle */ { int xsize, ysize; int x, y; @@ -133,8 +133,8 @@ grtkDrawGrid (prect, outline, clip) */ void -grtkSetCharSize (size) - int size; /* Width of characters, in pixels (6 or 8). */ +grtkSetCharSize( + int size) /* Width of characters, in pixels (6 or 8). */ { grCurrent.fontSize = size; switch (size) @@ -177,10 +177,10 @@ grtkSetCharSize (size) */ int -GrTkTextSize(text, size, r) - char *text; - int size; - Rect *r; +GrTkTextSize( + char *text, + int size, + Rect *r) { Tk_FontMetrics overall; Tk_Font font; @@ -233,9 +233,10 @@ GrTkTextSize(text, size, r) */ int -GrTkReadPixel (w, x, y) - MagWindow *w; - int x,y; /* the location of a pixel in screen coords */ +GrTkReadPixel( + MagWindow *w, + int x, + int y) { XImage *image; unsigned long value; @@ -265,9 +266,9 @@ GrTkReadPixel (w, x, y) */ void -GrTkBitBlt(r, p) - Rect *r; - Point *p; +GrTkBitBlt( + Rect *r, + Point *p) { Window wind = grCurrent.windowid; @@ -295,9 +296,9 @@ GrTkBitBlt(r, p) */ void -grtkRectConvert(mr, xr) - Rect *mr; /* source rectangle pointer */ - XRectangle *xr; /* destination rectangle pointer */ +grtkRectConvert( + Rect *mr, /* source rectangle pointer */ + XRectangle *xr) /* destination rectangle pointer */ { xr->x = mr->r_xbot; xr->y = grMagicToX(mr->r_ytop); @@ -316,14 +317,14 @@ grtkRectConvert(mr, xr) */ void -grtkFontText(text, font, size, rotate, pos, clip, obscure) - char *text; - int font; - int size; /* pixel size of the text */ - int rotate; /* text rotation */ - Point *pos; /* text base position */ - Rect *clip; - LinkedRect *obscure; +grtkFontText( + char *text, + int font, + int size, /* pixel size of the text */ + int rotate, /* text rotation */ + Point *pos, /* text base position */ + Rect *clip, + LinkedRect *obscure) { char *tptr; FontChar *ccur, *clist; @@ -477,14 +478,13 @@ grtkFontText(text, font, size, rotate, pos, clip, obscure) */ void -grtkPutText (text, pos, clip, obscure) - char *text; /* The text to be drawn. */ - Point *pos; /* A point located at the leftmost point of +grtkPutText( + char *text, /* The text to be drawn. */ + Point *pos, /* A point located at the leftmost point of * the baseline for this string. */ - Rect *clip; /* A rectangle to clip against */ - LinkedRect *obscure; /* A list of obscuring rectangles */ - + Rect *clip, /* A rectangle to clip against */ + LinkedRect *obscure) /* A list of obscuring rectangles */ { Rect location; Rect overlap; @@ -547,10 +547,9 @@ grtkPutText (text, pos, clip, obscure) */ void -grtkGeoSub(r, area) - Rect *r; /* Rectangle to be subtracted from. */ - Rect *area; /* Area to be subtracted. */ - +grtkGeoSub( + Rect *r, /* Rectangle to be subtracted from. */ + Rect *area) /* Area to be subtracted. */ { if (r->r_xbot == area->r_xbot) r->r_xbot = area->r_xtop; else diff --git a/graphics/grTkCommon.c b/graphics/grTkCommon.c index 56b767bfb..d42338af8 100644 --- a/graphics/grTkCommon.c +++ b/graphics/grTkCommon.c @@ -140,8 +140,8 @@ grTkFreeFonts() */ void -grTkFreeCursors(glyphs) - GrGlyphs *glyphs; +grTkFreeCursors( + GrGlyphs *glyphs) { int i; for (i = 0; i < glyphs->gr_num; i++) @@ -169,8 +169,8 @@ typedef struct { } CursorCache; void -grTkDefineCursor(glyphs) - GrGlyphs *glyphs; +grTkDefineCursor( + GrGlyphs *glyphs) { char *fgname, *bgname; int glyphnum; @@ -308,8 +308,8 @@ grTkDefineCursor(glyphs) */ char * -GrTkWindowName(mw) - MagWindow *mw; +GrTkWindowName( + MagWindow *mw) { Tk_Window tkwind; char *tkname; @@ -332,7 +332,8 @@ GrTkWindowName(mw) */ void -grtkFreeBackingStore(MagWindow *window) +grtkFreeBackingStore( + MagWindow *window) { Pixmap pmap = (Pixmap)window->w_backingStore; if (pmap == (Pixmap)NULL) return; @@ -357,7 +358,8 @@ grtkFreeBackingStore(MagWindow *window) */ void -grtkCreateBackingStore(MagWindow *w) +grtkCreateBackingStore( + MagWindow *w) { Pixmap pmap; Tk_Window tkwind = (Tk_Window)w->w_grdata; @@ -399,7 +401,9 @@ grtkCreateBackingStore(MagWindow *w) */ bool -grtkGetBackingStore(MagWindow *w, Rect *area) +grtkGetBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap; Tk_Window tkwind = (Tk_Window)w->w_grdata; @@ -466,7 +470,9 @@ grtkGetBackingStore(MagWindow *w, Rect *area) */ bool -grtkScrollBackingStore(MagWindow *w, Point *shift) +grtkScrollBackingStore( + MagWindow *w, + Point *shift) { Pixmap pmap; Tk_Window tkwind = (Tk_Window)w->w_grdata; @@ -531,7 +537,9 @@ grtkScrollBackingStore(MagWindow *w, Point *shift) */ void -grtkPutBackingStore(MagWindow *w, Rect *area) +grtkPutBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap = (Pixmap)w->w_backingStore; Tk_Window tkwind = (Tk_Window)w->w_grdata; @@ -615,8 +623,8 @@ grtkPutBackingStore(MagWindow *w, Rect *area) */ char * -GrTkGetColorByName(name) - char *name; +GrTkGetColorByName( + char *name) { Tk_Window tkwind = Tk_MainWindow(magicinterp); int style, red, green, blue; @@ -896,12 +904,12 @@ ImgLayerCreate(interp, name, argc, argv, typePtr, master, clientDataPtr) */ static int -ImgLayerConfigureMaster(masterPtr, objc, objv, flags) - LayerMaster *masterPtr; /* Pointer to data structure describing +ImgLayerConfigureMaster( + LayerMaster *masterPtr, /* Pointer to data structure describing * overall pixmap image to (reconfigure). */ - int objc; /* Number of entries in objv. */ - Tcl_Obj *const objv[]; /* Pairs of configuration options for image. */ - int flags; /* Flags to pass to Tk_ConfigureWidget, + int objc, /* Number of entries in objv. */ + Tcl_Obj *const objv[], /* Pairs of configuration options for image. */ + int flags) /* Flags to pass to Tk_ConfigureWidget, * such as TK_CONFIG_ARGV_ONLY. */ { LayerInstance *instancePtr; @@ -963,8 +971,8 @@ ImgLayerConfigureMaster(masterPtr, objc, objv, flags) */ void -grDrawOffScreenBox(rect) - Rect *rect; +grDrawOffScreenBox( + Rect *rect) { (*grDrawLinePtr)(rect->r_xbot, rect->r_ytop - 1, rect->r_xtop - 1, rect->r_ytop - 1); @@ -1003,8 +1011,8 @@ grDrawOffScreenBox(rect) #define LAYER_LAYOUT 3 static void -ImgLayerConfigureInstance(instancePtr) - LayerInstance *instancePtr; /* Instance to reconfigure. */ +ImgLayerConfigureInstance( + LayerInstance *instancePtr) /* Instance to reconfigure. */ { LayerMaster *masterPtr = instancePtr->masterPtr; XGCValues gcValues; @@ -1241,11 +1249,11 @@ ImgLayerConfigureInstance(instancePtr) */ static int -ImgLayerCmd(clientData, interp, objc, objv) - ClientData clientData; /* Information about the image master. */ - Tcl_Interp *interp; /* Current interpreter. */ - int objc; /* Number of arguments. */ - Tcl_Obj *const objv[]; /* Argument objects. */ +ImgLayerCmd( + ClientData clientData, /* Information about the image master. */ + Tcl_Interp *interp, /* Current interpreter. */ + int objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ { static char *layerOptions[] = {"cget", "configure", (char *) NULL}; LayerMaster *masterPtr = (LayerMaster *) clientData; @@ -1310,10 +1318,10 @@ ImgLayerCmd(clientData, interp, objc, objv) */ static ClientData -ImgLayerGet(tkwin, masterData) - Tk_Window tkwin; /* Window in which the instance will be +ImgLayerGet( + Tk_Window tkwin, /* Window in which the instance will be * used. */ - ClientData masterData; /* Pointer to our master structure for the + ClientData masterData) /* Pointer to our master structure for the * image. */ { LayerMaster *masterPtr = (LayerMaster *) masterData; @@ -1376,17 +1384,17 @@ ImgLayerGet(tkwin, masterData) */ static void -ImgLayerDisplay(clientData, display, drawable, imageX, imageY, width, - height, drawableX, drawableY) - ClientData clientData; /* Pointer to LayerInstance structure for +ImgLayerDisplay( + ClientData clientData, /* Pointer to LayerInstance structure for * for instance to be displayed. */ - Display *display; /* Display on which to draw image. */ - Drawable drawable; /* Pixmap or window in which to draw image. */ - int imageX, imageY; /* Upper-left corner of region within image - * to draw. */ - int width, height; /* Dimensions of region within image to draw. */ - int drawableX, drawableY; /* Coordinates within drawable that - * correspond to imageX and imageY. */ + Display *display, /* Display on which to draw image. */ + Drawable drawable, /* Pixmap or window in which to draw image. */ + int imageX, + int imageY, + int width, + int height, + int drawableX, + int drawableY) { LayerInstance *instancePtr = (LayerInstance *) clientData; @@ -1420,10 +1428,10 @@ ImgLayerDisplay(clientData, display, drawable, imageX, imageY, width, */ static void -ImgLayerFree(clientData, display) - ClientData clientData; /* Pointer to LayerInstance structure for +ImgLayerFree( + ClientData clientData, /* Pointer to LayerInstance structure for * for instance to be displayed. */ - Display *display; /* Display containing window that used image. */ + Display *display) /* Display containing window that used image. */ { LayerInstance *instancePtr = (LayerInstance *) clientData; LayerInstance *prevPtr; @@ -1479,8 +1487,8 @@ ImgLayerFree(clientData, display) */ static void -ImgLayerDelete(masterData) - ClientData masterData; /* Pointer to BitmapMaster structure for +ImgLayerDelete( + ClientData masterData) /* Pointer to BitmapMaster structure for * image. Must not have any more instances. */ { LayerMaster *masterPtr = (LayerMaster *) masterData; @@ -1515,8 +1523,8 @@ ImgLayerDelete(masterData) */ static void -ImgLayerCmdDeletedProc(clientData) - ClientData clientData; /* Pointer to BitmapMaster structure for +ImgLayerCmdDeletedProc( + ClientData clientData) /* Pointer to BitmapMaster structure for * image. */ { LayerMaster *masterPtr = (LayerMaster *) clientData; @@ -1542,7 +1550,8 @@ ImgLayerCmdDeletedProc(clientData) */ void -RegisterTkCommands(Tcl_Interp *interp) +RegisterTkCommands( + Tcl_Interp *interp) { Tcl_CreateCommand(interp, "magic::magiccolor", (Tcl_CmdProc *)_magic_magiccolor, (ClientData)NULL, diff --git a/graphics/grX11su1.c b/graphics/grX11su1.c index d77efe132..24df17941 100644 --- a/graphics/grX11su1.c +++ b/graphics/grX11su1.c @@ -134,9 +134,9 @@ extern bool grx11GetCursorPos(); */ void -grx11SetWMandC (mask, c) - int mask; /* New value for write mask */ - int c; /* New value for current color */ +grx11SetWMandC( + int mask, /* New value for write mask */ + int c) /* New value for current color */ { static int oldC = -1; static int oldM = -1; @@ -176,8 +176,8 @@ grx11SetWMandC (mask, c) */ void -grx11SetLineStyle (style) - int style; /* New stipple pattern for lines. */ +grx11SetLineStyle( + int style) /* New stipple pattern for lines. */ { static int oldStyle = -1; LineStyle *linestyle; @@ -271,9 +271,9 @@ grx11SetLineStyle (style) */ void -grx11SetSPattern (sttable, numstipples) - int **sttable; /* Table of patterns */ - int numstipples; /* Number of stipples */ +grx11SetSPattern( + int **sttable, /* Table of patterns */ + int numstipples) /* Number of stipples */ { Pixmap p; int i, x, y, pat; @@ -311,8 +311,8 @@ grx11SetSPattern (sttable, numstipples) */ void -grx11SetStipple (stipple) - int stipple; /* The stipple number to be used. */ +grx11SetStipple( + int stipple) /* The stipple number to be used. */ { static int oldStip = -1; if (stipple == oldStip) return; @@ -343,8 +343,8 @@ grx11SetStipple (stipple) */ bool -GrX11Init(dispType) - char *dispType; +GrX11Init( + char *dispType) { int i,j; XVisualInfo grvisual_info, *grvisual_get, grtemplate; @@ -965,10 +965,10 @@ grX11Stdin( */ bool -x11SetDisplay (dispType, outFileName, mouseFileName) - char *dispType; /* arguments not used by X */ - char *outFileName; - char *mouseFileName; +x11SetDisplay( + char *dispType, /* arguments not used by X */ + char *outFileName, + char *mouseFileName) { int fildes[2],fildes2[2]; char *fullname; @@ -1147,9 +1147,9 @@ grXWStdin( */ bool -GrX11Create(w, name) - MagWindow *w; - char *name; +GrX11Create( + MagWindow *w, + char *name) { Window wind; static int firstWindow = 1; @@ -1279,8 +1279,8 @@ GrX11Create(w, name) */ void -GrX11Delete(w) - MagWindow *w; +GrX11Delete( + MagWindow *w) { Window xw; HashEntry *entry; @@ -1308,8 +1308,8 @@ GrX11Delete(w) */ void -GrX11Configure(w) - MagWindow *w; +GrX11Configure( + MagWindow *w) { XMoveResizeWindow(grXdpy,(Window) w->w_grdata, w->w_frameArea.r_xbot, grMagicToXs(w->w_frameArea.r_ytop), @@ -1334,8 +1334,8 @@ GrX11Configure(w) */ void -GrX11Raise(w) - MagWindow *w; +GrX11Raise( + MagWindow *w) { XRaiseWindow(grXdpy, (Window) w->w_grdata ); } @@ -1357,8 +1357,8 @@ GrX11Raise(w) */ void -GrX11Lower(w) - MagWindow *w; +GrX11Lower( + MagWindow *w) { XLowerWindow(grXdpy, (Window) w->w_grdata ); } @@ -1381,9 +1381,9 @@ GrX11Lower(w) */ void -GrX11Lock(w, flag) - MagWindow *w; - bool flag; +GrX11Lock( + MagWindow *w, + bool flag) { grSimpleLock(w, flag); if ( w != GR_LOCK_SCREEN ) @@ -1411,8 +1411,8 @@ GrX11Lock(w, flag) */ void -GrX11Unlock(w) - MagWindow *w; +GrX11Unlock( + MagWindow *w) { GR_X_FLUSH_BATCH(); grSimpleUnlock(w); @@ -1432,10 +1432,9 @@ GrX11Unlock(w) */ void -GrX11IconUpdate(w,text) - MagWindow *w; - char *text; - +GrX11IconUpdate( + MagWindow *w, + char *text) { Window wind = (Window)(w->w_grdata); XClassHint class; diff --git a/graphics/grX11su2.c b/graphics/grX11su2.c index c30ef53ff..fe3c5cfd3 100644 --- a/graphics/grX11su2.c +++ b/graphics/grX11su2.c @@ -225,9 +225,9 @@ int grx11NbRects=0; */ void -grx11DrawLines(lines, nb) - XSegment lines[]; - int nb; +grx11DrawLines( + XSegment lines[], + int nb) { XDrawSegments(grXdpy, grCurrent.window, grGCDraw, lines, nb); @@ -245,9 +245,11 @@ grx11DrawLines(lines, nb) */ void -grx11DrawLine (x1, y1, x2, y2) - int x1, y1; /* Screen coordinates of first point. */ - int x2, y2; /* Screen coordinates of second point. */ +grx11DrawLine( + int x1, + int y1, + int x2, + int y2) { if (grx11NbLines == X11_BATCH_SIZE) GR_X_FLUSH_LINES(); grx11Lines[grx11NbLines].x1 = x1; @@ -270,9 +272,9 @@ grx11DrawLine (x1, y1, x2, y2) */ void -grx11FillRects(rects, nb) - XRectangle rects[]; - int nb; +grx11FillRects( + XRectangle rects[], + int nb) { XFillRectangles(grXdpy, grCurrent.window, grGCFill, rects, nb); } @@ -290,8 +292,8 @@ grx11FillRects(rects, nb) */ void -grx11FillRect(r) - Rect *r; /* Address of a rectangle in screen +grx11FillRect( + Rect *r) /* Address of a rectangle in screen * coordinates. */ { @@ -315,9 +317,9 @@ grx11FillRect(r) */ void -grx11FillPolygon(tp, np) - Point *tp; - int np; +grx11FillPolygon( + Point *tp, + int np) { XPoint xp[5]; int i; diff --git a/graphics/grX11su3.c b/graphics/grX11su3.c index 4e9dff86d..eefc18331 100644 --- a/graphics/grX11su3.c +++ b/graphics/grX11su3.c @@ -68,15 +68,15 @@ static XFontStruct *grXFonts[4]; #define GR_NUM_GRIDS 64 bool -grx11DrawGrid (prect, outline, clip) - Rect *prect; /* A rectangle that forms the template +grx11DrawGrid( + Rect *prect, /* A rectangle that forms the template * for the grid. Note: in order to maintain * precision for the grid, the rectangle * coordinates are specified in units of * screen coordinates multiplied by SUBPIXEL. */ - int outline; /* the outline style */ - Rect *clip; /* a clipping rectangle */ + int outline, /* the outline style */ + Rect *clip) /* a clipping rectangle */ { int xsize, ysize; int x, y; @@ -194,8 +194,8 @@ grx11LoadFont() */ void -grx11SetCharSize (size) - int size; /* Width of characters, in pixels (6 or 8). */ +grx11SetCharSize( + int size) /* Width of characters, in pixels (6 or 8). */ { grCurrent.fontSize = size; switch (size) @@ -238,10 +238,10 @@ grx11SetCharSize (size) */ int -GrX11TextSize(text, size, r) - char *text; - int size; - Rect *r; +GrX11TextSize( + char *text, + int size, + Rect *r) { XCharStruct overall; XFontStruct *font; @@ -292,9 +292,10 @@ GrX11TextSize(text, size, r) */ int -GrX11ReadPixel (w, x, y) - MagWindow *w; - int x,y; /* the location of a pixel in screen coords */ +GrX11ReadPixel( + MagWindow *w, + int x, + int y) { XImage *image; unsigned long value; @@ -326,9 +327,9 @@ GrX11ReadPixel (w, x, y) */ void -GrX11BitBlt(r, p) - Rect *r; - Point *p; +GrX11BitBlt( + Rect *r, + Point *p) { Drawable wind = (Drawable)grCurrent.window; @@ -354,7 +355,8 @@ static GC grXcopyGC = (GC)NULL; */ void -grx11FreeBackingStore(MagWindow *window) +grx11FreeBackingStore( + MagWindow *window) { Pixmap pmap = (Pixmap)window->w_backingStore; if (pmap == (Pixmap)NULL) return; @@ -380,7 +382,8 @@ grx11FreeBackingStore(MagWindow *window) */ void -grx11CreateBackingStore(MagWindow *w) +grx11CreateBackingStore( + MagWindow *w) { Pixmap pmap; Window wind = (Window)w->w_grdata; @@ -433,7 +436,9 @@ grx11CreateBackingStore(MagWindow *w) */ bool -grx11GetBackingStore(MagWindow *w, Rect *area) +grx11GetBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap; Window wind = (Window)w->w_grdata; @@ -482,7 +487,9 @@ grx11GetBackingStore(MagWindow *w, Rect *area) */ bool -grx11ScrollBackingStore(MagWindow *w, Point *shift) +grx11ScrollBackingStore( + MagWindow *w, + Point *shift) { Pixmap pmap; unsigned int width, height; @@ -541,7 +548,9 @@ grx11ScrollBackingStore(MagWindow *w, Point *shift) */ void -grx11PutBackingStore(MagWindow *w, Rect *area) +grx11PutBackingStore( + MagWindow *w, + Rect *area) { Pixmap pmap = (Pixmap)w->w_backingStore; Window wind = (Window)w->w_grdata; @@ -592,9 +601,9 @@ grx11PutBackingStore(MagWindow *w, Rect *area) */ void -grx11RectConvert(mr, xr) - Rect *mr; - XRectangle *xr; +grx11RectConvert( + Rect *mr, + XRectangle *xr) { xr->x = mr->r_xbot; xr->y = grMagicToX(mr->r_ytop); @@ -613,14 +622,14 @@ grx11RectConvert(mr, xr) */ void -grx11FontText(text, font, size, rotate, pos, clip, obscure) - char *text; - int font; - int size; /* pixel size of the text */ - int rotate; /* text rotation */ - Point *pos; /* text base position */ - Rect *clip; - LinkedRect *obscure; +grx11FontText( + char *text, + int font, + int size, /* pixel size of the text */ + int rotate, /* text rotation */ + Point *pos, /* text base position */ + Rect *clip, + LinkedRect *obscure) { char *tptr; FontChar *ccur, *clist; @@ -774,14 +783,13 @@ grx11FontText(text, font, size, rotate, pos, clip, obscure) */ void -grx11PutText (text, pos, clip, obscure) - char *text; /* The text to be drawn. */ - Point *pos; /* A point located at the leftmost point of +grx11PutText( + char *text, /* The text to be drawn. */ + Point *pos, /* A point located at the leftmost point of * the baseline for this string. */ - Rect *clip; /* A rectangle to clip against */ - LinkedRect *obscure; /* A list of obscuring rectangles */ - + Rect *clip, /* A rectangle to clip against */ + LinkedRect *obscure) /* A list of obscuring rectangles */ { Rect location; Rect overlap; @@ -842,9 +850,9 @@ grx11PutText (text, pos, clip, obscure) */ void -grX11suGeoSub(r, area) - Rect *r; /* Rectangle to be subtracted from. */ - Rect *area; /* Area to be subtracted. */ +grX11suGeoSub( + Rect *r, /* Rectangle to be subtracted from. */ + Rect *area) /* Area to be subtracted. */ { if (r->r_xbot == area->r_xbot) r->r_xbot = area->r_xtop; else diff --git a/graphics/grX11su5.c b/graphics/grX11su5.c index fb110f35b..3fc4b93ad 100644 --- a/graphics/grX11su5.c +++ b/graphics/grX11su5.c @@ -53,9 +53,9 @@ Cursor grCursors[MAX_CURSORS]; */ void -GrX11DrawGlyph (gl, p) - GrGlyph *gl; /* A single glyph */ - Point *p; /* screen pos of lower left corner */ +GrX11DrawGlyph( + GrGlyph *gl, /* A single glyph */ + Point *p) /* screen pos of lower left corner */ { Rect bBox; bool anyObscure; @@ -168,8 +168,8 @@ GrX11DrawGlyph (gl, p) */ void -grx11DefineCursor(glyphs) - GrGlyphs *glyphs; +grx11DefineCursor( + GrGlyphs *glyphs) { int glyphnum; Rect oldClip; @@ -301,8 +301,8 @@ grx11DefineCursor(glyphs) */ void -GrX11SetCursor(cursorNum) - int cursorNum; /* The cursor number as defined in the display +GrX11SetCursor( + int cursorNum) /* The cursor number as defined in the display * styles file. */ { diff --git a/graphics/grX11thread.c b/graphics/grX11thread.c index 7a0cb27b6..71b989cca 100644 --- a/graphics/grX11thread.c +++ b/graphics/grX11thread.c @@ -63,9 +63,9 @@ pthread_t xloop_thread = 0; */ void -ParseEvent (event, parentID) - XEvent *event; - int parentID; +ParseEvent( + XEvent *event, + int parentID) { if (event->type == KeyPress) { @@ -161,8 +161,8 @@ ParseEvent (event, parentID) */ void -xloop_begin(window) - Window window; +xloop_begin( + Window window) { XEvent xevent; int parentID; @@ -201,8 +201,8 @@ xloop_begin(window) */ int -xloop_create(window) - Window window; +xloop_create( + Window window) { int status = 0; diff --git a/graphics/graphics.h b/graphics/graphics.h index 331681c54..08db3f103 100644 --- a/graphics/graphics.h +++ b/graphics/graphics.h @@ -25,6 +25,15 @@ #include "utils/magic.h" #include "utils/geometry.h" +/* Forward declaration to avoid circular include with windows/windows.h */ +struct WIND_S1; +typedef struct WIND_S1 MagWindow; + +/* TileType is defined in database/database.h, which sits above graphics in + * the include hierarchy; repeat the (identical) typedef here so prototypes + * can name it without creating a circular dependency. */ +typedef int TileType; + /* data structures */ typedef struct { int idx, mask, color, outline, fill, stipple; @@ -54,13 +63,13 @@ extern void (*GrLockPtr)(); extern void (*GrUnlockPtr)(); extern bool GrHaveLock(); extern void GrClipTo(); -extern void GrClipBox(); +extern void GrClipBox(Rect *prect, int style); extern void GrClipLine(); -extern bool GrPutText(); +extern bool GrPutText(char *str, int style, Point *p, int pos, int size, bool adjust, Rect *clip, Rect *actual); extern void GrFillPolygon(); extern void (*GrDrawGlyphPtr)(); extern void (*GrBitBltPtr)(); -extern int (*GrReadPixelPtr)(); +extern int (*GrReadPixelPtr)(MagWindow *w, int x, int y); extern void (*GrFlushPtr)(); /* Tablet routines */ @@ -83,8 +92,10 @@ extern bool GrDrawGlyphNum(); #define GrFastBox(x) GrDrawFastBox(x, 0) /* external color map routines */ -extern bool GrReadCMap(), GrSaveCMap(); -extern bool GrGetColor(), GrPutColor(); +extern bool GrReadCMap(char *techStyle, char *dispType, char *monType, char *path, char *libPath); +extern bool GrSaveCMap(char *techStyle, char *dispType, char *monType, char *path, char *libPath); +extern bool GrGetColor(int color, int *red, int *green, int *blue); +extern bool GrPutColor(int color, int red, int green, int blue); extern int GrNameToColor(); extern void GrPutManyColors(); extern void (*GrSetCMapPtr)(); @@ -139,7 +150,7 @@ extern void (*GrResumePtr)(); #define GrResume (*GrResumePtr) /* C99 compat */ -extern void GrClipTriangle(); +extern void GrClipTriangle(Rect *r, Rect *c, bool clipped, TileType dinfo, Point *points, int *np); extern void GrBox(); extern bool GrFontText(); extern void GrDiagonal(); diff --git a/grouter/grouteChan.c b/grouter/grouteChan.c index 081861cb1..5149a17fe 100644 --- a/grouter/grouteChan.c +++ b/grouter/grouteChan.c @@ -134,8 +134,8 @@ PaintArea *glChanPaintList; */ void -glChanBuildMap(chanList) - GCRChannel *chanList; /* List of all channels in routing problem */ +glChanBuildMap( + GCRChannel *chanList) /* List of all channels in routing problem */ { GCRChannel *ch; bool workDone; @@ -235,10 +235,10 @@ glChanBuildMap(chanList) */ int -glChanFeedFunc(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +glChanFeedFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { char *mesg; Rect r; @@ -307,9 +307,9 @@ glChanFreeMap() int glChanCheckCount; void -glChanCheckCover(chanList, mask) - GCRChannel *chanList; - TileTypeBitMask *mask; +glChanCheckCover( + GCRChannel *chanList, + TileTypeBitMask *mask) { int glChanCheckFunc(); GCRChannel *ch; @@ -344,10 +344,10 @@ glChanCheckCover(chanList, mask) */ int -glChanCheckFunc(tile, dinfo, ch) - Tile *tile; - TileType dinfo; /* (unused) */ - GCRChannel *ch; +glChanCheckFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + GCRChannel *ch) { char mesg[1024]; Rect r; @@ -394,8 +394,8 @@ glChanCheckFunc(tile, dinfo, ch) */ bool -glChanClip(ch) - GCRChannel *ch; +glChanClip( + GCRChannel *ch) { bool ret; @@ -432,17 +432,17 @@ glChanClip(ch) } int -glChanSetClient(tile, cdata) - Tile *tile; - ClientData cdata; +glChanSetClient( + Tile *tile, + ClientData cdata) { tile->ti_client = cdata; return 0; } void -glChanShowTiles(mesg) - char *mesg; +glChanShowTiles( + char *mesg) { char answer[100], m[1024]; @@ -457,10 +457,10 @@ glChanShowTiles(mesg) } int -glChanShowFunc(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +glChanShowFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { GCRChannel *ch; char mesg[1024]; @@ -503,10 +503,10 @@ glChanShowFunc(tile, dinfo, clientdata) */ int -glChanClipFunc(tile, dinfo, area) - Tile *tile; - TileType dinfo; /* (unused) */ - Rect *area; +glChanClipFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + Rect *area) { ClientData tileClient = tile->ti_client; TileType type = TiGetType(tile); @@ -573,10 +573,10 @@ glChanClipFunc(tile, dinfo, area) */ int -glChanMergeFunc(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +glChanMergeFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { GCRChannel *ch = (GCRChannel *) tile->ti_client; Tile *delayed = NULL; /* delayed free to extend lifetime */ @@ -664,8 +664,8 @@ glChanMergeFunc(tile, dinfo, clientdata) */ void -glChanBlockDens(ch) - GCRChannel *ch; +glChanBlockDens( + GCRChannel *ch) { GlobChan *gc = (GlobChan *) ch->gcr_client; int halfGrid, shiftedOrigin; @@ -782,10 +782,10 @@ glChanBlockDens(ch) } int -glChanPaintFunc(tile, dinfo, type) - Tile *tile; - TileType dinfo; /* (unused) */ - TileType type; +glChanPaintFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TileType type) { static TileType changeTable[4][4] = { /* Paint atop CHAN_NORMAL */ @@ -832,9 +832,9 @@ glChanPaintFunc(tile, dinfo, type) */ void -glChanFlood(area, type) - Rect *area; - TileType type; +glChanFlood( + Rect *area, + TileType type) { TileTypeBitMask hMask, vMask; Rect outside; @@ -878,10 +878,10 @@ glChanFlood(area, type) } int -glChanFloodVFunc(tile, dinfo, area) - Tile *tile; - TileType dinfo; /* (unused) */ - Rect *area; +glChanFloodVFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + Rect *area) { PaintArea *pa; @@ -898,10 +898,10 @@ glChanFloodVFunc(tile, dinfo, area) } int -glChanFloodHFunc(tile, dinfo, area) - Tile *tile; - TileType dinfo; /* (unused) */ - Rect *area; +glChanFloodHFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + Rect *area) { PaintArea *pa; @@ -939,10 +939,10 @@ glChanFloodHFunc(tile, dinfo, area) */ int -glChanSplitRiver(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +glChanSplitRiver( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { ClientData tileClient = tile->ti_client; Tile *tp, *newTile; @@ -1022,10 +1022,10 @@ glChanSplitRiver(tile, dinfo, clientdata) */ int -glChanRiverBlock(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +glChanRiverBlock( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { GCRPin *pin, *pinLast; GCRChannel *ch; @@ -1087,9 +1087,9 @@ glChanRiverBlock(tile, dinfo, clientdata) */ Tile * -glChanPinToTile(hintTile, pin) - Tile *hintTile; /* Hint for starting the tile search */ - GCRPin *pin; /* Find tile containing this pin */ +glChanPinToTile( + Tile *hintTile, /* Hint for starting the tile search */ + GCRPin *pin) /* Find tile containing this pin */ { GCRChannel *ch; Tile *tp; diff --git a/grouter/grouteCrss.c b/grouter/grouteCrss.c index ffe49b817..9b25d1075 100644 --- a/grouter/grouteCrss.c +++ b/grouter/grouteCrss.c @@ -87,10 +87,10 @@ void glCrossTakePin(); */ void -glCrossMark(rootUse, path, pNetId) - CellUse *rootUse; /* For error feedback if non-NULL */ - GlPoint *path; /* Path linked via gl_path pointers */ - NetId *pNetId; /* Net and segment identifier; netid_seg is updated */ +glCrossMark( + CellUse *rootUse, /* For error feedback if non-NULL */ + GlPoint *path, /* Path linked via gl_path pointers */ + NetId *pNetId) /* Net and segment identifier; netid_seg is updated */ { GCRPin *srcPin, *dstPin; GlPoint *rp; @@ -161,10 +161,10 @@ glCrossMark(rootUse, path, pNetId) */ void -glCrossTakePin(rootUse, pin, netid) - CellUse *rootUse; /* For error feedback if non-NULL */ - GCRPin *pin; /* Pin to take */ - NetId netid; /* Identifier to assign */ +glCrossTakePin( + CellUse *rootUse, /* For error feedback if non-NULL */ + GCRPin *pin, /* Pin to take */ + NetId netid) /* Identifier to assign */ { char c[2048+64], name1[1024], name2[1024]; Rect r; @@ -236,8 +236,8 @@ glCrossTakePin(rootUse, pin, netid) */ void -glCrossUnreserve(net) - NLNet *net; +glCrossUnreserve( + NLNet *net) { NLTermLoc *loc; NLTerm *term; @@ -289,11 +289,11 @@ glCrossUnreserve(net) */ int -glCrossEnum(inPt, tp, func, cdata) - GlPoint *inPt; /* Top of heap point being expanded */ - Tile *tp; /* Tile adjacent to inPt->gl_tile */ - int (*func)(); /* Called for each crossing */ - ClientData cdata; /* Passed to (*func)() */ +glCrossEnum( + GlPoint *inPt, /* Top of heap point being expanded */ + Tile *tp, /* Tile adjacent to inPt->gl_tile */ + int (*func)(), /* Called for each crossing */ + ClientData cdata) /* Passed to (*func)() */ { int outSide, origin, lo, hi, max, start, n, nhi; GCRChannel *ch = inPt->gl_pin->gcr_ch; @@ -468,11 +468,11 @@ glCrossEnum(inPt, tp, func, cdata) */ GlPoint * -glCrossAdjust(lookAhead, path) - GlPoint *lookAhead; /* Normally, lookAhead->gl_path == path, except on the +glCrossAdjust( + GlPoint *lookAhead, /* Normally, lookAhead->gl_path == path, except on the * initial call, in which case lookAhead == NULL. */ - GlPoint *path; /* Adjust crossings along this path */ + GlPoint *path) /* Adjust crossings along this path */ { GlPoint *newPath, *newRest; GCRPin *linkedPin, *pin; @@ -571,11 +571,11 @@ glCrossAdjust(lookAhead, path) /*ARGSUSED*/ int -glCrossChoose(newRest, tp, pin, newPath) - GlPoint *newRest; /* Portion of path already assigned */ - Tile *tp; /* UNUSED */ - GCRPin *pin; /* Pin on boundary of tp being considered */ - GlPoint *newPath; /* Update newPath->gl_pin, newPath->gl_cost */ +glCrossChoose( + GlPoint *newRest, /* Portion of path already assigned */ + Tile *tp, /* UNUSED */ + GCRPin *pin, /* Pin on boundary of tp being considered */ + GlPoint *newPath) /* Update newPath->gl_pin, newPath->gl_cost */ { GCRPin *savePin; int cost; @@ -629,10 +629,10 @@ glCrossChoose(newRest, tp, pin, newPath) */ int -glCrossCost(lookAhead, exitPt, entryPt) - GlPoint *lookAhead; - GlPoint *exitPt; - GlPoint *entryPt; +glCrossCost( + GlPoint *lookAhead, + GlPoint *exitPt, + GlPoint *entryPt) { GCRPin *entryPin, *exitPin, *otherPin; GCRPin *opposite; diff --git a/grouter/grouteDens.c b/grouter/grouteDens.c index 432fa33a0..b74d1468b 100644 --- a/grouter/grouteDens.c +++ b/grouter/grouteDens.c @@ -61,10 +61,11 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ bool -glDensAdjust(dens, srcPin, dstPin, netid) - DensMap dens[2]; - GCRPin *srcPin, *dstPin; - NetId netid; +glDensAdjust( + DensMap dens[2], + GCRPin *srcPin, + GCRPin *dstPin, + NetId netid) { int minprow, maxprow, minpcol, maxpcol, mincol, maxcol, minrow, maxrow; int maxvd, maxhd, col, row, nrow, ncol; @@ -187,9 +188,10 @@ glDensAdjust(dens, srcPin, dstPin, netid) */ void -glDMAlloc(dm, top, cap) - DensMap *dm; - int top, cap; +glDMAlloc( + DensMap *dm, + int top, + int cap) { dm->dm_max = 0; dm->dm_size = top + 1; @@ -216,8 +218,9 @@ glDMAlloc(dm, top, cap) */ void -glDMCopy(dm1, dm2) - DensMap *dm1, *dm2; +glDMCopy( + DensMap *dm1, + DensMap *dm2) { dm2->dm_max = dm1->dm_max; ASSERT(dm2->dm_size == dm1->dm_size, "glDMCopy"); @@ -243,8 +246,8 @@ glDMCopy(dm1, dm2) */ void -glDMFree(dm) - DensMap *dm; +glDMFree( + DensMap *dm) { freeMagic((char *) dm->dm_value); } @@ -266,9 +269,10 @@ glDMFree(dm) */ int -glDMMaxInRange(dm, lo, hi) - DensMap *dm; - int lo, hi; +glDMMaxInRange( + DensMap *dm, + int lo, + int hi) { short *dval = dm->dm_value; int n, max; @@ -305,9 +309,9 @@ glDMMaxInRange(dm, lo, hi) */ void -glDensInit(dmap, ch) - DensMap dmap[2]; - GCRChannel *ch; +glDensInit( + DensMap dmap[2], + GCRChannel *ch) { short *dSrc, *dDst, *dEnd; diff --git a/grouter/grouteMain.c b/grouter/grouteMain.c index 79fdccfd7..cb95cdee1 100644 --- a/grouter/grouteMain.c +++ b/grouter/grouteMain.c @@ -80,9 +80,9 @@ void glClientFree(); */ void -GlGlobalRoute(chanList, netList) - GCRChannel *chanList; /* List of all channels in routing problem */ - NLNetList *netList; /* Netlist built by caller */ +GlGlobalRoute( + GCRChannel *chanList, /* List of all channels in routing problem */ + NLNetList *netList) /* Netlist built by caller */ { HeapEntry entry; Heap netHeap; @@ -166,9 +166,9 @@ GlGlobalRoute(chanList, netList) */ void -glClientInit(chanList, netList) - GCRChannel *chanList; - NLNetList *netList; +glClientInit( + GCRChannel *chanList, + NLNetList *netList) { GCRChannel *ch; GlobChan *gc; @@ -214,9 +214,9 @@ glClientInit(chanList, netList) */ void -glClientFree(chanList, netList) - GCRChannel *chanList; - NLNetList *netList; +glClientFree( + GCRChannel *chanList, + NLNetList *netList) { GlobChan *gc; CZone *cz; @@ -279,13 +279,13 @@ glClientFree(chanList, netList) */ GlPoint * -glProcessLoc(startList, loc, bestCost, doFast) - GlPoint *startList; /* List of starting points */ - NLTermLoc *loc; /* Location of terminal being routed to */ - int bestCost; /* Best cost so far; if we can't find a path in +glProcessLoc( + GlPoint *startList, /* List of starting points */ + NLTermLoc *loc, /* Location of terminal being routed to */ + int bestCost, /* Best cost so far; if we can't find a path in * less than this cost, give up. */ - bool doFast; /* If TRUE, only wiggle crossings around within the + bool doFast) /* If TRUE, only wiggle crossings around within the * channels on the shortest path; don't bother * considering other sequences of channels. If FALSE, * we keep generating longer and longer paths until diff --git a/grouter/grouteMaze.c b/grouter/grouteMaze.c index cd67a64e6..c01979485 100644 --- a/grouter/grouteMaze.c +++ b/grouter/grouteMaze.c @@ -92,9 +92,9 @@ bool glMazeCheckLoop(); */ GlPoint * -glMazeFindPath(loc, bestCost) - NLTermLoc *loc; /* Destination point */ - int bestCost; /* Beat this cost or give up */ +glMazeFindPath( + NLTermLoc *loc, /* Destination point */ + int bestCost) /* Beat this cost or give up */ { int heapPts, startPts, frontierPts; GlPoint *inPt; @@ -183,9 +183,9 @@ glMazeFindPath(loc, bestCost) */ void -glMazePropFinal(inPt, loc) - GlPoint *inPt; /* Point being processed */ - NLTermLoc *loc; /* Destination point */ +glMazePropFinal( + GlPoint *inPt, /* Point being processed */ + NLTermLoc *loc) /* Destination point */ { GCRPin *destPin = loc->nloc_pin; Point *destPoint = &loc->nloc_stem; @@ -229,8 +229,8 @@ glMazePropFinal(inPt, loc) */ void -glMazePropRiver(inPt) - GlPoint *inPt; +glMazePropRiver( + GlPoint *inPt) { GCRPin *inPin = inPt->gl_pin, *outPin, *linkedPin; GCRChannel *inCh = inPin->gcr_ch; @@ -311,8 +311,8 @@ glMazePropRiver(inPt) #define NOTBLOCKEDV(tp) (NOTBLOCKED(tp) && TiGetType(tp) != CHAN_HRIVER) void -glMazePropNormal(inPt) - GlPoint *inPt; +glMazePropNormal( + GlPoint *inPt) { Tile *tile = inPt->gl_tile, *tp; @@ -362,10 +362,10 @@ glMazePropNormal(inPt) */ void -glMazeTile(inPt, tile, dir) - GlPoint *inPt; /* Top of heap point being expanded */ - Tile *tile; /* Tile adjacent to inPt->gl_tile */ - int dir; /* Direction from inPt->gl_tile to tile */ +glMazeTile( + GlPoint *inPt, /* Top of heap point being expanded */ + Tile *tile, /* Tile adjacent to inPt->gl_tile */ + int dir) /* Direction from inPt->gl_tile to tile */ { GCRChannel *ch = (GCRChannel *) tile->ti_client; TileType type = TiGetType(tile); @@ -471,10 +471,10 @@ glMazeTile(inPt, tile, dir) */ int -glMazeTileFunc(inPt, tp, pin) - GlPoint *inPt; /* Top of heap point being expanded */ - Tile *tp; /* Tile adjacent to inPt->gl_tile */ - GCRPin *pin; /* Available pin on boundary of tp */ +glMazeTileFunc( + GlPoint *inPt, /* Top of heap point being expanded */ + Tile *tp, /* Tile adjacent to inPt->gl_tile */ + GCRPin *pin) /* Available pin on boundary of tp */ { GlPoint *outPt; int cost; @@ -530,9 +530,9 @@ glMazeTileFunc(inPt, tp, pin) */ bool -glMazeCheckLoop(path, tp) - GlPoint *path; - Tile *tp; +glMazeCheckLoop( + GlPoint *path, + Tile *tp) { for ( ; path; path = path->gl_path) if (path->gl_tile == tp) @@ -559,9 +559,9 @@ glMazeCheckLoop(path, tp) */ void -glMazeResetCost(headPage, headFree) - GlPage *headPage; - int headFree; +glMazeResetCost( + GlPage *headPage, + int headFree) { GlPage *gpage; GCRPin *pin; @@ -583,8 +583,8 @@ glMazeResetCost(headPage, headFree) } void -glPathPrint(path) - GlPoint *path; +glPathPrint( + GlPoint *path) { GlPoint *rp; GCRPin *pin; diff --git a/grouter/grouteMult.c b/grouter/grouteMult.c index cd493402e..db043d768 100644 --- a/grouter/grouteMult.c +++ b/grouter/grouteMult.c @@ -109,13 +109,13 @@ void glMultiAddStart(); */ int -glMultiSteiner(rootUse, net, routeProc, markProc, cdRoute, cdMark) - CellUse *rootUse; /* If non-NULL, feedback for errors left here */ - NLNet *net; /* Net to process */ - GlPoint *(*routeProc)(); /* Procedure to route a segment */ - int (*markProc)(); /* Procedure to remember the route */ - ClientData cdRoute; /* Passed to (*routeProc)() */ - ClientData cdMark; /* Passed to (*markProc)() */ +glMultiSteiner( + CellUse *rootUse, /* If non-NULL, feedback for errors left here */ + NLNet *net, /* Net to process */ + GlPoint *(*routeProc)(), /* Procedure to route a segment */ + int (*markProc)(), /* Procedure to remember the route */ + ClientData cdRoute, /* Passed to (*routeProc)() */ + ClientData cdMark) /* Passed to (*markProc)() */ { GlPoint *startList, *bestDest, *dest; char mesg[128], *lastTermName; @@ -240,8 +240,8 @@ glMultiSteiner(rootUse, net, routeProc, markProc, cdRoute, cdMark) */ int -glMultiStemCost(loc) - NLTermLoc *loc; +glMultiStemCost( + NLTermLoc *loc) { int n1, n2, cost; @@ -278,9 +278,9 @@ glMultiStemCost(loc) */ void -glMultiAddStart(path, pStartList) - GlPoint *path; /* Path linked via gl_path pointers */ - GlPoint **pStartList; /* List of starting points */ +glMultiAddStart( + GlPoint *path, /* Path linked via gl_path pointers */ + GlPoint **pStartList) /* List of starting points */ { GlPoint *srcEntry, *dstEntry; GCRPin *srcPin, *dstPin; diff --git a/grouter/grouteName.c b/grouter/grouteName.c index 86699074c..ece664100 100644 --- a/grouter/grouteName.c +++ b/grouter/grouteName.c @@ -58,9 +58,9 @@ static bool glNameDidInit = FALSE; */ void -glNetNameInit(netList, numNets) - NLNetList *netList; - int numNets; +glNetNameInit( + NLNetList *netList, + int numNets) { NLNet *net; int i; @@ -116,8 +116,8 @@ glNetNameInit(netList, numNets) */ char * -GlNetIdName(id) - int id; +GlNetIdName( + int id) { static char tempId[100]; diff --git a/grouter/grouteNet.c b/grouter/grouteNet.c index ddc2e5769..1b0c41b18 100644 --- a/grouter/grouteNet.c +++ b/grouter/grouteNet.c @@ -131,9 +131,9 @@ int fudgeDenom = 10; */ GlPoint * -glRouteToPoint(loc, bestCost) - NLTermLoc *loc; /* Route from points on heap to this point */ - int bestCost; /* If we haven't found a path with less than +glRouteToPoint( + NLTermLoc *loc, /* Route from points on heap to this point */ + int bestCost) /* If we haven't found a path with less than * this cost, return NULL. */ { @@ -321,14 +321,14 @@ glScalePenalties() */ bool -glPopFromHeap(pNewBest, newPaths, hEntry) - bool *pNewBest; /* Should be TRUE on initial call; afterwards, +glPopFromHeap( + bool *pNewBest, /* Should be TRUE on initial call; afterwards, * we set it to TRUE when glBestCost is updated. */ - bool newPaths; /* TRUE if points added to glHeap since the last + bool newPaths, /* TRUE if points added to glHeap since the last * call to glPopFromHeap(). */ - HeapEntry *hEntry; /* See above */ + HeapEntry *hEntry) /* See above */ { HeapEntry *bestCostTop, *glHeapTop; int minAcceptableCost, newBestCost; @@ -495,9 +495,9 @@ glPopFromHeap(pNewBest, newPaths, hEntry) */ bool -glFinalPropagate(inPt, loc) - GlPoint *inPt; /* Point being processed */ - NLTermLoc *loc; /* Destination point */ +glFinalPropagate( + GlPoint *inPt, /* Point being processed */ + NLTermLoc *loc) /* Destination point */ { GCRChannel *destCh = loc->nloc_chan; GCRPin *destPin = loc->nloc_pin; @@ -565,8 +565,8 @@ glFinalPropagate(inPt, loc) */ int -glRiverPropagate(inPt) - GlPoint *inPt; +glRiverPropagate( + GlPoint *inPt) { GCRPin *inPin = inPt->gl_pin, *outPin, *linkedPin; GCRChannel *inCh = inPt->gl_ch; @@ -719,10 +719,10 @@ glRiverPropagate(inPt) */ void -glNormalPropagate(inPt, inCh, heapCost) - GlPoint *inPt; /* Point on the boundary of inCh */ - GCRChannel *inCh; /* Channel through which we're passing */ - int heapCost; /* Cost with which inPt was added to heap */ +glNormalPropagate( + GlPoint *inPt, /* Point on the boundary of inCh */ + GCRChannel *inCh, /* Channel through which we're passing */ + int heapCost) /* Cost with which inPt was added to heap */ { PinRanges pinRange, prevRange; int x, y, baseCost, min, max; @@ -913,10 +913,11 @@ glNormalPropagate(inPt, inCh, heapCost) int -glMinRemainingCost(inPt, inCh, pRect, dRect) - GlPoint *inPt; - GCRChannel *inCh; - Rect *pRect, *dRect; +glMinRemainingCost( + GlPoint *inPt, + GCRChannel *inCh, + Rect *pRect, + Rect *dRect) { int cost, n; GCRPin *pins; @@ -1042,10 +1043,10 @@ glMinRemainingCost(inPt, inCh, pRect, dRect) int -glPinCost(inPt, pin, oldCost) - GlPoint *inPt; - GCRPin *pin; - int oldCost; +glPinCost( + GlPoint *inPt, + GCRPin *pin, + int oldCost) { int cost; @@ -1089,10 +1090,10 @@ glPinCost(inPt, pin, oldCost) */ bool -glSetDensityClip(inPt, ch, dRect) - GlPoint *inPt; - GCRChannel *ch; - Rect *dRect; +glSetDensityClip( + GlPoint *inPt, + GCRChannel *ch, + Rect *dRect) { GCRPin *inPin = inPt->gl_pin; short *den, maxdensity; @@ -1213,11 +1214,12 @@ glSetDensityClip(inPt, ch, dRect) */ void -glSetPinClip(inPt, inCh, heapCost, dRect, pRect) - GlPoint *inPt; - GCRChannel *inCh; - int heapCost; - Rect *dRect, *pRect; +glSetPinClip( + GlPoint *inPt, + GCRChannel *inCh, + int heapCost, + Rect *dRect, + Rect *pRect) { int bloat, estCost, t; Rect r; @@ -1272,9 +1274,9 @@ glSetPinClip(inPt, inCh, heapCost, dRect, pRect) */ void -glResetCost(headPage, headFree) - GlPage *headPage; - int headFree; +glResetCost( + GlPage *headPage, + int headFree) { GlPage *gpage; GCRPin *pin; @@ -1315,10 +1317,10 @@ glResetCost(headPage, headFree) */ int -glPropagateFn(outCh, outPin, inPt) - GCRChannel *outCh; /* Channel entered from outPin */ - GCRPin *outPin; /* Exit pin, also in inCh */ - GlPoint *inPt; /* Point being considered */ +glPropagateFn( + GCRChannel *outCh, /* Channel entered from outPin */ + GCRPin *outPin, /* Exit pin, also in inCh */ + GlPoint *inPt) /* Point being considered */ { int cost, n; int finalCost; @@ -1403,14 +1405,14 @@ glPropagateFn(outCh, outPin, inPt) */ int -glCrossPenalty(cost, inCh, outCh, inPin, outPin) - int cost; /* Distance cost */ - GCRChannel *inCh; /* Both inPin and outPin are in this channel */ - GCRChannel *outCh; /* Channel to which outPin exits, or NULL +glCrossPenalty( + int cost, /* Distance cost */ + GCRChannel *inCh, /* Both inPin and outPin are in this channel */ + GCRChannel *outCh, /* Channel to which outPin exits, or NULL * if outPin is the destination. */ - GCRPin *inPin; /* Pin used to enter inCh */ - GCRPin *outPin; /* Pin used to exit inCh into outCh */ + GCRPin *inPin, /* Pin used to enter inCh */ + GCRPin *outPin) /* Pin used to exit inCh into outCh */ { GCRPin *otherPin; int count; @@ -1518,9 +1520,10 @@ glCrossPenalty(cost, inCh, outCh, inPin, outPin) */ bool -glDensityExceeded(inCh, inPin, outPin) - GCRChannel *inCh; - GCRPin *inPin, *outPin; +glDensityExceeded( + GCRChannel *inCh, + GCRPin *inPin, + GCRPin *outPin) { int min, max, maxdensity; short *den; @@ -1590,10 +1593,10 @@ glDensityExceeded(inCh, inPin, outPin) */ void -glRectToRange(ch, r, pr) - GCRChannel *ch; - Rect *r; - PinRanges *pr; +glRectToRange( + GCRChannel *ch, + Rect *r, + PinRanges *pr) { Rect clipR; @@ -1642,8 +1645,9 @@ glRectToRange(ch, r, pr) */ bool -glJogsAcrossChannel(inPin, outPin) - GCRPin *inPin, *outPin; +glJogsAcrossChannel( + GCRPin *inPin, + GCRPin *outPin) { switch (inPin->gcr_side) { @@ -1691,11 +1695,13 @@ glJogsAcrossChannel(inPin, outPin) */ void -glPropagateDebug(inPt, inPin, outCh, outPin, prevCost, distCost) - GlPoint *inPt; - GCRPin *inPin, *outPin; - GCRChannel *outCh; - int prevCost, distCost; +glPropagateDebug( + GlPoint *inPt, + GCRPin *inPin, + GCRChannel *outCh, + GCRPin *outPin, + int prevCost, + int distCost) { char mesg[256]; Point linkedPt; @@ -1752,9 +1758,9 @@ glPropagateDebug(inPt, inPin, outCh, outPin, prevCost, distCost) */ void -glLogPath(inPt, cost) - GlPoint *inPt; - int cost; +glLogPath( + GlPoint *inPt, + int cost) { extern Rect glInitRect; @@ -1784,8 +1790,8 @@ glLogPath(inPt, cost) */ void -glPrintPoint(inPt) - GlPoint *inPt; +glPrintPoint( + GlPoint *inPt) { TxPrintf("(%d,%d) l=%d p=0x%x c=0x%x", inPt->gl_point.p_x, inPt->gl_point.p_y, diff --git a/grouter/groutePath.c b/grouter/groutePath.c index 593c49b2d..204446d46 100644 --- a/grouter/groutePath.c +++ b/grouter/groutePath.c @@ -69,10 +69,10 @@ GlPage *glPathCurPage = NULL; */ void -glListAdd(list, pin, cost) - GlPoint **list; /* Linked via gl_path pointers */ - GCRPin *pin; - int cost; +glListAdd( + GlPoint **list, /* Linked via gl_path pointers */ + GCRPin *pin, + int cost) { GlPoint *newPt; @@ -106,9 +106,9 @@ glListAdd(list, pin, cost) */ void -glListToHeap(list, destPt) - GlPoint *list; /* List of points linked via gl_path pointers */ - Point *destPt; +glListToHeap( + GlPoint *list, /* List of points linked via gl_path pointers */ + Point *destPt) { GlPoint *temp, *new; GCRPin *pin; @@ -164,8 +164,8 @@ glListToHeap(list, destPt) */ GlPoint * -glPathCopyPerm(list) - GlPoint *list; +glPathCopyPerm( + GlPoint *list) { GlPoint *new, *prev, *first; @@ -183,8 +183,8 @@ glPathCopyPerm(list) } int -glPathFreePerm(list) - GlPoint *list; +glPathFreePerm( + GlPoint *list) { GlPoint *p; @@ -213,10 +213,10 @@ glPathFreePerm(list) */ GlPoint * -glPathNew(pin, cost, prev) - GCRPin *pin; /* Pin at the crossing point (mustn't be NULL) */ - int cost; /* The cost to get here from source */ - GlPoint *prev; /* Point from which the new one was visited */ +glPathNew( + GCRPin *pin, /* Pin at the crossing point (mustn't be NULL) */ + int cost, /* The cost to get here from source */ + GlPoint *prev) /* Point from which the new one was visited */ { GlPoint *result; diff --git a/grouter/groutePen.c b/grouter/groutePen.c index 6f9263c04..abdc61cd7 100644 --- a/grouter/groutePen.c +++ b/grouter/groutePen.c @@ -73,8 +73,8 @@ CZone *glPenFindCZones(); */ void -glPenSetPerChan(net) - NLNet *net; +glPenSetPerChan( + NLNet *net) { CZone *czNet, *czChan; GlobChan *gc; @@ -92,8 +92,8 @@ glPenSetPerChan(net) } int -glPenClearPerChan(net) - NLNet *net; +glPenClearPerChan( + NLNet *net) { CZone *czNet, *czChan; GlobChan *gc; @@ -181,9 +181,9 @@ glPenClearPerChan(net) */ void -glPenCompute(chanList, netList) - GCRChannel *chanList; /* All the channels in the routing problem */ - NLNetList *netList; /* Netlist being routed */ +glPenCompute( + GCRChannel *chanList, /* All the channels in the routing problem */ + NLNetList *netList) /* Netlist being routed */ { #ifdef notdef CZone *czones, *cz; @@ -263,8 +263,8 @@ glPenCompute(chanList, netList) */ CZone * -glPenFindCZones(chanList) - GCRChannel *chanList; /* All the channels in the routing problem */ +glPenFindCZones( + GCRChannel *chanList) /* All the channels in the routing problem */ { CZone *czList; DensMap *dmap; @@ -300,11 +300,11 @@ glPenFindCZones(chanList) */ CZone * -glPenScanDens(czList, ch, dm, type) - CZone *czList; /* Prepend to this list */ - GCRChannel *ch; /* Which channel is being processed */ - DensMap *dm; /* Map to search */ - int type; /* Type of zone: CZ_ROW or CZ_COL */ +glPenScanDens( + CZone *czList, /* Prepend to this list */ + GCRChannel *ch, /* Which channel is being processed */ + DensMap *dm, /* Map to search */ + int type) /* Type of zone: CZ_ROW or CZ_COL */ { short *val = dm->dm_value; CZone *cz; @@ -381,9 +381,9 @@ glPenScanDens(czList, ch, dm, type) */ void -glPenAssignCosts(cz, netList) - CZone *cz; /* A single CZone being processed */ - NLNetList *netList; /* List of all nets; we look for nets that cross +glPenAssignCosts( + CZone *cz, /* A single CZone being processed */ + NLNetList *netList) /* List of all nets; we look for nets that cross * this zone. */ { @@ -484,8 +484,9 @@ glPenAssignCosts(cz, netList) */ int -glPenSortNetSet(ns1, ns2) - NetSet **ns1, **ns2; +glPenSortNetSet( + NetSet **ns1, + NetSet **ns2) { if ((*ns1)->ns_cost > (*ns2)->ns_cost) return 1; if ((*ns1)->ns_cost < (*ns2)->ns_cost) return -1; @@ -518,9 +519,9 @@ struct glCrossClient }; NetSet * -glPenFindCrossingNets(cz, netList) - CZone *cz; /* A single CZone being processed */ - NLNetList *netList; /* List of all nets; we look for nets that cross +glPenFindCrossingNets( + CZone *cz, /* A single CZone being processed */ + NLNetList *netList) /* List of all nets; we look for nets that cross * this zone. */ { @@ -566,10 +567,11 @@ glPenFindCrossingNets(cz, netList) /*ARGSUSED*/ int -glPenFindCrossingFunc(cz, srcPin, dstPin, rcc) - CZone *cz; /* UNUSED */ - GCRPin *srcPin, *dstPin; /* UNUSED */ - struct glCrossClient *rcc; +glPenFindCrossingFunc( + CZone *cz, /* UNUSED */ + GCRPin *srcPin, + GCRPin *dstPin, + struct glCrossClient *rcc) { NetSet *ns; @@ -615,11 +617,11 @@ glPenFindCrossingFunc(cz, srcPin, dstPin, rcc) */ int -glPenEnumCross(cz, rp, func, cdata) - CZone *cz; /* Look for segments passing through here */ - GlPoint *rp; /* List of GlPoints (linked by gl_path ptrs) */ - int (*func)(); /* Apply to each segment passing through cz */ - ClientData cdata; /* Passed to (*func)() */ +glPenEnumCross( + CZone *cz, /* Look for segments passing through here */ + GlPoint *rp, /* List of GlPoints (linked by gl_path ptrs) */ + int (*func)(), /* Apply to each segment passing through cz */ + ClientData cdata) /* Passed to (*func)() */ { GCRPin *srcPin, *dstPin; int cSrc, cDst; @@ -674,9 +676,9 @@ glPenEnumCross(cz, rp, func, cdata) */ int -glPenRerouteNetCost(cz, net) - CZone *cz; - NLNet *net; /* Net to be rerouted */ +glPenRerouteNetCost( + CZone *cz, + NLNet *net) /* Net to be rerouted */ { NetClient *nc = (NetClient *) net->nnet_cdata; CZone fakeCZ; @@ -707,11 +709,11 @@ glPenRerouteNetCost(cz, net) /*ARGSUSED*/ int -glPenRouteCost(rootUse, bestPath, pNetId, pCost) - CellUse *rootUse; /* UNUSED */ - GlPoint *bestPath; /* Best path for this segment */ - NetId *pNetId; /* UNUSED */ - int *pCost; /* Add bestPath->gl_cost to this */ +glPenRouteCost( + CellUse *rootUse, /* UNUSED */ + GlPoint *bestPath, /* Best path for this segment */ + NetId *pNetId, /* UNUSED */ + int *pCost) /* Add bestPath->gl_cost to this */ { *pCost += bestPath->gl_cost; return 0; @@ -739,10 +741,10 @@ glPenRouteCost(rootUse, bestPath, pNetId, pCost) */ int -glPenDeleteNet(dm, list, cz) - DensMap *dm; /* Update this map */ - List *list; /* List of paths */ - CZone *cz; /* Remove all segments passing through 'cz' from 'dm' */ +glPenDeleteNet( + DensMap *dm, /* Update this map */ + List *list, /* List of paths */ + CZone *cz) /* Remove all segments passing through 'cz' from 'dm' */ { for ( ; list; list = LIST_TAIL(list)) (void) glPenEnumCross(cz, (GlPoint *) LIST_FIRST(list), @@ -768,10 +770,11 @@ glPenDeleteNet(dm, list, cz) */ int -glPenDeleteFunc(cz, srcPin, dstPin, dm) - CZone *cz; /* Being passed through by srcPin..dstPin */ - GCRPin *srcPin, *dstPin; /* Two pins in cz->cz_chan */ - DensMap *dm; /* Remove srcPin..dstPin segment from 'dm' */ +glPenDeleteFunc( + CZone *cz, /* Being passed through by srcPin..dstPin */ + GCRPin *srcPin, + GCRPin *dstPin, + DensMap *dm) /* Remove srcPin..dstPin segment from 'dm' */ { int n; int lo, hi; @@ -819,8 +822,8 @@ glPenDeleteFunc(cz, srcPin, dstPin, dm) */ void -glPenCleanNet(net) - NLNet *net; +glPenCleanNet( + NLNet *net) { List *list; NetClient *nc; @@ -851,10 +854,10 @@ glPenCleanNet(net) */ void -glPenSavePath(rootUse, path, pNetId) - CellUse *rootUse; /* UNUSED */ - GlPoint *path; /* Path linked via gl_path pointers */ - NetId *pNetId; /* Net and segment identifier */ +glPenSavePath( + CellUse *rootUse, /* UNUSED */ + GlPoint *path, /* Path linked via gl_path pointers */ + NetId *pNetId) /* Net and segment identifier */ { GlPoint *newpath; NetClient *nc; @@ -884,8 +887,8 @@ glPenSavePath(rootUse, path, pNetId) */ void -glPenDensitySet(net) - NLNet *net; +glPenDensitySet( + NLNet *net) { NetClient *nc = (NetClient *) net->nnet_cdata; GCRPin *srcPin, *dstPin; diff --git a/grouter/groutePin.c b/grouter/groutePin.c index 5384d109d..21c8d02c3 100644 --- a/grouter/groutePin.c +++ b/grouter/groutePin.c @@ -58,10 +58,10 @@ static char sccsid[] = "@(#)groutePin.c 4.9 MAGIC (Berkeley) 12/8/85"; */ GCRPin * -glPointToPin(ch, side, point) - GCRChannel *ch; /* The channel containing the point */ - int side; /* Side of ch that point lies on */ - Point *point; /* The point to be converted to a pin */ +glPointToPin( + GCRChannel *ch, /* The channel containing the point */ + int side, /* Side of ch that point lies on */ + Point *point) /* The point to be converted to a pin */ { int coord; @@ -131,8 +131,8 @@ glPointToPin(ch, side, point) */ void -GLInitPins(ch) - GCRChannel *ch; +GLInitPins( + GCRChannel *ch) { glPinArrayInit(ch, GEO_NORTH, ch->gcr_tPins, ch->gcr_length); glPinArrayInit(ch, GEO_SOUTH, ch->gcr_bPins, ch->gcr_length); @@ -141,10 +141,11 @@ GLInitPins(ch) } void -glPinArrayInit(ch, side, pins, nPins) - GCRChannel *ch; - GCRPin *pins; - int nPins; +glPinArrayInit( + GCRChannel *ch, + int side, + GCRPin *pins, + int nPins) { GCRPin *pin, *linked; GCRChannel *adjacent; @@ -275,8 +276,8 @@ glPinArrayInit(ch, side, pins, nPins) */ bool -GLBlockPins(ch) - GCRChannel *ch; +GLBlockPins( + GCRChannel *ch) { bool changed; @@ -294,13 +295,13 @@ GLBlockPins(ch) } bool -glPinArrayBlock(ch, pins, opins, nPins) - GCRChannel *ch; /* Channel pins belong to */ - GCRPin *pins; /* Processing this side of channel */ - GCRPin *opins; /* Pins on opposite side; used only if ch is a +glPinArrayBlock( + GCRChannel *ch, /* Channel pins belong to */ + GCRPin *pins, /* Processing this side of channel */ + GCRPin *opins, /* Pins on opposite side; used only if ch is a * river-routing channel. */ - int nPins; /* Number of internal pins (not counting pins[0]) */ + int nPins) /* Number of internal pins (not counting pins[0]) */ { bool changed, isRiver = (ch->gcr_type != CHAN_NORMAL); GCRPin *pin, *opin, *linked; @@ -353,8 +354,8 @@ glPinArrayBlock(ch, pins, opins, nPins) */ void -GLLinkPins(ch) - GCRChannel *ch; +GLLinkPins( + GCRChannel *ch) { glPinArrayLink(ch->gcr_tPins, ch->gcr_length); glPinArrayLink(ch->gcr_bPins, ch->gcr_length); @@ -363,9 +364,9 @@ GLLinkPins(ch) } void -glPinArrayLink(pins, nPins) - GCRPin *pins; - int nPins; +glPinArrayLink( + GCRPin *pins, + int nPins) { GCRPin *pin, *lastPin, *lastValid; @@ -386,8 +387,8 @@ glPinArrayLink(pins, nPins) } } -glShowPin(pin) - GCRPin *pin; +glShowPin( + GCRPin *pin) { char mesg[256]; Rect r, area; @@ -453,8 +454,8 @@ glShowPin(pin) */ void -GLFixStemPins(ch) - GCRChannel *ch; +GLFixStemPins( + GCRChannel *ch) { glPinArrayFixStems(ch->gcr_tPins, ch->gcr_length); glPinArrayFixStems(ch->gcr_bPins, ch->gcr_length); @@ -463,9 +464,9 @@ GLFixStemPins(ch) } void -glPinArrayFixStems(pins, nPins) - GCRPin *pins; - int nPins; +glPinArrayFixStems( + GCRPin *pins, + int nPins) { GCRPin *pin, *lastPin; diff --git a/grouter/grouteTest.c b/grouter/grouteTest.c index 4a1beaedf..3d92313c6 100644 --- a/grouter/grouteTest.c +++ b/grouter/grouteTest.c @@ -111,9 +111,9 @@ void glShowCross(); */ void -GlTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +GlTest( + MagWindow *w, + TxCommand *cmd) { int glDebugSides(); typedef enum { CLRDEBUG, ONLYNET, SETDEBUG, SHOWDEBUG, SIDES } cmdType; @@ -209,8 +209,8 @@ GlTest(w, cmd) } int -glDebugSides(side) - Side *side; +glDebugSides( + Side *side) { char mesg[256]; CellDef *def = EditCellUse->cu_def; @@ -311,9 +311,10 @@ GlInit() */ void -glShowPath(dest, root, kind) - GlPoint *dest, *root; - int kind; +glShowPath( + GlPoint *dest, + GlPoint *root, + int kind) { static NetId dummyId = { 0, 0 }; GlPoint *temp; @@ -343,10 +344,10 @@ glShowPath(dest, root, kind) */ void -glShowCross(pin, netId, kind) - GCRPin *pin; /* Pin itself */ - NetId netId; /* Identifies net and segment for this pin */ - int kind; /* Determines kind of display; see above */ +glShowCross( + GCRPin *pin, /* Pin itself */ + NetId netId, /* Identifies net and segment for this pin */ + int kind) /* Determines kind of display; see above */ { char *name, name1[1024], name2[1024]; int style; @@ -402,8 +403,10 @@ glShowCross(pin, netId, kind) */ void -glHistoAdd(heapPtsBefore, frontierPtsBefore, startPtsBefore) - int heapPtsBefore, frontierPtsBefore, startPtsBefore; +glHistoAdd( + int heapPtsBefore, + int frontierPtsBefore, + int startPtsBefore) { GlNetHisto *gh; @@ -575,9 +578,9 @@ glStatsInit() */ void -glStatsDone(numNets, numTerms) - int numNets; - int numTerms; +glStatsDone( + int numNets, + int numTerms) { if (DebugIsSet(glDebugID, glDebVerbose)) diff --git a/grouter/grouter.h b/grouter/grouter.h index 4128c0a98..167430711 100644 --- a/grouter/grouter.h +++ b/grouter/grouter.h @@ -233,7 +233,7 @@ extern CellUse *glChanUse; /* Internal procedures */ GlPoint *glPathNew(); GlPoint *glPathCopyPerm(); -GlPoint *glProcessLoc(); +GlPoint *glProcessLoc(GlPoint *startList, NLTermLoc *loc, int bestCost, bool doFast); Tile *glChanPinToTile(); void glCrossMark(); diff --git a/irouter/irCommand.c b/irouter/irCommand.c index 80c80e82d..36c296446 100644 --- a/irouter/irCommand.c +++ b/irouter/irCommand.c @@ -96,10 +96,10 @@ extern const SubCmdTableE irSubcommands[]; */ void -irSetNoisyAutoInt(parm, valueS, file) - int *parm; - char *valueS; - FILE *file; +irSetNoisyAutoInt( + int *parm, + char *valueS, + FILE *file) { int which; @@ -208,10 +208,10 @@ irSetNoisyAutoInt(parm, valueS, file) /* irLSetActive -- */ Tcl_Obj * -irLSetActive(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetActive( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewBooleanObj(rL->rl_routeType.rt_active); @@ -221,10 +221,10 @@ irLSetActive(rL,s,file) /* irLSetWidth -- */ Tcl_Obj * -irLSetWidth(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetWidth( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_routeType.rt_width); @@ -234,10 +234,10 @@ irLSetWidth(rL,s,file) /* irLSetLength -- */ Tcl_Obj * -irLSetLength(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetLength( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_routeType.rt_length); @@ -247,10 +247,10 @@ irLSetLength(rL,s,file) /* irLSetHCost -- */ Tcl_Obj * -irLSetHCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetHCost( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_hCost); @@ -260,10 +260,10 @@ irLSetHCost(rL,s,file) /* irLSetVCost -- */ Tcl_Obj * -irLSetVCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetVCost( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_vCost); @@ -273,10 +273,10 @@ irLSetVCost(rL,s,file) /* irLSetJogCost -- */ Tcl_Obj * -irLSetJogCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetJogCost( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_jogCost); @@ -286,10 +286,10 @@ irLSetJogCost(rL,s,file) /* irLSetHintCost -- */ Tcl_Obj * -irLSetHintCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetHintCost( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_hintCost); @@ -299,10 +299,10 @@ irLSetHintCost(rL,s,file) /* irLSetOverCost -- */ Tcl_Obj * -irLSetOverCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetOverCost( + RouteLayer *rL, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rL->rl_overCost); @@ -314,60 +314,60 @@ irLSetOverCost(rL,s,file) /* irLSetActive -- */ void -irLSetActive(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetActive( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyBool(&(rL->rl_routeType.rt_active),s,file); } /* irLSetWidth -- */ void -irLSetWidth(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetWidth( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_routeType.rt_width),s,file); } /* irLSetLength -- */ void -irLSetLength(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetLength( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_routeType.rt_length),s,file); } /* irLSetHCost -- */ void -irLSetHCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetHCost( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_hCost),s,file); } /* irLSetVCost -- */ void -irLSetVCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetVCost( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_vCost),s,file); } /* irLSetJogCost -- */ void -irLSetJogCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetJogCost( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_jogCost),s,file); } @@ -375,20 +375,20 @@ irLSetJogCost(rL,s,file) /* irLSetHintCost -- */ void -irLSetHintCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetHintCost( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_hintCost),s,file); } /* irLSetOverCost -- */ void -irLSetOverCost(rL,s,file) - RouteLayer *rL; - char *s; - FILE *file; +irLSetOverCost( + RouteLayer *rL, + char *s, + FILE *file) { SetNoisyInt(&(rL->rl_overCost),s,file); } @@ -418,10 +418,10 @@ irLSetOverCost(rL,s,file) /* irCSetActive -- */ Tcl_Obj * -irCSetActive(rC,s, file) - RouteContact *rC; - char *s; - FILE *file; +irCSetActive( + RouteContact *rC, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewBooleanObj(rC->rc_routeType.rt_active); @@ -431,10 +431,10 @@ irCSetActive(rC,s, file) /* irCSetWidth -- */ Tcl_Obj * -irCSetWidth(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetWidth( + RouteContact *rC, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rC->rc_routeType.rt_width); @@ -444,10 +444,10 @@ irCSetWidth(rC,s,file) /* irCSetLength-- */ Tcl_Obj * -irCSetLength(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetLength( + RouteContact *rC, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rC->rc_routeType.rt_length); @@ -457,10 +457,10 @@ irCSetLength(rC,s,file) /* irCSetCost -- */ Tcl_Obj * -irCSetCost(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetCost( + RouteContact *rC, + char *s, + FILE *file) { if (file == (FILE *)1) return Tcl_NewIntObj(rC->rc_cost); @@ -472,40 +472,40 @@ irCSetCost(rC,s,file) /* irCSetActive -- */ void -irCSetActive(rC,s, file) - RouteContact *rC; - char *s; - FILE *file; +irCSetActive( + RouteContact *rC, + char *s, + FILE *file) { SetNoisyBool(&(rC->rc_routeType.rt_active),s,file); } /* irCSetWidth -- */ void -irCSetWidth(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetWidth( + RouteContact *rC, + char *s, + FILE *file) { SetNoisyInt(&(rC->rc_routeType.rt_width),s,file); } /* irCSetLength -- */ void -irCSetLength(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetLength( + RouteContact *rC, + char *s, + FILE *file) { SetNoisyInt(&(rC->rc_routeType.rt_length),s,file); } /* irCSetCost -- */ void -irCSetCost(rC,s,file) - RouteContact *rC; - char *s; - FILE *file; +irCSetCost( + RouteContact *rC, + char *s, + FILE *file) { SetNoisyInt(&(rC->rc_cost),s,file); } @@ -535,18 +535,18 @@ irCSetCost(rC,s,file) /* irSrSetRate -- */ void -irSrSetRate(s,file) - char *s; - FILE *file; +irSrSetRate( + char *s, + FILE *file) { SetNoisyDI(&irMazeParms->mp_wRate,s,file); } /* irSrSetWidth -- */ void -irSrSetWidth(s,file) - char *s; - FILE *file; +irSrSetWidth( + char *s, + FILE *file) { SetNoisyDI(&(irMazeParms->mp_wWidth),s,file); } @@ -572,54 +572,54 @@ irSrSetWidth(s,file) /* irWzdSetBloomCost -- */ void -irWzdSetBloomCost(s,file) - char *s; - FILE *file; +irWzdSetBloomCost( + char *s, + FILE *file) { SetNoisyDI(&(irMazeParms->mp_bloomDeltaCost),s,file); } /* irWzdSetBloomLimit -- */ void -irWzdSetBloomLimit(s,file) - char *s; - FILE *file; +irWzdSetBloomLimit( + char *s, + FILE *file) { SetNoisyInt(&(irMazeParms->mp_bloomLimit),s,file); } /* irWzdSetBoundsIncrement -- */ void -irWzdSetBoundsIncrement(s,file) - char *s; - FILE *file; +irWzdSetBoundsIncrement( + char *s, + FILE *file) { irSetNoisyAutoInt(&(irMazeParms->mp_boundsIncrement),s,file); } /* irWzdSetEstimate -- */ void -irWzdSetEstimate(s,file) - char *s; - FILE *file; +irWzdSetEstimate( + char *s, + FILE *file) { SetNoisyBool(&(irMazeParms->mp_estimate),s,file); } /* irWzdSetExpandEndpoints-- */ void -irWzdSetExpandEndpoints(s, file) -char *s; -FILE *file; +irWzdSetExpandEndpoints( +char *s, +FILE *file) { SetNoisyBool(&(irMazeParms->mp_expandEndpoints),s,file); } /* irWzdSetPenalty -- */ void -irWzdSetPenalty(s, file) - char *s; - FILE *file; +irWzdSetPenalty( + char *s, + FILE *file) { if(s) { @@ -655,18 +655,18 @@ irWzdSetPenalty(s, file) /* irWzdSetPenetration-- */ void -irWzdSetPenetration(s, file) -char *s; -FILE *file; +irWzdSetPenetration( +char *s, +FILE *file) { irSetNoisyAutoInt(&(irMazeParms->mp_maxWalkLength),s,file); } /* irWzdSetWindow -- */ void -irWzdSetWindow(s, file) -char *s; -FILE *file; +irWzdSetWindow( +char *s, +FILE *file) { int which; int i, type; @@ -800,9 +800,9 @@ static const struct ) void -irContactsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irContactsCmd( + MagWindow *w, + TxCommand *cmd) { TileType tileType; RouteContact *rC; @@ -1069,9 +1069,9 @@ irContactsCmd(w, cmd) /*ARGSUSED*/ void -irHelpCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irHelpCmd( + MagWindow *w, + TxCommand *cmd) { int n; int which; @@ -1174,9 +1174,9 @@ static const struct /*ARGSUSED*/ void -irLayersCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irLayersCmd( + MagWindow *w, + TxCommand *cmd) { TileType tileType; RouteLayer *rL; @@ -1459,9 +1459,9 @@ static const char* const rOptions[] = { }; void -irRouteCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irRouteCmd( + MagWindow *w, + TxCommand *cmd) { Point *startPtArg = NULL; /* pts to start point, if given on command */ Rect *destRectArg = NULL; /* pts to dest rect, if given on command */ @@ -1753,9 +1753,9 @@ static const struct }; void -irSearchCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irSearchCmd( + MagWindow *w, + TxCommand *cmd) { /* Process by case */ @@ -1853,9 +1853,9 @@ irSearchCmd(w, cmd) */ void -irSpacingsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irSpacingsCmd( + MagWindow *w, + TxCommand *cmd) { TileType tileType; RouteType *rT; @@ -2132,9 +2132,9 @@ irSpacingsCmd(w, cmd) */ void -irVerbosityCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irVerbosityCmd( + MagWindow *w, + TxCommand *cmd) { if(cmd->tx_argc >3) { @@ -2197,9 +2197,9 @@ irVerbosityCmd(w, cmd) */ void -irVersionCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irVersionCmd( + MagWindow *w, + TxCommand *cmd) { if(cmd->tx_argc == 2) @@ -2250,9 +2250,9 @@ static const struct }; void -irWizardCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irWizardCmd( + MagWindow *w, + TxCommand *cmd) { /* Process by case */ @@ -2353,9 +2353,9 @@ irWizardCmd(w, cmd) */ void -irSaveParametersCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irSaveParametersCmd( + MagWindow *w, + TxCommand *cmd) { FILE *saveFile; RouteContact *rC; @@ -2570,9 +2570,9 @@ iroute spacings CLEAR\n\ }, *subCmdP; void -IRCommand(w, cmd) - MagWindow *w; - TxCommand *cmd; +IRCommand( + MagWindow *w, + TxCommand *cmd) { int n; int which; diff --git a/irouter/irInternal.h b/irouter/irInternal.h index f4090905d..a215bf771 100644 --- a/irouter/irInternal.h +++ b/irouter/irInternal.h @@ -48,7 +48,7 @@ extern RouteType *irFindRouteType(); extern RouteLayer *irFindRouteLayer(); extern RouteContact *irFindRouteContact(); -extern char *irRepeatChar(); +extern char *irRepeatChar(int n, char c); /* ------------------------ Data Global to IRouter ------------------- */ extern MazeParameters *irMazeParms; diff --git a/irouter/irRoute.c b/irouter/irRoute.c index e8fc7ace3..63ab59143 100644 --- a/irouter/irRoute.c +++ b/irouter/irRoute.c @@ -92,17 +92,16 @@ typedef struct labelSearchData */ int -irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, - destType, argDestRect, argDestLabel, argDestLayers) - MagWindow *cmdWindow; /* window route command issued to */ - int startType; /* how start is specified */ - Point *argStartPt; /* location to route from (in edit cell coords) */ - char *argStartLabel; /* label to route from */ - List *argStartLayers; /* OK route layers to start route on */ - int destType; /* how dest is specified */ - Rect *argDestRect; /* location to route to (in edit cell coords) */ - char *argDestLabel; /* label to route to */ - List *argDestLayers; /* OK route layers to end route on */ +irRoute( + MagWindow *cmdWindow, /* window route command issued to */ + int startType, /* how start is specified */ + Point *argStartPt, /* location to route from (in edit cell coords) */ + char *argStartLabel, /* label to route from */ + List *argStartLayers, /* OK route layers to start route on */ + int destType, /* how dest is specified */ + Rect *argDestRect, /* location to route to (in edit cell coords) */ + char *argDestLabel, /* label to route to */ + List *argDestLayers) /* OK route layers to end route on */ { CellUse *routeUse; /* Toplevel cell visible during routing */ int expansionMask; /* Subcell expansion modes to use during @@ -497,13 +496,13 @@ irRoute(cmdWindow, startType, argStartPt, argStartLabel, argStartLayers, */ Point -irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) - int startType; /* how start is specified */ - Point *argStartPt; /* location to route from +irGetStartPoint( + int startType, /* how start is specified */ + Point *argStartPt, /* location to route from * (in edit cell coords) */ - char *argStartLabel; /* label to route from */ - TileType *startLayerPtr; /* layer type (returned value) */ - CellUse *routeUse; /* toplevel cell visible to router */ + char *argStartLabel, /* label to route from */ + TileType *startLayerPtr, /* layer type (returned value) */ + CellUse *routeUse) /* toplevel cell visible to router */ { Point startPt; @@ -626,13 +625,13 @@ irGetStartPoint(startType, argStartPt, argStartLabel, startLayerPtr, routeUse) */ Rect -irGetDestRect(destType, argDestRect, argDestLabel, destLayerPtr, routeUse) - int destType; /* how dest is specified */ - Rect *argDestRect; /* location to route to +irGetDestRect( + int destType, /* how dest is specified */ + Rect *argDestRect, /* location to route to * (in edit cell coords) */ - char *argDestLabel; /* label to route to */ - TileType *destLayerPtr; /* layer type (returned value) */ - CellUse *routeUse; /* toplevel cell visible to router */ + char *argDestLabel, /* label to route to */ + TileType *destLayerPtr, /* layer type (returned value) */ + CellUse *routeUse) /* toplevel cell visible to router */ { Rect destRect; @@ -754,11 +753,11 @@ irGetDestRect(destType, argDestRect, argDestLabel, destLayerPtr, routeUse) */ int -irSelLabelsFunc(label, cellUse, transform, clientData) - Label *label; - CellUse *cellUse; - Transform *transform; - ClientData clientData; +irSelLabelsFunc( + Label *label, + CellUse *cellUse, + Transform *transform, + ClientData clientData) { LabelSearchData *lsd = (LabelSearchData *)clientData; CellDef *cellDef = cellUse->cu_def; @@ -804,11 +803,11 @@ irSelLabelsFunc(label, cellUse, transform, clientData) */ int -irAllLabelsFunc(rect, name, label, clientData) - Rect *rect; - char *name; - Label *label; - ClientData clientData; +irAllLabelsFunc( + Rect *rect, + char *name, + Label *label, + ClientData clientData) { LabelSearchData *lsd = (LabelSearchData *)clientData; @@ -849,10 +848,10 @@ irAllLabelsFunc(rect, name, label, clientData) */ int -irSelectedTileFunc(rect, type, c) - Rect *rect; - TileType type; - ClientData c; +irSelectedTileFunc( + Rect *rect, + TileType type, + ClientData c) { RouteLayer *rL = (RouteLayer *) c; MZAddDest(rect, rL->rl_routeType.rt_tileType); @@ -915,12 +914,12 @@ LayerInTouchingContact( */ List * -irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) - CellUse *routeUse; - int expansionMask; /* mask of expanded subcells */ - Point *endPt; - List *argLayers; - char *endPtName; +irChooseEndPtLayers( + CellUse *routeUse, + int expansionMask, /* mask of expanded subcells */ + Point *endPt, + List *argLayers, + char *endPtName) { List *activeLayers; List *presentLayers; diff --git a/irouter/irTestCmd.c b/irouter/irTestCmd.c index efb0fbd4a..0a8bad1ea 100644 --- a/irouter/irTestCmd.c +++ b/irouter/irTestCmd.c @@ -77,9 +77,9 @@ extern const TestCmdTableE irTestCommands[]; */ void -irDebugTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irDebugTstCmd( + MagWindow *w, + TxCommand *cmd) { int result; bool value; @@ -130,9 +130,9 @@ irDebugTstCmd(w, cmd) */ void -irHelpTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irHelpTstCmd( + MagWindow *w, + TxCommand *cmd) { int n; int which; @@ -206,9 +206,9 @@ irHelpTstCmd(w, cmd) */ void -irParmsTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +irParmsTstCmd( + MagWindow *w, + TxCommand *cmd) { MZPrintRLs(irRouteLayers); @@ -265,9 +265,9 @@ const TestCmdTableE irTestCommands[] = { */ void -IRTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +IRTest( + MagWindow *w, + TxCommand *cmd) { int n; int which; diff --git a/irouter/irUtils.c b/irouter/irUtils.c index 6606a46e6..476df611b 100644 --- a/irouter/irUtils.c +++ b/irouter/irUtils.c @@ -50,8 +50,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ RouteType * -irFindRouteType(type) - TileType type; +irFindRouteType( + TileType type) { RouteType *rT; @@ -80,8 +80,8 @@ irFindRouteType(type) */ RouteLayer * -irFindRouteLayer(type) - TileType type; +irFindRouteLayer( + TileType type) { RouteLayer *rL; @@ -110,8 +110,8 @@ irFindRouteLayer(type) */ RouteContact * -irFindRouteContact(type) - TileType type; +irFindRouteContact( + TileType type) { RouteContact *rC; @@ -149,9 +149,9 @@ irFindRouteContact(type) char RepeatString[100]; char * -irRepeatChar(n,c) - int n; - char c; +irRepeatChar( + int n, + char c) { int i; for(i=0; in = freeQ; freeQ = t; @@ -82,8 +82,8 @@ StackFree (t) */ void -LispStackPush (name) - char *name; +LispStackPush( + char *name) { TRACE *t; t = StackNew(); diff --git a/mzrouter/mzBlock.c b/mzrouter/mzBlock.c index afb5baa7d..ad7c071dd 100644 --- a/mzrouter/mzBlock.c +++ b/mzrouter/mzBlock.c @@ -145,8 +145,8 @@ extern void mzPaintBlockType(); */ void -mzBuildMaskDataBlocks(buildArea) - Rect *buildArea; /* Area over which blockage planes will be built */ +mzBuildMaskDataBlocks( + Rect *buildArea) /* Area over which blockage planes will be built */ { Rect searchArea; int pNum; @@ -234,10 +234,10 @@ mzBuildMaskDataBlocks(buildArea) */ int -mzBuildBlockFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; // Unused - TreeContext *cxp; +mzBuildBlockFunc( + Tile *tile, + TileType dinfo, // Unused + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; Rect *buildArea = (Rect *) (cxp->tc_filter->tf_arg); @@ -274,9 +274,9 @@ mzBuildBlockFunc(tile, dinfo, cxp) */ int -mzBlockSubcellsFunc(scx, cdarg) - SearchContext *scx; - ClientData cdarg; +mzBlockSubcellsFunc( + SearchContext *scx, + ClientData cdarg) { Rect r, rDest; Rect *buildArea = (Rect *) cdarg; @@ -317,7 +317,10 @@ mzBlockSubcellsFunc(scx, cdarg) */ int -mzPaintSameNodeFunc(Tile *t, TileType dinfo, Rect *buildArea) +mzPaintSameNodeFunc( + Tile *t, + TileType dinfo, + Rect *buildArea) { Rect r; TileType ttype; @@ -351,11 +354,11 @@ mzPaintSameNodeFunc(Tile *t, TileType dinfo, Rect *buildArea) */ void -mzPaintBlockType(r, type, buildArea, blockType) - Rect *r; - TileType type; - Rect *buildArea; - TileType blockType; +mzPaintBlockType( + Rect *r, + TileType type, + Rect *buildArea, + TileType blockType) { RouteType *rT; TileType locBlockType; @@ -522,8 +525,8 @@ mzPaintBlockType(r, type, buildArea, blockType) */ void -mzBuildFenceBlocks(buildArea) - Rect *buildArea; /* Area over which planes modified */ +mzBuildFenceBlocks( + Rect *buildArea) /* Area over which planes modified */ { int mzBuildFenceBlocksFunc(); Rect searchArea; @@ -580,10 +583,10 @@ mzBuildFenceBlocks(buildArea) */ int -mzBuildFenceBlocksFunc(tile, dinfo, buildArea) - Tile *tile; - TileType dinfo; - Rect *buildArea; /* clip to this area before painting */ +mzBuildFenceBlocksFunc( + Tile *tile, + TileType dinfo, + Rect *buildArea) /* clip to this area before painting */ { RouteType *rT; int d; @@ -648,8 +651,8 @@ mzBuildFenceBlocksFunc(tile, dinfo, buildArea) */ void -mzExtendBlockBoundsR(rect) - Rect *rect; +mzExtendBlockBoundsR( + Rect *rect) { Rect area; TileTypeBitMask genMask; @@ -724,10 +727,10 @@ mzExtendBlockBoundsR(rect) */ int -mzExtendBlockFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; - ClientData cdarg; +mzExtendBlockFunc( + Tile *tile, + TileType dinfo, + ClientData cdarg) { Rect area; @@ -785,8 +788,8 @@ mzExtendBlockFunc(tile, dinfo, cdarg) */ void -mzExtendBlockBounds(point) - Point *point; +mzExtendBlockBounds( + Point *point) { Rect rect; @@ -934,10 +937,10 @@ mzBuildDestAreaBlocks() */ int -mzDestAreaFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +mzDestAreaFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; TileType type = TiGetType(tile); @@ -1014,10 +1017,10 @@ mzDestAreaFunc(tile, dinfo, cxp) */ int -mzDestWalksFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +mzDestWalksFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; TileType type = TiGetType(tile); @@ -1100,10 +1103,10 @@ mzDestWalksFunc(tile, dinfo, cxp) */ int -mzHWalksFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; - ClientData cdarg; +mzHWalksFunc( + Tile *tile, + TileType dinfo, + ClientData cdarg) { RouteType *rT = (RouteType *) cdarg; @@ -1189,10 +1192,10 @@ mzHWalksFunc(tile, dinfo, cdarg) */ int -mzVWalksFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; - ClientData cdarg; +mzVWalksFunc( + Tile *tile, + TileType dinfo, + ClientData cdarg) { RouteType *rT = (RouteType *) cdarg; @@ -1288,10 +1291,10 @@ typedef struct walkContactFuncData */ int -mzLRCWalksFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData cdarg; +mzLRCWalksFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData cdarg) { RouteType *rT = (RouteType *) cdarg; /* RouteType of this dest area */ RouteContact *rC; @@ -1372,10 +1375,10 @@ mzLRCWalksFunc(tile, dinfo, cdarg) */ int -mzUDCWalksFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData cdarg; +mzUDCWalksFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData cdarg) { RouteType *rT = (RouteType *) cdarg; /* RouteType of this dest area */ RouteContact *rC; @@ -1458,9 +1461,9 @@ mzUDCWalksFunc(tile, dinfo, cdarg) */ int -mzCWalksFunc2(tile, cdarg) - Tile *tile; - ClientData cdarg; +mzCWalksFunc2( + Tile *tile, + ClientData cdarg) { WalkContactFuncData *wD = (WalkContactFuncData *) cdarg; Rect rect; diff --git a/mzrouter/mzDebug.c b/mzrouter/mzDebug.c index 8ac6be731..05e8d404b 100644 --- a/mzrouter/mzDebug.c +++ b/mzrouter/mzDebug.c @@ -67,8 +67,8 @@ extern void mzPrintPathHead(); */ void -MZPrintRCListNames(l) - List *l; +MZPrintRCListNames( + List *l) { RouteContact *rC; @@ -101,8 +101,8 @@ MZPrintRCListNames(l) */ void -MZPrintRLListNames(l) - List *l; +MZPrintRLListNames( + List *l) { RouteLayer *rL; @@ -135,8 +135,8 @@ MZPrintRLListNames(l) */ void -MZPrintRLs(rL) - RouteLayer *rL; +MZPrintRLs( + RouteLayer *rL) { while(rL!=NULL) { @@ -166,8 +166,8 @@ MZPrintRLs(rL) */ void -mzPrintRL(rL) - RouteLayer *rL; +mzPrintRL( + RouteLayer *rL) { List *cL; @@ -224,8 +224,8 @@ mzPrintRL(rL) */ void -mzPrintRT(rT) - RouteType *rT; +mzPrintRT( + RouteType *rT) { int i; @@ -282,8 +282,8 @@ mzPrintRT(rT) */ void -MZPrintRCs(rC) - RouteContact *rC; +MZPrintRCs( + RouteContact *rC) { while(rC!=NULL) { @@ -312,8 +312,8 @@ MZPrintRCs(rC) */ void -mzPrintRC(rC) - RouteContact *rC; +mzPrintRC( + RouteContact *rC) { TxPrintf("ROUTE CONTACT:\n"); mzPrintRT(&(rC->rc_routeType)); @@ -348,8 +348,8 @@ mzPrintRC(rC) */ void -mzPrintRPs(path) - RoutePath *path; +mzPrintRPs( + RoutePath *path) { while(path!=NULL) { @@ -377,8 +377,8 @@ mzPrintRPs(path) */ void -mzPrintRP(path) - RoutePath *path; +mzPrintRP( + RoutePath *path) { TxPrintf("ROUTE PATH:"); TxPrintf(" layer = %s", @@ -415,8 +415,8 @@ mzPrintRP(path) /* mzPrintPathHead -- */ void -mzPrintPathHead(path) - RoutePath *path; +mzPrintPathHead( + RoutePath *path) { if(path==NULL) @@ -479,8 +479,8 @@ mzPrintPathHead(path) */ void -mzDumpTags(area) - Rect *area; +mzDumpTags( + Rect *area) { int mzDumpTagsFunc(); SearchContext scx; @@ -526,10 +526,10 @@ mzDumpTags(area) */ int -mzDumpTagsFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +mzDumpTagsFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; Rect r; diff --git a/mzrouter/mzEstimate.c b/mzrouter/mzEstimate.c index 451c9edee..9df197fb3 100644 --- a/mzrouter/mzEstimate.c +++ b/mzrouter/mzEstimate.c @@ -487,10 +487,10 @@ mzCleanEstimate() */ int -mzReclaimTCFunc(tile, dinfo, notUsed) - Tile *tile; - TileType dinfo; - ClientData notUsed; +mzReclaimTCFunc( + Tile *tile, + TileType dinfo, + ClientData notUsed) { if (tile->ti_client != (ClientData)CLIENTDEFAULT) { @@ -537,10 +537,10 @@ mzReclaimTCFunc(tile, dinfo, notUsed) */ int -mzProcessDestEstFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +mzProcessDestEstFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; TileType type = TiGetType(tile); @@ -610,10 +610,10 @@ mzProcessDestEstFunc(tile, dinfo, cxp) */ int -mzDestTileEstFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; - ClientData cdarg; +mzDestTileEstFunc( + Tile *tile, + TileType dinfo, + ClientData cdarg) { Rect rect; @@ -661,10 +661,10 @@ mzDestTileEstFunc(tile, dinfo, cdarg) */ int -mzAddSubcellEstFunc(scx, dinfo, cdarg) - SearchContext *scx; - TileType dinfo; - ClientData cdarg; +mzAddSubcellEstFunc( + SearchContext *scx, + TileType dinfo, + ClientData cdarg) { Rect r, rDest; @@ -703,10 +703,10 @@ mzAddSubcellEstFunc(scx, dinfo, cdarg) */ int -mzAddFenceEstFunc(tile, dinfo, buildArea) - Tile *tile; - TileType dinfo; - Rect *buildArea; /* currently ignored */ +mzAddFenceEstFunc( + Tile *tile, + TileType dinfo, + Rect *buildArea) /* currently ignored */ { Rect r; @@ -742,10 +742,10 @@ mzAddFenceEstFunc(tile, dinfo, buildArea) */ int -mzBuildSolidsListFunc(tile, dinfo, listPtr) - Tile *tile; - TileType dinfo; - List **listPtr; /* pointer to list to add tile to */ +mzBuildSolidsListFunc( + Tile *tile, + TileType dinfo, + List **listPtr) /* pointer to list to add tile to */ { LIST_ADD(tile,*listPtr); @@ -770,10 +770,10 @@ mzBuildSolidsListFunc(tile, dinfo, listPtr) * ---------------------------------------------------------------------------- */ int -mzAssignCostsFunc(tile, dinfo, spaceCosts) - Tile *tile; - TileType dinfo; - TileCosts *spaceCosts; /* costs to assign to space tiles */ +mzAssignCostsFunc( + Tile *tile, + TileType dinfo, + TileCosts *spaceCosts) /* costs to assign to space tiles */ { Tile *tRight, *tUp; TileCosts *newCosts; @@ -869,10 +869,10 @@ mzAssignCostsFunc(tile, dinfo, spaceCosts) * ---------------------------------------------------------------------------- */ int -mzDestInitialAssignFunc(tile, dinfo, cdarg) - Tile *tile; - TileType dinfo; - ClientData cdarg; +mzDestInitialAssignFunc( + Tile *tile, + TileType dinfo, + ClientData cdarg) { Heap *adjHeap = (Heap *) cdarg; Vertex *v; @@ -912,10 +912,10 @@ mzDestInitialAssignFunc(tile, dinfo, cdarg) */ int -mzBuildEstimatesFunc(tile, dinfo, notUsed) - Tile *tile; - TileType dinfo; - ClientData notUsed; +mzBuildEstimatesFunc( + Tile *tile, + TileType dinfo, + ClientData notUsed) { mzBuildCornerEstimators(tile); @@ -943,8 +943,8 @@ mzBuildEstimatesFunc(tile, dinfo, notUsed) */ void -mzBuildCornerEstimators(tile) - Tile *tile; +mzBuildCornerEstimators( + Tile *tile) { TileCosts *tc = (TileCosts *) (tile->ti_client); Vertex *vLLeft = NULL; @@ -1104,8 +1104,8 @@ mzBuildCornerEstimators(tile) * ---------------------------------------------------------------------------- */ void -mzBuildStraightShotEstimators(tile) - Tile *tile; +mzBuildStraightShotEstimators( + Tile *tile) { TileCosts *tc = (TileCosts *) (tile->ti_client); @@ -1257,10 +1257,10 @@ mzBuildStraightShotEstimators(tile) */ bool -AlwaysAsGood(est1, est2, tile) - Estimate *est1; - Estimate *est2; - Tile *tile; +AlwaysAsGood( + Estimate *est1, + Estimate *est2, + Tile *tile) { if(est1->e_cost0 > est2->e_cost0) { @@ -1325,10 +1325,10 @@ AlwaysAsGood(est1, est2, tile) */ int -mzTrimEstimatesFunc(tile, dinfo, notUsed) - Tile *tile; - TileType dinfo; - ClientData notUsed; +mzTrimEstimatesFunc( + Tile *tile, + TileType dinfo, + ClientData notUsed) { TileCosts *tc = (TileCosts *) (tile->ti_client); Estimate *e; @@ -1403,9 +1403,9 @@ mzTrimEstimatesFunc(tile, dinfo, notUsed) */ void -mzSplitTiles(plane, point) - Plane * plane; - Point * point; /* origin from which tiles split */ +mzSplitTiles( + Plane * plane, + Point * point) /* origin from which tiles split */ { Tile *pointTile = TiSrPointNoHint(plane, point); Tile *t; @@ -1588,9 +1588,9 @@ mzAssignVertexCosts() */ void -mzAddVertex(vxThis, adjHeap) - Vertex *vxThis; - Heap *adjHeap; +mzAddVertex( + Vertex *vxThis, + Heap *adjHeap) { Tile *tThis; /* Tile vxThis is attached to */ Point loc; /* location of vxThis */ @@ -1886,8 +1886,8 @@ noLeft:; // changed from DoubleInt to dlong dlong -mzEstimatedCost(point) - Point *point; +mzEstimatedCost( + Point *point) { Tile *t = TiSrPointNoHint(mzEstimatePlane, point); TileCosts *tc = ((TileCosts *) t->ti_client); @@ -1931,9 +1931,9 @@ mzEstimatedCost(point) */ void -mzDumpEstimates(area,fd) - Rect *area; - FILE *fd; +mzDumpEstimates( + Rect *area, + FILE *fd) { int mzDumpEstFunc(); @@ -1976,10 +1976,10 @@ mzDumpEstimates(area,fd) */ int -mzDumpEstFunc(tile, dinfo, fd) - Tile *tile; - TileType dinfo; - FILE *fd; +mzDumpEstFunc( + Tile *tile, + TileType dinfo, + FILE *fd) { Rect r; TileCosts *tilec = (TileCosts *) tile->ti_client; diff --git a/mzrouter/mzMain.c b/mzrouter/mzMain.c index 09717a668..f546a4def 100644 --- a/mzrouter/mzMain.c +++ b/mzrouter/mzMain.c @@ -269,8 +269,8 @@ do \ */ MazeParameters * -MZCopyParms(oldParms) - MazeParameters *oldParms; /* Maze routing parameters */ +MZCopyParms( + MazeParameters *oldParms) /* Maze routing parameters */ { MazeParameters *newParms; HashTable aT; /* Address translation hash table */ @@ -415,8 +415,8 @@ MZCopyParms(oldParms) */ MazeParameters * -MZFindStyle(name) -char *name; /* name of style we are looking for */ +MZFindStyle( +char *name) /* name of style we are looking for */ { MazeStyle *style = mzStyles; @@ -457,10 +457,10 @@ char *name; /* name of style we are looking for */ */ void -MZInitRoute(parms, routeUse, expansionMask) - MazeParameters *parms; /* Maze routing parameters */ - CellUse *routeUse; /* toplevel cell router sees */ - int expansionMask; /* which subcells are expanded - NOTE: the +MZInitRoute( + MazeParameters *parms, /* Maze routing parameters */ + CellUse *routeUse, /* toplevel cell router sees */ + int expansionMask) /* which subcells are expanded - NOTE: the * maze router interpets a 0 mask to mean * all cells are expanded */ @@ -568,9 +568,9 @@ MZInitRoute(parms, routeUse, expansionMask) */ void -MZAddStart(point, type) - Point *point; - TileType type; +MZAddStart( + Point *point, + TileType type) { /* Disable undo to avoid overhead on paint operations to internal planes */ UndoDisable(); @@ -668,9 +668,9 @@ MZAddStart(point, type) */ void -MZAddDest(rect, type) - Rect *rect; - TileType type; +MZAddDest( + Rect *rect, + TileType type) { ColoredRect *dTerm; @@ -721,8 +721,8 @@ MZAddDest(rect, type) */ RoutePath * -MZRoute(mzResult) - int *mzResult; /* Place to put result code */ +MZRoute( + int *mzResult) /* Place to put result code */ { RoutePath *path; /* handle for result of search */ ColoredRect *term; @@ -877,8 +877,8 @@ MZRoute(mzResult) */ void -MZCleanupPath(pathList) - RoutePath *pathList; +MZCleanupPath( + RoutePath *pathList) { RoutePath *path, *n1path, *n2path, *n3path; RoutePath *spath, *cpath, *mpath; @@ -1149,8 +1149,8 @@ MZCleanupPath(pathList) */ CellUse * -MZPaintPath(pathList) - RoutePath *pathList; +MZPaintPath( + RoutePath *pathList) { RoutePath *path, *prev; RouteLayer *last_rL = NULL; diff --git a/mzrouter/mzNumLine.c b/mzrouter/mzNumLine.c index c4851cfb2..224b684c2 100644 --- a/mzrouter/mzNumLine.c +++ b/mzrouter/mzNumLine.c @@ -64,9 +64,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -mzNLInit(nL, size) - NumberLine *nL; - int size; /*initial size of number line */ +mzNLInit( + NumberLine *nL, + int size) /*initial size of number line */ { int *entries; size = MAX(size, 2); @@ -101,9 +101,9 @@ mzNLInit(nL, size) */ void -mzNLInsert(nL,x) - NumberLine *nL; - int x; /* new point */ +mzNLInsert( + NumberLine *nL, + int x) /* new point */ { int lowI, highI; @@ -205,9 +205,9 @@ mzNLInsert(nL,x) */ int * -mzNLGetContainingInterval(nL,x) - NumberLine *nL; - int x; /* new point */ +mzNLGetContainingInterval( + NumberLine *nL, + int x) /* new point */ { int lowI, highI; @@ -256,8 +256,8 @@ mzNLGetContainingInterval(nL,x) */ void -mzNLClear(nL) - NumberLine *nL; +mzNLClear( + NumberLine *nL) { nL->nl_entries[0] = MINFINITY; diff --git a/mzrouter/mzSearch.c b/mzrouter/mzSearch.c index 6911c92d8..56c814c95 100644 --- a/mzrouter/mzSearch.c +++ b/mzrouter/mzSearch.c @@ -179,8 +179,8 @@ extern void mzExtendPath(RoutePath *); * ---------------------------------------------------------------------------- */ RoutePath * -mzSearch(mzResult) - int *mzResult; +mzSearch( + int *mzResult) { RoutePath *path; /* solution */ bool morePartialPaths = TRUE; @@ -728,8 +728,8 @@ mzSearch(mzResult) */ void -mzExtendPath(path) - RoutePath *path; +mzExtendPath( + RoutePath *path) { int extendCode = path->rp_extendCode; @@ -813,8 +813,8 @@ mzExtendPath(path) * ---------------------------------------------------------------------------- */ void -mzExtendViaLRContacts(path) - RoutePath *path; +mzExtendViaLRContacts( + RoutePath *path) { Point p = path->rp_entry, *lastCpos = NULL; RouteLayer *rLayer = path->rp_rLayer; @@ -1010,8 +1010,8 @@ mzExtendViaLRContacts(path) * ---------------------------------------------------------------------------- */ void -mzExtendViaUDContacts(path) - RoutePath *path; +mzExtendViaUDContacts( + RoutePath *path) { Point p = path->rp_entry, *lastCpos = NULL; RouteLayer *rLayer = path->rp_rLayer; @@ -1208,17 +1208,16 @@ mzExtendViaUDContacts(path) * ---------------------------------------------------------------------------- */ void -mzAddPoint(path, p, rLayer, orient, extendCode, costptr) - RoutePath *path; /* path that new point extends */ - Point *p; /* new point */ - RouteLayer *rLayer; /* Route Layer of new point */ - int orient; /* 'H' = endpt of hor seg, 'V' = endpt of vert seg, +mzAddPoint( + RoutePath *path, /* path that new point extends */ + Point *p, /* new point */ + RouteLayer *rLayer, /* Route Layer of new point */ + int orient, /* 'H' = endpt of hor seg, 'V' = endpt of vert seg, * 'O' = LR contact, 'X' = UD contact, * 'B' = first point in path and blocked */ - int extendCode; /* interesting directions to extend in */ - dlong *costptr; /* Incremental cost of new path segment */ - + int extendCode, /* interesting directions to extend in */ + dlong *costptr) /* Incremental cost of new path segment */ { RoutePath *newPath; RoutePath *hashedPath; @@ -1459,8 +1458,8 @@ mzAddPoint(path, p, rLayer, orient, extendCode, costptr) * ---------------------------------------------------------------------------- */ void -mzBloomInit(path) - RoutePath *path; /* path that new point extends */ +mzBloomInit( + RoutePath *path) /* path that new point extends */ { ASSERT(mzBloomStack==NULL,"mzBloomInit"); diff --git a/mzrouter/mzStart.c b/mzrouter/mzStart.c index 7ee8e37a6..bda32de8a 100644 --- a/mzrouter/mzStart.c +++ b/mzrouter/mzStart.c @@ -59,7 +59,10 @@ extern bool mzAddInitialContacts(); */ int -mzFindSamenodeFunc(Tile *tile, TileType dinfo, Point *point) +mzFindSamenodeFunc( + Tile *tile, + TileType dinfo, + Point *point) { *point = tile->ti_ll; return 1; @@ -88,8 +91,8 @@ mzFindSamenodeFunc(Tile *tile, TileType dinfo, Point *point) #define EC_ALL_DIRECTIONS (EC_RIGHT | EC_LEFT | EC_UP | EC_DOWN) bool -mzStart(term) - ColoredRect *term; +mzStart( + ColoredRect *term) { RouteLayer *rL; RouteContact *rC; @@ -204,13 +207,13 @@ mzStart(term) * ---------------------------------------------------------------------------- */ bool -mzExtendInitPath(path, rL, point, cost, length, directions) - RoutePath *path; /* Initial Path, being extended */ - RouteLayer *rL; /* routelayer of new point */ - Point point; /* new point for initPath */ - dlong cost; /* cost of new segment */ - int length; /* length of path (excluding new segment) */ - int directions; /* directions to extend init path in */ +mzExtendInitPath( + RoutePath *path, /* Initial Path, being extended */ + RouteLayer *rL, /* routelayer of new point */ + Point point, /* new point for initPath */ + dlong cost, /* cost of new segment */ + int length, /* length of path (excluding new segment) */ + int directions) /* directions to extend init path in */ { Tile *tp; bool returnCode = TRUE; @@ -321,9 +324,9 @@ mzExtendInitPath(path, rL, point, cost, length, directions) */ bool -mzAddInitialContacts(rL, point) - RouteLayer *rL; /* routelayer of initial point */ - Point point; /* initial point */ +mzAddInitialContacts( + RouteLayer *rL, /* routelayer of initial point */ + Point point) /* initial point */ { List *cL; Tile *tp; diff --git a/mzrouter/mzSubrs.c b/mzrouter/mzSubrs.c index 48fde74e3..682f5e6a2 100644 --- a/mzrouter/mzSubrs.c +++ b/mzrouter/mzSubrs.c @@ -290,10 +290,10 @@ int mzMakeEndpoints; /* Set to MZ_EXPAND_START, MZ_EXPAND_DEST, or */ void -mzMarkConnectedTiles(rect, type, expandType) - Rect *rect; - TileType type; - int expandType; +mzMarkConnectedTiles( + Rect *rect, + TileType type, + int expandType) { List *expandList = NULL; /* areas remaining to be expanded from */ @@ -412,10 +412,10 @@ mzMarkConnectedTiles(rect, type, expandType) */ int -mzConnectedTileFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +mzConnectedTileFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { /* If tile not marked, mark it, add it to marked list, and add * corresponding area to expand list. Mark start tiles MZ_EXPAND_START @@ -514,9 +514,9 @@ mzConnectedTileFunc(tile, dinfo, cxp) */ int -mzConnectedSubcellFunc(scx, cdarg) - SearchContext *scx; - ClientData cdarg; +mzConnectedSubcellFunc( + SearchContext *scx, + ClientData cdarg) { CellUse *cu = scx->scx_use; @@ -550,8 +550,9 @@ mzConnectedSubcellFunc(scx, cdarg) */ RouteContact * -MZGetContact(path, prev) - RoutePath *path, *prev; +MZGetContact( + RoutePath *path, + RoutePath *prev) { RouteContact *rC; List *cL; @@ -586,8 +587,9 @@ MZGetContact(path, prev) */ int -mzPaintContact(path, prev) - RoutePath *path, *prev; +mzPaintContact( + RoutePath *path, + RoutePath *prev) { RouteContact *rC; int pNum, pNumC, cWidth; @@ -670,8 +672,8 @@ mzPaintContact(path, prev) */ RoutePath * -mzCopyPath(path) - RoutePath *path; +mzCopyPath( + RoutePath *path) { RoutePath *newHead, *newPrev, *new; @@ -795,9 +797,9 @@ mzFreeAllRPaths() */ bool -mzPresent(rL,touchingTypes) - RouteLayer *rL; - TileTypeBitMask *touchingTypes; +mzPresent( + RouteLayer *rL, + TileTypeBitMask *touchingTypes) { List *l; diff --git a/mzrouter/mzTech.c b/mzrouter/mzTech.c index 8fe3a5a92..0f0ad893b 100644 --- a/mzrouter/mzTech.c +++ b/mzrouter/mzTech.c @@ -117,8 +117,8 @@ void mzEdgeRule(int, char **); */ void -MZFreeParameters(params) - MazeParameters *params; +MZFreeParameters( + MazeParameters *params) { RouteLayer *rL; RouteContact *rC; @@ -331,10 +331,10 @@ MZAfterTech() */ bool -MZTechLine(sectionName, argc, argv) - char *sectionName; /* Unused */ - int argc; - char *argv[]; +MZTechLine( + char *sectionName, /* Unused */ + int argc, + char *argv[]) { if(strcmp(argv[0], "style") == 0) { @@ -399,9 +399,9 @@ MZTechLine(sectionName, argc, argv) */ void -mzTechStyle(argc, argv) - int argc; - char *argv[]; +mzTechStyle( + int argc, + char *argv[]) { /* if there is a previous style, complete processing on it */ @@ -514,8 +514,8 @@ mzStyleEnd() * ---------------------------------------------------------------------------- */ void -mzSetParmDefaults(parms) - MazeParameters *parms; +mzSetParmDefaults( + MazeParameters *parms) { /* initialize penalty factor for excess cost togo */ @@ -583,9 +583,9 @@ mzSetParmDefaults(parms) */ void -mzTechLayer(argc, argv) - int argc; - char *argv[]; +mzTechLayer( + int argc, + char *argv[]) { RouteLayer *new; TileType tileType; @@ -745,9 +745,9 @@ mzTechLayer(argc, argv) */ void -mzTechNotActive(argc, argv) - int argc; - char *argv[]; +mzTechNotActive( + int argc, + char *argv[]) { int argI; TileType tileType; @@ -811,9 +811,9 @@ mzTechNotActive(argc, argv) */ void -mzTechSpacing(argc, argv) - int argc; - char *argv[]; +mzTechSpacing( + int argc, + char *argv[]) { TechSpacing *new; TileType tileType; @@ -932,9 +932,9 @@ mzTechSpacing(argc, argv) */ void -mzTechSearch(argc, argv) - int argc; - char *argv[]; +mzTechSearch( + int argc, + char *argv[]) { /* check number of arguments */ if(argc != 4) @@ -1036,9 +1036,9 @@ mzTechSearch(argc, argv) */ void -mzTechWidth(argc, argv) - int argc; - char *argv[]; +mzTechWidth( + int argc, + char *argv[]) { TileType tileType; RouteType *rT; @@ -1133,9 +1133,9 @@ mzTechWidth(argc, argv) */ void -mzTechContact(argc, argv) - int argc; - char *argv[]; +mzTechContact( + int argc, + char *argv[]) { RouteContact *new; TileType type, tileType; @@ -1225,9 +1225,9 @@ mzTechContact(argc, argv) */ void -mzInitRouteType(rT,tileType) - RouteType *rT; - TileType tileType; +mzInitRouteType( + RouteType *rT, + TileType tileType) { int t; @@ -1296,8 +1296,8 @@ mzInitRouteType(rT,tileType) */ RouteType * -mzFindRouteType(type) - TileType type; +mzFindRouteType( + TileType type) { RouteType *rT; @@ -1326,8 +1326,8 @@ mzFindRouteType(type) */ RouteLayer * -mzFindRouteLayer(type) - TileType type; +mzFindRouteLayer( + TileType type) { RouteLayer *rL; @@ -1356,8 +1356,8 @@ mzFindRouteLayer(type) */ RouteContact * -mzFindRouteContact(type) - TileType type; +mzFindRouteContact( + TileType type) { RouteContact *rC; @@ -1390,10 +1390,10 @@ mzFindRouteContact(type) */ void -mzUpdateSpacing(rType,tType,distance) - RouteType *rType; /* Route Type to which spacing applies */ - TileType tType; /* spacing from this tiletype */ - int distance; /* min spacing betweeen rType and tType */ +mzUpdateSpacing( + RouteType *rType, /* Route Type to which spacing applies */ + TileType tType, /* spacing from this tiletype */ + int distance) /* min spacing betweeen rType and tType */ { rType->rt_spacing[tType] = MAX(rType->rt_spacing[tType],distance); diff --git a/mzrouter/mzTestCmd.c b/mzrouter/mzTestCmd.c index 4273f5df7..c809225db 100644 --- a/mzrouter/mzTestCmd.c +++ b/mzrouter/mzTestCmd.c @@ -79,9 +79,9 @@ extern const TestCmdTableE mzTestCommands[]; */ void -mzDebugTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzDebugTstCmd( + MagWindow *w, + TxCommand *cmd) { int result; bool value; @@ -133,9 +133,9 @@ mzDebugTstCmd(w, cmd) */ void -mzDumpEstimatesTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzDumpEstimatesTstCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc > 2) { @@ -180,9 +180,9 @@ mzDumpEstimatesTstCmd(w, cmd) */ void -mzDumpTagsTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzDumpTagsTstCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc > 2) { @@ -227,9 +227,9 @@ mzDumpTagsTstCmd(w, cmd) */ void -mzHelpTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzHelpTstCmd( + MagWindow *w, + TxCommand *cmd) { int n; int which; @@ -303,9 +303,9 @@ mzHelpTstCmd(w, cmd) */ void -mzNumberLineTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzNumberLineTstCmd( + MagWindow *w, + TxCommand *cmd) { NumberLine myLine; int *result; @@ -382,9 +382,9 @@ mzNumberLineTstCmd(w, cmd) */ void -mzParmsTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzParmsTstCmd( + MagWindow *w, + TxCommand *cmd) { MZPrintRLs(mzRouteLayers); @@ -413,9 +413,9 @@ mzParmsTstCmd(w, cmd) */ void -mzPlaneTstCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzPlaneTstCmd( + MagWindow *w, + TxCommand *cmd) { TileType t; RouteType *rT; @@ -486,9 +486,9 @@ mzPlaneTstCmd(w, cmd) */ void -mzVersionCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +mzVersionCmd( + MagWindow *w, + TxCommand *cmd) { if(cmd->tx_argc == 2) @@ -573,9 +573,9 @@ const TestCmdTableE mzTestCommands[] = { }, *mzTestCmdP; void -MZTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +MZTest( + MagWindow *w, + TxCommand *cmd) { int n; int which; diff --git a/mzrouter/mzWalk.c b/mzrouter/mzWalk.c index 2a6db28a8..9775c1e43 100644 --- a/mzrouter/mzWalk.c +++ b/mzrouter/mzWalk.c @@ -54,8 +54,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header:"; * ---------------------------------------------------------------------------- */ void -mzWalkRight(path) - RoutePath *path; +mzWalkRight( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pNew; /* next interesting point in direction of extension */ @@ -172,8 +172,8 @@ mzWalkRight(path) * ---------------------------------------------------------------------------- */ void -mzWalkLeft(path) - RoutePath *path; +mzWalkLeft( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pNew; /* next interesting point in direction of extension */ @@ -293,8 +293,8 @@ mzWalkLeft(path) * ---------------------------------------------------------------------------- */ void -mzWalkUp(path) - RoutePath *path; +mzWalkUp( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pNew; /* next interesting point in direction of extension */ @@ -411,8 +411,8 @@ mzWalkUp(path) * ---------------------------------------------------------------------------- */ void -mzWalkDown(path) - RoutePath *path; +mzWalkDown( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pNew; /* next interesting point in direction of extension */ @@ -531,8 +531,8 @@ mzWalkDown(path) * ---------------------------------------------------------------------------- */ void -mzWalkLRContact(path) - RoutePath *path; +mzWalkLRContact( + RoutePath *path) { Point pOrg; /* point to extend from */ int extendCode; /* Interesting directions to extend in */ @@ -618,8 +618,8 @@ mzWalkLRContact(path) * ---------------------------------------------------------------------------- */ void -mzWalkUDContact(path) - RoutePath *path; +mzWalkUDContact( + RoutePath *path) { Point pOrg; /* point to extend from */ int extendCode; /* Interesting directions to extend in */ diff --git a/mzrouter/mzXtndDown.c b/mzrouter/mzXtndDown.c index 049c77bf9..ef7be246b 100644 --- a/mzrouter/mzXtndDown.c +++ b/mzrouter/mzXtndDown.c @@ -53,8 +53,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * ---------------------------------------------------------------------------- */ void -mzExtendDown(path) - RoutePath *path; +mzExtendDown( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pStep; /* one unit from pOrg in direction of extension */ diff --git a/mzrouter/mzXtndLeft.c b/mzrouter/mzXtndLeft.c index a64171a62..afbb40ec6 100644 --- a/mzrouter/mzXtndLeft.c +++ b/mzrouter/mzXtndLeft.c @@ -53,8 +53,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * ---------------------------------------------------------------------------- */ void -mzExtendLeft(path) - RoutePath *path; +mzExtendLeft( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pStep; /* one unit from pOrg in direction of extension */ diff --git a/mzrouter/mzXtndUp.c b/mzrouter/mzXtndUp.c index b5fa89351..574ca6515 100644 --- a/mzrouter/mzXtndUp.c +++ b/mzrouter/mzXtndUp.c @@ -53,8 +53,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ * ---------------------------------------------------------------------------- */ void -mzExtendUp(path) - RoutePath *path; +mzExtendUp( + RoutePath *path) { Point pOrg; /* point to extend from */ Point pStep; /* one unit from pOrg in direction of extension */ diff --git a/netmenu/NMbutton.c b/netmenu/NMbutton.c index 43d40308f..0372f75c8 100644 --- a/netmenu/NMbutton.c +++ b/netmenu/NMbutton.c @@ -66,11 +66,11 @@ char *NMCurNetName = NULL; */ void -NMButtonNetList(window, cmd, nmButton, point) - MagWindow *window; /* Where button was clicked (not used). */ - NetButton *nmButton; /* Data structure for button (not used). */ - TxCommand *cmd; /* Used to figure out which button it was. */ - Point *point; /* Not used. */ +NMButtonNetList( + MagWindow *window, /* Where button was clicked (not used). */ + TxCommand *cmd, /* Used to figure out which button it was. */ + NetButton *nmButton, /* Data structure for button (not used). */ + Point *point) /* Not used. */ { #define MAXLENGTH 200 char newName[MAXLENGTH]; @@ -182,9 +182,9 @@ nmButtonSetup() */ void -NMButtonRight(w, cmd) - MagWindow *w; /* Window in which button was pushed. */ - TxCommand *cmd; /* Detailed information about command. */ +NMButtonRight( + MagWindow *w, /* Window in which button was pushed. */ + TxCommand *cmd) /* Detailed information about command. */ { char *name; extern int nmButHighlightFunc(), nmButUnHighlightFunc(); @@ -251,9 +251,9 @@ NMButtonRight(w, cmd) */ int -nmButCheckFunc(name1, name2) - char *name1; /* Name of terminal in net. */ - char *name2; /* Name of other terminal. */ +nmButCheckFunc( + char *name1, /* Name of terminal in net. */ + char *name2) /* Name of other terminal. */ { if (strcmp(name1, name2) == 0) return 1; return 0; @@ -265,9 +265,9 @@ nmButCheckFunc(name1, name2) */ int -nmFindNetNameFunc(name1, pname2) - char *name1; /* Name of terminal in net. */ - char **pname2; /* Pointer to name to be replaced with +nmFindNetNameFunc( + char *name1, /* Name of terminal in net. */ + char **pname2) /* Pointer to name to be replaced with * different name, if there is a different * name in the net. */ @@ -279,11 +279,11 @@ nmFindNetNameFunc(name1, pname2) /* ARGSUSED */ int -nmButHighlightFunc(area, name, label, pExists) - Rect *area; /* Area of the label. */ - char *name; /* Name of label. */ - Label *label; /* Pointer to label */ - bool *pExists; /* We just set this to TRUE. */ +nmButHighlightFunc( + Rect *area, /* Area of the label. */ + char *name, /* Name of label. */ + Label *label, /* Pointer to label */ + bool *pExists) /* We just set this to TRUE. */ { Rect rootArea; Point point; @@ -297,8 +297,8 @@ nmButHighlightFunc(area, name, label, pExists) } int -nmButUnHighlightFunc(area) - Rect *area; /* Area of the label. */ +nmButUnHighlightFunc( + Rect *area) /* Area of the label. */ { Rect rootArea; Point point; @@ -311,9 +311,9 @@ nmButUnHighlightFunc(area) } int -nmNewRefFunc(name, oldRef) - char *name; /* Name of a terminal in the net. */ - char *oldRef; /* Name we don't want to use as net reference +nmNewRefFunc( + char *name, /* Name of a terminal in the net. */ + char *oldRef) /* Name we don't want to use as net reference * anymore. */ { @@ -344,8 +344,8 @@ nmNewRefFunc(name, oldRef) */ void -NMSelectNet(name) - char *name; /* Gives name of terminal in net to be +NMSelectNet( + char *name) /* Gives name of terminal in net to be * be selected. */ { @@ -371,8 +371,8 @@ NMSelectNet(name) /* For each terminal in the net, highlight each instance of the terminal. */ int -nmSelNetFunc(name) - char *name; +nmSelNetFunc( + char *name) { bool exists; @@ -402,9 +402,9 @@ nmSelNetFunc(name) */ void -NMButtonLeft(w, cmd) - MagWindow *w; /* Window in which button was pushed. */ - TxCommand *cmd; /* Detailed information about the command. */ +NMButtonLeft( + MagWindow *w, /* Window in which button was pushed. */ + TxCommand *cmd) /* Detailed information about the command. */ { char *name; @@ -441,9 +441,9 @@ NMButtonLeft(w, cmd) */ void -NMButtonMiddle(w, cmd) - MagWindow *w; /* Window in which button was pushed. */ - TxCommand *cmd; /* Detailed information about command. */ +NMButtonMiddle( + MagWindow *w, /* Window in which button was pushed. */ + TxCommand *cmd) /* Detailed information about command. */ { char *name; @@ -489,9 +489,9 @@ NMButtonMiddle(w, cmd) */ void -NMButtonProc(w, cmd) - MagWindow *w; /* Window in which button was pushed. */ - TxCommand *cmd; /* Detailed information about exactly what happened. */ +NMButtonProc( + MagWindow *w, /* Window in which button was pushed. */ + TxCommand *cmd) /* Detailed information about exactly what happened. */ { if (cmd->tx_buttonAction != TX_BUTTON_DOWN) return; switch (cmd->tx_button) diff --git a/netmenu/NMshowcell.c b/netmenu/NMshowcell.c index 74b79fd15..5cde1df9c 100644 --- a/netmenu/NMshowcell.c +++ b/netmenu/NMshowcell.c @@ -79,9 +79,9 @@ static Plane *nmscPlane; /* Shared between procs below. */ extern int nmscRedrawFunc(); /* Forward declaration. */ int -NMRedrawCell(window, plane) - MagWindow *window; /* Window in which to redisplay. */ - Plane *plane; /* Non-space tiles on this plane indicate, +NMRedrawCell( + MagWindow *window, /* Window in which to redisplay. */ + Plane *plane) /* Non-space tiles on this plane indicate, * in root cell coordinates, the areas where * highlight information must be redrawn. */ @@ -122,10 +122,10 @@ NMRedrawCell(window, plane) } int -nmscRedrawFunc(tile, dinfo, window) - Tile *tile; /* Tile to be redisplayed on highlight layer.*/ - TileType dinfo; /* Split tile information */ - MagWindow *window; /* Window in which to redisplay. */ +nmscRedrawFunc( + Tile *tile, /* Tile to be redisplayed on highlight layer.*/ + TileType dinfo, /* Split tile information */ + MagWindow *window) /* Window in which to redisplay. */ { Rect area, screenArea; extern int nmscAlways1(); /* Forward reference. */ @@ -142,7 +142,10 @@ nmscRedrawFunc(tile, dinfo, window) } int -nmscAlways1(Tile *tile, TileType dinfo, ClientData clientdata) +nmscAlways1( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return 1; } @@ -200,11 +203,11 @@ NMUnsetCell() */ void -NMShowCell(use, rootDef) - CellUse *use; /* Cell whose contents are to be drawn +NMShowCell( + CellUse *use, /* Cell whose contents are to be drawn * on the highlight plane. */ - CellDef *rootDef; /* Highlights will appear in all windows + CellDef *rootDef) /* Highlights will appear in all windows * with this root definition. */ { @@ -325,8 +328,8 @@ NMShowUnderBox() */ int -NMShowRoutedNet(netName) - char * netName; +NMShowRoutedNet( + char * netName) { int nmShowRoutedNetFunc(); @@ -375,9 +378,9 @@ NMShowRoutedNet(netName) * ---------------------------------------------------------------------------- */ int -nmShowRoutedNetFunc(name, clientData) - char *name; - ClientData clientData; +nmShowRoutedNetFunc( + char *name, + ClientData clientData) { int nmSRNFunc(); @@ -404,11 +407,11 @@ nmShowRoutedNetFunc(name, clientData) /*ARGSUSED*/ int -nmSRNFunc(rect, name, label, cdarg) - Rect *rect; - char *name; /* Unused */ - Label *label; - ClientData cdarg; +nmSRNFunc( + Rect *rect, + char *name, /* Unused */ + Label *label, + ClientData cdarg) { SearchContext scx; diff --git a/netmenu/NMwiring.c b/netmenu/NMwiring.c index 95b7204b5..9cc1efa83 100644 --- a/netmenu/NMwiring.c +++ b/netmenu/NMwiring.c @@ -123,10 +123,10 @@ static int nmVCount= 0; */ int -nmwRipTileFunc(tile, plane, listHead) - Tile *tile; /* Tile that is to be deleted. */ - int plane; /* Plane index of the tile */ - struct nmwarea **listHead; /* Pointer to list head pointer. */ +nmwRipTileFunc( + Tile *tile, /* Tile that is to be deleted. */ + int plane, /* Plane index of the tile */ + struct nmwarea **listHead) /* Pointer to list head pointer. */ { struct nmwarea *new; @@ -219,13 +219,13 @@ NMRipup() /* ARGSUSED */ int -nmRipLocFunc(rect, name, label, area) - Rect *rect; /* Area of the terminal, edit cell coords. */ - char *name; /* Name of the terminal (ignored). */ - Label *label; /* Pointer to the label, used to find out +nmRipLocFunc( + Rect *rect, /* Area of the terminal, edit cell coords. */ + char *name, /* Name of the terminal (ignored). */ + Label *label, /* Pointer to the label, used to find out * what layer the label's attached to. */ - Rect *area; /* We GeoInclude into this all the areas of + Rect *area) /* We GeoInclude into this all the areas of * all the tiles we delete. */ { @@ -278,10 +278,10 @@ nmRipLocFunc(rect, name, label, area) /* ARGSUSED */ int -nmRipNameFunc(name, firstInNet, area) - char *name; /* Name of terminal. */ - bool firstInNet; /* Ignored by this procedure. */ - Rect *area; /* Passed through as ClientData to +nmRipNameFunc( + char *name, /* Name of terminal. */ + bool firstInNet, /* Ignored by this procedure. */ + Rect *area) /* Passed through as ClientData to * nmRipLocFunc. */ { @@ -346,8 +346,8 @@ NMRipupList() */ int -nmwNetCellFunc(scx) - SearchContext *scx; /* Describes search. */ +nmwNetCellFunc( + SearchContext *scx) /* Describes search. */ { TxError("Cell id %s touches net but has no terminals.\n", scx->scx_use->cu_id); @@ -373,9 +373,9 @@ nmwNetCellFunc(scx) */ int -nmwCheckFunc(name, otherName) - char *name; /* Terminal in net. */ - char *otherName; /* Terminal we want to know if it's in net. */ +nmwCheckFunc( + char *name, /* Terminal in net. */ + char *otherName) /* Terminal we want to know if it's in net. */ { if (strcmp(name, otherName) == 0) return 1; return 0; @@ -405,11 +405,11 @@ nmwCheckFunc(name, otherName) /* ARGSUSED */ int -nmwNetTermFunc(scx, label, tpath, netPtr) - SearchContext *scx; /* Describes state of search (ignored). */ - Label *label; /* Label (ignored). */ - TerminalPath *tpath; /* Gives hierarchical label name. */ - char **netPtr; /* Pointer to a terminal in current net. */ +nmwNetTermFunc( + SearchContext *scx, /* Describes state of search (ignored). */ + Label *label, /* Label (ignored). */ + TerminalPath *tpath, /* Gives hierarchical label name. */ + char **netPtr) /* Pointer to a terminal in current net. */ { char *p, *p2; @@ -478,10 +478,10 @@ nmwNetTermFunc(scx, label, tpath, netPtr) */ int -nmwNetTileFunc(tile, plane, netPtr) - Tile *tile; /* Tile that is connected to net. */ - int plane; /* Plane index of the tile */ - char **netPtr; /* Pointer to pointer to net name. */ +nmwNetTileFunc( + Tile *tile, /* Tile that is connected to net. */ + int plane, /* Plane index of the tile */ + char **netPtr) /* Pointer to pointer to net name. */ { SearchContext scx; char label[TERMLENGTH]; @@ -587,11 +587,11 @@ NMExtract() */ int -nmwVerifyLabelFunc2(scx, label, tpath, cd) - SearchContext *scx; /* Describes state of search. */ - Label *label; /* Label. */ - TerminalPath *tpath; /* Gives hierarchical label name. */ - ClientData cd; /* Used in nmwVerifyTileFunc */ +nmwVerifyLabelFunc2( + SearchContext *scx, /* Describes state of search. */ + Label *label, /* Label. */ + TerminalPath *tpath, /* Gives hierarchical label name. */ + ClientData cd) /* Used in nmwVerifyTileFunc */ { char *p, *p2; char *name; @@ -765,11 +765,11 @@ nmwVerifyTileFunc( */ int -nmwVerifyLabelFunc(rect, name, label, cd) - Rect *rect; /* Area of the label, in EditUse coords. */ - char *name; /* Hierarchical name of label. */ - Label *label; /* Actual label structure. */ - ClientData cd; /* Client data for nmwVerifyTileFunc (function pointer) */ +nmwVerifyLabelFunc( + Rect *rect, /* Area of the label, in EditUse coords. */ + char *name, /* Hierarchical name of label. */ + Label *label, /* Actual label structure. */ + ClientData cd) /* Client data for nmwVerifyTileFunc (function pointer) */ { TileTypeBitMask *mask; int i; @@ -826,10 +826,10 @@ nmwVerifyLabelFunc(rect, name, label, cd) /* ARGSUSED */ int -nmwVErrorLabelFunc(rect, name, label) - Rect *rect; /* Area of label in edit cell coords. */ - char *name; /* Hierarchical name of label. */ - Label *label; /* Pointer to the label itself (not used). */ +nmwVErrorLabelFunc( + Rect *rect, /* Area of label in edit cell coords. */ + char *name, /* Hierarchical name of label. */ + Label *label) /* Pointer to the label itself (not used). */ { char msg[200]; Rect biggerArea; @@ -868,9 +868,9 @@ nmwVErrorLabelFunc(rect, name, label) /* ARGSUSED */ int -nmwVerifyTermFunc(name, report) - char *name; /* Name of terminal. */ - bool report; /* TRUE => print error messages */ +nmwVerifyTermFunc( + char *name, /* Name of terminal. */ + bool report) /* TRUE => print error messages */ { int i, found; @@ -923,9 +923,9 @@ nmwVerifyTermFunc(name, report) */ int -nmwVerifyNetFunc(name, first) - char *name; /* Name of terminal. */ - bool first; /* TRUE means this is first terminal +nmwVerifyNetFunc( + char *name, /* Name of terminal. */ + bool first) /* TRUE means this is first terminal * of a new net. */ { @@ -1081,7 +1081,7 @@ NMVerify() int NMCull() { - int nmwCullNetFunc(); + int nmwCullNetFunc(char *name, bool first); /* This implementation is the complement of the verify command. Instead * of finding bad nets and reporting them, find good nets and remove them. @@ -1118,9 +1118,9 @@ NMCull() * ---------------------------------------------------------------------------- */ int -nmwCullNetFunc(name, first) - char *name; /* Name of a terminal in a net */ - bool first; /* TRUE => first terminal of a net */ +nmwCullNetFunc( + char *name, /* Name of a terminal in a net */ + bool first) /* TRUE => first terminal of a net */ { int i; @@ -1222,10 +1222,10 @@ NMMeasureNet() /* ARGSUSED */ int -nmMeasureFunc(r, type, clientData) - Rect *r; - TileType type; - ClientData clientData; +nmMeasureFunc( + Rect *r, + TileType type, + ClientData clientData) { if(type == RtrMetalType) nmMArea=nmMArea+(r->r_xtop-r->r_xbot)*(r->r_ytop-r->r_ybot); @@ -1257,10 +1257,10 @@ nmMeasureFunc(r, type, clientData) * ---------------------------------------------------------------------------- */ void -NMMeasureAll(fp) - FILE * fp; +NMMeasureAll( + FILE * fp) { - int nmAllFunc(); + int nmAllFunc(char *name, bool firstInNet, FILE * fp); nmMArea = nmPArea = nmVCount= 0; (void) NMEnumNets(nmAllFunc, (ClientData) fp); @@ -1271,10 +1271,10 @@ NMMeasureAll(fp) /* ARGSUSED */ int -nmAllFunc(name, firstInNet, fp) - char *name; - bool firstInNet; - FILE * fp; +nmAllFunc( + char *name, + bool firstInNet, + FILE * fp) { void nmwMeasureTileFunc(); int saveM, saveP, saveV; @@ -1329,8 +1329,8 @@ nmAllFunc(name, firstInNet, fp) * ---------------------------------------------------------------------------- */ void -nmwMeasureTileFunc(tile) - Tile * tile; +nmwMeasureTileFunc( + Tile * tile) { int i; Rect r; diff --git a/oa/oa.c b/oa/oa.c index 70e65c70b..1f8ee05c0 100644 --- a/oa/oa.c +++ b/oa/oa.c @@ -77,20 +77,20 @@ OAInit() */ int -OACellSearch(scx, xMask, func, cdarg) - SearchContext *scx; /* Pointer to search context specifying a cell use to +OACellSearch( + 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 */ { TreeContext context; TreeFilter filter; @@ -149,11 +149,14 @@ OACellSearch(scx, xMask, func, cdarg) */ int -oaTreeCellSrFunc(instname, defname, llx, lly, urx, ury, cdarg) - char *instname; - char *defname; - int llx, lly, urx, ury; - ClientData cdarg; +oaTreeCellSrFunc( + char *instname, + char *defname, + int llx, + int lly, + int urx, + int ury, + ClientData cdarg) { TreeContext *context = (TreeContext *)cdarg; TreeFilter *filter = context->tc_filter; diff --git a/plot/plotCmd.c b/plot/plotCmd.c index bee927e6a..fe978b85c 100644 --- a/plot/plotCmd.c +++ b/plot/plotCmd.c @@ -86,9 +86,9 @@ typedef enum { HELP } PlotOptions; void -CmdPlot(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPlot( + MagWindow *w, + TxCommand *cmd) { int option; const char * const *msg; diff --git a/plot/plotHP.c b/plot/plotHP.c index e2c6de540..d5d2b91c8 100644 --- a/plot/plotHP.c +++ b/plot/plotHP.c @@ -36,9 +36,11 @@ extern int rasFileByteCount; */ void -PlotHPRTLHeader(width, height, density, hpfile) - int width, height, density; - FILE *hpfile; +PlotHPRTLHeader( + int width, + int height, + int density, + FILE *hpfile) { fprintf(hpfile, "\033*r-3U\n"); /* Simple CMY color space */ fprintf(hpfile, "\033*r%dS", width); /* Image width in pixels. */ @@ -64,9 +66,12 @@ PlotHPRTLHeader(width, height, density, hpfile) #define THIN_MARGIN 40 /* thin spacer (1mm) in HPGL2 coordinates */ void -PlotHPGL2Header(width, height, density, scale, hpfile) - int width, height, density, scale; - FILE *hpfile; +PlotHPGL2Header( + int width, + int height, + int density, + int scale, + FILE *hpfile) { fprintf(hpfile, "\033%%-12345X"); /* Universal Command Language. */ fprintf(hpfile, "@PJL ENTER LANGUAGE=HPGL2\r\n"); @@ -132,8 +137,8 @@ PlotHPGL2Header(width, height, density, scale, hpfile) */ void -PlotHPRTLTrailer(hpfile) - FILE *hpfile; +PlotHPRTLTrailer( + FILE *hpfile) { fprintf(hpfile, "\033*r0B\014\n"); /* End raster graphics. */ } @@ -147,8 +152,8 @@ PlotHPRTLTrailer(hpfile) */ void -PlotHPGL2Trailer(hpfile) - FILE *hpfile; +PlotHPGL2Trailer( + FILE *hpfile) { fprintf(hpfile, "\033*rC"); /* End raster graphics. */ fprintf(hpfile, "\033%%0B"); /* HPGL2 mode. */ @@ -204,9 +209,10 @@ PlotHPGL2Trailer(hpfile) */ int -PlotRTLCompress(s1, s2, len) - unsigned char *s1, *s2; - int len; +PlotRTLCompress( + unsigned char *s1, + unsigned char *s2, + int len) { /* * Pack s1 using TIFF packbits encoding into s2 @@ -292,12 +298,12 @@ PlotRTLCompress(s1, s2, len) */ int -PlotDumpHPRTL(hpfile, kRaster, cRaster, mRaster, yRaster) - FILE *hpfile; /* File in which to dump it. */ - Raster *kRaster; /* Rasters to be dumped. */ - Raster *cRaster; - Raster *mRaster; - Raster *yRaster; +PlotDumpHPRTL( + FILE *hpfile, /* File in which to dump it. */ + Raster *kRaster, /* Rasters to be dumped. */ + Raster *cRaster, + Raster *mRaster, + Raster *yRaster) { int line, count, line_offset = 0; int ipl, bpl; diff --git a/plot/plotPNM.c b/plot/plotPNM.c index 5bfd486cd..8a1b6e6da 100644 --- a/plot/plotPNM.c +++ b/plot/plotPNM.c @@ -144,9 +144,9 @@ struct plotRTLdata { }; int -pnmRTLLineFunc(linebuffer, arg) - unsigned char *linebuffer; - struct plotRTLdata *arg; +pnmRTLLineFunc( + unsigned char *linebuffer, + struct plotRTLdata *arg) { int size; @@ -167,9 +167,9 @@ pnmRTLLineFunc(linebuffer, arg) */ int -pnmLineFunc(linebuffer, fp) - unsigned char *linebuffer; - FILE *fp; +pnmLineFunc( + unsigned char *linebuffer, + FILE *fp) { fwrite(linebuffer, im_x * 3, 1, fp); return 0; @@ -192,15 +192,15 @@ pnmLineFunc(linebuffer, fp) */ void -pnmRenderRegion(scale, scale_over_2, normal, temp, func, arg) - float scale; - int scale_over_2; - float normal; /* normalizing factor */ - float *temp; /* passed so we don't have to allocate it +pnmRenderRegion( + float scale, + int scale_over_2, + float normal, /* normalizing factor */ + float *temp, /* passed so we don't have to allocate it * on every call. */ - int (*func)(); /* Function to call per line of output */ - ClientData arg; /* Arguments to function */ + int (*func)(), /* Function to call per line of output */ + ClientData arg) /* Arguments to function */ { int i, j; int jmax; @@ -311,10 +311,10 @@ pnmRenderRegion(scale, scale_over_2, normal, temp, func, arg) */ int -pnmBBOX (tile, dinfo, cxp) - Tile *tile; - TileType dinfo; - TreeContext *cxp; +pnmBBOX( + Tile *tile, + TileType dinfo, + TreeContext *cxp) { Rect targetRect, sourceRect; SearchContext *scx = cxp->tc_scx; @@ -369,10 +369,10 @@ pnmBBOX (tile, dinfo, cxp) */ int -pnmTile (tile, dinfo, cxp) - Tile *tile; - TileType dinfo; - TreeContext *cxp; +pnmTile( + Tile *tile, + TileType dinfo, + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; Rect targetRect, sourceRect, *clipRect; @@ -552,12 +552,12 @@ pnmTile (tile, dinfo, cxp) */ void -PlotPNM(fileName, scx, layers, xMask, width) - char *fileName; /* Name of PNM file to write. */ - SearchContext *scx; /* The use and area and transformation +PlotPNM( + char *fileName, /* Name of PNM file to write. */ + SearchContext *scx, /* The use and area and transformation * in this describe what to plot. */ - TileTypeBitMask *layers; /* Tells what layers to plot. Only + TileTypeBitMask *layers, /* Tells what layers to plot. Only * paint layers in this mask, and also * expanded according to xMask, are * plotted. If L_LABELS is set, then @@ -568,13 +568,13 @@ PlotPNM(fileName, scx, layers, xMask, width) * according to xMask are plotted as * bounding boxes. */ - int xMask; /* An expansion mask, used to indicate + int xMask, /* An expansion mask, used to indicate * the window whose expansion status * will be used to determine * visibility. Zero means treat * everything as expanded. */ - int width; /* Indicates the width of the + int width) /* Indicates the width of the * plot, in pixels. */ { @@ -1010,8 +1010,9 @@ float lanczos_kernel(i, n) */ pnmcolor -PNMColorBlend(c_have, c_put) - pnmcolor *c_have, *c_put; +PNMColorBlend( + pnmcolor *c_have, + pnmcolor *c_put) { pnmcolor loccolor; short r, g, b; @@ -1030,9 +1031,9 @@ PNMColorBlend(c_have, c_put) } pnmcolor -PNMColorIndexAndBlend(c_have, cidx) - pnmcolor *c_have; - int cidx; +PNMColorIndexAndBlend( + pnmcolor *c_have, + int cidx) { pnmcolor loccolor, *c_put; int ir, ig, ib; @@ -1129,10 +1130,10 @@ PlotPNMTechInit() /* ARGSUSED */ bool -PlotPNMTechLine(sectionName, argc, argv) - char *sectionName; /* Name of this section (unused). */ - int argc; /* Number of arguments on line. */ - char *argv[]; /* Pointers to fields of line. */ +PlotPNMTechLine( + char *sectionName, /* Name of this section (unused). */ + int argc, /* Number of arguments on line. */ + char *argv[]) /* Pointers to fields of line. */ { int i, j, k, style; void PlotPNMSetDefaults(); /* Forward declaration */ @@ -1351,8 +1352,8 @@ PlotPNMTechFinal() */ void -PlotLoadStyles(filename) - char *filename; +PlotLoadStyles( + char *filename) { FILE *inp; char fullName[256]; @@ -1453,8 +1454,8 @@ PlotLoadStyles(filename) */ void -PlotLoadColormap(filename) - char *filename; +PlotLoadColormap( + char *filename) { FILE *inp; char fullName[256]; diff --git a/plot/plotPS.c b/plot/plotPS.c index b4a22c307..5057cb864 100644 --- a/plot/plotPS.c +++ b/plot/plotPS.c @@ -237,10 +237,10 @@ PlotPSTechInit() */ bool -PlotPSTechLine(sectionName, argc, argv) - char *sectionName; /* Name of this section (unused). */ - int argc; /* Number of arguments on line. */ - char *argv[]; /* Pointers to fields of line. */ +PlotPSTechLine( + char *sectionName, /* Name of this section (unused). */ + int argc, /* Number of arguments on line. */ + char *argv[]) /* Pointers to fields of line. */ { PSStyle *newstyle; PSColor *newcolor; @@ -333,8 +333,8 @@ PlotPSTechLine(sectionName, argc, argv) */ void -plotPSFlushRect(style) - int style; +plotPSFlushRect( + int style) { if (curwidth > 0) { @@ -389,10 +389,9 @@ plotPSFlushLine() */ void -plotPSLine(p1, p2) - Point *p1, *p2; /* Endpoints of line, given in root - * coordinates. - */ +plotPSLine( + Point *p1, + Point *p2) { int x1, x2, y1, y2, limit, diff; bool tmptf; @@ -472,9 +471,9 @@ plotPSLine(p1, p2) */ void -plotPSRect(rect, style) - Rect *rect; /* Rectangle to be drawn, in root coords. */ - int style; +plotPSRect( + Rect *rect, /* Rectangle to be drawn, in root coords. */ + int style) { int x, y, w, h; @@ -513,10 +512,10 @@ plotPSRect(rect, style) */ int -plotPSPaint(tile, dinfo, cxp) - Tile *tile; /* Tile that's of type to be output. */ - TileType dinfo; /* Split tile information */ - TreeContext *cxp; /* Describes search in progress. */ +plotPSPaint( + Tile *tile, /* Tile that's of type to be output. */ + TileType dinfo, /* Split tile information */ + TreeContext *cxp) /* Describes search in progress. */ { Rect tileArea, edge, rootArea; int xbot, width, ybot, height; @@ -758,14 +757,14 @@ plotPSPaint(tile, dinfo, cxp) */ int -plotPSLabelPosition(scx, label, x, y, p) - SearchContext *scx; /* Describes state of search when label +plotPSLabelPosition( + SearchContext *scx, /* Describes state of search when label * was found. */ - Label *label; /* Label that was found. */ - int *x; /* returned x position */ - int *y; /* returned y position */ - int *p; /* returned orientation */ + Label *label, /* Label that was found. */ + int *x, /* returned x position */ + int *y, /* returned y position */ + int *p) /* returned orientation */ { Rect rootArea; int pos; @@ -854,11 +853,11 @@ plotPSLabelPosition(scx, label, x, y, p) #define CHARHEIGHT 1.4 int -plotPSLabelBounds(scx, label) - SearchContext *scx; /* Describes state of search when label +plotPSLabelBounds( + SearchContext *scx, /* Describes state of search when label * was found. */ - Label *label; /* Label that was found. */ + Label *label) /* Label that was found. */ { int pspos; int ls, psxsize, psysize; @@ -939,11 +938,11 @@ plotPSLabelBounds(scx, label) */ int -plotPSLabelBox(scx, label) - SearchContext *scx; /* Describes state of search when label +plotPSLabelBox( + SearchContext *scx, /* Describes state of search when label * was found. */ - Label *label; /* Label that was found. */ + Label *label) /* Label that was found. */ { Rect rootArea; int x, y; @@ -1004,11 +1003,11 @@ plotPSLabelBox(scx, label) */ int -plotPSLabel(scx, label) - SearchContext *scx; /* Describes state of search when label +plotPSLabel( + SearchContext *scx, /* Describes state of search when label * was found. */ - Label *label; /* Label that was found. */ + Label *label) /* Label that was found. */ { int x, y; int pspos; @@ -1047,8 +1046,8 @@ plotPSLabel(scx, label) */ int -plotPSCell(scx) - SearchContext *scx; /* Describes cell whose bbox is to +plotPSCell( + SearchContext *scx) /* Describes cell whose bbox is to * be plotted. */ { @@ -1123,12 +1122,12 @@ plotPSCell(scx) */ void -PlotPS(fileName, scx, layers, xMask) - char *fileName; /* Name of PS file to write. */ - SearchContext *scx; /* The use and area and transformation +PlotPS( + char *fileName, /* Name of PS file to write. */ + SearchContext *scx, /* The use and area and transformation * in this describe what to plot. */ - TileTypeBitMask *layers; /* Tells what layers to plot. Only + TileTypeBitMask *layers, /* Tells what layers to plot. Only * paint layers in this mask, and also * expanded according to xMask, are * plotted. If L_LABELS is set, then @@ -1139,7 +1138,7 @@ PlotPS(fileName, scx, layers, xMask) * according to xMask are plotted as * bounding boxes. */ - int xMask; /* An expansion mask, used to indicate + int xMask) /* An expansion mask, used to indicate * the window whose expansion status * will be used to determine * visibility. Zero means treat diff --git a/plot/tclplot.c b/plot/tclplot.c index a590f4b59..b87f9d4d2 100644 --- a/plot/tclplot.c +++ b/plot/tclplot.c @@ -36,8 +36,8 @@ extern void CmdPlot(); */ int -Tclplot_Init(interp) - Tcl_Interp *interp; +Tclplot_Init( + Tcl_Interp *interp) { int n; SectionID invplot; diff --git a/plow/PlowCmd.c b/plow/PlowCmd.c index 3febd5d3b..f25f07dfc 100644 --- a/plow/PlowCmd.c +++ b/plow/PlowCmd.c @@ -81,9 +81,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define PLOWPLOW 9 /* Implicit when direction specified */ void -CmdPlow(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPlow( + MagWindow *w, + TxCommand *cmd) { int xdelta, ydelta, absX, absY; int option, dir, distance; @@ -334,9 +334,9 @@ CmdPlow(w, cmd) */ void -CmdStraighten(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdStraighten( + MagWindow *w, + TxCommand *cmd) { Rect editBox; int dir; @@ -394,9 +394,9 @@ CmdStraighten(w, cmd) */ void -CmdPlowTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdPlowTest( + MagWindow *w, + TxCommand *cmd) { PlowTest(w, cmd); } diff --git a/plow/PlowJogs.c b/plow/PlowJogs.c index 6f0cc0112..287c48697 100644 --- a/plow/PlowJogs.c +++ b/plow/PlowJogs.c @@ -97,9 +97,9 @@ extern void plowProcessJog(); */ void -plowCleanupJogs(area, changedArea) - Rect *area; - Rect *changedArea; +plowCleanupJogs( + Rect *area, + Rect *changedArea) { Edge edge; @@ -167,9 +167,9 @@ plowCleanupJogs(area, changedArea) */ void -plowProcessJog(edge, area) - Edge *edge; - Rect *area; +plowProcessJog( + Edge *edge, + Rect *area) { Rect r; @@ -218,8 +218,8 @@ plowProcessJog(edge, area) */ int -plowJogPropagateLeft(edge) - Edge *edge; +plowJogPropagateLeft( + Edge *edge) { if (DebugIsSet(plowDebugID, plowDebJogs)) plowDebugEdge(edge, (RuleTableEntry *) NULL, "plowJogPropagateLeft"); @@ -254,9 +254,9 @@ plowJogPropagateLeft(edge) */ int -plowProcessJogFunc(edge, area) - Edge *edge; /* Edge found by shadow search */ - Rect *area; /* Area in which jogs are being eliminated */ +plowProcessJogFunc( + Edge *edge, /* Edge found by shadow search */ + Rect *area) /* Area in which jogs are being eliminated */ { LinkedRect *lr; Rect r, lhs; @@ -418,8 +418,8 @@ plowProcessJogFunc(edge, area) */ int -plowJogTopProc(outline) - Outline *outline; +plowJogTopProc( + Outline *outline) { /* Stop if we're no longer adjacent to space */ if (TiGetTypeExact(outline->o_outside) != TT_SPACE) @@ -465,8 +465,8 @@ plowJogTopProc(outline) } int -plowJogBotProc(outline) - Outline *outline; +plowJogBotProc( + Outline *outline) { /* Stop if we're no longer adjacent to space */ if (TiGetTypeExact(outline->o_inside) != TT_SPACE) @@ -534,9 +534,9 @@ plowJogBotProc(outline) */ int -plowJogDragLHS(edge, newx) - Edge *edge; /* Edge potentially on the LHS of the jog */ - int newx; /* Move the edge to this position */ +plowJogDragLHS( + Edge *edge, /* Edge potentially on the LHS of the jog */ + int newx) /* Move the edge to this position */ { LinkedRect *lr; @@ -583,8 +583,8 @@ plowJogDragLHS(edge, newx) */ int -plowJogMoveFunc(edge) - Edge *edge; +plowJogMoveFunc( + Edge *edge) { Edge *origEdge = jogEdge; diff --git a/plow/PlowMain.c b/plow/PlowMain.c index 2f73f591e..1abd130b7 100644 --- a/plow/PlowMain.c +++ b/plow/PlowMain.c @@ -186,11 +186,11 @@ extern void plowYankCreate(); */ void -PlowSetBound(def, area, rootDef, rootArea) - CellDef *def; /* Def in which bounding area applies */ - Rect *area; /* Area in 'def' coordinates */ - CellDef *rootDef; /* Display bounding area in windows with this root */ - Rect *rootArea; /* Area in 'rootDef' coordinates */ +PlowSetBound( + CellDef *def, /* Def in which bounding area applies */ + Rect *area, /* Area in 'def' coordinates */ + CellDef *rootDef, /* Display bounding area in windows with this root */ + Rect *rootArea) /* Area in 'rootDef' coordinates */ { static bool firstTime = TRUE; PlowBoundary *pb; @@ -267,9 +267,9 @@ PlowClearBound() */ void -PlowRedrawBound(window, plane) - MagWindow *window; /* Window in which to redraw. */ - Plane *plane; /* Non-space tiles on this plane indicate +PlowRedrawBound( + MagWindow *window, /* Window in which to redraw. */ + Plane *plane) /* Non-space tiles on this plane indicate * areas where highlights need to be * redisplayed. */ @@ -305,7 +305,10 @@ PlowRedrawBound(window, plane) } int -plowBoundAlways1(Tile *tile, TileType dinfo, ClientData clientdata) +plowBoundAlways1( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return 1; } @@ -329,10 +332,10 @@ plowBoundAlways1(Tile *tile, TileType dinfo, ClientData clientdata) */ void -PlowStraighten(def, area, direction) - CellDef *def; /* Def whose jogs we should straighten */ - Rect *area; /* Area in which jogs are to be straightened */ - int direction; /* Pull all jogs in this direction to straighten them */ +PlowStraighten( + CellDef *def, /* Def whose jogs we should straighten */ + Rect *area, /* Area in which jogs are to be straightened */ + int direction) /* Pull all jogs in this direction to straighten them */ { Rect changedArea, changedUserArea, yankArea; bool saveCheckBoundary; @@ -435,10 +438,10 @@ PlowStraighten(def, area, direction) */ bool -PlowSelection(def, pdistance, direction) - CellDef *def; /* Cell being plowed */ - int *pdistance; /* Distance to plow */ - int direction; /* One of GEO_NORTH, GEO_SOUTH, GEO_WEST, or GEO_EAST */ +PlowSelection( + CellDef *def, /* Cell being plowed */ + int *pdistance, /* Distance to plow */ + int direction) /* One of GEO_NORTH, GEO_SOUTH, GEO_WEST, or GEO_EAST */ { Rect changedArea; bool firstTime; @@ -555,10 +558,10 @@ Plow( */ void -plowUpdate(def, direction, pChangedArea) - CellDef *def; - int direction; - Rect *pChangedArea; +plowUpdate( + CellDef *def, + int direction, + Rect *pChangedArea) { Rect changedUserArea; TileTypeBitMask *m; @@ -825,10 +828,10 @@ plowPropagateRect( */ bool -plowPropagateSel(def, pdistance, changedArea) - CellDef *def; /* Def being plowed */ - int *pdistance; /* Distance to plow */ - Rect *changedArea; /* Set to bounding box around area modified */ +plowPropagateSel( + CellDef *def, /* Def being plowed */ + int *pdistance, /* Distance to plow */ + Rect *changedArea) /* Set to bounding box around area modified */ { #ifndef NO_RUSAGE struct rusage t1, t2; @@ -988,10 +991,10 @@ plowPropagateSel(def, pdistance, changedArea) */ int -plowSelPaintBox(rect, type, pSelBox) - Rect *rect; - TileType type; - Rect *pSelBox; +plowSelPaintBox( + Rect *rect, + TileType type, + Rect *pSelBox) { Rect editRect; @@ -1001,11 +1004,11 @@ plowSelPaintBox(rect, type, pSelBox) } int -plowSelCellBox(selUse, realUse, transform, pSelBox) - CellUse *selUse; - CellUse *realUse; - Transform *transform; - Rect *pSelBox; +plowSelCellBox( + CellUse *selUse, + CellUse *realUse, + Transform *transform, + Rect *pSelBox) { GeoInclude(&realUse->cu_bbox, pSelBox); return (0); @@ -1030,10 +1033,10 @@ plowSelCellBox(selUse, realUse, transform, pSelBox) */ int -plowSelPaintPlow(rect, type, distance) - Rect *rect; - TileType type; - int distance; +plowSelPaintPlow( + Rect *rect, + TileType type, + int distance) { int plowSelPaintAdd(); Rect editRect, plowRect, plowLHS, plowRHS; @@ -1067,8 +1070,8 @@ plowSelPaintPlow(rect, type, distance) } int -plowSelPaintAdd(edge) - Edge *edge; +plowSelPaintAdd( + Edge *edge) { int saveFlags = edge->e_flags; @@ -1098,11 +1101,11 @@ plowSelPaintAdd(edge) */ int -plowSelCellPlow(selUse, realUse, transform, distance) - CellUse *selUse; /* Cell in selection */ - CellUse *realUse; /* Corresponding cell in def being plowed */ - Transform *transform; /* UNUSED */ - int distance; /* Plow distance */ +plowSelCellPlow( + CellUse *selUse, /* Cell in selection */ + CellUse *realUse, /* Corresponding cell in def being plowed */ + Transform *transform, /* UNUSED */ + int distance) /* Plow distance */ { int plowFindSelCell(); ClientData save; @@ -1117,9 +1120,9 @@ plowSelCellPlow(selUse, realUse, transform, distance) } int -plowFindSelCell(yankUse, editUse) - CellUse *yankUse; /* Cell in the plow yank buffer */ - CellUse *editUse; /* Cell from the original cell def */ +plowFindSelCell( + CellUse *yankUse, /* Cell in the plow yank buffer */ + CellUse *editUse) /* Cell from the original cell def */ { Edge edge; @@ -1180,8 +1183,8 @@ plowFindSelCell(yankUse, editUse) */ void -PlowExtendJogHorizon(edge) - Edge *edge; /* Edge being moved */ +PlowExtendJogHorizon( + Edge *edge) /* Edge being moved */ { int horizonTop, horizonBot, eTop, eBot; Tile *tpR, *tpL; @@ -1319,8 +1322,8 @@ PlowExtendJogHorizon(edge) */ void -plowSetTrans(direction) - int direction; +plowSetTrans( + int direction) { plowDirection = direction; switch (direction) @@ -1361,10 +1364,10 @@ plowSetTrans(direction) */ bool -plowPastBoundary(def, edge, pmove) - CellDef *def; /* Def being plowed */ - Edge *edge; /* Edge being moved */ - int *pmove; /* Updated to be the maximum distance by +plowPastBoundary( + CellDef *def, /* Def being plowed */ + Edge *edge, /* Edge being moved */ + int *pmove) /* Updated to be the maximum distance by * which something moves in an illegal area. */ { @@ -1422,9 +1425,9 @@ plowPastBoundary(def, edge, pmove) */ int -plowInitialPaint(edge, xnew) - Edge *edge; - int xnew; +plowInitialPaint( + Edge *edge, + int xnew) { edge->e_newx = xnew; edge->e_flags = E_ISINITIAL; @@ -1450,9 +1453,9 @@ plowInitialPaint(edge, xnew) */ int -plowInitialCell(use, plowRect) - CellUse *use; - Rect *plowRect; +plowInitialCell( + CellUse *use, + Rect *plowRect) { int xmove; Edge edge; @@ -1518,9 +1521,9 @@ plowInitialCell(use, plowRect) */ void -plowProcessEdge(edge, changedArea) - Edge *edge; /* Edge to be processed (in plowYankDef) */ - Rect *changedArea; /* Include any additional area changed in this area */ +plowProcessEdge( + Edge *edge, /* Edge to be processed (in plowYankDef) */ + Rect *changedArea) /* Include any additional area changed in this area */ { int amountToMove = edge->e_newx - edge->e_x; RuleTableEntry *rte; @@ -1649,8 +1652,8 @@ plowProcessEdge(edge, changedArea) */ int -plowApplySearchRules(edge) - Edge *edge; +plowApplySearchRules( + Edge *edge) { PlowRule *widthRules, *rules; RuleTableEntry *rte; @@ -1742,10 +1745,10 @@ plowApplySearchRules(edge) */ PlowRule * -plowBuildWidthRules(edge, bbox, phalo) - Edge *edge; /* Edge being moved */ - Rect *bbox; /* Bounding box of def being plowed */ - int *phalo; /* Update *phalo to be the max of its initial value +plowBuildWidthRules( + Edge *edge, /* Edge being moved */ + Rect *bbox, /* Bounding box of def being plowed */ + int *phalo) /* Update *phalo to be the max of its initial value * and each of the widths we compute for the rules * we return. */ @@ -1829,8 +1832,8 @@ plowBuildWidthRules(edge, bbox, phalo) */ void -plowMoveEdge(edge) - Edge *edge; /* Edge to be moved */ +plowMoveEdge( + Edge *edge) /* Edge to be moved */ { Plane *plane = plowYankDef->cd_planes[edge->e_pNum]; Tile *delayed = NULL; /* delayed free to extend lifetime */ @@ -1948,9 +1951,9 @@ plowMoveEdge(edge) */ Tile * -plowSplitY(tp, y) - Tile *tp; - int y; +plowSplitY( + Tile *tp, + int y) { Tile *newTile; @@ -1986,7 +1989,10 @@ plowSplitY(tp, y) */ void -plowMergeTop(Tile **delay1, Tile *tp, Plane *plane) +plowMergeTop( + Tile **delay1, + Tile *tp, + Plane *plane) { Tile *tpRT = RT(tp); @@ -1999,7 +2005,10 @@ plowMergeTop(Tile **delay1, Tile *tp, Plane *plane) } void -plowMergeBottom(Tile **delay1, Tile *tp, Plane *plane) +plowMergeBottom( + Tile **delay1, + Tile *tp, + Plane *plane) { Tile *tpLB = LB(tp); @@ -2259,9 +2268,12 @@ plowYankCreate() #ifndef NO_RUSAGE void -plowShowTime(t1, t2, nqueued, nprocessed, nmoved) - struct rusage *t1, *t2; - int nqueued, nprocessed, nmoved; +plowShowTime( + struct rusage *t1, + struct rusage *t2, + int nqueued, + int nprocessed, + int nmoved) { double secs, usecs; diff --git a/plow/PlowQueue.c b/plow/PlowQueue.c index 8af79a12b..45fb45847 100644 --- a/plow/PlowQueue.c +++ b/plow/PlowQueue.c @@ -72,9 +72,9 @@ int plowTooFar; /* # times we reduced plow size */ */ void -plowQueueInit(bbox, dist) - Rect *bbox; /* Bounding box for the cell being plowed */ - int dist; /* Distance the plow moves */ +plowQueueInit( + Rect *bbox, /* Bounding box for the cell being plowed */ + int dist) /* Distance the plow moves */ { Edge **pptr, **pend; int pNum; @@ -151,8 +151,8 @@ plowQueueDone() && (e1)->e_rtype == (e2)->e_rtype) int -plowQueueAdd(eadd) - Edge *eadd; /* Edge added to queue. We assume that +plowQueueAdd( + Edge *eadd) /* Edge added to queue. We assume that * e_ltype and e_rtype have been set to * the types on the LHS and RHS of this * edge, respectively. @@ -455,8 +455,8 @@ plowQueueAdd(eadd) */ bool -plowQueueLeftmost(edge) - Edge *edge; +plowQueueLeftmost( + Edge *edge) { Edge *enew, **pp, **plast; int pNum; @@ -530,8 +530,8 @@ plowQueueLeftmost(edge) */ bool -plowQueueRightmost(edge) - Edge *edge; +plowQueueRightmost( + Edge *edge) { Edge *enew, **pp, **plast; int pNum; diff --git a/plow/PlowRandom.c b/plow/PlowRandom.c index 6c84c698a..cb0b0a4ce 100644 --- a/plow/PlowRandom.c +++ b/plow/PlowRandom.c @@ -82,8 +82,8 @@ void plowGenRect(); */ void -PlowRandomTest(def) - CellDef *def; +PlowRandomTest( + CellDef *def) { #ifdef notdef static char *tempgood = "/tmp/PlowGoodaXXXXX"; @@ -189,7 +189,10 @@ PlowRandomTest(def) */ int -plowFindFirstError(Tile *tile, TileType dinfo, ClientData clientdata) +plowFindFirstError( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return (1); } @@ -215,9 +218,9 @@ plowFindFirstError(Tile *tile, TileType dinfo, ClientData clientdata) */ void -plowGenRect(bbox, r) - Rect *bbox; /* Bounding box of the cell being plowed */ - Rect *r; /* Fill in this rectangle */ +plowGenRect( + Rect *bbox, /* Bounding box of the cell being plowed */ + Rect *r) /* Fill in this rectangle */ { int temp; @@ -259,8 +262,9 @@ plowGenRect(bbox, r) */ int -plowGenRandom(lo, hi) - int lo, hi; /* Inclusive bounds for the integer we'll generate */ +plowGenRandom( + int lo, + int hi) { int range = hi - lo + 1; #if defined(SYSV) || defined(EMSCRIPTEN) @@ -290,9 +294,9 @@ plowGenRandom(lo, hi) */ bool -plowFileDiff(file1, file2) - char *file1; - char *file2; +plowFileDiff( + char *file1, + char *file2) { char b1[BUFSIZ], b2[BUFSIZ]; int f1 = -1, f2 = -1; diff --git a/plow/PlowRules1.c b/plow/PlowRules1.c index b9419f6fa..650bae4a6 100644 --- a/plow/PlowRules1.c +++ b/plow/PlowRules1.c @@ -77,8 +77,8 @@ bool plowSliverApplyRules(); */ void -prClearUmbra(edge) - Edge *edge; /* Edge being moved */ +prClearUmbra( + Edge *edge) /* Edge being moved */ { TileTypeBitMask rhsTypes; struct applyRule ar; @@ -123,9 +123,9 @@ prClearUmbra(edge) */ void -prUmbra(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* List of rules */ +prUmbra( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* List of rules */ { PlowRule *pr; struct applyRule ar; @@ -215,9 +215,9 @@ prUmbra(edge, rules) */ void -prPenumbraTop(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* Rules to apply (must be non-NULL) */ +prPenumbraTop( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* Rules to apply (must be non-NULL) */ { PlowRule *pr; struct applyRule ar; @@ -238,9 +238,9 @@ prPenumbraTop(edge, rules) } int -prPenumbraBot(edge, rules) - Edge *edge; /* Edge being moved */ - PlowRule *rules; /* Rules to apply (must be non-NULL) */ +prPenumbraBot( + Edge *edge, /* Edge being moved */ + PlowRule *rules) /* Rules to apply (must be non-NULL) */ { TileTypeBitMask insideTypes; PlowRule *pr; @@ -301,9 +301,9 @@ prPenumbraBot(edge, rules) */ int -plowPenumbraTopProc(outline, ar) - Outline *outline; /* Segment along penumbra border */ - struct applyRule *ar; /* Info needed for shadow search */ +plowPenumbraTopProc( + Outline *outline, /* Segment along penumbra border */ + struct applyRule *ar) /* Info needed for shadow search */ { Edge *movingEdge = ar->ar_moving; PlowRule *pr = ar->ar_rule; @@ -355,9 +355,9 @@ plowPenumbraTopProc(outline, ar) } int -plowPenumbraBotProc(outline, ar) - Outline *outline; /* Segment along penumbra border */ - struct applyRule *ar; /* Info needed for shadow search */ +plowPenumbraBotProc( + Outline *outline, /* Segment along penumbra border */ + struct applyRule *ar) /* Info needed for shadow search */ { Edge *movingEdge = ar->ar_moving; PlowRule *pr = ar->ar_rule; @@ -425,9 +425,9 @@ plowPenumbraBotProc(outline, ar) */ int -plowPenumbraRule(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Edge causing the shadow search, and +plowPenumbraRule( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Edge causing the shadow search, and * the design rule to apply. */ { @@ -478,9 +478,9 @@ plowPenumbraRule(impactedEdge, ar) */ int -prSliverTop(edge, rules) - Edge *edge; - PlowRule *rules; +prSliverTop( + Edge *edge, + PlowRule *rules) { PlowRule *pr; struct applyRule ar; @@ -532,9 +532,9 @@ prSliverTop(edge, rules) } int -prSliverBot(edge, rules) - Edge *edge; - PlowRule *rules; +prSliverBot( + Edge *edge, + PlowRule *rules) { TileTypeBitMask insideTypes; PlowRule *pr; @@ -619,9 +619,9 @@ prSliverBot(edge, rules) */ int -plowSliverTopMove(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverTopMove( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { int howfar = ar->ar_moving->e_newx - ar->ar_moving->e_x; Edge edge; @@ -649,13 +649,13 @@ plowSliverTopMove(outline, ar) } int -plowSliverBotMove(outline, ar) - Outline *outline; /* Segment of outline being followed. +plowSliverBotMove( + Outline *outline, /* Segment of outline being followed. * The sense of "inside" and "outside" * is reversed from that when handling * the top half of the penumbra. */ - struct applyRule *ar; + struct applyRule *ar) { int howfar = ar->ar_moving->e_newx - ar->ar_moving->e_x; Edge edge; @@ -712,9 +712,9 @@ plowSliverBotMove(outline, ar) */ int -plowSliverTopExtent(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverTopExtent( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int newx, xmove, ret = 0; @@ -818,9 +818,9 @@ plowSliverTopExtent(outline, ar) } int -plowSliverBotExtent(outline, ar) - Outline *outline; /* Segment of outline being followed */ - struct applyRule *ar; +plowSliverBotExtent( + Outline *outline, /* Segment of outline being followed */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int newx, xmove, ret = 0; @@ -956,10 +956,10 @@ plowSliverBotExtent(outline, ar) */ bool -plowSliverApplyRules(ar, far, farDist) - struct applyRule *ar; - TileType far; - int farDist; +plowSliverApplyRules( + struct applyRule *ar, + TileType far, + int farDist) { TileType near = ar->ar_moving->e_ltype; PlowRule *pr; @@ -1002,9 +1002,9 @@ plowSliverApplyRules(ar, far, farDist) */ int -plowApplyRule(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Edge causing the shadow search, and +plowApplyRule( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Edge causing the shadow search, and * the design rule to apply. */ { diff --git a/plow/PlowRules2.c b/plow/PlowRules2.c index 9c6595cf4..4c32a455f 100644 --- a/plow/PlowRules2.c +++ b/plow/PlowRules2.c @@ -66,8 +66,8 @@ int plowDragEdgeProc(); */ void -prFixedLHS(edge) - Edge *edge; /* Edge being moved */ +prFixedLHS( + Edge *edge) /* Edge being moved */ { int distance = edge->e_newx - edge->e_x; Tile *tpL; @@ -99,8 +99,8 @@ prFixedLHS(edge) } int -prFixedRHS(edge) - Edge *edge; /* Edge being moved */ +prFixedRHS( + Edge *edge) /* Edge being moved */ { int distance = edge->e_newx - edge->e_x; Tile *tpR, *tp; @@ -207,8 +207,8 @@ prFixedRHS(edge) */ void -prFixedPenumbraTop(edge) - Edge *edge; /* Edge being moved */ +prFixedPenumbraTop( + Edge *edge) /* Edge being moved */ { struct applyRule ar; PlowRule *pr; @@ -237,8 +237,8 @@ prFixedPenumbraTop(edge) } int -prFixedPenumbraBot(edge) - Edge *edge; /* Edge being moved */ +prFixedPenumbraBot( + Edge *edge) /* Edge being moved */ { struct applyRule ar; PlowRule *pr; @@ -289,8 +289,8 @@ prFixedPenumbraBot(edge) */ void -prFixedDragStubs(edge) - Edge *edge; /* Edge being moved; RHS is fixed-width */ +prFixedDragStubs( + Edge *edge) /* Edge being moved; RHS is fixed-width */ { int distance = edge->e_newx - edge->e_x; Tile *tpL; @@ -343,12 +343,12 @@ prFixedDragStubs(edge) */ int -plowDragEdgeProc(lhsEdge, movingEdge) - Edge *lhsEdge; /* Edge on LHS; the caller has already +plowDragEdgeProc( + Edge *lhsEdge, /* Edge on LHS; the caller has already * determined that this edge has not * already moved far enough. */ - Edge *movingEdge; /* RHS of this edge is fixed-width */ + Edge *movingEdge) /* RHS of this edge is fixed-width */ { PlowRule *pr; int xsep, width; @@ -412,8 +412,8 @@ plowDragEdgeProc(lhsEdge, movingEdge) */ void -prContactLHS(edge) - Edge *edge; /* Edge being moved (LHS is contact) */ +prContactLHS( + Edge *edge) /* Edge being moved (LHS is contact) */ { int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_ltype]; @@ -429,8 +429,8 @@ prContactLHS(edge) } int -prContactRHS(edge) - Edge *edge; /* Edge being moved (RHS is contact) */ +prContactRHS( + Edge *edge) /* Edge being moved (RHS is contact) */ { int pNum; PlaneMask connPlanes = DBConnPlanes[edge->e_rtype]; @@ -467,8 +467,8 @@ prContactRHS(edge) */ void -prCoverTop(edge) - Edge *edge; /* Edge being moved */ +prCoverTop( + Edge *edge) /* Edge being moved */ { TileType ltype, rtype; PlowRule *pr; @@ -505,8 +505,8 @@ prCoverTop(edge) } int -prCoverBot(edge) - Edge *edge; /* Edge being moved */ +prCoverBot( + Edge *edge) /* Edge being moved */ { TileType ltype, rtype; PlowRule *pr; @@ -562,8 +562,8 @@ prCoverBot(edge) */ void -prIllegalTop(edge) - Edge *edge; +prIllegalTop( + Edge *edge) { TileTypeBitMask insideTypes; struct applyRule ar; @@ -592,8 +592,8 @@ prIllegalTop(edge) } int -prIllegalBot(edge) - Edge *edge; +prIllegalBot( + Edge *edge) { TileTypeBitMask insideTypes; struct applyRule ar; @@ -642,9 +642,9 @@ prIllegalBot(edge) */ int -plowCoverTopProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowCoverTopProc( + Outline *outline, + struct applyRule *ar) { Edge edge; int ret = 0; @@ -678,9 +678,9 @@ plowCoverTopProc(outline, ar) } int -plowCoverBotProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowCoverBotProc( + Outline *outline, + struct applyRule *ar) { Edge edge; int ret = 0; @@ -741,9 +741,9 @@ plowCoverBotProc(outline, ar) */ int -plowIllegalTopProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowIllegalTopProc( + Outline *outline, + struct applyRule *ar) { TileType badType = TiGetTypeExact(outline->o_inside), leftType; Edge *movingEdge = ar->ar_moving; @@ -786,9 +786,9 @@ plowIllegalTopProc(outline, ar) } int -plowIllegalBotProc(outline, ar) - Outline *outline; - struct applyRule *ar; +plowIllegalBotProc( + Outline *outline, + struct applyRule *ar) { TileType badType = TiGetTypeExact(outline->o_outside), leftType; Edge *movingEdge = ar->ar_moving; @@ -853,8 +853,8 @@ plowIllegalBotProc(outline, ar) */ void -prFindCells(edge) - Edge *edge; /* Edge being moved */ +prFindCells( + Edge *edge) /* Edge being moved */ { BPlane *cellPlane = plowYankDef->cd_cellPlane; struct applyRule ar; @@ -890,8 +890,8 @@ prFindCells(edge) */ void -prCell(edge) - Edge *edge; /* Cell edge being moved */ +prCell( + Edge *edge) /* Cell edge being moved */ { Rect cellArea, shadowArea; CellUse *use = edge->e_use; @@ -962,10 +962,10 @@ prCell(edge) */ int -plowCellDragPaint(tile, dinfo, ar) - Tile *tile; - TileType dinfo; /* (unused) */ - struct applyRule *ar; +plowCellDragPaint( + Tile *tile, + TileType dinfo, /* (unused) */ + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int distance = movingEdge->e_newx - movingEdge->e_x; @@ -1016,9 +1016,9 @@ plowCellDragPaint(tile, dinfo, ar) */ int -plowCellPushPaint(impactedEdge, ar) - Edge *impactedEdge; /* Edge found by shadow search */ - struct applyRule *ar; /* Describes edge being moved and search area */ +plowCellPushPaint( + Edge *impactedEdge, /* Edge found by shadow search */ + struct applyRule *ar) /* Describes edge being moved and search area */ { Edge *movingEdge = ar->ar_moving; int xsep, newx; @@ -1057,9 +1057,9 @@ plowCellPushPaint(impactedEdge, ar) */ int -plowFoundCell(use, ar) - CellUse *use; - struct applyRule *ar; +plowFoundCell( + CellUse *use, + struct applyRule *ar) { Edge *movingEdge = ar->ar_moving; int xmove, xsep; diff --git a/plow/PlowRules3.c b/plow/PlowRules3.c index 74f3052fe..77a996201 100644 --- a/plow/PlowRules3.c +++ b/plow/PlowRules3.c @@ -37,8 +37,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ extern int plowApplyRule(); /* Forward declarations */ +struct inarg; int plowInSliverProc(); -int scanDown(), scanUp(); +int scanDown(struct inarg *inarg, TileType type, bool canMoveInargEdge), scanUp(struct inarg *inarg, TileType type, bool canMoveInargEdge); int scanDownError(), scanUpError(); /* Argument passed to above filter functions */ @@ -47,7 +48,8 @@ struct inarg Rect ina_area; /* Area to search for violations */ Edge *ina_moving; /* Edge causing this search */ TileType ina_t0; /* See comments in the procedures */ - int (*ina_proc)(); /* Apply to look for rule violations */ + int (*ina_proc)(struct inarg *, TileType, bool); + /* Apply to look for rule violations */ /* Used while appling design rules */ PlowRule *ina_rule; /* Plowing design rule being applied */ @@ -74,8 +76,8 @@ struct inarg */ void -prInSliver(edge) - Edge *edge; /* Edge being moved */ +prInSliver( + Edge *edge) /* Edge being moved */ { struct inarg inarg; Rect edgeBorder; @@ -111,10 +113,10 @@ prInSliver(edge) } int -plowInSliverProc(tile, dinfo, inarg) - Tile *tile; - TileType dinfo; /* (unused) */ - struct inarg *inarg; +plowInSliverProc( + Tile *tile, + TileType dinfo, /* (unused) */ + struct inarg *inarg) { Edge *movingEdge = inarg->ina_moving; #ifdef notdef @@ -199,10 +201,10 @@ plowInSliverProc(tile, dinfo, inarg) } int -scanDown(inarg, type, canMoveInargEdge) - struct inarg *inarg; - TileType type; - bool canMoveInargEdge; +scanDown( + struct inarg *inarg, + TileType type, + bool canMoveInargEdge) { TileType ltype = inarg->ina_moving->e_ltype; Edge *movingEdge = inarg->ina_moving; @@ -256,9 +258,9 @@ scanDown(inarg, type, canMoveInargEdge) } int -scanDownError(tile, inarg) - Tile *tile; - struct inarg *inarg; +scanDownError( + Tile *tile, + struct inarg *inarg) { Rect atomRect; int incursion; @@ -294,10 +296,10 @@ scanDownError(tile, inarg) } int -scanUp(inarg, type, canMoveInargEdge) - struct inarg *inarg; - TileType type; - bool canMoveInargEdge; +scanUp( + struct inarg *inarg, + TileType type, + bool canMoveInargEdge) { TileType ltype = inarg->ina_moving->e_ltype; Edge *movingEdge = inarg->ina_moving; @@ -351,9 +353,9 @@ scanUp(inarg, type, canMoveInargEdge) } int -scanUpError(tile, inarg) - Tile *tile; - struct inarg *inarg; +scanUpError( + Tile *tile, + struct inarg *inarg) { Rect atomRect; int incursion; @@ -390,12 +392,12 @@ scanUpError(tile, inarg) } int -plowSrFinalArea(plane, area, okTypes, proc, cdata) - Plane *plane; - Rect *area; - TileTypeBitMask *okTypes; - int (*proc)(); - ClientData cdata; +plowSrFinalArea( + Plane *plane, + Rect *area, + TileTypeBitMask *okTypes, + int (*proc)(), + ClientData cdata) { return (DBSrPaintArea((Tile *) NULL, plane, area, okTypes, proc, cdata)); } diff --git a/plow/PlowSearch.c b/plow/PlowSearch.c index aa51335ed..a813decfd 100644 --- a/plow/PlowSearch.c +++ b/plow/PlowSearch.c @@ -279,10 +279,10 @@ plowSrShadow( */ int -plowShadowRHS(tp, s, bottomLeft) - Tile *tp; /* Tile whose RHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int bottomLeft; /* Bottom of 'tp', clipped to area */ +plowShadowRHS( + Tile *tp, /* Tile whose RHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int bottomLeft) /* Bottom of 'tp', clipped to area */ { Tile *tpR; int bottom, left; @@ -434,10 +434,10 @@ plowSrShadowInitial( */ int -plowShadowInitialRHS(tp, s, bottomLeft) - Tile *tp; /* Tile whose RHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int bottomLeft; /* Bottom of 'tp', clipped to area */ +plowShadowInitialRHS( + Tile *tp, /* Tile whose RHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int bottomLeft) /* Bottom of 'tp', clipped to area */ { Tile *tpR; int bottom, left; @@ -591,10 +591,10 @@ plowSrShadowBack( */ int -plowShadowLHS(tp, s, topRight) - Tile *tp; /* Tile whose LHS is to be followed */ - struct shadow *s; /* Shadow search argument */ - int topRight; /* Top of 'tp', clipped to area */ +plowShadowLHS( + Tile *tp, /* Tile whose LHS is to be followed */ + struct shadow *s, /* Shadow search argument */ + int topRight) /* Top of 'tp', clipped to area */ { Tile *tpL; int top, right; @@ -674,14 +674,14 @@ plowShadowLHS(tp, s, topRight) */ int -plowAtomize(pNum, rect, proc, cdata) - int pNum; /* Plane from plowYankDef to search */ - Rect *rect; /* LHS is the geometrical edge we search; each +plowAtomize( + int pNum, /* Plane from plowYankDef to search */ + Rect *rect, /* LHS is the geometrical edge we search; each * Edge found will have an e_newx coordinate * equal to the RHS of this rect. */ - int (*proc)(); /* Procedure to apply to each Edge */ - ClientData cdata; /* Additional argument to (*proc)() */ + int (*proc)(), /* Procedure to apply to each Edge */ + ClientData cdata) /* Additional argument to (*proc)() */ { Tile *tpL, *tpR; Plane *plane = plowYankDef->cd_planes[pNum]; @@ -889,8 +889,8 @@ plowSrOutline( */ void -plowSrOutlineInit(outline) - Outline *outline; +plowSrOutlineInit( + Outline *outline) { Plane *plane = plowYankDef->cd_planes[outline->o_pNum]; Tile *in, *out; @@ -1054,8 +1054,8 @@ plowSrOutlineInit(outline) */ void -plowSrOutlineNext(outline) - Outline *outline; +plowSrOutlineNext( + Outline *outline) { Tile *tpL, *tpR; diff --git a/plow/PlowTech.c b/plow/PlowTech.c index 6a9ceaa45..c6c7f3d90 100644 --- a/plow/PlowTech.c +++ b/plow/PlowTech.c @@ -177,10 +177,10 @@ PlowDRCInit() /*ARGSUSED*/ bool -PlowDRCLine(sectionName, argc, argv) - char *sectionName; /* Unused */ - int argc; - char *argv[]; +PlowDRCLine( + char *sectionName, /* Unused */ + int argc, + char *argv[]) { int which; static const struct @@ -233,9 +233,9 @@ PlowDRCLine(sectionName, argc, argv) */ int -plowWidthRule(argc, argv) - int argc; - char *argv[]; +plowWidthRule( + int argc, + char *argv[]) { char *layers = argv[1]; int distance = atoi(argv[2]); @@ -314,9 +314,9 @@ plowWidthRule(argc, argv) */ int -plowSpacingRule(argc, argv) - int argc; - char *argv[]; +plowSpacingRule( + int argc, + char *argv[]) { char *layers1 = argv[1], *layers2 = argv[2]; int distance = atoi(argv[3]); @@ -458,9 +458,9 @@ plowSpacingRule(argc, argv) */ int -plowEdgeRule(argc, argv) - int argc; - char *argv[]; +plowEdgeRule( + int argc, + char *argv[]) { char *layers1 = argv[1], *layers2 = argv[2]; int distance = atoi(argv[3]); @@ -693,8 +693,8 @@ PlowDRCFinal() */ PlowRule * -plowTechOptimizeRule(ruleList) - PlowRule *ruleList; +plowTechOptimizeRule( + PlowRule *ruleList) { PlowRule *pCand, *pCandLast, *pr; TileTypeBitMask tmpMask; @@ -819,10 +819,10 @@ PlowTechInit() */ bool -PlowTechLine(sectionName, argc, argv) - char *sectionName; /* Unused */ - int argc; - char *argv[]; +PlowTechLine( + char *sectionName, /* Unused */ + int argc, + char *argv[]) { TileTypeBitMask types; @@ -945,7 +945,10 @@ void plowScaleDown(PlowRule *pr, int scalefactor) */ void -DRCPlowScale(int scaled, int scalen, bool adjustmax) +DRCPlowScale( + int scaled, + int scalen, + bool adjustmax) { PlowRule *pr; TileType i, j; @@ -997,9 +1000,9 @@ DRCPlowScale(int scaled, int scalen, bool adjustmax) */ void -plowTechPrintRule(pr, f) - PlowRule *pr; - FILE *f; +plowTechPrintRule( + PlowRule *pr, + FILE *f) { fprintf(f, "\tDISTANCE=%d, PLANE=%s, FLAGS=", pr->pr_dist, DBPlaneLongName(pr->pr_pNum)); @@ -1015,10 +1018,10 @@ plowTechPrintRule(pr, f) } void -plowTechShowTable(table, header, f) - PlowRule *table[TT_MAXTYPES][TT_MAXTYPES]; - char *header; - FILE *f; +plowTechShowTable( + PlowRule *table[TT_MAXTYPES][TT_MAXTYPES], + char *header, + FILE *f) { PlowRule *pr; TileType i, j; @@ -1036,8 +1039,8 @@ plowTechShowTable(table, header, f) } void -plowTechShow(f) - FILE *f; +plowTechShow( + FILE *f) { plowTechShowTable(plowWidthRulesTbl, "Width Rules", f); plowTechShowTable(plowSpacingRulesTbl, "Spacing Rules", f); diff --git a/plow/PlowTest.c b/plow/PlowTest.c index 0e627e7c3..1285157b9 100644 --- a/plow/PlowTest.c +++ b/plow/PlowTest.c @@ -130,9 +130,9 @@ const struct }; void -PlowTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +PlowTest( + MagWindow *w, + TxCommand *cmd) { pCmd plowCmd, plowGetCommand(); Rect editArea, dummyRect, rootBox, area2; @@ -414,8 +414,8 @@ PlowTest(w, cmd) */ pCmd -plowGetCommand(cmd) - TxCommand *cmd; +plowGetCommand( + TxCommand *cmd) { int plowIndex; @@ -497,9 +497,9 @@ plowDebugInit() */ int -plowShowShadow(edge, def) - Edge *edge; - CellDef *def; +plowShowShadow( + Edge *edge, + CellDef *def) { char mesg[512]; int scaleFactor = 10; @@ -537,9 +537,9 @@ plowShowShadow(edge, def) */ void -plowTestJog(def, area) - CellDef *def; - Rect *area; +plowTestJog( + CellDef *def, + Rect *area) { extern CellUse *plowYankUse; extern Rect plowYankedArea; @@ -613,10 +613,10 @@ plowTestJog(def, area) */ void -plowDebugEdge(edge, rtePtr, mesg) - Edge *edge; - RuleTableEntry *rtePtr; - char *mesg; +plowDebugEdge( + Edge *edge, + RuleTableEntry *rtePtr, + char *mesg) { int scaleFactor = 10; Rect edgeArea; @@ -721,9 +721,9 @@ plowDebugMore() */ int -plowShowOutline(outline, clipArea) - Outline *outline; - Rect *clipArea; +plowShowOutline( + Outline *outline, + Rect *clipArea) { static char *dirNames[] = { "center", "north", "northeast", "east", @@ -815,8 +815,8 @@ plowShowOutline(outline, clipArea) */ void -plowDisplay(dodef) - bool dodef; +plowDisplay( + bool dodef) { if (dodef) DBWAreaChanged(plowDummyUse->cu_def, &TiPlaneRect, diff --git a/resis/ResBasic.c b/resis/ResBasic.c index 45b91c5ae..ce3dd4147 100644 --- a/resis/ResBasic.c +++ b/resis/ResBasic.c @@ -44,9 +44,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -resMakePortBreakpoints(tile, list) - Tile *tile; - resNode **list; +resMakePortBreakpoints( + Tile *tile, + resNode **list) { int x, y; resNode *resptr; @@ -95,10 +95,10 @@ resMakePortBreakpoints(tile, list) */ void -ResStartTile(tile, x, y) - Tile *tile; - int x, y; - +ResStartTile( + Tile *tile, + int x, + int y) { resNode *resptr; @@ -135,9 +135,9 @@ ResStartTile(tile, x, y) #define IGNORE_BOTTOM 8 bool -ResEachTile(tile, devNodeTable) - Tile *tile; /* Tile being processed */ - HashTable *devNodeTable; /* Table of tiles connected to devices */ +ResEachTile( + Tile *tile, /* Tile being processed */ + HashTable *devNodeTable) /* Table of tiles connected to devices */ { Tile *tp; resNode *resptr; diff --git a/resis/ResChecks.c b/resis/ResChecks.c index 3007a4553..51702829b 100644 --- a/resis/ResChecks.c +++ b/resis/ResChecks.c @@ -43,12 +43,11 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -ResSanityChecks(nodename, resistorList, nodeList, devlist) - char *nodename; - resResistor *resistorList; - resNode *nodeList; - resDevice *devlist; - +ResSanityChecks( + char *nodename, + resResistor *resistorList, + resNode *nodeList, + resDevice *devlist) { resResistor *resistor; resNode *node; diff --git a/resis/ResDebug.c b/resis/ResDebug.c index be5cdc066..11ebeb60c 100644 --- a/resis/ResDebug.c +++ b/resis/ResDebug.c @@ -46,9 +46,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -ResPrintNodeList(fp, list) - FILE *fp; - resNode *list; +ResPrintNodeList( + FILE *fp, + resNode *list) { for (; list != NULL; list = list->rn_more) @@ -72,10 +72,9 @@ ResPrintNodeList(fp, list) *------------------------------------------------------------------------- */ void -ResPrintResistorList(fp, list) - FILE *fp; - resResistor *list; - +ResPrintResistorList( + FILE *fp, + resResistor *list) { for (; list != NULL; list = list->rr_nextResistor) { @@ -111,10 +110,9 @@ ResPrintResistorList(fp, list) */ void -ResPrintDeviceList(fp, list) - FILE *fp; - resDevice *list; - +ResPrintDeviceList( + FILE *fp, + resDevice *list) { static char termtype[] = {'g','s','d','c'}; int i; diff --git a/resis/ResFract.c b/resis/ResFract.c index 0dc498b22..4b9e8a51d 100644 --- a/resis/ResFract.c +++ b/resis/ResFract.c @@ -61,9 +61,9 @@ extern void ResCheckConcavity(); */ int -ResFracture(plane, rect) - Plane *plane; - Rect *rect; +ResFracture( + Plane *plane, + Rect *rect) { Point start; Tile *tpnew; @@ -161,10 +161,10 @@ ResFracture(plane, rect) */ void -ResCheckConcavity(bot, top, tt) - Tile *bot, *top; - TileType tt; - +ResCheckConcavity( + Tile *bot, + Tile *top, + TileType tt) { Tile *tp; int xlen, ylen; @@ -271,12 +271,12 @@ ResCheckConcavity(bot, top, tt) */ int -resWalkup(tile, tt, xpos, ypos, func) - Tile *tile; - TileType tt; - int xpos, ypos; - Tile * (*func)(); - +resWalkup( + Tile *tile, + TileType tt, + int xpos, + int ypos, + Tile * (*func)()) { Point pt; Tile *tp; @@ -304,12 +304,12 @@ resWalkup(tile, tt, xpos, ypos, func) } int -resWalkdown(tile, tt, xpos, ypos, func) - Tile *tile; - TileType tt; - int xpos, ypos; - Tile * (*func)(); - +resWalkdown( + Tile *tile, + TileType tt, + int xpos, + int ypos, + Tile * (*func)()) { Point pt; Tile *tp; @@ -345,12 +345,12 @@ resWalkdown(tile, tt, xpos, ypos, func) } int -resWalkright(tile, tt, xpos, ypos, func) - Tile *tile; - TileType tt; - int xpos, ypos; - Tile * (*func)(); - +resWalkright( + Tile *tile, + TileType tt, + int xpos, + int ypos, + Tile * (*func)()) { Point pt; Tile *tp; @@ -378,12 +378,12 @@ resWalkright(tile, tt, xpos, ypos, func) } int -resWalkleft(tile, tt, xpos, ypos, func) - Tile *tile; - TileType tt; - int xpos, ypos; - Tile * (*func)(); - +resWalkleft( + Tile *tile, + TileType tt, + int xpos, + int ypos, + Tile * (*func)()) { Point pt; Tile *tp; @@ -433,10 +433,9 @@ resWalkleft(tile, tt, xpos, ypos, func) */ Tile * -ResSplitX(tile, x) - Tile *tile; - int x; - +ResSplitX( + Tile *tile, + int x) { Tile *delayed = NULL; /* delayed free to extend lifetime */ TileType tt = TiGetType(tile); diff --git a/resis/ResJunct.c b/resis/ResJunct.c index 03f9d2fe7..26b4a5b97 100644 --- a/resis/ResJunct.c +++ b/resis/ResJunct.c @@ -48,12 +48,14 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -ResNewTermDevice(tile, tp, n, xj, yj, direction, PendingList) - Tile *tile, *tp; - int n; /* Terminal index */ - int xj, yj; /* Location of connection */ - int direction; /* Direction of current */ - resNode **PendingList; +ResNewTermDevice( + Tile *tile, + Tile *tp, + int n, /* Terminal index */ + int xj, + int yj, + int direction, /* Direction of current */ + resNode **PendingList) { resNode *resptr = NULL; resDevice *resDev; @@ -132,10 +134,13 @@ ResNewTermDevice(tile, tp, n, xj, yj, direction, PendingList) */ void -ResNewSubDevice(tile, tp, xj, yj, direction, PendingList) - Tile *tile, *tp; - int xj, yj, direction; - resNode **PendingList; +ResNewSubDevice( + Tile *tile, + Tile *tp, + int xj, + int yj, + int direction, + resNode **PendingList) { resNode *resptr; resDevice *resDev; @@ -185,10 +190,12 @@ ResNewSubDevice(tile, tp, xj, yj, direction, PendingList) */ void -ResProcessJunction(tile, tp, xj, yj, NodeList) - Tile *tile, *tp; - int xj, yj; - resNode **NodeList; +ResProcessJunction( + Tile *tile, + Tile *tp, + int xj, + int yj, + resNode **NodeList) { ResJunction *junction; resNode *resptr; diff --git a/resis/ResMain.c b/resis/ResMain.c index 4dd8ce4f9..b42ea4fe6 100644 --- a/resis/ResMain.c +++ b/resis/ResMain.c @@ -144,8 +144,8 @@ ResGetReCell() *------------------------------------------------------------------------ */ void -ResDissolveContacts(contacts) - ResContactPoint *contacts; +ResDissolveContacts( + ResContactPoint *contacts) { TileType t, conttype; Tile *tp; @@ -226,8 +226,8 @@ typedef struct driversinkdata { */ void -ResMakeDriverSinkPorts(def) - CellDef *def; +ResMakeDriverSinkPorts( + CellDef *def) { Plane *plane; Rect *rect; @@ -359,10 +359,10 @@ ResMakeDriverSinkPorts(def) */ int -ResAddPortFunc(tile, dinfo, dsd) - Tile *tile; - TileType dinfo; /* (unused) */ - DriverSinkData *dsd; /* Data for driver or sink */ +ResAddPortFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + DriverSinkData *dsd) /* Data for driver or sink */ { resPort *rp; resInfo *pX; @@ -432,9 +432,9 @@ typedef struct reslabeldata { */ void -ResMakeLabelPorts(def, resisdata) - CellDef *def; - ResisData *resisdata; +ResMakeLabelPorts( + CellDef *def, + ResisData *resisdata) { Plane *plane; TileTypeBitMask mask; @@ -526,10 +526,10 @@ ResMakeLabelPorts(def, resisdata) */ int -ResAddLabelFunc(tile, dinfo, rld) - Tile *tile; - TileType dinfo; /* (unused) */ - ResLabelData *rld; /* Label and node data */ +ResAddLabelFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ResLabelData *rld) /* Label and node data */ { resPort *rp; resInfo *pX; @@ -586,8 +586,8 @@ ResAddLabelFunc(tile, dinfo, rld) */ void -ResFindNewContactTiles(contacts) - ResContactPoint *contacts; +ResFindNewContactTiles( + ResContactPoint *contacts) { int pNum; Tile *tile; @@ -697,10 +697,10 @@ ResFindNewContactTiles(contacts) */ int -ResProcessTiles(resisdata, origin, devNodeTable) - ResisData *resisdata; - Point *origin; - HashTable *devNodeTable; +ResProcessTiles( + ResisData *resisdata, + Point *origin, + HashTable *devNodeTable) { Tile *startTile; int tilenum, merged; @@ -841,9 +841,9 @@ ResProcessTiles(resisdata, origin, devNodeTable) */ void -ResCalcPerimOverlap(tile, dev) - Tile *tile; - ResDevTile *dev; +ResCalcPerimOverlap( + Tile *tile, + ResDevTile *dev) { Tile *tp; int t1; @@ -902,10 +902,10 @@ ResCalcPerimOverlap(tile, dev) */ int -resMakeDevFunc(tile, dinfo, cx) - Tile *tile; - TileType dinfo; - TreeContext *cx; +resMakeDevFunc( + Tile *tile, + TileType dinfo, + TreeContext *cx) { ResDevTile *thisDev = (ResDevTile *)cx->tc_filter->tf_arg; Rect devArea; @@ -971,10 +971,10 @@ resMakeDevFunc(tile, dinfo, cx) #define IGNORE_BOTTOM 8 int -resExpandDevFunc(tile, dinfo, cx) - Tile *tile; - TileType dinfo; /* Split tile information (unused) */ - TreeContext *cx; +resExpandDevFunc( + Tile *tile, + TileType dinfo, /* Split tile information (unused) */ + TreeContext *cx) { ResDevTile *thisDev = (ResDevTile *)cx->tc_filter->tf_arg; static Stack *devExtentsStack = NULL; @@ -1132,10 +1132,10 @@ resExpandDevFunc(tile, dinfo, cx) */ int -ResShaveContacts(tile, dinfo, def) - Tile *tile; - TileType dinfo; /* (unused, see comment below) */ - CellDef *def; +ResShaveContacts( + Tile *tile, + TileType dinfo, /* (unused, see comment below) */ + CellDef *def) { TileType ttype; TileTypeBitMask *rmask; @@ -1194,10 +1194,10 @@ ResShaveContacts(tile, dinfo, def) */ bool -ResExtractNet(node, resisdata, cellname) - ResExtNode *node; - ResisData *resisdata; - char *cellname; +ResExtractNet( + ResExtNode *node, + ResisData *resisdata, + char *cellname) { SearchContext scx; TileTypeBitMask FirstTileMask; @@ -1595,10 +1595,10 @@ ResCleanUpEverything() */ int -ResGetTileFunc(tile, dinfo, tpptr) - Tile *tile; - TileType dinfo; /* (unused) */ - Tile **tpptr; +ResGetTileFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + Tile **tpptr) { /* To simplify processing, if a split tile does not have TT_SPACE * on either side, then only the left side is processed. @@ -1641,9 +1641,9 @@ ResGetTileFunc(tile, dinfo, tpptr) */ Tile * -FindStartTile(resisdata, SourcePoint) - ResisData *resisdata; - Point *SourcePoint; +FindStartTile( + ResisData *resisdata, + Point *SourcePoint) { Point workingPoint; Tile *tile, *tp; @@ -2054,9 +2054,9 @@ FindStartTile(resisdata, SourcePoint) */ resDevice * -ResGetDevice(pt, type) - Point *pt; - TileType type; +ResGetDevice( + Point *pt, + TileType type) { Point workingPoint; Tile *tile; diff --git a/resis/ResMakeRes.c b/resis/ResMakeRes.c index 3264d867c..f6c42b292 100644 --- a/resis/ResMakeRes.c +++ b/resis/ResMakeRes.c @@ -52,11 +52,11 @@ bool ResCalcEastWest(); */ bool -ResCalcTileResistance(tile, info, pendingList, doneList) - Tile *tile; - resInfo *info; - resNode **pendingList, **doneList; - +ResCalcTileResistance( + Tile *tile, + resInfo *info, + resNode **pendingList, + resNode **doneList) { int MaxX = MINFINITY, MinX = INFINITY; int MaxY = MINFINITY, MinY = INFINITY; @@ -119,10 +119,11 @@ ResCalcTileResistance(tile, info, pendingList, doneList) */ bool -ResCalcEastWest(tile, pendingList, doneList, resList) - Tile *tile; - resNode **pendingList, **doneList; - resResistor **resList; +ResCalcEastWest( + Tile *tile, + resNode **pendingList, + resNode **doneList, + resResistor **resList) { int count, height; bool merged; @@ -331,10 +332,11 @@ ResCalcEastWest(tile, pendingList, doneList, resList) */ bool -ResCalcNorthSouth(tile, pendingList, doneList, resList) - Tile *tile; - resNode **pendingList, **doneList; - resResistor **resList; +ResCalcNorthSouth( + Tile *tile, + resNode **pendingList, + resNode **doneList, + resResistor **resList) { int count, width; bool merged; @@ -544,11 +546,11 @@ ResCalcNorthSouth(tile, pendingList, doneList, resList) */ bool -ResCalcNearDevice(tile, pendingList, doneList, resList) - Tile *tile; - resNode **pendingList, **doneList; - resResistor **resList; - +ResCalcNearDevice( + Tile *tile, + resNode **pendingList, + resNode **doneList, + resResistor **resList) { bool merged; int devcount, devedge, deltax, deltay; @@ -853,10 +855,10 @@ ResCalcNearDevice(tile, pendingList, doneList, resList) */ void -ResDoContacts(contact, nodes, resList) - ResContactPoint *contact; - resNode **nodes; - resResistor **resList; +ResDoContacts( + ResContactPoint *contact, + resNode **nodes, + resResistor **resList) { resNode *resptr; cElement *ccell; @@ -1136,7 +1138,9 @@ SplitList( */ Breakpoint * -MergeSortBreaks(Breakpoint *list, int xsort) +MergeSortBreaks( + Breakpoint *list, + int xsort) { Breakpoint *a, *b; @@ -1172,9 +1176,9 @@ MergeSortBreaks(Breakpoint *list, int xsort) */ int -ResSortBreaks(masterlist, xsort) - Breakpoint **masterlist; - int xsort; +ResSortBreaks( + Breakpoint **masterlist, + int xsort) { Breakpoint *p1, *p2, *p3, *p4; bool changed; diff --git a/resis/ResMerge.c b/resis/ResMerge.c index cc7271794..45e18b749 100644 --- a/resis/ResMerge.c +++ b/resis/ResMerge.c @@ -42,9 +42,8 @@ extern void ResFixBreakPoint(); */ void -ResDoneWithNode(resptr) - resNode *resptr; - +ResDoneWithNode( + resNode *resptr) { int status; resNode *resptr2; @@ -136,10 +135,12 @@ ResDoneWithNode(resptr) */ void -ResFixRes(resptr, resptr2, resptr3, elimResis, newResis) - resNode *resptr, *resptr2, *resptr3; - resResistor *elimResis, *newResis; - +ResFixRes( + resNode *resptr, + resNode *resptr2, + resNode *resptr3, + resResistor *elimResis, + resResistor *newResis) { resElement *thisREl; @@ -182,9 +183,9 @@ ResFixRes(resptr, resptr2, resptr3, elimResis, newResis) */ void -ResFixParallel(elimResis, newResis) - resResistor *elimResis, *newResis; - +ResFixParallel( + resResistor *elimResis, + resResistor *newResis) { if ((newResis->rr_value + elimResis->rr_value) != 0) { @@ -218,9 +219,8 @@ ResFixParallel(elimResis, newResis) */ int -ResSeriesCheck(resptr) - resNode *resptr; - +ResSeriesCheck( + resNode *resptr) { resResistor *rr1,*rr2; resNode *resptr2, *resptr3; @@ -403,8 +403,8 @@ ResSeriesCheck(resptr) */ int -ResParallelCheck(resptr) - resNode *resptr; +ResParallelCheck( + resNode *resptr) { resResistor *r1, *r2; resNode *resptr2, *resptr3; @@ -521,9 +521,8 @@ ResParallelCheck(resptr) */ int -ResTriangleCheck(resptr) - resNode *resptr; - +ResTriangleCheck( + resNode *resptr) { resResistor *rr1, *rr2, *rr3; int status = UNTOUCHED; @@ -849,9 +848,11 @@ ResTriangleCheck(resptr) */ void -ResMergeNodes(node1, node2, pendingList, doneList) - resNode *node1, *node2; - resNode **pendingList, **doneList; +ResMergeNodes( + resNode *node1, + resNode *node2, + resNode **pendingList, + resNode **doneList) { resElement *workingRes, *tRes; tElement *workingDev, *tDev; @@ -1021,10 +1022,9 @@ ResMergeNodes(node1, node2, pendingList, doneList) */ void -ResDeleteResPointer(node, resistor) - resNode *node; - resResistor *resistor; - +ResDeleteResPointer( + resNode *node, + resResistor *resistor) { resElement *rcell1, *rcell2; int notfound = TRUE; @@ -1071,9 +1071,9 @@ ResDeleteResPointer(node, resistor) */ void -ResEliminateResistor(resistor, homelist) - resResistor *resistor, **homelist; - +ResEliminateResistor( + resResistor *resistor, + resResistor **homelist) { if (resistor->rr_lastResistor == NULL) *homelist = resistor->rr_nextResistor; @@ -1108,11 +1108,11 @@ ResEliminateResistor(resistor, homelist) */ void -ResCleanNode(resptr, info, homelist1, homelist2) - resNode *resptr; - int info; - resNode **homelist1; - resNode **homelist2; +ResCleanNode( + resNode *resptr, + int info, + resNode **homelist1, + resNode **homelist2) { resElement *rcell; cElement *ccell; @@ -1193,10 +1193,10 @@ ResCleanNode(resptr, info, homelist1, homelist2) */ void -ResFixBreakPoint(sourcelist, origNode, newNode) - Breakpoint **sourcelist; - resNode *origNode, *newNode; - +ResFixBreakPoint( + Breakpoint **sourcelist, + resNode *origNode, + resNode *newNode) { Breakpoint *bp, *bp2, *bp3, *bp4; int alreadypresent; diff --git a/resis/ResPrint.c b/resis/ResPrint.c index 91eeef41c..1a069e5fa 100644 --- a/resis/ResPrint.c +++ b/resis/ResPrint.c @@ -46,11 +46,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -ResPrintExtRes(outextfile, resistors, nodename) - FILE *outextfile; - resResistor *resistors; - char *nodename; - +ResPrintExtRes( + FILE *outextfile, + resResistor *resistors, + char *nodename) { int nodenum = 0; char newname[MAXNAME]; @@ -106,9 +105,9 @@ ResPrintExtRes(outextfile, resistors, nodename) */ void -ResPrintExtDev(outextfile, devices) - FILE *outextfile; - RDev *devices; +ResPrintExtDev( + FILE *outextfile, + RDev *devices) { char *subsName; ExtDevice *devptr, *devtest; @@ -210,10 +209,10 @@ ResPrintExtDev(outextfile, devices) */ void -ResPrintExtNode(outextfile, nodelist, node) - FILE *outextfile; - resNode *nodelist; - ResExtNode *node; +ResPrintExtNode( + FILE *outextfile, + resNode *nodelist, + ResExtNode *node) { char *nodename = node->name; int nodenum = 0; @@ -321,9 +320,9 @@ ResPrintExtNode(outextfile, nodelist, node) */ void -ResPrintStats(resisdata, name) - ResisData *resisdata; - char *name; +ResPrintStats( + ResisData *resisdata, + char *name) { static int totalnets = 0, totalnodes = 0, totalresistors = 0; int nodes, resistors; @@ -367,9 +366,9 @@ ResPrintStats(resisdata, name) */ void -resWriteNodeName(fp, nodeptr) - FILE *fp; - resNode *nodeptr; +resWriteNodeName( + FILE *fp, + resNode *nodeptr) { if (nodeptr->rn_name == NULL) fprintf(fp, "N%d", nodeptr->rn_id); @@ -387,12 +386,12 @@ resWriteNodeName(fp, nodeptr) */ void -ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) - FILE *fp; - resNode *nodelist; - char *nodename; - int *nidx; - CellDef *celldef; +ResPrintFHNodes( + FILE *fp, + resNode *nodelist, + char *nodename, + int *nidx, + CellDef *celldef) { char newname[16]; resNode *nodeptr; @@ -575,11 +574,11 @@ ResPrintFHNodes(fp, nodelist, nodename, nidx, celldef) */ void -ResPrintFHRects(fp, reslist, nodename, eidx) - FILE *fp; - resResistor *reslist; - char *nodename; - int *eidx; /* element (segment) index */ +ResPrintFHRects( + FILE *fp, + resResistor *reslist, + char *nodename, + int *eidx) /* element (segment) index */ { resResistor *resistors; float oscale, thick, cwidth; @@ -677,10 +676,10 @@ ResPrintFHRects(fp, reslist, nodename, eidx) */ void -ResPrintReference(fp, devices, cellDef) - FILE *fp; - RDev *devices; - CellDef *cellDef; +ResPrintReference( + FILE *fp, + RDev *devices, + CellDef *cellDef) { char *outfile = cellDef->cd_name; Rect *bbox = &(cellDef->cd_bbox); @@ -735,10 +734,10 @@ ResPrintReference(fp, devices, cellDef) */ int -ResCreateCenterlines(reslist, nidx, def) - resResistor *reslist; - int *nidx; - CellDef *def; +ResCreateCenterlines( + resResistor *reslist, + int *nidx, + CellDef *def) { resResistor *resistors; resNode *nodeptr; diff --git a/resis/ResReadExt.c b/resis/ResReadExt.c index 7bd95c098..6b3f4f4de 100644 --- a/resis/ResReadExt.c +++ b/resis/ResReadExt.c @@ -127,7 +127,8 @@ ResFixPoint *ResFixList; */ int -ResReadExt(CellDef *def) +ResReadExt( + CellDef *def) { char *line = NULL, *argv[128]; int result, locresult; @@ -518,7 +519,9 @@ ResReadParentExt(CellDef *parent, */ ResExtNode * -ResReadNode(int argc, char *argv[]) +ResReadNode( + int argc, + char *argv[]) { HashEntry *entry; ResExtNode *node; @@ -1052,8 +1055,8 @@ ResReadAttribute(ResExtNode *node, */ ResExtNode * -ResExtInitNode(entry) - HashEntry *entry; +ResExtInitNode( + HashEntry *entry) { ResExtNode *node; diff --git a/resis/ResRex.c b/resis/ResRex.c index 6d7756c48..4d3ef6ecd 100644 --- a/resis/ResRex.c +++ b/resis/ResRex.c @@ -83,9 +83,9 @@ int ResPortIndex; /* Port ordering to backannotate into magic */ */ void -ExtResisForDef(celldef, resisdata) - CellDef *celldef; - ResisData *resisdata; +ExtResisForDef( + CellDef *celldef, + ResisData *resisdata) { RDev *oldRDev; HashSearch hs; @@ -263,9 +263,9 @@ ResInit() */ void -CmdExtResis(win, cmd) - MagWindow *win; - TxCommand *cmd; +CmdExtResis( + MagWindow *win, + TxCommand *cmd) { int i, j, k, option, value, saveFlags; @@ -802,9 +802,9 @@ typedef enum { */ int -resSubcircuitFunc(cellUse, rdata) - CellUse *cellUse; - ResisData *rdata; +resSubcircuitFunc( + CellUse *cellUse, + ResisData *rdata) { CellDef *cellDef = cellUse->cu_def; Plane *savePlane; @@ -843,11 +843,11 @@ resSubcircuitFunc(cellUse, rdata) */ int -resPortFunc(scx, lab, tpath, result) - SearchContext *scx; - Label *lab; - TerminalPath *tpath; - int *result; +resPortFunc( + SearchContext *scx, + Label *lab, + TerminalPath *tpath, + int *result) { Rect r; int pclass, puse; @@ -946,8 +946,8 @@ resPortFunc(scx, lab, tpath, result) */ int -ResCheckBlackbox(cellDef) - CellDef *cellDef; +ResCheckBlackbox( + CellDef *cellDef) { int result = 1; SearchContext scx; @@ -990,8 +990,8 @@ ResCheckBlackbox(cellDef) */ int -ResCheckPorts(cellDef) - CellDef *cellDef; +ResCheckPorts( + CellDef *cellDef) { Label *lab; HashEntry *entry; @@ -1313,9 +1313,9 @@ ResProcessNode( */ void -ResCheckExtNodes(celldef, resisdata) - CellDef *celldef; - ResisData *resisdata; +ResCheckExtNodes( + CellDef *celldef, + ResisData *resisdata) { ResExtNode *node; int numext = 0; /* Number of nets extracted */ @@ -1506,11 +1506,11 @@ ResFixUpSinkpoints(ResConnect *sink, */ void -ResFixUpConnections(extDev, layoutDev, extNode, nodename) - RDev *extDev; - resDevice *layoutDev; - ResExtNode *extNode; - char *nodename; +ResFixUpConnections( + RDev *extDev, + resDevice *layoutDev, + ResExtNode *extNode, + char *nodename) { static char newname[MAXNAME], oldnodename[MAXNAME]; int notdecremented; @@ -1810,12 +1810,11 @@ ResFixUpConnections(extDev, layoutDev, extNode, nodename) */ void -ResFixDevName(line, type, device, layoutnode) - char line[]; - int type; - RDev *device; - resNode *layoutnode; - +ResFixDevName( + char line[], + int type, + RDev *device, + resNode *layoutnode) { HashEntry *entry; ResExtNode *node; @@ -1881,8 +1880,9 @@ ResFixDevName(line, type, device, layoutnode) */ int -devSortFunc(rec1, rec2) - devPtr **rec1, **rec2; +devSortFunc( + devPtr **rec1, + devPtr **rec2) { devPtr *dev1 = *rec1; devPtr *dev2 = *rec2; @@ -1932,8 +1932,8 @@ devSortFunc(rec1, rec2) */ void -ResSortByGate(DevpointerList) - devPtr **DevpointerList; +ResSortByGate( + devPtr **DevpointerList) { devPtr *working, **Devindexed; int listlen, listidx; @@ -1950,7 +1950,8 @@ ResSortByGate(DevpointerList) for (working = *DevpointerList; working; working = working->nextDev) Devindexed[listidx++] = working; - qsort(Devindexed, (size_t)listlen, (size_t)sizeof(devPtr *), devSortFunc); + qsort(Devindexed, (size_t)listlen, (size_t)sizeof(devPtr *), + (int (*)(const void *, const void *))devSortFunc); for (listidx = 0; listidx < listlen - 1; listidx++) Devindexed[listidx]->nextDev = Devindexed[listidx + 1]; @@ -1973,9 +1974,9 @@ ResSortByGate(DevpointerList) */ void -ResWriteLumpFile(node, resisdata) - ResExtNode *node; - ResisData *resisdata; +ResWriteLumpFile( + ResExtNode *node, + ResisData *resisdata) { int lumpedres; @@ -2009,9 +2010,9 @@ ResWriteLumpFile(node, resisdata) */ void -ResAlignNodes(nodelist, reslist) - resNode *nodelist; - resResistor *reslist; +ResAlignNodes( + resNode *nodelist, + resResistor *reslist) { resResistor *resistor; resNode *node1; @@ -2068,11 +2069,12 @@ ResAlignNodes(nodelist, reslist) */ int -ResWriteExtFile(celldef, node, resisdata, nidx, eidx) - CellDef *celldef; - ResExtNode *node; - ResisData *resisdata; - int *nidx, *eidx; +ResWriteExtFile( + CellDef *celldef, + ResExtNode *node, + ResisData *resisdata, + int *nidx, + int *eidx) { char *cp, newname[MAXNAME]; devPtr *ptr; diff --git a/resis/ResSimple.c b/resis/ResSimple.c index 0ff281051..d308155e2 100644 --- a/resis/ResSimple.c +++ b/resis/ResSimple.c @@ -63,11 +63,11 @@ extern void ResAddResistorToList(); */ void -ResSimplifyNet(nodelist, biglist, reslist, tolerance) - resNode **nodelist, **biglist; - resResistor **reslist; - float tolerance; - +ResSimplifyNet( + resNode **nodelist, + resNode **biglist, + resResistor **reslist, + float tolerance) { resElement *resisptr; resNode *node, *otherNode, *node1, *node2; @@ -372,9 +372,9 @@ ResSimplifyNet(nodelist, biglist, reslist, tolerance) */ void -ResMoveDevices(node1, node2) - resNode *node1, *node2; - +ResMoveDevices( + resNode *node1, + resNode *node2) { tElement *devptr, *oldptr; resDevice *device; @@ -413,7 +413,9 @@ ResMoveDevices(node1, node2) */ int -qrescompare(const void *one, const void *two) +qrescompare( + const void *one, + const void *two) { int cval; @@ -442,11 +444,11 @@ qrescompare(const void *one, const void *two) */ void -ResScrunchNet(reslist, pendingList, biglist, tolerance) - resResistor **reslist; - resNode **pendingList, **biglist; - float tolerance; - +ResScrunchNet( + resResistor **reslist, + resNode **pendingList, + resNode **biglist, + float tolerance) { resResistor *current, *working; resNode *node1, *node2; @@ -640,9 +642,9 @@ ResScrunchNet(reslist, pendingList, biglist, tolerance) */ void -ResAddResistorToList(resistor, locallist) - resResistor *resistor, **locallist; - +ResAddResistorToList( + resResistor *resistor, + resResistor **locallist) { resResistor *local, *last = NULL; @@ -696,10 +698,9 @@ ResAddResistorToList(resistor, locallist) */ void -ResDistributeCapacitance(nodelist, totalcap) - resNode *nodelist; - float totalcap; - +ResDistributeCapacitance( + resNode *nodelist, + float totalcap) { float totalarea = 0, capperarea; resNode *workingNode; @@ -739,9 +740,8 @@ ResDistributeCapacitance(nodelist, totalcap) */ float -ResCalculateChildCapacitance(me) - resNode *me; - +ResCalculateChildCapacitance( + resNode *me) { RCDelayStuff *myC; resElement *workingRes; @@ -817,11 +817,10 @@ ResCalculateChildCapacitance(me) */ void -ResCalculateTDi(node, resistor, resistorvalue) - resNode *node; - resResistor *resistor; - int resistorvalue; - +ResCalculateTDi( + resNode *node, + resResistor *resistor, + int resistorvalue) { resElement *workingRes; RCDelayStuff *rcd = (RCDelayStuff *)node->rn_client; @@ -863,11 +862,12 @@ ResCalculateTDi(node, resistor, resistorvalue) */ void -ResPruneTree(node, minTdi, nodelist1, nodelist2, resistorlist) - resNode *node, **nodelist1, **nodelist2; - float minTdi; - resResistor **resistorlist; - +ResPruneTree( + resNode *node, + float minTdi, + resNode **nodelist1, + resNode **nodelist2, + resResistor **resistorlist) { resResistor *currentRes; resElement *current; @@ -920,9 +920,8 @@ ResPruneTree(node, minTdi, nodelist1, nodelist2, resistorlist) */ int -ResDoSimplify(resisdata) - ResisData *resisdata; - +ResDoSimplify( + ResisData *resisdata) { resNode *node, *slownode; float bigres = 0.0; @@ -1061,7 +1060,8 @@ ResDoSimplify(resisdata) */ void -ResSetPathRes(ResisData *resisdata) +ResSetPathRes( + ResisData *resisdata) { HeapEntry he; resNode *node; @@ -1119,9 +1119,8 @@ ResSetPathRes(ResisData *resisdata) */ void -resPathNode(node) - resNode *node; - +resPathNode( + resNode *node) { resElement *re; @@ -1158,9 +1157,8 @@ resPathNode(node) */ void -resPathRes(res) - resResistor *res; - +resPathRes( + resResistor *res) { resNode *node0, *node1; int flag0, flag1; diff --git a/resis/ResUtils.c b/resis/ResUtils.c index a0a709224..57aa22be9 100644 --- a/resis/ResUtils.c +++ b/resis/ResUtils.c @@ -45,10 +45,10 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ ExtRegion * -ResFirst(tile, dinfo, arg) - Tile *tile; - TileType dinfo; - FindRegion *arg; +ResFirst( + Tile *tile, + TileType dinfo, + FindRegion *arg) { ResContactPoint *reg; TileType t; @@ -151,11 +151,11 @@ resSubstrateTerm( */ int -ResEach(tile, dinfo, pNum, arg) - Tile *tile; - TileType dinfo; - int pNum; - FindRegion *arg; +ResEach( + Tile *tile, + TileType dinfo, + int pNum, + FindRegion *arg) { if (((ResContactPoint *)(arg->fra_region))->cp_contactTile != tile) @@ -818,11 +818,10 @@ ResAddDevPlumbing( */ int -ResRemovePlumbing(tile, dinfo, arg) - Tile *tile; - TileType dinfo; // Unused, but should be handled. - ClientData *arg; - +ResRemovePlumbing( + Tile *tile, + TileType dinfo, // Unused, but should be handled. + ClientData *arg) { ClientData ticlient = TiGetClient(tile); if (ticlient != CLIENTDEFAULT) @@ -848,8 +847,8 @@ ResRemovePlumbing(tile, dinfo, arg) */ void -ResFreeDevTiles(TileList) - ResDevTile *TileList; +ResFreeDevTiles( + ResDevTile *TileList) { ResDevTile *oldTile; @@ -884,11 +883,11 @@ ResFreeDevTiles(TileList) */ void -ResPreProcessDevices(TileList, DeviceList, Def, devNodeTable) - ResDevTile *TileList; - resDevice *DeviceList; - CellDef *Def; - HashTable *devNodeTable; +ResPreProcessDevices( + ResDevTile *TileList, + resDevice *DeviceList, + CellDef *Def, + HashTable *devNodeTable) { Tile *tile; ResDevTile *oldTile; @@ -1072,8 +1071,9 @@ ResPreProcessDevices(TileList, DeviceList, Def, devNodeTable) */ void -ResAddToQueue(node, list) - resNode *node, **list; +ResAddToQueue( + resNode *node, + resNode **list) { node->rn_more = *list; node->rn_less = NULL; @@ -1095,8 +1095,9 @@ ResAddToQueue(node, list) */ void -ResRemoveFromQueue(node, list) - resNode *node, **list; +ResRemoveFromQueue( + resNode *node, + resNode **list) { if (node->rn_less != NULL) { @@ -1122,8 +1123,8 @@ ResRemoveFromQueue(node, list) } resInfo * -resAddField(tile) - Tile *tile; +resAddField( + Tile *tile) { ClientData ticlient = TiGetClient(tile); resInfo *Info = (resInfo *)CD2PTR(ticlient); diff --git a/resis/ResWrite.c b/resis/ResWrite.c index 9a6e85efc..ac476a4ae 100644 --- a/resis/ResWrite.c +++ b/resis/ResWrite.c @@ -42,10 +42,9 @@ static char sccsid[] = "@(#)Write.c 4.10 MAGIC (Stanford Addition) 07/86"; #define RESGROUPSIZE 256 void -ResPrintNetwork(filename, reslist) - char *filename; - resResistor *reslist; - +ResPrintNetwork( + char *filename, + resResistor *reslist) { char bigname[255], name1[255], name2[255]; FILE *fp; @@ -95,11 +94,10 @@ ResPrintNetwork(filename, reslist) } void -ResPrintCurrents(filename, extension, node) - char *filename; - float extension; - resNode *node; - +ResPrintCurrents( + char *filename, + float extension, + resNode *node) { char bigname[255]; FILE *fp; @@ -128,11 +126,10 @@ ResPrintCurrents(filename, extension, node) */ void -resCurrentPrintFunc(node, resistor, filename) - resNode *node; - resResistor *resistor; - FILE *filename; - +resCurrentPrintFunc( + resNode *node, + resResistor *resistor, + FILE *filename) { tElement *workingDev; float i_sum = 0.0; @@ -174,11 +171,10 @@ ResDeviceCounts() void -ResWriteECLFile(filename, reslist, nodelist) - char *filename; - resResistor *reslist; - resNode *nodelist; - +ResWriteECLFile( + char *filename, + resResistor *reslist, + resNode *nodelist) { char newname[100], *tmpname, *per; FILE *fp; diff --git a/router/router.h b/router/router.h index 972a6a25b..89162d792 100644 --- a/router/router.h +++ b/router/router.h @@ -26,6 +26,16 @@ #include "database/database.h" #include "utils/geometry.h" +/* Forward declaration to avoid pulling in utils/netlist.h */ +struct nlNetList; +typedef struct nlNetList NLNetList; +struct nlTermLoc; +typedef struct nlTermLoc NLTermLoc; +struct nlTerm; +typedef struct nlTerm NLTerm; +struct nlNet; +typedef struct nlNet NLNet; + /* Masks of directions */ #define DIRTOMASK(d) (1 << (d)) #define DIRMASKHASDIR(m, d) ((m) & DIRTOMASK(d)) @@ -185,9 +195,9 @@ extern void RtrMilestoneDone(); extern void RtrChannelDensity(); extern void RtrChannelRoute(); extern void RtrChannelCleanObstacles(); -extern void RtrStemProcessAll(); +extern void RtrStemProcessAll(CellUse *use, NLNetList *netList, bool doWarn, bool (*func)()); extern void RtrPaintBack(); -extern bool RtrStemAssignExt(); +extern bool RtrStemAssignExt(CellUse *use, bool doWarn, NLTermLoc *loc, NLTerm *term, NLNet *net); extern void RtrPinsInit(); extern void RtrHazards(); extern void RtrPinsLink(); diff --git a/router/routerInt.h b/router/routerInt.h index a3ef3d3e0..c7d83e1a2 100644 --- a/router/routerInt.h +++ b/router/routerInt.h @@ -38,8 +38,8 @@ extern int rtrPinArrayInit(); extern int rtrPinArrayLink(); extern int rtrSidePassToClient(); extern int rtrSideProcess(); -extern int rtrXDist(); -extern int rtrYDist(); +extern int rtrXDist(Tile *tiles[], int x, bool isRight); +extern int rtrYDist(Tile *tiles[], Point *point, bool up, Plane *plane); extern int rtrStemContactLine(); extern int rtrStemTypes(); extern int rtrSrTraverse(); diff --git a/router/rtrChannel.c b/router/rtrChannel.c index 7231627b7..e01fd8808 100644 --- a/router/rtrChannel.c +++ b/router/rtrChannel.c @@ -89,9 +89,9 @@ extern void rtrChannelObstaclePins(); */ void -RtrChannelRoute(ch, pCount) - GCRChannel *ch; - int *pCount; +RtrChannelRoute( + GCRChannel *ch, + int *pCount) { GCRChannel *flipped, *flipped_again, *copy; int errs1, errs2; @@ -214,11 +214,11 @@ RtrChannelRoute(ch, pCount) */ void -RtrChannelBounds(loc, pLength, pWidth, origin) - Rect *loc; /* Area the channel is to occupy */ - int *pLength; /* Filled in with # columns in channel */ - int *pWidth; /* Filled in with # rows in channel */ - Point *origin; /* Filled in with coords of (0,0) grid point +RtrChannelBounds( + Rect *loc, /* Area the channel is to occupy */ + int *pLength, /* Filled in with # columns in channel */ + int *pWidth, /* Filled in with # rows in channel */ + Point *origin) /* Filled in with coords of (0,0) grid point * (one grid line below and to left of first * usable grid point) */ @@ -285,9 +285,9 @@ RtrChannelBounds(loc, pLength, pWidth, origin) */ void -RtrChannelObstacles(use, ch) - CellUse *use; - GCRChannel * ch; +RtrChannelObstacles( + CellUse *use, + GCRChannel * ch) { int l, w, up = RtrSubcellSepUp, down = RtrSubcellSepDown; TileTypeBitMask allObs; @@ -342,8 +342,8 @@ RtrChannelObstacles(use, ch) */ void -rtrChannelObstaclePins(ch) - GCRChannel *ch; +rtrChannelObstaclePins( + GCRChannel *ch) { short **res; int row, col, end; @@ -412,10 +412,10 @@ rtrChannelObstaclePins(ch) */ int -rtrChannelObstacleMark(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused) */ - TreeContext *cxp; +rtrChannelObstacleMark( + Tile *tile, + TileType dinfo, /* (unused) */ + TreeContext *cxp) { short **mcol, *mrow, *mrowend, mask; GCRChannel *ch = (GCRChannel *) cxp->tc_filter->tf_arg; @@ -514,8 +514,8 @@ rtrChannelObstacleMark(tile, dinfo, cxp) */ void -RtrChannelDensity(ch) - GCRChannel *ch; +RtrChannelDensity( + GCRChannel *ch) { short *hdens, *vdens, *rptr; int col, density; @@ -587,8 +587,8 @@ RtrChannelDensity(ch) */ void -RtrChannelCleanObstacles(ch) - GCRChannel *ch; +RtrChannelCleanObstacles( + GCRChannel *ch) { short *rptr; int row, rtop; diff --git a/router/rtrCmd.c b/router/rtrCmd.c index 8ed6a168c..9ae16e015 100644 --- a/router/rtrCmd.c +++ b/router/rtrCmd.c @@ -76,9 +76,9 @@ bool RtrMazeStems = FALSE; /* Set by default to original behavior */ */ void -CmdGARouterTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGARouterTest( + MagWindow *w, + TxCommand *cmd) { GATest(w, cmd); } @@ -103,9 +103,9 @@ CmdGARouterTest(w, cmd) */ void -CmdGRouterTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGRouterTest( + MagWindow *w, + TxCommand *cmd) { GlTest(w, cmd); } @@ -130,9 +130,9 @@ CmdGRouterTest(w, cmd) */ void -CmdIRouterTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdIRouterTest( + MagWindow *w, + TxCommand *cmd) { IRTest(w, cmd); } @@ -157,9 +157,9 @@ CmdIRouterTest(w, cmd) */ void -CmdMZRouterTest(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdMZRouterTest( + MagWindow *w, + TxCommand *cmd) { MZTest(w, cmd); } @@ -188,9 +188,9 @@ CmdMZRouterTest(w, cmd) */ void -CmdChannel(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdChannel( + MagWindow *w, + TxCommand *cmd) { Rect newBox; CellDef *def, *RtrDecomposeName(); @@ -227,10 +227,10 @@ CmdChannel(w, cmd) } int -cmdChannelFunc(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData clientdata; /* (unused) */ +cmdChannelFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData clientdata) /* (unused) */ { Rect area, rootArea; @@ -258,9 +258,9 @@ cmdChannelFunc(tile, dinfo, clientdata) */ void -CmdGaRoute(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdGaRoute( + MagWindow *w, + TxCommand *cmd) { typedef enum { CHANNEL, GEN, HELP, NOWARN, RESET, ROUTE, WARN } cmdType; static char *chanTypeName[] = { "NORMAL", "HRIVER", "VRIVER" }; @@ -459,9 +459,9 @@ channel [type] define a channel", CHANNEL}, */ void -CmdIRoute(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdIRoute( + MagWindow *w, + TxCommand *cmd) { IRCommand(w,cmd); @@ -506,9 +506,9 @@ CmdIRoute(w, cmd) #define ROUTERMAZESTEMS 19 void -CmdRoute(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdRoute( + MagWindow *w, + TxCommand *cmd) { int option; GCRChannel *ch; @@ -782,9 +782,9 @@ CmdRoute(w, cmd) */ void -CmdSeeFlags(w, cmd) - MagWindow * w; - TxCommand *cmd; +CmdSeeFlags( + MagWindow * w, + TxCommand *cmd) { Rect rootRect; Point point; diff --git a/router/rtrDcmpose.c b/router/rtrDcmpose.c index 275c5899c..405e31706 100644 --- a/router/rtrDcmpose.c +++ b/router/rtrDcmpose.c @@ -75,7 +75,7 @@ Rect RouteArea; /* Forward declarations */ extern int rtrSrCells(); -extern void rtrRoundRect(); +extern void rtrRoundRect(Rect *r, int sepUp, int sepDown, bool doRoundUp); extern void rtrHashKill(); extern void rtrSplitToArea(); extern void rtrMarkChannel(); @@ -104,10 +104,10 @@ bool rtrUseCorner(); */ CellDef * -RtrDecomposeName(routeUse, area, name) - CellUse *routeUse; /* Cell to be decomposed */ - Rect *area; /* Confine channels to this area */ - char *name; /* Name of netlist if non-NULL; otherwise, use the +RtrDecomposeName( + CellUse *routeUse, /* Cell to be decomposed */ + Rect *area, /* Confine channels to this area */ + char *name) /* Name of netlist if non-NULL; otherwise, use the * name of the current netlist or that of routeUse * as described above. */ @@ -164,10 +164,10 @@ RtrDecomposeName(routeUse, area, name) */ CellDef * -RtrDecompose(routeUse, area, netList) - CellUse *routeUse; - Rect *area; - NLNetList *netList; +RtrDecompose( + CellUse *routeUse, + Rect *area, + NLNetList *netList) { SearchContext scx; CellDef *cdTo; @@ -312,9 +312,9 @@ RtrFindChannelDef() */ int -rtrSrCells(scx, targetDef) - SearchContext *scx; /* The cell to be painted */ - CellDef *targetDef; /* The def into which the silhouette is painted */ +rtrSrCells( + SearchContext *scx, /* The cell to be painted */ + CellDef *targetDef) /* The def into which the silhouette is painted */ { CellDef *def = scx->scx_use->cu_def; Rect rootBbox, gridBbox; @@ -367,10 +367,11 @@ rtrSrCells(scx, targetDef) */ void -rtrRoundRect(r, sepUp, sepDown, doRoundUp) - Rect *r; - int sepUp, sepDown; - bool doRoundUp; +rtrRoundRect( + Rect *r, + int sepUp, + int sepDown, + bool doRoundUp) { int halfGrid = RtrGridSpacing / 2; @@ -425,8 +426,8 @@ rtrRoundRect(r, sepUp, sepDown, doRoundUp) */ void -rtrHashKill(ht) - HashTable *ht; +rtrHashKill( + HashTable *ht) { HashEntry *he; HashSearch hs; @@ -454,9 +455,9 @@ rtrHashKill(ht) */ void -rtrSplitToArea(area, def) - Rect *area; /* Routing area */ - CellDef *def; /* Def holding routing results */ +rtrSplitToArea( + Rect *area, /* Routing area */ + CellDef *def) /* Def holding routing results */ { Tile *tile; Point p; @@ -522,10 +523,10 @@ rtrSplitToArea(area, def) */ int -rtrSrClear(tile, dinfo, area) - Tile *tile; - TileType dinfo; - Rect *area; +rtrSrClear( + Tile *tile, + TileType dinfo, + Rect *area) { /* Clear all */ rtrCLEAR(tile, -1); @@ -581,10 +582,10 @@ rtrSrClear(tile, dinfo, area) */ int -rtrSrFunc(tile, dinfo, plane) - Tile *tile; /* Candidate cell tile */ - TileType dinfo; /* Split tile information (unused) */ - Plane *plane; /* Plane in which searches take place */ +rtrSrFunc( + Tile *tile, /* Candidate cell tile */ + TileType dinfo, /* Split tile information (unused) */ + Plane *plane) /* Plane in which searches take place */ { Tile *tiles[3]; Point p; @@ -639,11 +640,11 @@ rtrSrFunc(tile, dinfo, plane) */ bool -rtrUseCorner(point, corner, plane, tiles) - Point *point; /* Point at which a cell corner is found */ - int corner; /* Selects NE, NW, SE, or SW cell corner */ - Plane *plane; /* Plane to be searched for tiles */ - Tile *tiles[]; /* Return pointers to found space tiles */ +rtrUseCorner( + Point *point, /* Point at which a cell corner is found */ + int corner, /* Selects NE, NW, SE, or SW cell corner */ + Plane *plane, /* Plane to be searched for tiles */ + Tile *tiles[]) /* Return pointers to found space tiles */ { Point p0, p1; Tile * tile; @@ -723,11 +724,11 @@ rtrUseCorner(point, corner, plane, tiles) */ void -rtrMarkChannel(plane, tiles, point, corner) - Plane *plane; /* Plane for searching */ - Tile *tiles[]; /* Bordering space tiles */ - Point *point; /* Coordinates of corner */ - int corner; /* Corner of tile to process */ +rtrMarkChannel( + Plane *plane, /* Plane for searching */ + Tile *tiles[], /* Bordering space tiles */ + Point *point, /* Coordinates of corner */ + int corner) /* Corner of tile to process */ { int xDist, yDist, d1, d2, lastY; Tile *tile, *new; @@ -846,11 +847,11 @@ rtrMarkChannel(plane, tiles, point, corner) */ int -rtrYDist(tiles, point, up, plane) - Tile *tiles[]; /* Start tile in [1]. Put bottom tile in [0] */ - Point *point; /* Point from which distance is measure */ - bool up; /* TRUE if search up, FALSE if down */ - Plane *plane; /* Cell plane for search */ +rtrYDist( + Tile *tiles[], /* Start tile in [1]. Put bottom tile in [0] */ + Point *point, /* Point from which distance is measure */ + bool up, /* TRUE if search up, FALSE if down */ + Plane *plane) /* Cell plane for search */ { Tile *current = tiles[1], *next; int x, yStart, flag; @@ -954,10 +955,10 @@ rtrYDist(tiles, point, up, plane) */ int -rtrXDist(tiles, x, isRight) - Tile *tiles[]; /* Space tiles bordering the corner */ - int x; /* Starting x for distance calculation */ - bool isRight; /* TRUE if right, FALSE if left */ +rtrXDist( + Tile *tiles[], /* Space tiles bordering the corner */ + int x, /* Starting x for distance calculation */ + bool isRight) /* TRUE if right, FALSE if left */ { int l0, l1; @@ -987,7 +988,11 @@ rtrXDist(tiles, x, isRight) */ void -rtrMerge(Tile **delay1, Tile *tup, Tile *tdn, Plane *plane) +rtrMerge( + Tile **delay1, + Tile *tup, + Tile *tdn, + Plane *plane) { Tile *side; diff --git a/router/rtrFdback.c b/router/rtrFdback.c index a9a2040b8..b79c40acd 100644 --- a/router/rtrFdback.c +++ b/router/rtrFdback.c @@ -82,12 +82,12 @@ int rtrFNum; /* Says which list is active */ */ void -RtrChannelError(ch, col, track, msg, net) - GCRChannel *ch; /* Channel where error occurred. */ - int col; /* Column where error occurred. */ - int track; /* Track where error occurred. */ - char *msg; /* Message identifying error. */ - NLNet *net; /* Net where error occurred */ +RtrChannelError( + GCRChannel *ch, /* Channel where error occurred. */ + int col, /* Column where error occurred. */ + int track, /* Track where error occurred. */ + char *msg, /* Message identifying error. */ + NLNet *net) /* Net where error occurred */ { Rect box; Point old, new; @@ -170,9 +170,9 @@ rtrFBClear() */ void -rtrFBAdd(r, t) - Rect * r; - char * t; +rtrFBAdd( + Rect * r, + char * t) { RtrFB * new; @@ -201,8 +201,8 @@ rtrFBAdd(r, t) */ void -RtrFBPaint(num) - int num; /* Selects which list to use */ +RtrFBPaint( + int num) /* Selects which list to use */ { RtrFB *temp; diff --git a/router/rtrHazards.c b/router/rtrHazards.c index c76eec498..417219979 100644 --- a/router/rtrHazards.c +++ b/router/rtrHazards.c @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* Forward declarations */ extern void rtrFindEnds(); -extern void rtrFlag(); +extern void rtrFlag(GCRChannel * ch, int cl, int cr, int rb, int rt, bool isHoriz); /* @@ -84,8 +84,8 @@ extern void rtrFlag(); */ void -RtrHazards(ch) - GCRChannel *ch; /* The channel to be flagged */ +RtrHazards( + GCRChannel *ch) /* The channel to be flagged */ { short **map, **rtrHeights(), **rtrWidths(), **height, **width; short *hcol, *wcol, *mcol; @@ -231,8 +231,8 @@ RtrHazards(ch) */ short ** -rtrHeights(ch) - GCRChannel * ch; /* Channel to be processed */ +rtrHeights( + GCRChannel * ch) /* Channel to be processed */ { short **heights, *obstacles, *hcol; int i, row; @@ -303,8 +303,8 @@ rtrHeights(ch) */ short ** -rtrWidths(ch) - GCRChannel * ch; +rtrWidths( + GCRChannel * ch) { short **widths, **map; int col, i; @@ -377,13 +377,13 @@ rtrWidths(ch) */ void -rtrFindEnds(ch, isHoriz, bot, top, lo, hi) - GCRChannel *ch; - int isHoriz; /* 1 if to find horizontal ends */ - int bot; /* Low range to be scanned */ - int top; /* High range to be scanned */ - int *lo; /* Low range of result. Also starting col or row. */ - int *hi; /* High range of result */ +rtrFindEnds( + GCRChannel *ch, + int isHoriz, /* 1 if to find horizontal ends */ + int bot, /* Low range to be scanned */ + int top, /* High range to be scanned */ + int *lo, /* Low range of result. Also starting col or row. */ + int *hi) /* High range of result */ { int col, row; short **map; @@ -488,11 +488,13 @@ rtrFindEnds(ch, isHoriz, bot, top, lo, hi) */ void -rtrFlag(ch, cl, cr, rb, rt, isHoriz) - GCRChannel * ch; /* Channel whose flag array is to be set */ - int cl, cr; /* Left and right limits of columns to be set */ - int rb, rt; /* Bottom and top limits of rows to be set */ - bool isHoriz; /* TRUE if left/right flags, else top/bottom */ +rtrFlag( + GCRChannel * ch, /* Channel whose flag array is to be set */ + int cl, + int cr, + int rb, + int rt, + bool isHoriz) /* TRUE if left/right flags, else top/bottom */ { int extra, limit, r, c; short ** map; diff --git a/router/rtrMain.c b/router/rtrMain.c index ea86c37eb..e7e89c812 100644 --- a/router/rtrMain.c +++ b/router/rtrMain.c @@ -86,9 +86,9 @@ Point RtrOrigin = { 0, 0 }; */ void -Route(routeUse, routeArea) - CellUse *routeUse; - Rect *routeArea; +Route( + CellUse *routeUse, + Rect *routeArea) { CellDef *channelDef; int errs, numNets; @@ -171,13 +171,13 @@ Route(routeUse, routeArea) */ int -rtrMakeChannel(tile, dinfo, clipBox) - Tile *tile; /* Potential channel tile; we create a channel whose +rtrMakeChannel( + Tile *tile, /* Potential channel tile; we create a channel whose * area is equal to that of this tile if the type of * this tile is TT_SPACE. */ - TileType dinfo; /* Split tile information (unused) */ - Rect *clipBox; /* If non-NULL, clip the channel area to this box */ + TileType dinfo, /* Split tile information (unused) */ + Rect *clipBox) /* If non-NULL, clip the channel area to this box */ { int length, width; HashEntry *entry; @@ -256,8 +256,8 @@ RtrRunStats() } void -RtrMilestoneStart(event) - char *event; +RtrMilestoneStart( + char *event) { rtrMilestoneName = event; TxPrintf("%s: ", event); diff --git a/router/rtrPaint.c b/router/rtrPaint.c index 347f1333c..f27c732fe 100644 --- a/router/rtrPaint.c +++ b/router/rtrPaint.c @@ -72,9 +72,9 @@ bool rtrDoVia(); */ void -RtrPaintBack(ch, def) - GCRChannel * ch; - CellDef *def; +RtrPaintBack( + GCRChannel * ch, + CellDef *def) { if(RtrDoMMax) /*Change poly to metal where possible */ rtrMaxMetal(ch); @@ -102,9 +102,9 @@ RtrPaintBack(ch, def) */ void -rtrPaintRows(def, ch) - CellDef *def; /* Def into which paint will go */ - GCRChannel *ch; /* Channel being painted */ +rtrPaintRows( + CellDef *def, /* Def into which paint will go */ + GCRChannel *ch) /* Channel being painted */ { TileType curType, nextType; short **result, code; @@ -230,9 +230,9 @@ rtrPaintRows(def, ch) */ void -rtrPaintColumns(def, ch) - CellDef * def; - GCRChannel * ch; +rtrPaintColumns( + CellDef * def, + GCRChannel * ch) { TileType curType; /* Describes what kind of material currently * occupies the column. It's either RtrMetalType, @@ -339,10 +339,10 @@ rtrPaintColumns(def, ch) */ bool -rtrDoVia(ch, col, row) - GCRChannel *ch; /* The channel undergoing display */ - int col; /* The x coordinate of the location considered */ - int row; /* The y coordinate of the location considered */ +rtrDoVia( + GCRChannel *ch, /* The channel undergoing display */ + int col, /* The x coordinate of the location considered */ + int row) /* The y coordinate of the location considered */ { short up, down, left, right, mask; short **result, code; @@ -430,8 +430,8 @@ rtrDoVia(ch, col, row) */ void -rtrMaxMetal(ch) - GCRChannel * ch; +rtrMaxMetal( + GCRChannel * ch) { bool needLowX, needHiX, hasLowX, hasHiX, active, cross; int x, y, i, bottom, top; @@ -569,10 +569,10 @@ rtrMaxMetal(ch) */ bool -rtrMetalOkay(ch, col, dir) - GCRChannel *ch; /* The originating channel for the search */ - int col; /* The crossing column in the originating channel */ - int dir; /* Direction of the crossing NORTH or SOUTH */ +rtrMetalOkay( + GCRChannel *ch, /* The originating channel for the search */ + int col, /* The crossing column in the originating channel */ + int dir) /* Direction of the crossing NORTH or SOUTH */ { GCRChannel *newCh; GCRPin *pin; @@ -622,9 +622,9 @@ rtrMetalOkay(ch, col, dir) */ void -RtrPaintContact(def, area) - CellDef *def; /* Cell in which to paint contact. */ - Rect *area; /* Area in which to paint the contact. */ +RtrPaintContact( + CellDef *def, /* Cell in which to paint contact. */ + Rect *area) /* Area in which to paint the contact. */ { Rect larger; @@ -659,9 +659,9 @@ RtrPaintContact(def, area) */ void -RtrPaintStats(type, distance) - TileType type; - int distance; +RtrPaintStats( + TileType type, + int distance) { if (distance < 0) distance = -distance; diff --git a/router/rtrPin.c b/router/rtrPin.c index b7b7aa20b..73bc26cc9 100644 --- a/router/rtrPin.c +++ b/router/rtrPin.c @@ -79,8 +79,8 @@ void rtrPinShow(GCRPin *); */ void -RtrPinsInit(ch) - GCRChannel *ch; +RtrPinsInit( + GCRChannel *ch) { rtrPinArrayInit(ch, GEO_NORTH, ch->gcr_tPins, ch->gcr_length); rtrPinArrayInit(ch, GEO_SOUTH, ch->gcr_bPins, ch->gcr_length); @@ -89,11 +89,11 @@ RtrPinsInit(ch) } int -rtrPinArrayInit(ch, side, pins, nPins) - GCRChannel *ch; - int side; - GCRPin *pins; - int nPins; +rtrPinArrayInit( + GCRChannel *ch, + int side, + GCRPin *pins, + int nPins) { GCRPin *pin, *linked; GCRChannel *adjacent; @@ -212,10 +212,10 @@ rtrPinArrayInit(ch, side, pins, nPins) */ GCRPin * -RtrPointToPin(ch, side, point) - GCRChannel *ch; /* The channel containing the point */ - int side; /* Side of ch that point lies on */ - Point *point; /* The point to be converted to a pin */ +RtrPointToPin( + GCRChannel *ch, /* The channel containing the point */ + int side, /* Side of ch that point lies on */ + Point *point) /* The point to be converted to a pin */ { int coord; @@ -286,8 +286,8 @@ RtrPointToPin(ch, side, point) */ bool -RtrPinsBlock(ch) - GCRChannel *ch; +RtrPinsBlock( + GCRChannel *ch) { bool changed; @@ -305,13 +305,13 @@ RtrPinsBlock(ch) } bool -rtrPinArrayBlock(ch, pins, opins, nPins) - GCRChannel *ch; /* Channel pins belong to */ - GCRPin *pins; /* Processing this side of channel */ - GCRPin *opins; /* Pins on opposite side; used only if ch is a +rtrPinArrayBlock( + GCRChannel *ch, /* Channel pins belong to */ + GCRPin *pins, /* Processing this side of channel */ + GCRPin *opins, /* Pins on opposite side; used only if ch is a * river-routing channel. */ - int nPins; /* Number of internal pins (not counting pins[0]) */ + int nPins) /* Number of internal pins (not counting pins[0]) */ { bool changed, isRiver = (ch->gcr_type != CHAN_NORMAL); GCRPin *pin, *opin, *linked; @@ -364,8 +364,8 @@ rtrPinArrayBlock(ch, pins, opins, nPins) */ void -RtrPinsLink(ch) - GCRChannel *ch; +RtrPinsLink( + GCRChannel *ch) { rtrPinArrayLink(ch->gcr_tPins, ch->gcr_length); rtrPinArrayLink(ch->gcr_bPins, ch->gcr_length); @@ -374,9 +374,9 @@ RtrPinsLink(ch) } int -rtrPinArrayLink(pins, nPins) - GCRPin *pins; - int nPins; +rtrPinArrayLink( + GCRPin *pins, + int nPins) { GCRPin *pin, *lastPin, *lastValid; @@ -465,8 +465,8 @@ void rtrPinShow(pin) */ void -RtrPinsFixStems(ch) - GCRChannel *ch; +RtrPinsFixStems( + GCRChannel *ch) { rtrPinArrayFixStems(ch->gcr_tPins, ch->gcr_length); rtrPinArrayFixStems(ch->gcr_bPins, ch->gcr_length); @@ -475,9 +475,9 @@ RtrPinsFixStems(ch) } int -rtrPinArrayFixStems(pins, nPins) - GCRPin *pins; - int nPins; +rtrPinArrayFixStems( + GCRPin *pins, + int nPins) { GCRPin *pin, *lastPin; diff --git a/router/rtrSide.c b/router/rtrSide.c index a205c7630..d03222139 100644 --- a/router/rtrSide.c +++ b/router/rtrSide.c @@ -151,15 +151,15 @@ int rtrSideLookCellsFunc(); */ int -rtrEnumSides(use, area, minChannelWidth, func, cdata) - CellUse *use; /* Enumerate sides of use->cu_def */ - Rect *area; /* Only consider sides inside this area; +rtrEnumSides( + CellUse *use, /* Enumerate sides of use->cu_def */ + Rect *area, /* Only consider sides inside this area; * this does not include sides along the * border. */ - int minChannelWidth; /* See above */ - int (*func)(); /* Applied to each Side found */ - ClientData cdata; /* Passed to (*func)() */ + int minChannelWidth, /* See above */ + int (*func)(), /* Applied to each Side found */ + ClientData cdata) /* Passed to (*func)() */ { /* Create the yank buffer if it doesn't exist */ if (rtrSideTransUse == NULL) @@ -213,11 +213,11 @@ rtrEnumSides(use, area, minChannelWidth, func, cdata) */ int -rtrSideProcess(use, side, area, trans) - CellUse *use; /* Enumerating Sides of use->cu_def */ - int side; /* Which sides (GEO_NORTH, etc) of cells to process */ - Rect *area; /* Find sides in this area (in use->cu_def coords) */ - Transform *trans; /* Transform from use->cu_def coords to those of the +rtrSideProcess( + CellUse *use, /* Enumerating Sides of use->cu_def */ + int side, /* Which sides (GEO_NORTH, etc) of cells to process */ + Rect *area, /* Find sides in this area (in use->cu_def coords) */ + Transform *trans) /* Transform from use->cu_def coords to those of the * cell tile plane where we actually try to find Sides. */ { @@ -285,10 +285,10 @@ rtrSideProcess(use, side, area, trans) */ int -rtrSideInitClient(tile, dinfo, client) - Tile *tile; - TileType dinfo; - ClientData client; +rtrSideInitClient( + Tile *tile, + TileType dinfo, + ClientData client) { if (IsSplit(tile)) if (TiGetLeftType(tile) != TT_SPACE && TiGetRightType(tile) != TT_SPACE) @@ -321,10 +321,10 @@ rtrSideInitClient(tile, dinfo, client) */ int -rtrEnumSidesFunc(tile, dinfo, clientdata) - Tile *tile; - TileType dinfo; - ClientData clientdata; /* (unused) */ +rtrEnumSidesFunc( + Tile *tile, + TileType dinfo, + ClientData clientdata) /* (unused) */ { int ybot, ytop, yprev, sep, x, origin; Tile *tp, *tpB; @@ -487,8 +487,8 @@ rtrEnumSidesFunc(tile, dinfo, clientdata) */ int -rtrSidePassToClient(side) - Side *side; +rtrSidePassToClient( + Side *side) { side->side_search.r_ybot = side->side_line.r_ybot; side->side_search.r_ytop = side->side_line.r_ytop; diff --git a/router/rtrStem.c b/router/rtrStem.c index 02923b534..0dc568340 100644 --- a/router/rtrStem.c +++ b/router/rtrStem.c @@ -131,11 +131,11 @@ bool RtrComputeJogs(); */ void -RtrStemProcessAll(use, netList, doWarn, func) - CellUse *use; - NLNetList *netList; - bool doWarn; - bool (*func)(); +RtrStemProcessAll( + CellUse *use, + NLNetList *netList, + bool doWarn, + bool (*func)()) { NLTermLoc *loc, *locFirst, *locPrev, *locNext; Rect errArea; @@ -236,12 +236,12 @@ RtrStemProcessAll(use, netList, doWarn, func) */ bool -RtrStemAssignExt(use, doWarn, loc, term, net) - CellUse *use; /* Cell being routed (for feedback) */ - bool doWarn; /* If TRUE, leave feedback for each bad loc */ - NLTermLoc *loc; /* Location being assigned */ - NLTerm *term; /* For nterm_name */ - NLNet *net; /* For marking pin */ +RtrStemAssignExt( + CellUse *use, /* Cell being routed (for feedback) */ + bool doWarn, /* If TRUE, leave feedback for each bad loc */ + NLTermLoc *loc, /* Location being assigned */ + NLTerm *term, /* For nterm_name */ + NLNet *net) /* For marking pin */ { TileType type = loc->nloc_label->lab_type; int dirMask, termWidth, pins; @@ -403,7 +403,10 @@ RtrStemAssignExt(use, doWarn, loc, term, net) /* Routine to expand rectangle into touching tiles of a label's type. */ int -rtrStemExpandFunc(Tile *t, TileType dinfo, TreeContext *cxp) +rtrStemExpandFunc( + Tile *t, + TileType dinfo, + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; Rect rsrc; @@ -465,10 +468,10 @@ rtrStemExpandFunc(Tile *t, TileType dinfo, TreeContext *cxp) */ GCRPin * -rtrStemTip(loc, si, use) - NLTermLoc *loc; /* Location whose stem tip is being found */ - StemInfo *si; /* Stem information */ - CellUse *use; +rtrStemTip( + NLTermLoc *loc, /* Location whose stem tip is being found */ + StemInfo *si, /* Stem information */ + CellUse *use) { Point plo, phi; int *lo, *hi; @@ -546,11 +549,11 @@ rtrAbort(Tile *tile, */ GCRPin * -rtrStemTryPin(loc, dir, p, use) - NLTermLoc *loc; /* Try to assign the GCRPin for p to this loc */ - int dir; /* Direction away from loc that p lies */ - Point *p; /* Crossing point to try */ - CellUse *use; +rtrStemTryPin( + NLTermLoc *loc, /* Try to assign the GCRPin for p to this loc */ + int dir, /* Direction away from loc that p lies */ + Point *p, /* Crossing point to try */ + CellUse *use) { Point pSearch; GCRChannel *ch; @@ -651,11 +654,11 @@ rtrStemTryPin(loc, dir, p, use) */ bool -rtrTreeSrArea(loc, dir, p, use) - NLTermLoc *loc; /* Terminal location under consideration */ - int dir; /* Direction away from loc that p lies */ - Point *p; /* Point at channel boundary */ - CellUse *use; /* Parent cell use */ +rtrTreeSrArea( + NLTermLoc *loc, /* Terminal location under consideration */ + int dir, /* Direction away from loc that p lies */ + Point *p, /* Point at channel boundary */ + CellUse *use) /* Parent cell use */ { Rect tmp, tmp1, tmp2; Point contact, jog, start; @@ -719,11 +722,11 @@ rtrTreeSrArea(loc, dir, p, use) } bool -rtrSrArea(dir,use,tmp,delta) - int dir; - CellUse *use; - Rect *tmp; - int delta; +rtrSrArea( + int dir, + CellUse *use, + Rect *tmp, + int delta) { SearchContext scx; TileTypeBitMask r1mask, r2mask; @@ -821,10 +824,10 @@ rtrSrArea(dir,use,tmp,delta) */ void -rtrStemRange(loc, dir, si) - NLTermLoc *loc; /* Terminal we're trying to find a stem for */ - int dir; /* Direction away from loc that we're searching */ - StemInfo *si; /* Fill this in if this direction looks best so far */ +rtrStemRange( + NLTermLoc *loc, /* Terminal we're trying to find a stem for */ + int dir, /* Direction away from loc that we're searching */ + StemInfo *si) /* Fill this in if this direction looks best so far */ { Rect *area = &loc->nloc_rect; Point start, near, center; @@ -899,9 +902,10 @@ rtrStemRange(loc, dir, si) */ int -rtrStemContactLine(lo, hi, origin) - int lo, hi; /* Bottom and top, or left and right of terminal */ - int origin; /* Coordinate of routing grid origin */ +rtrStemContactLine( + int lo, + int hi, + int origin) /* Coordinate of routing grid origin */ { int center; @@ -936,10 +940,10 @@ rtrStemContactLine(lo, hi, origin) */ GCRChannel * -rtrStemSearch(center, dir, point) - Point *center; - int dir; - Point *point; +rtrStemSearch( + Point *center, + int dir, + Point *point) { Tile *tile; GCRChannel *ch; @@ -1012,9 +1016,9 @@ rtrStemSearch(center, dir, point) */ bool -RtrStemPaintExt(use, loc) - CellUse *use; - NLTermLoc *loc; /* Terminal whose stem is to be painted */ +RtrStemPaintExt( + CellUse *use, + NLTermLoc *loc) /* Terminal whose stem is to be painted */ { TileTypeBitMask startMask; /* Possible layers for first part of stem */ TileTypeBitMask finalMask; /* Possible layers for last part of stem */ @@ -1135,18 +1139,18 @@ RtrStemPaintExt(use, loc) */ bool -rtrStemMask(routeUse, loc, flags, startMask, finalMask) - CellUse *routeUse; /* Cell being routed */ - NLTermLoc *loc; /* Terminal */ - int flags; /* Blockage flags in the channel at the +rtrStemMask( + CellUse *routeUse, /* Cell being routed */ + NLTermLoc *loc, /* Terminal */ + int flags, /* Blockage flags in the channel at the * crossing point. If a layer is marked * as blocked in these flags, it is excluded * from finalMask since the channel router * will not have used it for routing a * signal. */ - TileTypeBitMask *startMask; /* Possible types for terminal */ - TileTypeBitMask *finalMask; /* Possible types for stem tip */ + TileTypeBitMask *startMask, /* Possible types for terminal */ + TileTypeBitMask *finalMask) /* Possible types for stem tip */ { Rect tmp; @@ -1193,9 +1197,11 @@ rtrStemMask(routeUse, loc, flags, startMask, finalMask) } int -rtrStemTypes(startMask, finalMask, startType, finalType) - TileTypeBitMask *startMask, *finalMask; - TileType *startType, *finalType; +rtrStemTypes( + TileTypeBitMask *startMask, + TileTypeBitMask *finalMask, + TileType *startType, + TileType *finalType) { if (!TTMaskHasType(finalMask, RtrMetalType)) { @@ -1240,20 +1246,20 @@ rtrStemTypes(startMask, finalMask, startType, finalType) */ bool -RtrComputeJogs(loc, stem, dir, contact, jog, start, width) - NLTermLoc *loc; /* Terminal whose stem is to be painted */ - Point *stem; /* Point intersecting channel*/ - int dir; - Point *contact; /* A second grid point, where a contact can +RtrComputeJogs( + NLTermLoc *loc, /* Terminal whose stem is to be painted */ + Point *stem, /* Point intersecting channel*/ + int dir, + Point *contact, /* A second grid point, where a contact can * be placed if necessary. This is a the * nearest grid crossing to crossing outside * the channel. */ - Point *jog; /* Where the stem crosses the first usable + Point *jog, /* Where the stem crosses the first usable * grid line as it runs out from the cell. */ - Point *start; /* Somewhere along terminal area */ - int width; + Point *start, /* Somewhere along terminal area */ + int width) { Rect *area; area = &loc->nloc_rect; diff --git a/router/rtrTech.c b/router/rtrTech.c index be93b6444..bf4c5bffc 100644 --- a/router/rtrTech.c +++ b/router/rtrTech.c @@ -129,10 +129,10 @@ RtrTechInit() */ bool -RtrTechLine(sectionName, argc, argv) - char *sectionName; /* Name of this section. */ - int argc; /* Number of fields on line. */ - char *argv[]; /* Values of fields. */ +RtrTechLine( + char *sectionName, /* Name of this section. */ + int argc, /* Number of fields on line. */ + char *argv[]) /* Values of fields. */ { TileTypeBitMask mask; int type, width, i, distance; @@ -403,8 +403,9 @@ RtrTechFinal() */ int -RtrTechScale(scaled, scalen) - int scaled, scalen; +RtrTechScale( + int scaled, + int scalen) { int i; diff --git a/router/rtrTravers.c b/router/rtrTravers.c index 40897ecc2..c0881da63 100644 --- a/router/rtrTravers.c +++ b/router/rtrTravers.c @@ -114,32 +114,31 @@ struct rtrTileStack */ int -rtrSrTraverse(def, startArea, mask, connect, bounds, func, clientData) - CellDef *def; /* Cell definition in which to carry out +rtrSrTraverse( + 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; struct rtrTileStack ts; @@ -199,10 +198,10 @@ rtrSrTraverse(def, startArea, mask, connect, bounds, func, clientData) } int -rtrSrTraverseStartFunc(tile, dinfo, tad) - Tile *tile; /* This will be the starting tile. */ - TileType dinfo; /* Split tile information (unused) */ - TileAndDinfo *tad; /* We store tile's address here. */ +rtrSrTraverseStartFunc( + Tile *tile, /* This will be the starting tile. */ + TileType dinfo, /* Split tile information (unused) */ + TileAndDinfo *tad) /* We store tile's address here. */ { /* Simplified approach to split tiles: Use split tiles with one @@ -257,10 +256,10 @@ rtrSrTraverseStartFunc(tile, dinfo, tad) #define IGNORE_BOTTOM 8 int -rtrSrTraverseFunc(tile, dinfo, ts) - Tile *tile; /* Tile that is connected. */ - TileType dinfo; /* Split tile information (unused) */ - struct rtrTileStack *ts; /* Contains information about the search. */ +rtrSrTraverseFunc( + Tile *tile, /* Tile that is connected. */ + TileType dinfo, /* Split tile information (unused) */ + struct rtrTileStack *ts) /* Contains information about the search. */ { Tile *t2; Rect tileArea; @@ -451,10 +450,10 @@ rtrSrTraverseFunc(tile, dinfo, ts) */ int -rtrExamineTile(tile, dinfo, cdata) - Tile *tile; - TileType dinfo; - ClientData cdata; +rtrExamineTile( + Tile *tile, + TileType dinfo, + ClientData cdata) { TileType ttype; @@ -496,10 +495,10 @@ rtrExamineTile(tile, dinfo, cdata) */ int -rtrExamineStack(tile, dinfo, ts) - Tile *tile; - TileType dinfo; /* (unused) */ - struct rtrTileStack *ts; +rtrExamineStack( + Tile *tile, + TileType dinfo, /* (unused) */ + struct rtrTileStack *ts) { int i; Tile *tp[3]; diff --git a/router/rtrVia.c b/router/rtrVia.c index 10a92f2e0..7bf2a2c20 100644 --- a/router/rtrVia.c +++ b/router/rtrVia.c @@ -108,13 +108,13 @@ int rtrExamineStack(); /* Examines the tile stack for /* ARGSUSED */ int -rtrFollowLocFunc(rect, name, label, area) - Rect *rect; /* Area of the terminal, edit cell coords. */ - char *name; /* Name of the terminal (ignored). */ - Label *label; /* Pointer to the label, used to find out +rtrFollowLocFunc( + Rect *rect, /* Area of the terminal, edit cell coords. */ + char *name, /* Name of the terminal (ignored). */ + Label *label, /* Pointer to the label, used to find out * what layer the label's attached to. */ - Rect *area; /* We GeoInclude into this all the areas of + Rect *area) /* We GeoInclude into this all the areas of * all the tiles we delete. */ { @@ -150,10 +150,10 @@ rtrFollowLocFunc(rect, name, label, area) /* ARGSUSED */ int -rtrFollowName(name, firstInNet, area) - char *name; /* Name of terminal. */ - bool firstInNet; /* Ignored by this procedure. */ - Rect *area; /* Passed through as ClientData to +rtrFollowName( + char *name, /* Name of terminal. */ + bool firstInNet, /* Ignored by this procedure. */ + Rect *area) /* Passed through as ClientData to * rtrFollowLocFunc. */ { @@ -182,10 +182,10 @@ rtrFollowName(name, firstInNet, area) */ int -rtrCheckTypes(tile, dinfo, cdata) - Tile *tile; - TileType dinfo; - ClientData cdata; +rtrCheckTypes( + Tile *tile, + TileType dinfo, + ClientData cdata) { int type; int lastType = *(int *)cdata; @@ -226,10 +226,10 @@ rtrCheckTypes(tile, dinfo, cdata) */ void -rtrExtend(tile,area,stub) - Tile *tile; /* Tile adjacent to via */ - Rect *area; /* Area occupied by via */ - Rect *stub; /* Extension of routing material +rtrExtend( + Tile *tile, /* Tile adjacent to via */ + Rect *area, /* Area occupied by via */ + Rect *stub) /* Extension of routing material into area of via */ { if ( (TOP(tile) == area->r_ybot) || (BOTTOM(tile) == area->r_ytop) ) @@ -264,10 +264,10 @@ rtrExtend(tile,area,stub) */ int -rtrStubGen(tile, dinfo, si) - Tile *tile; - TileType dinfo; /* (unused) */ - struct srinfo *si; +rtrStubGen( + Tile *tile, + TileType dinfo, /* (unused) */ + struct srinfo *si) { Rect area; struct paintlist *pl; @@ -311,10 +311,10 @@ rtrStubGen(tile, dinfo, si) int -rtrReferenceTile(tile, dinfo, si) - Tile *tile; - TileType dinfo; /* (unused) */ - struct srinfo *si; +rtrReferenceTile( + Tile *tile, + TileType dinfo, /* (unused) */ + struct srinfo *si) { si->si_tile = tile; rtrExtend(tile, si->si_varea, &si->si_extend); @@ -342,9 +342,9 @@ rtrReferenceTile(tile, dinfo, si) */ void -rtrViaCheck(area, def) - Rect *area; - CellDef *def; +rtrViaCheck( + Rect *area, + CellDef *def) { Rect r; int type, plane; @@ -423,12 +423,12 @@ rtrViaCheck(area, def) */ void -rtrListArea(tile, oldType, newType, deltax, deltay) - Tile *tile; - int oldType; - int newType; - int deltax; - int deltay; +rtrListArea( + Tile *tile, + int oldType, + int newType, + int deltax, + int deltay) { struct arealist *ap; @@ -469,8 +469,8 @@ rtrListArea(tile, oldType, newType, deltax, deltay) */ int -rtrListVia(tile) - Tile *tile; +rtrListVia( + Tile *tile) { struct vialist *vp; @@ -501,8 +501,8 @@ rtrListVia(tile) */ int -RtrViaMinimize(def) - CellDef *def; +RtrViaMinimize( + CellDef *def) { Rect area; struct vialist *vp; diff --git a/router/tclroute.c b/router/tclroute.c index 3426267bb..a57293b6a 100644 --- a/router/tclroute.c +++ b/router/tclroute.c @@ -44,8 +44,8 @@ extern void CmdIRouterTest(), CmdMZRouterTest(); */ int -Tclroute_Init(interp) - Tcl_Interp *interp; +Tclroute_Init( + Tcl_Interp *interp) { SectionID invsec; diff --git a/scripts/configure b/scripts/configure index fcb86a0ea..f404f052b 100755 --- a/scripts/configure +++ b/scripts/configure @@ -8747,7 +8747,11 @@ case $target in *-emscripten*) $as_echo "#define linux 1" >>confdefs.h - CFLAGS="${CFLAGS} -fPIC -Werror=implicit-function-declaration -Wno-int-conversion -Wno-implicit-int" + # emcc (clang) defaults to C23, where "()" means "(void)". Force + # -std=gnu17 to keep the legacy "()" declarations compiling, matching + # the native gcc build. (-std=gnu17 must be a single dash; clang + # silently ignores the "--std=" long form used in some CI scripts.) + CFLAGS="${CFLAGS} -std=gnu17 -fPIC -Werror=implicit-function-declaration -Wno-int-conversion" ;; *solaris*) $as_echo "#define SYSV 1" >>confdefs.h @@ -9189,7 +9193,10 @@ fi *cygwin*) ;; *) - SHLIB_CFLAGS="-Wimplicit-int -fPIC" + # GCC 16 defaults to C23, where "()" means "(void)". Magic relies on + # the older C17 semantics where "()" means "unspecified arguments". + # Force -std=gnu17 to keep the legacy declarations compiling. + SHLIB_CFLAGS="-std=gnu17 -Wimplicit-int -fPIC" ;; esac fi diff --git a/scripts/configure.in b/scripts/configure.in index 98421feb3..9faa53124 100644 --- a/scripts/configure.in +++ b/scripts/configure.in @@ -1471,7 +1471,11 @@ case $target in ;; *-emscripten*) AC_DEFINE(linux) - CFLAGS="${CFLAGS} -fPIC -Werror=implicit-function-declaration -Wno-int-conversion -Wno-implicit-int" + dnl emcc (clang) defaults to C23, where "()" means "(void)". Force + dnl -std=gnu17 to keep the legacy "()" declarations compiling, matching + dnl the native gcc build. (-std=gnu17 must be a single dash; clang + dnl silently ignores the "--std=" long form used in some CI scripts.) + CFLAGS="${CFLAGS} -std=gnu17 -fPIC -Werror=implicit-function-declaration -Wno-int-conversion" ;; *solaris*) AC_DEFINE(SYSV) @@ -1854,7 +1858,10 @@ if test $usingTcl ; then *cygwin*) ;; *) - SHLIB_CFLAGS="-Wimplicit-int -fPIC" + dnl GCC 16 defaults to C23, where "()" means "(void)". Magic relies on + dnl the older C17 semantics where "()" means "unspecified arguments". + dnl Force -std=gnu17 to keep the legacy declarations compiling. + SHLIB_CFLAGS="-std=gnu17 -Wimplicit-int -fPIC" ;; esac fi diff --git a/select/selDisplay.c b/select/selDisplay.c index 820d8f9c8..cddaafb56 100644 --- a/select/selDisplay.c +++ b/select/selDisplay.c @@ -83,9 +83,9 @@ static Plane *selRedisplayPlane; */ void -SelRedisplay(window, plane) - MagWindow *window; /* Window in which to redisplay. */ - Plane *plane; /* Non-space tiles on this plane indicate +SelRedisplay( + MagWindow *window, /* Window in which to redisplay. */ + Plane *plane) /* Non-space tiles on this plane indicate * which areas must have their highlights * redrawn. */ @@ -195,7 +195,10 @@ SelRedisplay(window, plane) */ int -selAlways1(Tile *tile, TileType dinfo, ClientData clientdata) +selAlways1( + Tile *tile, + TileType dinfo, + ClientData clientdata) { return 1; } @@ -206,10 +209,10 @@ selAlways1(Tile *tile, TileType dinfo, ClientData clientdata) */ int -selRedisplayFunc(tile, dinfo, window) - Tile *tile; /* Tile to be drawn on highlight layer. */ - TileType dinfo; /* Split tile information */ - MagWindow *window; /* Window in which to redisplay. */ +selRedisplayFunc( + Tile *tile, /* Tile to be drawn on highlight layer. */ + TileType dinfo, /* Split tile information */ + MagWindow *window) /* Window in which to redisplay. */ { Rect area, edge, screenEdge, tmpr; Tile *neighbor; @@ -307,9 +310,9 @@ selRedisplayFunc(tile, dinfo, window) */ int -selRedisplayCellFunc(scx, window) - SearchContext *scx; /* Describes cell found. */ - MagWindow *window; /* Window in which to redisplay. */ +selRedisplayCellFunc( + SearchContext *scx, /* Describes cell found. */ + MagWindow *window) /* Window in which to redisplay. */ { Rect tmp, screen, bbox; Point p; @@ -392,11 +395,11 @@ selRedisplayCellFunc(scx, window) */ void -SelSetDisplay(selectUse, displayRoot) - CellUse *selectUse; /* Cell whose contents are to be +SelSetDisplay( + CellUse *selectUse, /* Cell whose contents are to be * highlighted. */ - CellDef *displayRoot; /* Cell definition on top of whose contents + CellDef *displayRoot) /* Cell definition on top of whose contents * the highlights are to be displayed. Must * be the root cell of a window. May be NULL * to turn off selection displaying. @@ -423,11 +426,11 @@ typedef struct { } FeedLayerData; void -SelCopyToFeedback(celldef, seluse, style, text) - CellDef *celldef; /* Cell def to hold feedback */ - CellUse *seluse; /* Cell use holding selection */ - int style; /* Style to use for feedback */ - char *text; /* Text to attach to feedback */ +SelCopyToFeedback( + CellDef *celldef, /* Cell def to hold feedback */ + CellUse *seluse, /* Cell use holding selection */ + int style, /* Style to use for feedback */ + char *text) /* Text to attach to feedback */ { int selFeedbackFunc(); /* Forward reference */ int i; @@ -459,10 +462,10 @@ SelCopyToFeedback(celldef, seluse, style, text) /*----------------------------------------------------------------------*/ int -selFeedbackFunc(tile, dinfo, fld) - Tile *tile; - TileType dinfo; - FeedLayerData *fld; +selFeedbackFunc( + Tile *tile, + TileType dinfo, + FeedLayerData *fld) { Rect area; diff --git a/select/selOps.c b/select/selOps.c index 91cbeeb28..bb89cc703 100644 --- a/select/selOps.c +++ b/select/selOps.c @@ -96,13 +96,13 @@ static StretchArea *selStretchList; /* List of areas to paint. */ */ void -SelectDelete(msg, do_clear) - char *msg; /* Some information to print in error messages. +SelectDelete( + char *msg, /* Some information to print in error messages. * For example, if called as part of a move procedure, * supply "moved". This will appear in messages of * the form "only edit cell information was moved". */ - bool do_clear; /* If TRUE, clear the select def before returning. */ + bool do_clear) /* If TRUE, clear the select def before returning. */ { bool nonEdit; Rect editArea; @@ -169,13 +169,13 @@ SelectDelete(msg, do_clear) */ void -SelectDeleteUses(msg, do_clear) - char *msg; /* Some information to print in error messages. +SelectDeleteUses( + char *msg, /* Some information to print in error messages. * For example, if called as part of a move procedure, * supply "moved". This will appear in messages of * the form "only edit cell information was moved". */ - bool do_clear; /* If TRUE, clear the select def before returning. */ + bool do_clear) /* If TRUE, clear the select def before returning. */ { bool nonEdit; Rect editArea; @@ -207,9 +207,9 @@ SelectDeleteUses(msg, do_clear) /* Search function to delete paint. */ int -selDelPaintFunc(rect, type) - Rect *rect; /* Area of paint, in root coords. */ - TileType type; /* Type of paint to delete. */ +selDelPaintFunc( + Rect *rect, /* Area of paint, in root coords. */ + TileType type) /* Type of paint to delete. */ { Rect editRect; TileTypeBitMask tmask; @@ -238,9 +238,9 @@ selDelPaintFunc(rect, type) /* ARGSUSED */ int -selDelCellFunc(selUse, use) - CellUse *selUse; /* Not used. */ - CellUse *use; /* What to delete. */ +selDelCellFunc( + CellUse *selUse, /* Not used. */ + CellUse *use) /* What to delete. */ { if (use->cu_flags & CU_LOCKED) return 0; @@ -256,8 +256,8 @@ selDelCellFunc(selUse, use) * the selection can differ from the edit cell in this regard. */ int -selDelLabelFunc(label) - Label *label; /* Label to delete. */ +selDelLabelFunc( + Label *label) /* Label to delete. */ { DBEraseLabelsByContent(EditCellUse->cu_def, &label->lab_rect, -1, label->lab_text); @@ -283,8 +283,8 @@ selDelLabelFunc(label) */ void -SelectCopy(transform) - Transform *transform; /* How to displace the copy relative +SelectCopy( + Transform *transform) /* How to displace the copy relative * to the original. This displacement * is given in root coordinates. */ @@ -410,10 +410,10 @@ typedef struct _shortsearchdata { */ int -selShortTileProc(tile, dinfo, ssd) - Tile *tile; - TileType dinfo; /* (unused) */ - ShortSearchData *ssd; +selShortTileProc( + Tile *tile, + TileType dinfo, /* (unused) */ + ShortSearchData *ssd) { const int curr = (int)TiGetClientINT(tile); if (curr < ssd->cost) @@ -448,11 +448,11 @@ selShortTileProc(tile, dinfo, ssd) */ int -selShortFindReverse(rlist, tile, pnum, fdir) - ExtRectList **rlist; - Tile *tile; - int pnum; - int fdir; +selShortFindReverse( + ExtRectList **rlist, + Tile *tile, + int pnum, + int fdir) { Tile *tp, *mintp; ExtRectList *newrrec; @@ -711,11 +711,11 @@ ShortData *NewSD(cost, tile, type, pnum) */ int -selShortProcessTile(tile, cost, fdir, mask) - Tile *tile; - int cost; - int fdir; - TileTypeBitMask *mask; +selShortProcessTile( + Tile *tile, + int cost, + int fdir, + TileTypeBitMask *mask) { TileType ttype; @@ -789,11 +789,11 @@ selShortProcessTile(tile, cost, fdir, mask) */ void -selShortFindForward(srctile, srctype, srcpnum, desttile) - Tile *srctile; - TileType srctype; - int srcpnum; - Tile *desttile; +selShortFindForward( + Tile *srctile, + TileType srctype, + int srcpnum, + Tile *desttile) { TileType type; TileTypeBitMask *lmask; @@ -938,7 +938,9 @@ selShortFindForward(srctile, srctype, srcpnum, desttile) */ ExtRectList * -SelectShort(char *lab1, char *lab2) +SelectShort( + char *lab1, + char *lab2) { Label *selLabel, *srclab = NULL, *destlab = NULL; Tile *srctile, *desttile; @@ -1052,8 +1054,8 @@ SelectShort(char *lab1, char *lab2) */ void -selTransTo2(transform) - Transform *transform; /* How to transform stuff before copying +selTransTo2( + Transform *transform) /* How to transform stuff before copying * it to Select2Def. */ { @@ -1076,10 +1078,10 @@ selTransTo2(transform) /* Search function to copy paint. Always return 1 to keep the search alive. */ int -selTransPaintFunc(rect, type, transform) - Rect *rect; /* Area of paint. */ - TileType type; /* Type of paint. */ - Transform *transform; /* How to change coords before painting. */ +selTransPaintFunc( + Rect *rect, /* Area of paint. */ + TileType type, /* Type of paint. */ + Transform *transform) /* How to change coords before painting. */ { Rect newarea; TileType loctype; @@ -1105,12 +1107,12 @@ selTransPaintFunc(rect, type, transform) /* ARGSUSED */ int -selTransCellFunc(selUse, realUse, realTrans, transform) - CellUse *selUse; /* Use from selection. */ - CellUse *realUse; /* Corresponding use from layout (used to +selTransCellFunc( + CellUse *selUse, /* Use from selection. */ + CellUse *realUse, /* Corresponding use from layout (used to * get id). */ - Transform *realTrans; /* Transform for realUse (ignored). */ - Transform *transform; /* How to change coords of selUse before + Transform *realTrans, /* Transform for realUse (ignored). */ + Transform *transform) /* How to change coords of selUse before * copying. */ { @@ -1142,13 +1144,13 @@ selTransCellFunc(selUse, realUse, realTrans, transform) /* ARGSUSED */ int -selTransLabelFunc(label, cellUse, defTransform, transform) - Label *label; /* Label to copy. This points to label +selTransLabelFunc( + Label *label, /* Label to copy. This points to label * in cellDef. */ - CellUse *cellUse; /* (unused) */ - Transform *defTransform; /* Transform from cellDef to root. */ - Transform *transform; /* How to modify coords before copying to + CellUse *cellUse, /* (unused) */ + Transform *defTransform, /* Transform from cellDef to root. */ + Transform *transform) /* How to modify coords before copying to * Select2Def. */ { @@ -1192,8 +1194,8 @@ selTransLabelFunc(label, cellUse, defTransform, transform) */ void -SelectTransform(transform) - Transform *transform; /* How to displace the selection. +SelectTransform( + Transform *transform) /* How to displace the selection. * The transform is in root (user- * visible) coordinates. */ @@ -1246,15 +1248,15 @@ typedef struct selExpData { */ void -SelectExpand(mask, expandType, rootBox) - int mask; /* Bits of this word indicate which +SelectExpand( + int mask, /* Bits of this word indicate which * windows the selected cells will be * expanded in. */ - int expandType; /* Operation to perform: Expand, + int expandType, /* Operation to perform: Expand, * unexpand, or expand toggle. */ - Rect *rootBox; /* Area of root box, if selecting by + Rect *rootBox) /* Area of root box, if selecting by * cursor box area. */ { @@ -1285,11 +1287,11 @@ SelectExpand(mask, expandType, rootBox) /* ARGSUSED */ int -selExpandFunc(selUse, use, transform, sed) - CellUse *selUse; /* Use from selection. */ - CellUse *use; /* Use to expand (in actual layout). */ - Transform *transform; /* Not used. */ - SelExpData *sed; /* Information for expansion */ +selExpandFunc( + CellUse *selUse, /* Use from selection. */ + CellUse *use, /* Use to expand (in actual layout). */ + Transform *transform, /* Not used. */ + SelExpData *sed) /* Information for expansion */ { int expandType = sed->sed_type; int mask = sed->sed_mask; @@ -1420,8 +1422,8 @@ selExpandFunc(selUse, use, transform, sed) */ void -SelectArray(arrayInfo) - ArrayInfo *arrayInfo; /* Describes desired shape of array, all in +SelectArray( + ArrayInfo *arrayInfo) /* Describes desired shape of array, all in * root coordinates. */ { @@ -1457,10 +1459,10 @@ SelectArray(arrayInfo) */ int -selArrayPFunc(rect, type, arrayInfo) - Rect *rect; /* Rectangle to be arrayed. */ - TileType type; /* Type of tile. */ - ArrayInfo *arrayInfo; /* How to array. */ +selArrayPFunc( + Rect *rect, /* Rectangle to be arrayed. */ + TileType type, /* Type of tile. */ + ArrayInfo *arrayInfo) /* How to array. */ { int y, nx, ny; Rect current; @@ -1493,11 +1495,11 @@ selArrayPFunc(rect, type, arrayInfo) /* ARGSUSED */ int -selArrayCFunc(selUse, use, transform, arrayInfo) - CellUse *selUse; /* Use from selection (not used). */ - CellUse *use; /* Use to be copied and arrayed. */ - Transform *transform; /* Transform from use->cu_def to root. */ - ArrayInfo *arrayInfo; /* Array characteristics desired. */ +selArrayCFunc( + CellUse *selUse, /* Use from selection (not used). */ + CellUse *use, /* Use to be copied and arrayed. */ + Transform *transform, /* Transform from use->cu_def to root. */ + ArrayInfo *arrayInfo) /* Array characteristics desired. */ { CellUse *newUse; Transform tinv, newTrans; @@ -1551,11 +1553,11 @@ selArrayCFunc(selUse, use, transform, arrayInfo) /* ARGSUSED */ int -selArrayLFunc(label, use, transform, arrayInfo) - Label *label; /* Label to be copied and replicated. */ - CellUse *use; /* (unused) */ - Transform *transform; /* Transform from coords of def to root. */ - ArrayInfo *arrayInfo; /* How to replicate. */ +selArrayLFunc( + Label *label, /* Label to be copied and replicated. */ + CellUse *use, /* (unused) */ + Transform *transform, /* Transform from coords of def to root. */ + ArrayInfo *arrayInfo) /* How to replicate. */ { int y, nx, ny, rootJust, rootRotate; Point rootOffset; @@ -1631,9 +1633,9 @@ selArrayLFunc(label, use, transform, arrayInfo) */ void -SelectStretch(x, y) - int x; /* Amount to move in the x-direction. */ - int y; /* Amount to move in the y-direction. Must +SelectStretch( + int x, /* Amount to move in the x-direction. */ + int y) /* Amount to move in the y-direction. Must * be zero if x is non-zero. */ { @@ -1746,10 +1748,10 @@ SelectStretch(x, y) */ int -selStretchEraseFunc(tile, dinfo, plane) - Tile *tile; /* Tile being moved in a stretch operation. */ - TileType dinfo; /* Split tile information */ - int *plane; /* Plane of tiles being searched */ +selStretchEraseFunc( + Tile *tile, /* Tile being moved in a stretch operation. */ + TileType dinfo, /* Split tile information */ + int *plane) /* Plane of tiles being searched */ { Rect area, editArea; int planeNum; @@ -1881,10 +1883,10 @@ selStretchEraseFunc(tile, dinfo, plane) } int -selStretchEraseFunc2(tile, dinfo, pa) - Tile *tile; - TileType dinfo; /* (unused) */ - planeAndArea *pa; +selStretchEraseFunc2( + Tile *tile, + TileType dinfo, /* (unused) */ + planeAndArea *pa) { TileType type = TT_SPACE; @@ -1924,10 +1926,10 @@ selStretchEraseFunc2(tile, dinfo, pa) */ int -selStretchFillFunc(tile, dinfo, plane) - Tile *tile; /* Tile in the old selection. */ - TileType dinfo; /* Split tile information (unused) */ - int *plane; /* Plane of tile being searched */ +selStretchFillFunc( + Tile *tile, /* Tile in the old selection. */ + TileType dinfo, /* Split tile information (unused) */ + int *plane) /* Plane of tile being searched */ { Rect area; extern int selStretchFillFunc2(); @@ -1993,12 +1995,12 @@ selStretchFillFunc(tile, dinfo, plane) */ int -selStretchFillFunc2(tile, dinfo, area) - Tile *tile; /* Space tile that borders selected +selStretchFillFunc2( + Tile *tile, /* Space tile that borders selected * paint. */ - TileType dinfo; /* Split tile information (unused) */ - Rect *area; /* A one-unit wide strip along the + TileType dinfo, /* Split tile information (unused) */ + Rect *area) /* A one-unit wide strip along the * border (i.e. the area in which * we're interested in space). */ @@ -2042,12 +2044,12 @@ selStretchFillFunc2(tile, dinfo, area) */ int -selStretchFillFunc3(tile, dinfo, area) - Tile *tile; /* Tile of edit material that's about to +selStretchFillFunc3( + Tile *tile, /* Tile of edit material that's about to * be left behind selection. */ - TileType dinfo; /* Split tile information (unused) */ - Rect *area; /* The border area we're interested in, + TileType dinfo, /* Split tile information (unused) */ + Rect *area) /* The border area we're interested in, * in root coords. */ { @@ -2180,8 +2182,8 @@ selStretchFillFunc3(tile, dinfo, area) */ void -SelectDump(scx) - SearchContext *scx; /* Describes the cell from which +SelectDump( + SearchContext *scx) /* Describes the cell from which * material is to be copied, the * area to copy, and the transform * to root coordinates in the edit diff --git a/select/selUnselect.c b/select/selUnselect.c index effc9e0bd..d2df37d27 100644 --- a/select/selUnselect.c +++ b/select/selUnselect.c @@ -44,10 +44,10 @@ */ int -selUnselFunc(tile, dinfo, arg) - Tile *tile; - TileType dinfo; /* unused, but should be handled */ - ClientData *arg; +selUnselFunc( + Tile *tile, + TileType dinfo, /* unused, but should be handled */ + ClientData *arg) { TileType type; Rect rect; @@ -83,10 +83,9 @@ static CellUse *(selRemoveUses[MAXUNSELUSES]); static int selNRemove; int -selRemoveCellFunc(scx, cdarg) - SearchContext *scx; - Rect *cdarg; - +selRemoveCellFunc( + SearchContext *scx, + Rect *cdarg) { ASSERT((selNRemove < MAXUNSELUSES) && (selNRemove >= 0), "selRemoveCellFunc(selNRemove)"); @@ -118,10 +117,10 @@ selRemoveCellFunc(scx, cdarg) */ void -SelRemoveArea(area, mask, globmatch) - Rect *area; - TileTypeBitMask *mask; - char *globmatch; +SelRemoveArea( + Rect *area, + TileTypeBitMask *mask, + char *globmatch) { SearchContext scx; Rect bbox, areaReturn; @@ -211,10 +210,10 @@ SelRemoveArea(area, mask, globmatch) */ int -selRemoveLabelPaintFunc(tile, dinfo, label) - Tile *tile; - TileType dinfo; /* (unused) */ - Label *label; +selRemoveLabelPaintFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + Label *label) { (void) DBPutFontLabel(Select2Def, &label->lab_rect, label->lab_font, label->lab_size, label->lab_rotate, &label->lab_offset, @@ -319,9 +318,9 @@ typedef struct */ int -SelRemoveCellSearchFunc(scx, cdarg) - SearchContext *scx; - SelRemoveCellArgs *cdarg; +SelRemoveCellSearchFunc( + SearchContext *scx, + SelRemoveCellArgs *cdarg) { Transform *et, *st; @@ -374,10 +373,9 @@ SelRemoveCellSearchFunc(scx, cdarg) */ int -SelectRemoveCellUse(use, trans) - CellUse *use; - Transform *trans; - +SelectRemoveCellUse( + CellUse *use, + Transform *trans) { SearchContext scx; SelRemoveCellArgs args; diff --git a/select/select.h b/select/select.h index f4f920e99..960d9fd22 100644 --- a/select/select.h +++ b/select/select.h @@ -50,8 +50,8 @@ extern int SelEnumLabelsMirror(); /* Procedures to operate on the selection. */ -extern void SelectDelete(); -extern void SelectDeleteUses(); +extern void SelectDelete(char *msg, bool do_clear); +extern void SelectDeleteUses(char *msg, bool do_clear); extern void SelectCopy(); extern void SelectTransform(); extern void SelectExpand(); diff --git a/tcltk/magicdnull.c b/tcltk/magicdnull.c index b75531b2f..e0f473c41 100644 --- a/tcltk/magicdnull.c +++ b/tcltk/magicdnull.c @@ -18,8 +18,8 @@ /*----------------------------------------------------------------------*/ int -magic_AppInit(interp) - Tcl_Interp *interp; +magic_AppInit( + Tcl_Interp *interp) { if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; @@ -42,9 +42,9 @@ magic_AppInit(interp) /*----------------------------------------------------------------------*/ int -main(argc, argv) - int argc; - char **argv; +main( + int argc, + char **argv) { Tcl_Main(argc, argv, magic_AppInit); return 0; diff --git a/tcltk/magicexec.c b/tcltk/magicexec.c index 73abbd3ac..407eff154 100644 --- a/tcltk/magicexec.c +++ b/tcltk/magicexec.c @@ -44,8 +44,8 @@ /*----------------------------------------------------------------------*/ int -magic_AppInit(interp) - Tcl_Interp *interp; +magic_AppInit( + Tcl_Interp *interp) { if (Tcl_Init(interp) == TCL_ERROR) { return TCL_ERROR; @@ -68,9 +68,9 @@ magic_AppInit(interp) /*----------------------------------------------------------------------*/ int -main(argc, argv) - int argc; - char **argv; +main( + int argc, + char **argv) { Tk_Main(argc, argv, magic_AppInit); return 0; diff --git a/tcltk/tclmagic.c b/tcltk/tclmagic.c index dd1e3aec3..1f4cd1bfc 100644 --- a/tcltk/tclmagic.c +++ b/tcltk/tclmagic.c @@ -85,8 +85,8 @@ void RegisterTkCommands(); /*--------------------------------------------------------------*/ int -TagVerify(keyword) - char *keyword; +TagVerify( + char *keyword) { char *croot, *postcmd; HashEntry *entry; @@ -107,11 +107,11 @@ TagVerify(keyword) /*--------------------------------------------------------------*/ int -TagCallback(interp, tkpath, argc, argv) - Tcl_Interp *interp; - char *tkpath; - int argc; /* original command's number of arguments */ - char *argv[]; /* original command's argument list */ +TagCallback( + Tcl_Interp *interp, + char *tkpath, + int argc, /* original command's number of arguments */ + char *argv[]) /* original command's argument list */ { int argidx, result = TCL_OK; char *postcmd, *substcmd, *newcmd, *sptr, *sres; @@ -582,7 +582,9 @@ _tk_dispatch(ClientData clientData, /*--------------------------------------------------------------*/ void -MakeWindowCommand(char *wname, MagWindow *mw) +MakeWindowCommand( + char *wname, + MagWindow *mw) { char *tclcmdstr; @@ -601,7 +603,8 @@ MakeWindowCommand(char *wname, MagWindow *mw) #ifdef HAVE_SETRLIMIT static int -process_rlimit_nofile_ensure(rlim_t nofile) +process_rlimit_nofile_ensure( + rlim_t nofile) { struct rlimit rlim; int err = getrlimit(RLIMIT_NOFILE, &rlim); @@ -948,10 +951,10 @@ _magic_startup(ClientData clientData, /*--------------------------------------------------------------*/ int -TxDialog(prompt, responses, defresp) - const char *prompt; - const char * const *responses; - int defresp; +TxDialog( + const char *prompt, + const char * const *responses, + int defresp) { Tcl_Obj *objPtr; int code, result, pos; @@ -1044,10 +1047,10 @@ TxSetPrompt( /*--------------------------------------------------------------*/ char * -TxGetLinePfix(dest, maxChars, prefix) - char *dest; - int maxChars; - char *prefix; +TxGetLinePfix( + char *dest, + int maxChars, + char *prefix) { Tcl_Obj *objPtr; int charsStored; @@ -1104,8 +1107,8 @@ TxGetLinePfix(dest, maxChars, prefix) /*--------------------------------------------------------------*/ void -TxDispatch(f) - FILE *f; /* Under Tcl, we never call this with NULL */ +TxDispatch( + FILE *f) /* Under Tcl, we never call this with NULL */ { if (f == NULL) { @@ -1129,8 +1132,8 @@ TxDispatch(f) /*--------------------------------------------------------------*/ void -TxParseString(str) - const char *str; +TxParseString( + const char *str) { const char *reply; @@ -1224,7 +1227,10 @@ TxFlush() /*--------------------------------------------------------------*/ int -Tcl_printf(FILE *f, const char *fmt, va_list args_in) +Tcl_printf( + FILE *f, + const char *fmt, + va_list args_in) { va_list args; static char outstr[128] = "puts -nonewline std"; @@ -1318,8 +1324,8 @@ Tcl_printf(FILE *f, const char *fmt, va_list args_in) /*--------------------------------------------------------------*/ char * -Tcl_escape(instring) - char *instring; +Tcl_escape( + char *instring) { char *newstr; int nchars = 0; @@ -1368,11 +1374,11 @@ Tcl_escape(instring) /*--------------------------------------------------------------*/ int -TerminalInputProc(instanceData, buf, toRead, errorCodePtr) - ClientData instanceData; - char *buf; - int toRead; - int *errorCodePtr; +TerminalInputProc( + ClientData instanceData, + char *buf, + int toRead, + int *errorCodePtr) { FileState *fsPtr = (FileState *)instanceData; int bytesRead, i, tlen; @@ -1417,8 +1423,8 @@ TerminalInputProc(instanceData, buf, toRead, errorCodePtr) /*--------------------------------------------------------------*/ int -Tclmagic_Init(interp) - Tcl_Interp *interp; +Tclmagic_Init( + Tcl_Interp *interp) { const char *cadroot; @@ -1475,8 +1481,8 @@ Tclmagic_Init(interp) /*--------------------------------------------------------------*/ int -Tclmagic_SafeInit(interp) - Tcl_Interp *interp; +Tclmagic_SafeInit( + Tcl_Interp *interp) { return Tclmagic_Init(interp); } diff --git a/textio/txCommands.c b/textio/txCommands.c index 57b1f1035..957190270 100644 --- a/textio/txCommands.c +++ b/textio/txCommands.c @@ -176,8 +176,8 @@ FD_OrSet( /* A bitmask find max bit set operation */ int -FD_MaxFd(fdmask) - const fd_set *fdmask; +FD_MaxFd( + const fd_set *fdmask) { int fd; for (fd = FD_SETSIZE-1; fd >= 0; fd--) /* backwards */ @@ -1841,11 +1841,11 @@ txCommandsInit(void) */ bool -TxLispDispatch (argc,argv,trace, inFile) - int argc; - char **argv; - int trace; - int inFile; +TxLispDispatch( + int argc, + char **argv, + int trace, + int inFile) { TxCommand *cmd = lisp_cur_cmd; int i,j,k; diff --git a/textio/txcommands.h b/textio/txcommands.h index cfb533c4c..2a8e5614f 100644 --- a/textio/txcommands.h +++ b/textio/txcommands.h @@ -38,7 +38,7 @@ #define TX_MAXARGS 200 #define TX_MAX_CMDLEN 2048 -typedef struct { /* A command -- either a button push or +typedef struct TxCommand_ { /* A command -- either a button push or * a textual command. */ Point tx_p; /* The location of the pointing device diff --git a/utils/LIBdbio.c b/utils/LIBdbio.c index 0a1e03e97..924b2ddfe 100644 --- a/utils/LIBdbio.c +++ b/utils/LIBdbio.c @@ -45,11 +45,11 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBdbio.c,v 1.1.1.1 */ FILE * -flock_open(filename, mode, is_locked, fdb) - char *filename; - char *mode; - bool *is_locked; - int *fdb; +flock_open( + char *filename, + char *mode, + bool *is_locked, + int *fdb) { FILE *f; diff --git a/utils/LIBmain.c b/utils/LIBmain.c index 20cff26d8..307e16506 100644 --- a/utils/LIBmain.c +++ b/utils/LIBmain.c @@ -42,8 +42,8 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBmain.c,v 1.1.1.1 */ void -MainExit(code) - int code; +MainExit( + int code) { exit (code); } diff --git a/utils/LIBtextio.c b/utils/LIBtextio.c index ef42e2251..283be47b8 100644 --- a/utils/LIBtextio.c +++ b/utils/LIBtextio.c @@ -41,9 +41,9 @@ static char rcsid[] = "$Header: /usr/cvsroot/magic-8.0/utils/LIBtextio.c,v 1.1.1 */ char * -TxGetLine(buf, size) - char *buf; - int size; +TxGetLine( + char *buf, + int size) { return (fgets(buf, size, stdin)); } @@ -96,7 +96,9 @@ TxFlush() */ void -TxError(const char *fmt, ...) +TxError( + const char *fmt, + ...) { va_list ap; @@ -126,7 +128,9 @@ TxError(const char *fmt, ...) */ void -TxPrintf(const char *fmt, ...) +TxPrintf( + const char *fmt, + ...) { va_list ap; diff --git a/utils/dqueue.c b/utils/dqueue.c index b3ab7e875..0f0a00fdf 100644 --- a/utils/dqueue.c +++ b/utils/dqueue.c @@ -43,9 +43,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -DQInit(q, capacity) - DQueue *q; - int capacity; +DQInit( + DQueue *q, + int capacity) { if (capacity < 1) capacity = 1; q->dq_data = (ClientData *) mallocMagic((unsigned)((capacity+1) * sizeof (ClientData))); @@ -73,8 +73,8 @@ DQInit(q, capacity) */ void -DQFree(q) - DQueue *q; +DQFree( + DQueue *q) { freeMagic((char *) q->dq_data); } @@ -96,9 +96,9 @@ DQFree(q) */ void -DQPushFront(q, elem) - DQueue *q; - ClientData elem; +DQPushFront( + DQueue *q, + ClientData elem) { if (q->dq_size == q->dq_maxSize) DQChangeSize(q, 2 * q->dq_maxSize); q->dq_data[q->dq_front] = elem; @@ -108,9 +108,9 @@ DQPushFront(q, elem) } void -DQPushRear(q, elem) - DQueue *q; - ClientData elem; +DQPushRear( + DQueue *q, + ClientData elem) { if (q->dq_size == q->dq_maxSize) DQChangeSize(q, 2 * q->dq_maxSize); q->dq_data[q->dq_rear] = elem; @@ -136,8 +136,8 @@ DQPushRear(q, elem) */ ClientData -DQPopFront(q) - DQueue *q; +DQPopFront( + DQueue *q) { if (q->dq_size == 0) return (ClientData) NULL; q->dq_size--; @@ -147,8 +147,8 @@ DQPopFront(q) } ClientData -DQPopRear(q) - DQueue *q; +DQPopRear( + DQueue *q) { if (q->dq_size == 0) return (ClientData) NULL; q->dq_size--; @@ -175,9 +175,9 @@ DQPopRear(q) */ void -DQChangeSize(q, newSize) - DQueue *q; - int newSize; +DQChangeSize( + DQueue *q, + int newSize) { DQueue newq; @@ -209,9 +209,9 @@ DQChangeSize(q, newSize) */ void -DQCopy(dst, src) - DQueue *dst; /* The destination queue */ - DQueue *src; /* The source queue */ +DQCopy( + DQueue *dst, /* The destination queue */ + DQueue *src) /* The source queue */ { int i; dst->dq_size = 0; diff --git a/utils/flsbuf.c b/utils/flsbuf.c index c71434084..4625b18cc 100644 --- a/utils/flsbuf.c +++ b/utils/flsbuf.c @@ -48,9 +48,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ char *malloc(); int -_flsbuf(c, iop) - unsigned c; - FILE *iop; +_flsbuf( + unsigned c, + FILE *iop) { char *base; n, rn; @@ -125,8 +125,8 @@ _flsbuf(c, iop) } int -fflush(iop) - struct _iobuf *iop; +fflush( + struct _iobuf *iop) { char *base; n, rn; @@ -149,8 +149,8 @@ fflush(iop) } int -fclose(iop) - struct _iobuf *iop; +fclose( + struct _iobuf *iop) { int r; diff --git a/utils/fraction.c b/utils/fraction.c index d5ace09bf..4fc708014 100644 --- a/utils/fraction.c +++ b/utils/fraction.c @@ -51,8 +51,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ int -FindGCF(a, b) - int a, b; +FindGCF( + int a, + int b) { int a_mod_b, bp; @@ -80,8 +81,9 @@ FindGCF(a, b) */ void -ReduceFraction(n, d) - int *n, *d; +ReduceFraction( + int *n, + int *d) { int c; diff --git a/utils/hash.c b/utils/hash.c index 342f2f57d..fe7e41282 100644 --- a/utils/hash.c +++ b/utils/hash.c @@ -143,10 +143,10 @@ static int rebuildLimit = 3; */ void -HashInit(table, nBuckets, ptrKeys) - HashTable *table; /* Table to be initialized */ - int nBuckets; /* How many buckets to create for starters */ - int ptrKeys; /* See comments above */ +HashInit( + HashTable *table, /* Table to be initialized */ + int nBuckets, /* How many buckets to create for starters */ + int ptrKeys) /* See comments above */ { ASSERT(ptrKeys != HT_CLIENTKEYS, "HashInit: should use HashInitClient"); HashInitClient(table, nBuckets, ptrKeys, @@ -155,14 +155,14 @@ HashInit(table, nBuckets, ptrKeys) } void -HashInitClient(table, nBuckets, ptrKeys, compareFn, copyFn, hashFn, killFn) - HashTable *table; /* Table to be initialized */ - int nBuckets; /* How many buckets to create for starters */ - int ptrKeys; /* See comments above */ - int (*compareFn)(); /* Function to compare two keys */ - char *(*copyFn)(); /* Function to copy a key */ - int (*hashFn)(); /* For hashing */ - int (*killFn)(); /* For hashing */ +HashInitClient( + HashTable *table, /* Table to be initialized */ + int nBuckets, /* How many buckets to create for starters */ + int ptrKeys, /* See comments above */ + int (*compareFn)(), /* Function to compare two keys */ + char *(*copyFn)(), /* Function to copy a key */ + int (*hashFn)(), /* For hashing */ + int (*killFn)()) /* For hashing */ { HashEntry ** ptr; int i; @@ -215,9 +215,9 @@ HashInitClient(table, nBuckets, ptrKeys, compareFn, copyFn, hashFn, killFn) */ int -hash(table, key) - HashTable *table; - char *key; +hash( + HashTable *table, + char *key) { unsigned *up; unsigned long i; @@ -280,9 +280,9 @@ hash(table, key) */ HashEntry * -HashLookOnly(table, key) - HashTable *table; /* Hash table to search. */ - const char *key; /* Interpreted according to table->ht_ptrKeys +HashLookOnly( + HashTable *table, /* Hash table to search. */ + const char *key) /* Interpreted according to table->ht_ptrKeys * as described in HashInit()'s comments. */ { @@ -350,9 +350,9 @@ HashLookOnly(table, key) */ HashEntry * -HashFind(table, key) - HashTable *table; /* Hash table to search. */ - const char *key; /* Interpreted according to table->ht_ptrKeys +HashFind( + HashTable *table, /* Hash table to search. */ + const char *key) /* Interpreted according to table->ht_ptrKeys * as described in HashInit()'s comments. */ { @@ -475,8 +475,8 @@ HashFind(table, key) */ void -rebuild(table) - HashTable *table; /* Table to be enlarged. */ +rebuild( + HashTable *table) /* Table to be enlarged. */ { HashEntry **oldTable, **old2, *h, *next; int oldSize, bucket; @@ -537,8 +537,8 @@ rebuild(table) #define MAXCOUNT 15 void -HashStats(table) - HashTable *table; +HashStats( + HashTable *table) { int count[MAXCOUNT], overflow, i, j; HashEntry *h; @@ -575,9 +575,9 @@ HashStats(table) */ void -HashRemove(table, key) - HashTable *table; /* Hash table to search. */ - const char *key; /* Interpreted according to table->ht_ptrKeys +HashRemove( + HashTable *table, /* Hash table to search. */ + const char *key) /* Interpreted according to table->ht_ptrKeys * as described in HashInit()'s comments. */ { @@ -624,8 +624,8 @@ HashRemove(table, key) */ void -HashStartSearch(hs) - HashSearch *hs; /* Area in which to keep state about search.*/ +HashStartSearch( + HashSearch *hs) /* Area in which to keep state about search.*/ { hs->hs_nextIndex = 0; hs->hs_h = NIL; @@ -651,9 +651,9 @@ HashStartSearch(hs) */ HashEntry * -HashNext(table, hs) - HashTable *table; /* Table to be searched. */ - HashSearch *hs; /* Area used to keep state about search. */ +HashNext( + HashTable *table, /* Table to be searched. */ + HashSearch *hs) /* Area used to keep state about search. */ { HashEntry *h; @@ -684,8 +684,8 @@ HashNext(table, hs) */ void -HashKill(table) - HashTable *table; /* Hash table whose space is to be freed */ +HashKill( + HashTable *table) /* Hash table whose space is to be freed */ { HashEntry *h, **hp, **hend; int (*killFn)() = (int (*)()) NULL; @@ -731,8 +731,8 @@ HashKill(table) *--------------------------------------------------------- */ void -HashFreeKill(table) -HashTable *table; +HashFreeKill( +HashTable *table) { HashSearch hs; HashEntry *he; diff --git a/utils/lookupany.c b/utils/lookupany.c index d489d9c25..e9bff1791 100644 --- a/utils/lookupany.c +++ b/utils/lookupany.c @@ -45,9 +45,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ int -LookupAny(c, table) - char c; - const char * const *table; +LookupAny( + char c, + const char * const *table) { const char * const *tp; diff --git a/utils/lookupfull.c b/utils/lookupfull.c index b72c02fcd..be1278bc1 100644 --- a/utils/lookupfull.c +++ b/utils/lookupfull.c @@ -49,9 +49,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ int -LookupFull(name, table) - const char *name; - const char * const *table; +LookupFull( + const char *name, + const char * const *table) { const char * const *tp; @@ -106,15 +106,15 @@ LookupFull(name, table) */ int -LookupStructFull(str, table, size) - const char *str; /* Pointer to a string to be looked up */ - const char * const *table; +LookupStructFull( + const char *str, /* Pointer to a string to be looked up */ + const char * const *table, /* Pointer to an array of structs containing string * pointers to valid commands. * The last table entry should have a NULL * string pointer. */ - int size; /* The size, in bytes, of each table entry */ + int size) /* The size, in bytes, of each table entry */ { const char * const *entry; int pos; diff --git a/utils/macros.c b/utils/macros.c index 25ab1adca..84b8af0de 100644 --- a/utils/macros.c +++ b/utils/macros.c @@ -93,12 +93,12 @@ MacroInit() */ void -MacroDefineByName(clientName, xc, str, help, imacro) - char *clientName; /* window client name */ - int xc; /* full (X11) keycode of macro with modifiers */ - char *str; /* ...and the string to be attached to it */ - char *help; /* ...and/or the help text for the macro */ - bool imacro; /* is this an interactive macro? */ +MacroDefineByName( + char *clientName, /* window client name */ + int xc, /* full (X11) keycode of macro with modifiers */ + char *str, /* ...and the string to be attached to it */ + char *help, /* ...and/or the help text for the macro */ + bool imacro) /* is this an interactive macro? */ { HashEntry *h; HashTable *clienttable, newTable; @@ -159,12 +159,12 @@ MacroDefineByName(clientName, xc, str, help, imacro) */ void -MacroDefine(client, xc, str, help, imacro) - WindClient client; /* window client type */ - int xc; /* full (X11) keycode of macro with modifiers */ - char *str; /* ...and the string to be attached to it */ - char *help; /* ...and/or the help text for the macro */ - bool imacro; /* is this an interactive macro? */ +MacroDefine( + WindClient client, /* window client type */ + int xc, /* full (X11) keycode of macro with modifiers */ + char *str, /* ...and the string to be attached to it */ + char *help, /* ...and/or the help text for the macro */ + bool imacro) /* is this an interactive macro? */ { char *clientName = NULL; @@ -193,10 +193,10 @@ MacroDefine(client, xc, str, help, imacro) */ void -MacroDefineHelp(client, xc, help) - WindClient client; /* window client type */ - int xc; /* full (X11) keycode of macro with modifiers */ - char *help; /* ...and/or the help text for the macro */ +MacroDefineHelp( + WindClient client, /* window client type */ + int xc, /* full (X11) keycode of macro with modifiers */ + char *help) /* ...and/or the help text for the macro */ { HashEntry *h; HashTable *clienttable; @@ -241,10 +241,10 @@ MacroDefineHelp(client, xc, help) */ char * -MacroRetrieve(client, xc, iReturn) - WindClient client; /* window client type */ - int xc; /* the extended name of the macro */ - bool *iReturn; /* TRUE if macro is interactive */ +MacroRetrieve( + WindClient client, /* window client type */ + int xc, /* the extended name of the macro */ + bool *iReturn) /* TRUE if macro is interactive */ { HashEntry *h; HashTable *clienttable; @@ -297,9 +297,9 @@ MacroRetrieve(client, xc, iReturn) */ char * -MacroRetrieveHelp(client, xc) - WindClient client; /* window client type */ - int xc; /* the extended name of the macro */ +MacroRetrieveHelp( + WindClient client, /* window client type */ + int xc) /* the extended name of the macro */ { HashEntry *h; HashTable *clienttable; @@ -347,10 +347,10 @@ MacroRetrieveHelp(client, xc) */ char * -MacroSubstitute(macrostr, searchstr, replacestr) - char *macrostr; - char *searchstr; - char *replacestr; +MacroSubstitute( + char *macrostr, + char *searchstr, + char *replacestr) { char *found, *last, *new; int expand, length, oldlength, srchsize; @@ -402,9 +402,9 @@ MacroSubstitute(macrostr, searchstr, replacestr) */ void -MacroDelete(client, xc) - WindClient client; /* window client type */ - int xc; /* the extended name of the macro */ +MacroDelete( + WindClient client, /* window client type */ + int xc) /* the extended name of the macro */ { HashEntry *h; HashTable *clienttable; @@ -459,9 +459,9 @@ MacroDelete(client, xc) */ void -MacroCopy(client, clientkey) - WindClient client; /* Current window client */ - char *clientkey; /* Name of client to copy macros to */ +MacroCopy( + WindClient client, /* Current window client */ + char *clientkey) /* Name of client to copy macros to */ { HashTable *clienttable; HashTable *copytable; @@ -511,8 +511,8 @@ MacroCopy(client, clientkey) */ char * -MacroName(xc) - int xc; +MacroName( + int xc) { char *vis; static char hex[17] = "0123456789ABCDEF"; @@ -598,9 +598,9 @@ MacroName(xc) */ int -MacroKey(str, verbose) - char *str; - int *verbose; +MacroKey( + char *str, + int *verbose) { static int warn = 1; @@ -759,8 +759,8 @@ MacroKey(str, verbose) */ int -TranslateChar(key) - int key; +TranslateChar( + int key) { int rval = key; diff --git a/utils/macros.h b/utils/macros.h index b55cf6260..ab4e7c652 100644 --- a/utils/macros.h +++ b/utils/macros.h @@ -40,7 +40,7 @@ extern HashTable MacroClients; /* procedures */ extern void MacroInit(); -extern void MacroDefine(); +extern void MacroDefine(WindClient client, int xc, char *str, char *help, bool imacro); extern void MacroDefineHelp(); extern void MacroDefineInt(); extern char *MacroRetrieve(); /* returns a malloc'ed string */ diff --git a/utils/main.c b/utils/main.c index f02e3bd10..7d76c7571 100644 --- a/utils/main.c +++ b/utils/main.c @@ -187,8 +187,8 @@ char *mainArg(); */ void -MainExit(errNum) - int errNum; +MainExit( + int errNum) { #ifdef MOCHA MochaExit(errNum); @@ -250,9 +250,9 @@ MainExit(errNum) */ int -mainDoArgs(argc, argv) - int argc; - char **argv; +mainDoArgs( + int argc, + char **argv) { bool haveDashI = FALSE; char *cp; @@ -471,10 +471,10 @@ mainDoArgs(argc, argv) */ char * -mainArg(pargc, pargv, mesg) - int *pargc; - char ***pargv; - char *mesg; +mainArg( + int *pargc, + char ***pargv, + char *mesg) { char option, *cp; @@ -508,9 +508,9 @@ mainArg(pargc, pargv, mesg) */ int -mainInitBeforeArgs(argc, argv) - int argc; - char *argv[]; +mainInitBeforeArgs( + int argc, + char *argv[]) { TechOverridesDefault = FALSE; if (Path == NULL) @@ -1283,9 +1283,9 @@ mainFinished() */ void -magicMain(argc, argv) - int argc; - char *argv[]; +magicMain( + int argc, + char *argv[]) { int rstatus; @@ -1295,9 +1295,9 @@ magicMain(argc, argv) } int -magicMainInit(argc, argv) - int argc; - char *argv[]; +magicMainInit( + int argc, + char *argv[]) { int rstatus; diff --git a/utils/malloc.c b/utils/malloc.c index 02444d56f..2b01fa919 100644 --- a/utils/malloc.c +++ b/utils/malloc.c @@ -104,8 +104,8 @@ static char *freeDelayedItem = NULL; */ void * -mallocMagicLegacy(nbytes) - size_t nbytes; +mallocMagicLegacy( + size_t nbytes) { void *p; @@ -139,8 +139,8 @@ mallocMagicLegacy(nbytes) */ void -freeMagicLegacy(cp) - void *cp; +freeMagicLegacy( + void *cp) { if (cp == NULL) TxError("freeMagic called with NULL argument.\n"); @@ -162,8 +162,8 @@ freeMagicLegacy(cp) */ void * -callocMagicLegacy(nbytes) - size_t nbytes; +callocMagicLegacy( + size_t nbytes) { void *cp; diff --git a/utils/netlist.c b/utils/netlist.c index 5195c9280..bab9f8db9 100644 --- a/utils/netlist.c +++ b/utils/netlist.c @@ -45,7 +45,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define NETSIZE(r) ((int)((r)->r_xtop - (r)->r_xbot + (r)->r_ytop - (r)->r_ybot)) /* Forward declarations */ -int nlTermFunc(), nlLabelFunc(); +int nlTermFunc(char *name, bool firstInNet, NLNetList *netList), nlLabelFunc(); /* * ---------------------------------------------------------------------------- @@ -71,9 +71,9 @@ int nlTermFunc(), nlLabelFunc(); */ int -NLBuild(rootUse, netList) - CellUse *rootUse; /* Cell searched for terminals */ - NLNetList *netList; /* Netlist to build */ +NLBuild( + CellUse *rootUse, /* Cell searched for terminals */ + NLNetList *netList) /* Netlist to build */ { NLTerm *term; NLNet *net; @@ -154,10 +154,10 @@ NLBuild(rootUse, netList) */ int -nlTermFunc(name, firstInNet, netList) - char *name; - bool firstInNet; - NLNetList *netList; +nlTermFunc( + char *name, + bool firstInNet, + NLNetList *netList) { NLNet *net; NLTerm *term; @@ -212,11 +212,11 @@ nlTermFunc(name, firstInNet, netList) */ int -nlLabelFunc(area, name, label, term) - Rect *area; /* Root coords of label */ - char *name; /* Same as term->nterm_name (UNUSED) */ - Label *label; /* Label within scx->scx_use->cu_def */ - NLTerm *term; /* Prepend new NLTermLoc to this terminal */ +nlLabelFunc( + Rect *area, /* Root coords of label */ + char *name, /* Same as term->nterm_name (UNUSED) */ + Label *label, /* Label within scx->scx_use->cu_def */ + NLTerm *term) /* Prepend new NLTermLoc to this terminal */ { NLTermLoc *loc; @@ -261,8 +261,8 @@ nlLabelFunc(area, name, label, term) */ void -NLFree(netList) - NLNetList *netList; +NLFree( + NLNetList *netList) { NLTermLoc *loc; NLTerm *term; @@ -303,9 +303,9 @@ NLFree(netList) */ void -NLSort(netList, netHeap) - NLNetList *netList; - Heap *netHeap; +NLSort( + NLNetList *netList, + Heap *netHeap) { NLTermLoc *loc; NLTerm *term; @@ -366,8 +366,8 @@ NLSort(netList, netHeap) */ char * -NLNetName(net) - NLNet *net; +NLNetName( + NLNet *net) { static char tempId[100]; #if defined(EMSCRIPTEN) diff --git a/utils/netlist.h b/utils/netlist.h index 09ddb48e8..b7abf8370 100644 --- a/utils/netlist.h +++ b/utils/netlist.h @@ -110,7 +110,7 @@ typedef struct nlNet * A NLNetList contains a list of nets, along with the * table that maps from signal names to terminals. */ -typedef struct +typedef struct nlNetList { struct nlNet *nnl_nets; /* List of nets */ int nnl_numNets; /* # of nets in list (redundant, since diff --git a/utils/path.c b/utils/path.c index a4ead2486..4ccd981fa 100644 --- a/utils/path.c +++ b/utils/path.c @@ -71,7 +71,11 @@ bool FileLocking = TRUE; * Made non-static as flock() can use it but still considered module internal API. */ gzFile -path_gzdopen_internal(const char *path, int oflags, const char *modestr, int *fdp) +path_gzdopen_internal( + const char *path, + int oflags, + const char *modestr, + int *fdp) { ASSERT(fdp, "fdp"); @@ -113,8 +117,8 @@ path_gzdopen_internal(const char *path, int oflags, const char *modestr, int *fd */ char * -PaCheckCompressed(filename) - const char *filename; +PaCheckCompressed( + const char *filename) { char *gzname; @@ -137,7 +141,9 @@ PaCheckCompressed(filename) * newstring is the new string to append to the path. */ void -PaAppend(char **pathptr, const char *newstring) +PaAppend( + char **pathptr, + const char *newstring) { int oldlength, addlength; char *new; @@ -190,11 +196,10 @@ PaAppend(char **pathptr, const char *newstring) */ int -PaExpand(psource, pdest, size) - const char **psource; /* Pointer to a pointer to the source string */ - char **pdest; /* Pointer to a ptr to dest string area. */ - int size; /* Number of bytes available at pdest */ - +PaExpand( + const char **psource, /* Pointer to a pointer to the source string */ + char **pdest, /* Pointer to a ptr to dest string area. */ + int size) /* Number of bytes available at pdest */ { const char *ps; char *pd; @@ -386,14 +391,13 @@ PaExpand(psource, pdest, size) */ char * -nextName(ppath, file, dest, size) - const char **ppath; /* Pointer to a pointer to the next +nextName( + const char **ppath, /* Pointer to a pointer to the next * entry in the path. */ - const char *file; /* Pointer to a file name. */ - char *dest; /* Place to build result name. */ - int size; /* Size of result area. */ - + const char *file, /* Pointer to a file name. */ + char *dest, /* Place to build result name. */ + int size) /* Size of result area. */ { char *p; @@ -444,32 +448,32 @@ nextName(ppath, file, dest, size) */ gzFile -PaLockZOpen(file, mode, ext, path, library, pRealName, is_locked, fdp) - const char *file; /* Name of the file to be opened. */ - const char *mode; /* The file mode, as given to fopen. */ - const char *ext; /* The extension to be added to the file name, +PaLockZOpen( + const char *file, /* Name of the file to be opened. */ + const char *mode, /* The file mode, as given to fopen. */ + const char *ext, /* The extension to be added to the file name, * or NULL. Note: this string must include * the dot (or whatever separator you use). */ - const char *path; /* A search path: a list of directory names + const char *path, /* A search path: a list of directory names * separated by colons or blanks. To use * only the working directory, use "." for * the path. */ - const char *library; /* A 2nd path containing library names. Can be + const char *library, /* A 2nd path containing library names. Can be * NULL to indicate no library. */ - char **pRealName; /* Pointer to a location that will be filled + char **pRealName, /* Pointer to a location that will be filled * in with the address of the real name of * the file that was successfully opened. * If NULL, then nothing is stored. */ - bool *is_locked; /* Pointer to a location to store the result + bool *is_locked, /* Pointer to a location to store the result * of the attempt to grab an advisory lock * on the file. If NULL, then nothing is * stored. */ - int *fdp; /* If non-NULL, put the file descriptor here */ + int *fdp) /* If non-NULL, put the file descriptor here */ { char extendedName[MAXSIZE], *p1; const char *p2; @@ -644,32 +648,32 @@ PaLockZOpen(file, mode, ext, path, library, pRealName, is_locked, fdp) */ FILE * -PaLockOpen(file, mode, ext, path, library, pRealName, is_locked, fdp) - const char *file; /* Name of the file to be opened. */ - const char *mode; /* The file mode, as given to fopen. */ - const char *ext; /* The extension to be added to the file name, +PaLockOpen( + const char *file, /* Name of the file to be opened. */ + const char *mode, /* The file mode, as given to fopen. */ + const char *ext, /* The extension to be added to the file name, * or NULL. Note: this string must include * the dot (or whatever separator you use). */ - const char *path; /* A search path: a list of directory names + const char *path, /* A search path: a list of directory names * separated by colons or blanks. To use * only the working directory, use "." for * the path. */ - const char *library; /* A 2nd path containing library names. Can be + const char *library, /* A 2nd path containing library names. Can be * NULL to indicate no library. */ - char **pRealName; /* Pointer to a location that will be filled + char **pRealName, /* Pointer to a location that will be filled * in with the address of the real name of * the file that was successfully opened. * If NULL, then nothing is stored. */ - bool *is_locked; /* Pointer to a location to store the result + bool *is_locked, /* Pointer to a location to store the result * of the attempt to grab an advisory lock * on the file. If NULL, then nothing is * stored. */ - int *fdp; /* If non-NULL, put the file descriptor here. */ + int *fdp) /* If non-NULL, put the file descriptor here. */ { char extendedName[MAXSIZE], *p1; const char *p2; @@ -829,22 +833,22 @@ PaLockOpen(file, mode, ext, path, library, pRealName, is_locked, fdp) */ gzFile -PaZOpen(file, mode, ext, path, library, pRealName) - const char *file; /* Name of the file to be opened. */ - const char *mode; /* The file mode, as given to gzopen. */ - const char *ext; /* The extension to be added to the file name, +PaZOpen( + const char *file, /* Name of the file to be opened. */ + const char *mode, /* The file mode, as given to gzopen. */ + const char *ext, /* The extension to be added to the file name, * or NULL. Note: this string must include * the dot (or whatever separator you use). */ - const char *path; /* A search path: a list of directory names + const char *path, /* A search path: a list of directory names * separated by colons or blanks. To use * only the working directory, use "." for * the path. */ - const char *library; /* A 2nd path containing library names. Can be + const char *library, /* A 2nd path containing library names. Can be * NULL to indicate no library. */ - char **pRealName; /* Pointer to a location that will be filled + char **pRealName) /* Pointer to a location that will be filled * in with the address of the real name of * the file that was successfully opened. * If NULL, then nothing is stored. @@ -964,22 +968,22 @@ PaZOpen(file, mode, ext, path, library, pRealName) */ FILE * -PaOpen(file, mode, ext, path, library, pRealName) - const char *file; /* Name of the file to be opened. */ - const char *mode; /* The file mode, as given to fopen. */ - const char *ext; /* The extension to be added to the file name, +PaOpen( + const char *file, /* Name of the file to be opened. */ + const char *mode, /* The file mode, as given to fopen. */ + const char *ext, /* The extension to be added to the file name, * or NULL. Note: this string must include * the dot (or whatever separator you use). */ - const char *path; /* A search path: a list of directory names + const char *path, /* A search path: a list of directory names * separated by colons or blanks. To use * only the working directory, use "." for * the path. */ - const char *library; /* A 2nd path containing library names. Can be + const char *library, /* A 2nd path containing library names. Can be * NULL to indicate no library. */ - char **pRealName; /* Pointer to a location that will be filled + char **pRealName) /* Pointer to a location that will be filled * in with the address of the real name of * the file that was successfully opened. * If NULL, then nothing is stored. @@ -1008,12 +1012,11 @@ PaOpen(file, mode, ext, path, library, pRealName) */ char * -PaSubsWD(path, newWD) -const char *path; /* Path in which to substitute. */ -const char *newWD; /* New working directory to be used. Must +PaSubsWD( +const char *path, /* Path in which to substitute. */ +const char *newWD) /* New working directory to be used. Must * end in a slash. */ - { #define NEWPATHSIZE 1000 static char newPath[NEWPATHSIZE]; @@ -1107,13 +1110,13 @@ const char *newWD; /* New working directory to be used. Must */ int -PaEnum(path, file, proc, cdata) - const char *path; /* Search path */ - const char *file; /* Each element of the search path is prepended to +PaEnum( + const char *path, /* Search path */ + const char *file, /* Each element of the search path is prepended to * this file name and passed to the client. */ - int (*proc)(); /* Client procedure */ - ClientData cdata; /* Passed to (*proc)() */ + int (*proc)(), /* Client procedure */ + ClientData cdata) /* Passed to (*proc)() */ { char component[MAXSIZE], *next; diff --git a/utils/pathvisit.c b/utils/pathvisit.c index bcf3c5d03..0028d12b2 100644 --- a/utils/pathvisit.c +++ b/utils/pathvisit.c @@ -78,8 +78,8 @@ PaVisitInit() */ void -PaVisitFree(pv) - PaVisit *pv; +PaVisitFree( + PaVisit *pv) { PaVisitClient *pvc; @@ -126,11 +126,11 @@ PaVisitFree(pv) */ void -PaVisitAddClient(pv, keyword, proc, cdata) - PaVisit *pv; - char *keyword; - int (*proc)(); - ClientData cdata; +PaVisitAddClient( + PaVisit *pv, + char *keyword, + int (*proc)(), + ClientData cdata) { PaVisitClient *pvc; @@ -175,17 +175,17 @@ PaVisitAddClient(pv, keyword, proc, cdata) */ int -PaVisitFiles(path, file, pv) - char *path; /* Colon or space separated list of directories to +PaVisitFiles( + char *path, /* Colon or space separated list of directories to * search for the file 'file'. If 'file' does not * exist in a given directory, that directory is * skipped. */ - char *file; /* If 'file' exists in a directory of 'path' we + char *file, /* If 'file' exists in a directory of 'path' we * open it and match each line against the list * of clients pointed to by 'pv'. */ - PaVisit *pv; + PaVisit *pv) { int paVisitFilesProc(); @@ -219,9 +219,9 @@ PaVisitFiles(path, file, pv) */ int -paVisitFilesProc(name, pv) - char *name; /* Full filename */ - PaVisit *pv; /* Points to list of clients */ +paVisitFilesProc( + char *name, /* Full filename */ + PaVisit *pv) /* Points to list of clients */ { char *lp; char line[BUFSIZ+2]; @@ -280,9 +280,9 @@ next: ; */ int -paVisitProcess(line, pv) - char *line; - PaVisit *pv; +paVisitProcess( + char *line, + PaVisit *pv) { PaVisitClient *pvc; char *cp; diff --git a/utils/printstuff.c b/utils/printstuff.c index 81477c152..58bc25bbb 100644 --- a/utils/printstuff.c +++ b/utils/printstuff.c @@ -8,8 +8,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "utils/geometry.h" void -PrintTrans(t) - Transform *t; +PrintTrans( + Transform *t) { printf("Translate: (%d, %d)\n", t->t_c, t->t_f); printf("%d\t%d\n", t->t_a, t->t_d); @@ -17,8 +17,8 @@ PrintTrans(t) } void -PrintRect(r) - Rect *r; +PrintRect( + Rect *r) { printf("(%d,%d) :: (%d,%d)\n", r->r_xbot, r->r_ybot, r->r_xtop, r->r_ytop); } diff --git a/utils/show.c b/utils/show.c index 7d41223f1..a142b23a3 100644 --- a/utils/show.c +++ b/utils/show.c @@ -58,10 +58,10 @@ int ShowRectStyle; CellDef *ShowRectDef; void -ShowRect(def, r, style) - CellDef *def; /* The area is in this def */ - Rect *r; /* Display this area (in coords of def above) */ - int style; /* in this style */ +ShowRect( + CellDef *def, /* The area is in this def */ + Rect *r, /* Display this area (in coords of def above) */ + int style) /* in this style */ { int ShowRectFunc(); @@ -72,9 +72,9 @@ ShowRect(def, r, style) } int -ShowRectFunc(w, r) - MagWindow *w; - Rect *r; +ShowRectFunc( + MagWindow *w, + Rect *r) { Rect screenRect; diff --git a/utils/signals.c b/utils/signals.c index 772c70787..338825f2c 100644 --- a/utils/signals.c +++ b/utils/signals.c @@ -121,7 +121,8 @@ static int sigNumDisables = 0; */ void -SigSetTimer(int secs) +SigSetTimer( + int secs) { #ifdef __EMSCRIPTEN__ (void)secs; @@ -170,7 +171,8 @@ SigRemoveTimer() } sigRetVal -sigOnAlarm(int signo) +sigOnAlarm( + int signo) { if (GrDisplayStatus == DISPLAY_IN_PROGRESS) GrDisplayStatus = DISPLAY_BREAK_PENDING; @@ -211,7 +213,8 @@ SigTimerInterrupts() */ sigRetVal -sigOnStop(int signo) +sigOnStop( + int signo) { /* fix things up */ TxResetTerminal(TRUE); @@ -262,8 +265,8 @@ sigOnStop(int signo) */ bool -SigCheckProcess(pid) - int pid; +SigCheckProcess( + int pid) { #ifdef __EMSCRIPTEN__ (void)pid; @@ -341,9 +344,9 @@ SigDisableInterrupts() */ void -SigWatchFile(filenum, filename) - int filenum; /* A file descriptor number */ - char *filename; /* Used to recognize special files that +SigWatchFile( + int filenum, /* A file descriptor number */ + char *filename) /* Used to recognize special files that * don't support a full range of fcntl * calls (such as windows: /dev/winXX). */ @@ -422,9 +425,9 @@ SigWatchFile(filenum, filename) /*ARGSUSED*/ void -SigUnWatchFile(filenum, filename) - int filenum; /* A file descriptor number */ - char *filename; /* Used to recognize special files that +SigUnWatchFile( + int filenum, /* A file descriptor number */ + char *filename) /* Used to recognize special files that * don't support a full range of fcntl * calls (such as windows: /dev/winXX). */ @@ -471,7 +474,8 @@ SigUnWatchFile(filenum, filename) */ sigRetVal -sigOnInterrupt(int signo) +sigOnInterrupt( + int signo) { if (sigNumDisables != 0) sigInterruptReceived = TRUE; @@ -499,7 +503,8 @@ sigOnInterrupt(int signo) */ sigRetVal -sigOnTerm(int signo) +sigOnTerm( + int signo) { DBWriteBackup(NULL, FALSE, FALSE); exit (1); @@ -522,7 +527,8 @@ sigOnTerm(int signo) */ sigRetVal -sigOnWinch(int signo) +sigOnWinch( + int signo) { SigGotSigWinch = TRUE; sigReturn; @@ -543,7 +549,8 @@ sigOnWinch(int signo) */ sigRetVal -sigIO(int signo) +sigIO( + int signo) { SigIOReady = TRUE; if (SigInterruptOnSigIO == 1) sigOnInterrupt(0); @@ -567,8 +574,8 @@ sigIO(int signo) */ sigRetVal -sigCrash(signum) - int signum; +sigCrash( + int signum) { static int magicNumber = 1239987; char *msg; @@ -637,8 +644,8 @@ sigCrash(signum) */ void -SigInit(batchmode) - int batchmode; +SigInit( + int batchmode) { #ifdef __EMSCRIPTEN__ SigInterruptOnSigIO = (batchmode) ? -1 : 0; @@ -706,7 +713,9 @@ SigInit(batchmode) } void -sigSetAction(int signo, sigRetVal (*handler)(int)) +sigSetAction( + int signo, + sigRetVal (*handler)(int)) { #if defined(SYSV) || defined(CYGWIN) || defined(__NetBSD__) || defined(EMSCRIPTEN) struct sigaction sa; diff --git a/utils/stack.c b/utils/stack.c index ab54054ac..3a381cdc4 100644 --- a/utils/stack.c +++ b/utils/stack.c @@ -46,8 +46,8 @@ bool stackCopyStr; */ Stack * -StackNew(sincr) - int sincr; /* Number of entries by which to grow storage area */ +StackNew( + int sincr) /* Number of entries by which to grow storage area */ { Stack *stack; @@ -76,8 +76,8 @@ StackNew(sincr) */ void -StackFree(stack) - Stack *stack; +StackFree( + Stack *stack) { struct stackBody *stackp, *stacknext; @@ -106,9 +106,9 @@ StackFree(stack) * ---------------------------------------------------------------------------- */ void -StackPush(arg, stack) - ClientData arg; - Stack *stack; +StackPush( + ClientData arg, + Stack *stack) { struct stackBody *bodyNew; @@ -142,8 +142,8 @@ StackPush(arg, stack) */ ClientData -StackPop(stack) - Stack *stack; +StackPop( + Stack *stack) { struct stackBody *bodyOld; @@ -177,8 +177,8 @@ StackPop(stack) */ ClientData -StackLook(stack) - Stack *stack; +StackLook( + Stack *stack) { struct stackBody *bodyNext; @@ -218,10 +218,10 @@ StackLook(stack) * ---------------------------------------------------------------------------- */ void -StackEnum(stack, func, cd) - Stack * stack; - int (* func)(); - ClientData cd; +StackEnum( + Stack * stack, + int (* func)(), + ClientData cd) { int i, j; struct stackBody * sb; @@ -256,9 +256,10 @@ StackEnum(stack, func, cd) * ---------------------------------------------------------------------------- */ void -StackCopy(src, dest, copystr) - Stack * src, ** dest; - bool copystr; +StackCopy( + Stack *src, + Stack **dest, + bool copystr) { int stackCopyFn(); @@ -276,10 +277,10 @@ StackCopy(src, dest, copystr) /*ARGSUSED*/ int -stackCopyFn(stackItem, i, cd) - ClientData stackItem; - int i; - ClientData cd; +stackCopyFn( + ClientData stackItem, + int i, + ClientData cd) { if(stackCopyStr) StackPush((ClientData) StrDup((char **) NULL, (char *)stackItem), (Stack *) cd); diff --git a/utils/stack.h b/utils/stack.h index 1a9ee563a..733b6740f 100644 --- a/utils/stack.h +++ b/utils/stack.h @@ -54,7 +54,7 @@ ClientData StackLook(); void StackPush(); void StackFree(); void StackEnum(); -void StackCopy(); +void StackCopy(Stack *src, Stack **dest, bool copystr); #define stackBodyEmpty(st) ((st)->st_ptr <= (st)->st_body->sb_data) diff --git a/utils/strdup.c b/utils/strdup.c index b8736c61c..0b074d9fe 100644 --- a/utils/strdup.c +++ b/utils/strdup.c @@ -51,9 +51,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ char * -StrDup(oldstr, str) - char **oldstr; - const char *str; +StrDup( + char **oldstr, + const char *str) { char *newstr; @@ -89,9 +89,9 @@ StrDup(oldstr, str) */ bool -StrIsWhite(line, commentok) - const char *line; - bool commentok; /* TRUE means # comments are considered all-white */ +StrIsWhite( + const char *line, + bool commentok) /* TRUE means # comments are considered all-white */ { if ( (*line == '#') && commentok) return TRUE; @@ -122,8 +122,8 @@ StrIsWhite(line, commentok) */ bool -StrIsInt(s) - const char *s; +StrIsInt( + const char *s) { if (*s == '-' || *s == '+') s++; while (*s) @@ -151,8 +151,8 @@ StrIsInt(s) */ bool -StrIsNumeric(s) - const char *s; +StrIsNumeric( + const char *s) { double result; char *endptr; diff --git a/utils/tech.c b/utils/tech.c index ce0dd39ce..222e4b427 100644 --- a/utils/tech.c +++ b/utils/tech.c @@ -156,9 +156,9 @@ techSection *techFindSection(); */ SectionID -TechSectionGetMask(sectionName, depend) - char *sectionName; - SectionID *depend; +TechSectionGetMask( + char *sectionName, + SectionID *depend) { techSection *tsp, *thissect; SectionID invid = 0; @@ -234,9 +234,9 @@ TechInit() */ void -TechAddAlias(primaryName, alias) - char *primaryName; - char *alias; +TechAddAlias( + char *primaryName, + char *alias) { techSection *tsp; @@ -278,9 +278,9 @@ TechAddAlias(primaryName, alias) */ int -changePlanesFunc(cellDef, arg) - CellDef *cellDef; - int *arg; +changePlanesFunc( + CellDef *cellDef, + int *arg) { int oldnumplanes = *arg; int pNum; @@ -355,14 +355,14 @@ changePlanesFunc(cellDef, arg) */ void -TechAddClient(sectionName, init, proc, final, prevSections, pSectionID, opt) - char *sectionName; - void (*init)(); - bool (*proc)(); - void (*final)(); - SectionID prevSections; - SectionID *pSectionID; - bool opt; /* optional section */ +TechAddClient( + char *sectionName, + void (*init)(), + bool (*proc)(), + void (*final)(), + SectionID prevSections, + SectionID *pSectionID, + int opt) /* optional section */ { techSection *tsp; techClient *tcp, *tcl; @@ -422,9 +422,9 @@ TechAddClient(sectionName, init, proc, final, prevSections, pSectionID, opt) */ bool -TechLoad(filename, initmask) - char *filename; - SectionID initmask; +TechLoad( + char *filename, + SectionID initmask) { FILE *tf; techSection *tsp; @@ -901,7 +901,9 @@ TechPrintLine() } void -TechError(const char *fmt, ...) +TechError( + const char *fmt, + ...) { va_list args; @@ -932,8 +934,8 @@ TechError(const char *fmt, ...) */ techSection * -techFindSection(sectionName) - char *sectionName; +techFindSection( + char *sectionName) { techSection *tsp; @@ -974,11 +976,11 @@ techFindSection(sectionName) */ int -techGetTokens(line, size, fstack, argv) - char *line; /* Character array into which line is read */ - int size; /* Size of character array */ - filestack **fstack; /* Open technology file on top of stack */ - char *argv[]; /* Vector of tokens built by techGetTokens() */ +techGetTokens( + char *line, /* Character array into which line is read */ + int size, /* Size of character array */ + filestack **fstack, /* Open technology file on top of stack */ + char *argv[]) /* Vector of tokens built by techGetTokens() */ { char *get, *put, *getp; bool inquote; diff --git a/utils/tech.h b/utils/tech.h index 7f56eb7a4..46fc73801 100644 --- a/utils/tech.h +++ b/utils/tech.h @@ -52,6 +52,11 @@ extern bool TechOverridesDefault; /* Set TRUE if technology was specified on /* ----------------- Exported procedures ---------------- */ extern void TechError(const char *, ...) ATTR_FORMAT_PRINTF_1; +/* TechAddClient takes per-section callbacks with intentionally varying + * signatures, so its declaration stays generic (unprototyped) and "opt" is + * declared int (not bool) in the definition so this empty-parameter-list + * declaration remains compatible with it under C23/GCC 16. + */ extern void TechAddClient(); extern void TechAddAlias(); diff --git a/utils/touchtypes.c b/utils/touchtypes.c index b6a4923be..95952eab5 100644 --- a/utils/touchtypes.c +++ b/utils/touchtypes.c @@ -58,10 +58,10 @@ typedef struct touchingfuncparms * ---------------------------------------------------------------------------- */ TileTypeBitMask -TouchingTypes(cellUse, expansionMask, point) - CellUse *cellUse; - int expansionMask; - Point *point; +TouchingTypes( + CellUse *cellUse, + int expansionMask, + Point *point) { int touchingTypesFunc(); int touchingSubcellsFunc(); @@ -138,10 +138,10 @@ TouchingTypes(cellUse, expansionMask, point) */ int -touchingTypesFunc(tile, dinfo, cxp) - Tile *tile; - TileType dinfo; /* (unused, but should be handled) */ - TreeContext *cxp; +touchingTypesFunc( + Tile *tile, + TileType dinfo, /* (unused, but should be handled) */ + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; Rect r, rDest; @@ -179,9 +179,9 @@ touchingTypesFunc(tile, dinfo, cxp) */ int -touchingSubcellsFunc(scx, cdarg) - SearchContext *scx; - ClientData cdarg; +touchingSubcellsFunc( + SearchContext *scx, + ClientData cdarg) { Rect r, rDest; TouchingFuncParms *parms = (TouchingFuncParms *) cdarg; diff --git a/utils/undo.c b/utils/undo.c index b4124c5e8..3e01ec1be 100644 --- a/utils/undo.c +++ b/utils/undo.c @@ -228,11 +228,11 @@ extern void undoMemTruncate(); */ bool -UndoInit(logFileName, mode) - char *logFileName; /* Name of log file. This may contain tilde +UndoInit( + char *logFileName, /* Name of log file. This may contain tilde * abbreviations. */ - char *mode; /* Mode for opening. Must be "r", "rw", or "w" */ + char *mode) /* Mode for opening. Must be "r", "rw", or "w" */ { UndoDisableCount = 0; undoLogTail = NULL; @@ -330,13 +330,14 @@ UndoInit(logFileName, mode) */ UndoType -UndoAddClient(init, done, readEvent, writeEvent, forwEvent, backEvent, name) - void (*init)(); - void (*done)(); - UndoEvent *(*readEvent)(); - int (*writeEvent)(); - void (*forwEvent)(), (*backEvent)(); - char *name; +UndoAddClient( + void (*init)(), + void (*done)(), + UndoEvent * (*readEvent)(), + int (*writeEvent)(), + void (*forwEvent)(), + void (*backEvent)(), + char *name) { if (undoNumClients >= MAXUNDOCLIENTS) return ((UndoType) -1); @@ -464,9 +465,9 @@ UndoEnable() */ UndoEvent * -UndoNewEvent(clientType, size) - UndoType clientType; /* Type of event to allocate */ - unsigned int size; /* Number of bytes of client data to allocate */ +UndoNewEvent( + UndoType clientType, /* Type of event to allocate */ + unsigned int size) /* Number of bytes of client data to allocate */ { internalUndoEvent *iup; int usize; @@ -567,8 +568,8 @@ UndoNext() */ int -UndoBackward(n) - int n; /* Number of events to unplay */ +UndoBackward( + int n) /* Number of events to unplay */ { internalUndoEvent *iup; int client, count; @@ -649,8 +650,8 @@ UndoBackward(n) */ int -UndoForward(n) - int n; /* Number of events to replay */ +UndoForward( + int n) /* Number of events to replay */ { internalUndoEvent *iup; int count, client; @@ -729,8 +730,8 @@ UndoForward(n) */ internalUndoEvent * -undoGetForw(iup) - internalUndoEvent *iup; +undoGetForw( + internalUndoEvent *iup) { if (iup != (internalUndoEvent *) NULL) { @@ -775,8 +776,8 @@ undoGetForw(iup) */ internalUndoEvent * -undoGetBack(iup) - internalUndoEvent *iup; +undoGetBack( + internalUndoEvent *iup) { if (iup == (internalUndoEvent *) NULL) return (iup); if (iup->iue_back != (internalUndoEvent *) NULL) return (iup->iue_back); @@ -913,8 +914,8 @@ undoMemTruncate() */ void -undoPrintEvent(iup) - internalUndoEvent *iup; +undoPrintEvent( + internalUndoEvent *iup) { char *client_name; if (iup->iue_type < 0) @@ -930,9 +931,9 @@ undoPrintEvent(iup) /* the end of the stack. Otherwise, print the next n events. */ void -undoPrintForw(iup, n) - internalUndoEvent *iup; - int n; +undoPrintForw( + internalUndoEvent *iup, + int n) { int i = 0; @@ -953,9 +954,9 @@ undoPrintForw(iup, n) /* the beginning of the stack. Otherwise, print the previous n events. */ void -undoPrintBack(iup, n) - internalUndoEvent *iup; - int n; +undoPrintBack( + internalUndoEvent *iup, + int n) { int i = 0; @@ -977,8 +978,8 @@ undoPrintBack(iup, n) /* and n = 0 (backward). */ void -UndoStackTrace(n) - int n; +UndoStackTrace( + int n) { if (n < 0) undoPrintBack(undoLogCur, -(n + 1)); diff --git a/utils/undo.h b/utils/undo.h index a593bfb15..79c7db0d3 100644 --- a/utils/undo.h +++ b/utils/undo.h @@ -62,7 +62,7 @@ typedef char UndoEvent; /* Externally visible undo event */ */ extern bool UndoInit(char *, char *); -extern UndoType UndoAddClient(); +extern UndoType UndoAddClient(void (*init)(), void (*done)(), UndoEvent *(*readEvent)(), int (*writeEvent)(), void (*forwEvent)(), void (*backEvent)(), char *name); extern UndoEvent *UndoNewEvent(UndoType, unsigned int); /* extern UndoEvent *UndoCopyEvent(); */ extern void UndoNext(void); diff --git a/windows/windClient.c b/windows/windClient.c index b92fc39dd..36a8e503e 100644 --- a/windows/windClient.c +++ b/windows/windClient.c @@ -53,30 +53,30 @@ static char rcsid[] __attribute__ ((unused)) ="$Header: /usr/cvsroot/magic-8.0/w /* our window client ID */ global WindClient windClientID = (WindClient) NULL; -extern int windBorderCmd(); -extern int windCaptionCmd(), windCrashCmd(), windCursorCmd(); -extern int windFilesCmd(), windCloseCmd(), windOpenCmd(); -extern int windQuitCmd(), windRedrawCmd(); -extern int windResetCmd(), windSpecialOpenCmd(); -extern int windOverCmd(), windUnderCmd(), windDebugCmd(); -extern int windDumpCmd(), windHelpCmd(); -extern int windMacroCmd(), windIntMacroCmd(); -extern int windLogCommandsCmd(), windUpdateCmd(), windSleepCmd(); -extern int windSetpointCmd(); -extern int windPushbuttonCmd(); -extern int windPauseCmd(), windGrstatsCmd(); -extern int windGrowCmd(); -extern int windUndoCmd(), windRedoCmd(); -extern int windCenterCmd(), windScrollCmd(); -extern int windVersionCmd(), windViewCmd(), windXviewCmd(), windZoomCmd(); -extern int windScrollBarsCmd(), windPositionsCmd(); -extern int windNamesCmd(); +extern void windBorderCmd(); +extern void windCaptionCmd(), windCrashCmd(), windCursorCmd(); +extern void windFilesCmd(), windCloseCmd(), windOpenCmd(); +extern void windQuitCmd(), windRedrawCmd(); +extern void windResetCmd(), windSpecialOpenCmd(); +extern void windOverCmd(), windUnderCmd(), windDebugCmd(); +extern void windDumpCmd(), windHelpCmd(); +extern void windMacroCmd(), windIntMacroCmd(); +extern void windLogCommandsCmd(), windUpdateCmd(), windSleepCmd(); +extern void windSetpointCmd(); +extern void windPushbuttonCmd(); +extern void windPauseCmd(), windGrstatsCmd(); +extern void windGrowCmd(); +extern void windUndoCmd(), windRedoCmd(); +extern void windCenterCmd(), windScrollCmd(); +extern void windVersionCmd(), windViewCmd(), windXviewCmd(), windZoomCmd(); +extern void windScrollBarsCmd(), windPositionsCmd(); +extern void windNamesCmd(); #ifdef MAGIC_WRAPPER -extern int windBypassCmd(); +extern void windBypassCmd(); #else -extern int windEchoCmd(), windSourceCmd(), windSendCmd(); +extern void windEchoCmd(), windSourceCmd(), windSendCmd(); #endif static Rect windFrameRect; @@ -104,9 +104,9 @@ static int windCorner = WIND_ILG; /* Nearest corner when button went */ void -windButtonSetCursor(button, corner) - int button; /* Button that is down. */ - int corner; /* Corner to be displayed in cursor. */ +windButtonSetCursor( + int button, /* Button that is down. */ + int corner) /* Corner to be displayed in cursor. */ { switch (corner) { @@ -154,10 +154,9 @@ windButtonSetCursor(button, corner) */ int -windGetCorner(screenPoint, screenRect) - Point *screenPoint; - Rect *screenRect; - +windGetCorner( + Point *screenPoint, + Rect *screenRect) { Rect r; @@ -200,15 +199,15 @@ windGetCorner(screenPoint, screenRect) */ void -windMoveRect(wholeRect, corner, p, rect) - bool wholeRect; /* move the whole thing? or just a corner? */ - int corner; /* Specifies a corner in the format +windMoveRect( + bool wholeRect, /* move the whole thing? or just a corner? */ + int corner, /* Specifies a corner in the format * returned by ToolGetCorner. */ - Point *p; /* New position of corner, in screen + Point *p, /* New position of corner, in screen * coordinates. */ - Rect *rect; + Rect *rect) { int x, y, tmp; @@ -312,9 +311,9 @@ windMoveRect(wholeRect, corner, p, rect) */ void -windFrameDown(w, cmd) - MagWindow *w; - TxCommand *cmd; +windFrameDown( + MagWindow *w, + TxCommand *cmd) { if (WindOldButtons == 0) { @@ -341,9 +340,9 @@ windFrameDown(w, cmd) /*ARGSUSED*/ void -windFrameUp(w, cmd) - MagWindow *w; - TxCommand *cmd; +windFrameUp( + MagWindow *w, + TxCommand *cmd) { if (WindNewButtons == 0) { @@ -391,9 +390,9 @@ windFrameUp(w, cmd) */ bool -windFrameButtons(w, cmd) - MagWindow *w; - TxCommand *cmd; +windFrameButtons( + MagWindow *w, + TxCommand *cmd) { extern void windBarLocations(); @@ -498,9 +497,9 @@ windFrameButtons(w, cmd) */ void -windClientButtons(w, cmd) - MagWindow *w; - TxCommand *cmd; +windClientButtons( + MagWindow *w, + TxCommand *cmd) { /* * Is this an initial 'down push' in a non-iconic window? If so, we @@ -599,11 +598,11 @@ windClientButtons(w, cmd) */ bool -WindButtonInFrame(w, x, y, b) - MagWindow *w; - int x; - int y; - int b; +WindButtonInFrame( + MagWindow *w, + int x, + int y, + int b) { TxCommand cmd; cmd.tx_p.p_x = x; @@ -638,9 +637,9 @@ WindButtonInFrame(w, x, y, b) */ void -windCmdInterp(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCmdInterp( + MagWindow *w, + TxCommand *cmd) { int cmdNum; diff --git a/windows/windCmdAM.c b/windows/windCmdAM.c index 88eef6eda..50a6da97d 100644 --- a/windows/windCmdAM.c +++ b/windows/windCmdAM.c @@ -54,7 +54,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include "cif/cif.h" /* Forward declarations */ -void windDoMacro(); +void windDoMacro(MagWindow *w, TxCommand *cmd, bool interactive); /* * ---------------------------------------------------------------------------- @@ -78,9 +78,9 @@ void windDoMacro(); */ void -windBorderCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windBorderCmd( + MagWindow *w, + TxCommand *cmd) { int place; bool value; @@ -148,9 +148,9 @@ windBorderCmd(w, cmd) */ void -windCaptionCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCaptionCmd( + MagWindow *w, + TxCommand *cmd) { int place; Rect ts; @@ -218,9 +218,9 @@ windCaptionCmd(w, cmd) */ void -windCenterCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCenterCmd( + MagWindow *w, + TxCommand *cmd) { Point rootPoint; Rect newArea, oldArea; @@ -318,9 +318,9 @@ windCenterCmd(w, cmd) */ void -windCloseCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCloseCmd( + MagWindow *w, + TxCommand *cmd) { if ((cmd->tx_argc == 2) && GrWindowNamePtr) { @@ -372,9 +372,9 @@ windCloseCmd(w, cmd) */ void -windBypassCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windBypassCmd( + MagWindow *w, + TxCommand *cmd) { int saveCount; @@ -410,9 +410,9 @@ windBypassCmd(w, cmd) */ void -windCrashCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCrashCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) { @@ -457,9 +457,9 @@ windCrashCmd(w, cmd) #define CURSOR_SCREEN 6 void -windCursorCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windCursorCmd( + MagWindow *w, + TxCommand *cmd) { Point p_in, p_out; int resulttype, saveunits, idx; @@ -588,9 +588,9 @@ windCursorCmd(w, cmd) */ void -windDebugCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windDebugCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) goto usage; windPrintCommands = !windPrintCommands; @@ -617,9 +617,9 @@ windDebugCmd(w, cmd) */ void -windDumpCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windDumpCmd( + MagWindow *w, + TxCommand *cmd) { (void) windDump(); } @@ -643,9 +643,9 @@ windDumpCmd(w, cmd) */ void -windEchoCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windEchoCmd( + MagWindow *w, + TxCommand *cmd) { int i; bool newline = TRUE; @@ -686,9 +686,9 @@ windEchoCmd(w, cmd) /*ARGSUSED*/ void -windFilesCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windFilesCmd( + MagWindow *w, + TxCommand *cmd) { #define NUM_FD 20 /* max number of open files per process */ int fd; @@ -740,9 +740,9 @@ windFilesCmd(w, cmd) */ void -windGrowCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windGrowCmd( + MagWindow *w, + TxCommand *cmd) { if (w == NULL) { @@ -769,9 +769,9 @@ windGrowCmd(w, cmd) */ void -windGrstatsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windGrstatsCmd( + MagWindow *w, + TxCommand *cmd) { char *RunStats(), *rstatp; static struct tms tlast, tdelta; @@ -875,9 +875,9 @@ windGrstatsCmd(w, cmd) */ void -windHelpCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windHelpCmd( + MagWindow *w, + TxCommand *cmd) { ASSERT(FALSE, windHelpCmd); } @@ -914,9 +914,9 @@ windHelpCmd(w, cmd) #define LOG_CMD_RESUME 4 // Resume command logging. void -windLogCommandsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windLogCommandsCmd( + MagWindow *w, + TxCommand *cmd) { char *fileName = NULL; unsigned char flags = 0; @@ -994,9 +994,9 @@ windLogCommandsCmd(w, cmd) */ void -windIntMacroCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windIntMacroCmd( + MagWindow *w, + TxCommand *cmd) { windDoMacro(w, cmd, TRUE); } @@ -1018,9 +1018,9 @@ windIntMacroCmd(w, cmd) */ void -windMacroCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windMacroCmd( + MagWindow *w, + TxCommand *cmd) { windDoMacro(w, cmd, FALSE); } @@ -1042,10 +1042,10 @@ windMacroCmd(w, cmd) */ void -windDoMacro(w, cmd, interactive) - MagWindow *w; - TxCommand *cmd; - bool interactive; +windDoMacro( + MagWindow *w, + TxCommand *cmd, + bool interactive) { char *cp, *cn; char nulltext[] = ""; diff --git a/windows/windCmdNR.c b/windows/windCmdNR.c index 3237a54c7..425c43177 100644 --- a/windows/windCmdNR.c +++ b/windows/windCmdNR.c @@ -64,9 +64,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -windOpenCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windOpenCmd( + MagWindow *w, + TxCommand *cmd) { Rect area; Point frame; @@ -111,9 +111,9 @@ windOpenCmd(w, cmd) */ void -windOverCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windOverCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) { @@ -148,9 +148,9 @@ windOverCmd(w, cmd) */ void -windPauseCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windPauseCmd( + MagWindow *w, + TxCommand *cmd) { int i; static char ssline[TX_MAX_CMDLEN]; @@ -200,9 +200,9 @@ const char * const actTable[] = */ void -windPushbuttonCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windPushbuttonCmd( + MagWindow *w, + TxCommand *cmd) { int but, act; static TxCommand txcmd; @@ -259,9 +259,9 @@ windPushbuttonCmd(w, cmd) */ void -windQuitCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windQuitCmd( + MagWindow *w, + TxCommand *cmd) { clientRec *cr; bool checkfirst = TRUE; @@ -332,9 +332,9 @@ windQuitCmd(w, cmd) */ void -windRedoCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windRedoCmd( + MagWindow *w, + TxCommand *cmd) { int count; @@ -406,9 +406,9 @@ windRedoCmd(w, cmd) */ void -windRedrawCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windRedrawCmd( + MagWindow *w, + TxCommand *cmd) { WindAreaChanged((MagWindow *) NULL, (Rect *) NULL); } @@ -432,9 +432,9 @@ windRedrawCmd(w, cmd) */ void -windResetCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windResetCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) { diff --git a/windows/windCmdSZ.c b/windows/windCmdSZ.c index 63bd3e6eb..5915f258a 100644 --- a/windows/windCmdSZ.c +++ b/windows/windCmdSZ.c @@ -72,9 +72,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ */ void -windScrollCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windScrollCmd( + MagWindow *w, + TxCommand *cmd) { Rect r; int xsize, ysize; @@ -211,9 +211,9 @@ windScrollCmd(w, cmd) */ void -windSetpointCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windSetpointCmd( + MagWindow *w, + TxCommand *cmd) { int wid; Point rootPoint; @@ -292,9 +292,9 @@ windSetpointCmd(w, cmd) } int -windSetPrintProc(name, val) - char *name; - char *val; +windSetPrintProc( + char *name, + char *val) { TxPrintf("%s = \"%s\"\n", name, val); return 0; @@ -316,9 +316,9 @@ windSetPrintProc(name, val) */ void -windSleepCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windSleepCmd( + MagWindow *w, + TxCommand *cmd) { int time; @@ -360,9 +360,9 @@ windSleepCmd(w, cmd) */ void -windSourceCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windSourceCmd( + MagWindow *w, + TxCommand *cmd) { FILE *f; @@ -401,9 +401,9 @@ windSourceCmd(w, cmd) */ void -windSpecialOpenCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windSpecialOpenCmd( + MagWindow *w, + TxCommand *cmd) { WindClient wc; Rect area; @@ -478,9 +478,9 @@ windSpecialOpenCmd(w, cmd) */ void -windNamesCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windNamesCmd( + MagWindow *w, + TxCommand *cmd) { bool doforall = FALSE; WindClient wc = (WindClient)NULL; @@ -591,9 +591,9 @@ windNamesCmd(w, cmd) */ void -windUnderCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windUnderCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) { @@ -631,9 +631,9 @@ windUnderCmd(w, cmd) */ void -windUndoCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windUndoCmd( + MagWindow *w, + TxCommand *cmd) { int count; @@ -713,9 +713,9 @@ windUndoCmd(w, cmd) */ void -windUpdateCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windUpdateCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc == 1) WindUpdate(); @@ -759,9 +759,9 @@ windUpdateCmd(w, cmd) */ void -windVersionCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windVersionCmd( + MagWindow *w, + TxCommand *cmd) { if (cmd->tx_argc != 1) { TxError("Usage: %s\n", cmd->tx_argv[0]); @@ -795,9 +795,9 @@ windVersionCmd(w, cmd) */ void -windViewCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windViewCmd( + MagWindow *w, + TxCommand *cmd) { if (w == NULL) return; @@ -937,9 +937,9 @@ windViewCmd(w, cmd) */ void -windXviewCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windXviewCmd( + MagWindow *w, + TxCommand *cmd) { CellUse *celluse; int ViewUnexpandFunc(); @@ -967,9 +967,9 @@ windXviewCmd(w, cmd) */ int -ViewUnexpandFunc(use, windowMask) - CellUse *use; /* Use that was just unexpanded. */ - int windowMask; /* Window where it was unexpanded. */ +ViewUnexpandFunc( + 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, @@ -998,9 +998,9 @@ ViewUnexpandFunc(use, windowMask) */ void -windScrollBarsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windScrollBarsCmd( + MagWindow *w, + TxCommand *cmd) { int place; static const char * const onoff[] = {"on", "off", 0}; @@ -1052,9 +1052,9 @@ windScrollBarsCmd(w, cmd) */ void -windSendCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windSendCmd( + MagWindow *w, + TxCommand *cmd) { MagWindow *toWindow; WindClient client; @@ -1090,9 +1090,9 @@ windSendCmd(w, cmd) } int -windSendCmdFunc(w, cd) - MagWindow *w; - ClientData cd; +windSendCmdFunc( + MagWindow *w, + ClientData cd) { *((MagWindow **) cd) = w; return 1; @@ -1129,9 +1129,9 @@ typedef struct _cdwpos { */ void -windPositionsCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windPositionsCmd( + MagWindow *w, + TxCommand *cmd) { extern int windPositionsFunc(); char *filename = NULL; @@ -1174,9 +1174,9 @@ windPositionsCmd(w, cmd) } int -windPositionsFunc(w, cdata) - MagWindow *w; - ClientData cdata; +windPositionsFunc( + MagWindow *w, + ClientData cdata) { cdwpos *windpos = (cdwpos *)cdata; Rect r; @@ -1236,9 +1236,9 @@ windPositionsFunc(w, cdata) */ void -windZoomCmd(w, cmd) - MagWindow *w; - TxCommand *cmd; +windZoomCmd( + MagWindow *w, + TxCommand *cmd) { float factor; diff --git a/windows/windDebug.c b/windows/windDebug.c index bceac628e..d249364c5 100644 --- a/windows/windDebug.c +++ b/windows/windDebug.c @@ -48,8 +48,8 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$"; */ void -windPrintWindow(w) - MagWindow *w; +windPrintWindow( + MagWindow *w) { LinkedRect *lr; @@ -136,8 +136,8 @@ windDump() */ void -windPrintCommand(cmd) - TxCommand *cmd; +windPrintCommand( + TxCommand *cmd) { if (cmd->tx_button == TX_NO_BUTTON) { diff --git a/windows/windDisp.c b/windows/windDisp.c index 02f38de74..dc21c28e7 100644 --- a/windows/windDisp.c +++ b/windows/windDisp.c @@ -78,7 +78,9 @@ bool windSomeSeparateRedisplay = FALSE; */ int -windCheckOnlyWindow(MagWindow **w, WindClient client) +windCheckOnlyWindow( + MagWindow **w, + WindClient client) { MagWindow *sw, *tw; int wct = 0; @@ -116,8 +118,8 @@ windCheckOnlyWindow(MagWindow **w, WindClient client) */ void -windFreeList(llr) - LinkedRect **llr; /* A pointer to a list of linked rectangles */ +windFreeList( + LinkedRect **llr) /* A pointer to a list of linked rectangles */ { LinkedRect *lr, *freelr; @@ -211,8 +213,8 @@ windReClip() */ void -WindSeparateRedisplay(w) - MagWindow *w; +WindSeparateRedisplay( + MagWindow *w) { windSomeSeparateRedisplay = TRUE; if (w->w_redrawAreas != (ClientData)NULL) return; @@ -235,8 +237,8 @@ WindSeparateRedisplay(w) */ void -WindIconChanged(w) - MagWindow *w; +WindIconChanged( + MagWindow *w) { ASSERT(w != NULL, "WindIconChanged"); w->w_flags |= WIND_REDRAWICON; @@ -264,9 +266,9 @@ WindIconChanged(w) */ void -WindAreaChanged(w, area) - MagWindow *w; /* The window that changed. */ - Rect *area; /* The area in screen coordinates. +WindAreaChanged( + MagWindow *w, /* The window that changed. */ + Rect *area) /* The area in screen coordinates. * NULL means the whole screen. Caller * should clip this rectangle to the area * of the window. @@ -346,9 +348,9 @@ WindAreaChanged(w, area) } bool -windChangedFunc(area, next) - Rect *area; /* Area that is still unobscured. */ - LinkedRect *next; /* Next obscuring area. */ +windChangedFunc( + Rect *area, /* Area that is still unobscured. */ + LinkedRect *next) /* Next obscuring area. */ { /* If we're at the end of obscuring areas, paint an error * tile to mark what's to be redisplayed. Otherwise, @@ -383,29 +385,29 @@ windChangedFunc(area, next) */ void -windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) - MagWindow *w; /* The window under consideration. */ +windBarLocations( + MagWindow *w, /* The window under consideration. */ /* The following are rectangles that will be filled * in by this procedure. The values will be in the * same coordinate sytem as w->w_allArea. */ - Rect *leftBar; /* The location of the left scrollbar area (not the + Rect *leftBar, /* The location of the left scrollbar area (not the * bar itself). */ - Rect *botBar; /* The location of the bottom scrollbar area. */ - Rect *up; /* The location of the 'up arrow' icon above the + Rect *botBar, /* The location of the bottom scrollbar area. */ + Rect *up, /* The location of the 'up arrow' icon above the * left scroll bar. */ - Rect *down; /* The location of the 'down arrow' icon below the + Rect *down, /* The location of the 'down arrow' icon below the * left scroll bar. */ - Rect *right; /* The location of the 'right arrow' icon to the right + Rect *right, /* The location of the 'right arrow' icon to the right * of the bottom scroll bar. */ - Rect *left; /* The location of the 'left arrow' icon to the left of + Rect *left, /* The location of the 'left arrow' icon to the left of * the bottom scroll bar. */ - Rect *zoom; /* The location of the 'zoom' icon in the lower-left + Rect *zoom) /* The location of the 'zoom' icon in the lower-left * corner of the window. */ { @@ -462,9 +464,9 @@ windBarLocations(w, leftBar, botBar, up, down, right, left, zoom) */ void -WindDrawBorder(w, clip) - MagWindow *w; - Rect *clip; +WindDrawBorder( + MagWindow *w, + Rect *clip) { Rect r; Rect leftBar, botBar, up, down, left, right, zoom; @@ -633,9 +635,9 @@ WindDrawBorder(w, clip) */ void -WindCaption(w, caption) - MagWindow *w; - char *caption; /* The string that is to be copied into the caption. +WindCaption( + MagWindow *w, + char *caption) /* The string that is to be copied into the caption. * (The string is copied, not just pointed at.) */ { @@ -666,8 +668,8 @@ WindCaption(w, caption) */ void -windNewView(w) - MagWindow *w; +windNewView( + MagWindow *w) { Rect leftBar, botBar, up, down, right, left, zoom; @@ -696,8 +698,8 @@ windNewView(w) */ void -WindRedisplay(w) - MagWindow *w; +WindRedisplay( + MagWindow *w) { WindAreaChanged(w, &(w->w_allArea)); } @@ -717,8 +719,8 @@ WindRedisplay(w) */ void -windRedrawIcon(w) - MagWindow *w; +windRedrawIcon( + MagWindow *w) { Point p; clientRec *cl; @@ -900,10 +902,10 @@ WindUpdate() */ int -windUpdateFunc(tile, dinfo, w) - Tile *tile; /* Tile in the redisplay plane. */ - TileType dinfo; /* Split tile information (unused) */ - MagWindow *w; /* Window we're currently interested in. */ +windUpdateFunc( + Tile *tile, /* Tile in the redisplay plane. */ + TileType dinfo, /* Split tile information (unused) */ + MagWindow *w) /* Window we're currently interested in. */ { Rect area; @@ -968,10 +970,10 @@ windUpdateFunc(tile, dinfo, w) /* ARGSUSED */ int -windBackgroundFunc(tile, dinfo, notUsed) - Tile *tile; - TileType dinfo; /* (unused) */ - ClientData notUsed; /* (unused) */ +windBackgroundFunc( + Tile *tile, + TileType dinfo, /* (unused) */ + ClientData notUsed) /* (unused) */ { Rect area; diff --git a/windows/windInt.h b/windows/windInt.h index 49e2f6268..6799310af 100644 --- a/windows/windInt.h +++ b/windows/windInt.h @@ -59,7 +59,7 @@ extern MagWindow *windSearchPoint(); /* C99 compat */ extern void windScreenToFrame(); -extern void WindPrintClientList(); +extern void WindPrintClientList(bool wizard); /* ----------------- constants ----------------- */ diff --git a/windows/windMain.c b/windows/windMain.c index 018123b6d..78bd7086f 100644 --- a/windows/windMain.c +++ b/windows/windMain.c @@ -221,21 +221,20 @@ WindInit() */ WindClient -WindAddClient(clientName, create, delete, redisplay, command, update, - exitproc, reposition, icon) - char *clientName; /* A textual name for the client. This +WindAddClient( + char *clientName, /* A textual name for the client. This * name will be visable in the user * interface as the name to use to switch * a window over to a new client */ - bool (*create)(); - bool (*delete)(); - void (*redisplay)(); - void (*command)(); - void (*update)(); - bool (*exitproc)(); - void (*reposition)(); - GrGlyph *icon; /* An icon to draw when the window is closed. + bool (*create)(), + bool (*delete)(), + void (*redisplay)(), + void (*command)(), + void (*update)(), + bool (*exitproc)(), + void (*reposition)(), + GrGlyph *icon) /* An icon to draw when the window is closed. * (currently for Sun Windows only). */ { @@ -288,9 +287,9 @@ WindAddClient(clientName, create, delete, redisplay, command, update, */ WindClient -WindGetClient(clientName, exact) - char *clientName; /* the textual name of the client */ - bool exact; /* must the name be exact, or are abbreviations allowed */ +WindGetClient( + char *clientName, /* the textual name of the client */ + bool exact) /* must the name be exact, or are abbreviations allowed */ { clientRec *cr, *found; int length; @@ -339,8 +338,8 @@ WindGetClient(clientName, exact) */ char * -WindGetClientName(client) - WindClient client; +WindGetClientName( + WindClient client) { clientRec *clientrec = (clientRec *)client; if (client == (WindClient)NULL) return NULL; @@ -366,8 +365,8 @@ WindGetClientName(client) */ WindClient -WindNextClient(client) - WindClient client; +WindNextClient( + WindClient client) { clientRec *cr = (clientRec *)client; int length; @@ -393,8 +392,8 @@ WindNextClient(client) */ void -WindPrintClientList(wizard) - bool wizard; /* If true print the names of ALL clients, even those +WindPrintClientList( + bool wizard) /* If true print the names of ALL clients, even those * that don't have user-visable windows */ { clientRec *cr; @@ -424,10 +423,10 @@ WindPrintClientList(wizard) */ int -WindExecute(w, rc, cmd) - MagWindow *w; - WindClient rc; - TxCommand *cmd; +WindExecute( + MagWindow *w, + WindClient rc, + TxCommand *cmd) { int cmdNum; clientRec *client = (clientRec *) rc; @@ -469,11 +468,11 @@ WindExecute(w, rc, cmd) */ void -WindAddCommand(rc, text, func, dynamic) - WindClient rc; - char *text; - void (*func)(); - bool dynamic; +WindAddCommand( + WindClient rc, + char *text, + void (*func)(), + bool dynamic) { int cidx, numCommands = 0; clientRec *client = (clientRec *) rc; @@ -552,10 +551,10 @@ WindAddCommand(rc, text, func, dynamic) */ int -WindReplaceCommand(rc, command, newfunc) - WindClient rc; - char *command; - void (*newfunc)(); +WindReplaceCommand( + WindClient rc, + char *command, + void (*newfunc)()) { int cidx, clen; clientRec *client = (clientRec *) rc; @@ -595,8 +594,8 @@ WindReplaceCommand(rc, command, newfunc) */ const char * const * -WindGetCommandTable(rc) - WindClient rc; +WindGetCommandTable( + WindClient rc) { clientRec *client = (clientRec *) rc; return client->w_commandTable; diff --git a/windows/windMove.c b/windows/windMove.c index 991fa5f5d..17f935afe 100644 --- a/windows/windMove.c +++ b/windows/windMove.c @@ -75,8 +75,8 @@ int windCurNumWindows = 0; */ void -windUnlink(w) - MagWindow *w; +windUnlink( + MagWindow *w) { ASSERT(w != (MagWindow *) NULL, "windUnlink"); ASSERT(windTopWindow != (MagWindow *) NULL, "windUnlink"); @@ -127,8 +127,8 @@ windUnlink(w) */ void -windFree(w) - MagWindow *w; +windFree( + MagWindow *w) { windWindowMask &= ~(1 << w->w_wid); windCurNumWindows--; @@ -158,8 +158,8 @@ windFree(w) */ void -WindSetWindowAreas(w) - MagWindow *w; +WindSetWindowAreas( + MagWindow *w) { switch ( WindPackageType ) { @@ -193,8 +193,8 @@ WindSetWindowAreas(w) */ void -windSetWindowPosition(w) - MagWindow *w; +windSetWindowPosition( + MagWindow *w) { } @@ -214,8 +214,8 @@ windSetWindowPosition(w) */ bool -WindDelete(w) - MagWindow *w; +WindDelete( + MagWindow *w) { clientRec *cr; @@ -253,16 +253,16 @@ WindDelete(w) */ MagWindow * -WindCreate(client, frameArea, isHint, argc, argv) - WindClient client; /* The client that will control this window */ - Rect *frameArea; /* The area that the window is to occupy */ - bool isHint; /* TRUE if the above rectangle is only a +WindCreate( + WindClient client, /* The client that will control this window */ + Rect *frameArea, /* The area that the window is to occupy */ + bool isHint, /* TRUE if the above rectangle is only a * hint and it is OK for a window package to * override it to maintain a consistent * user interface. */ - int argc; /* Passed to the client */ - char *argv[]; + int argc, /* Passed to the client */ + char *argv[]) { MagWindow *w; clientRec *cr; @@ -386,12 +386,12 @@ WindCreate(client, frameArea, isHint, argc, argv) */ void -WindOutToIn(w, out, in) - MagWindow *w; /* Window under consideration */ - Rect *out; /* Pointer to rectangle of outside area of +WindOutToIn( + MagWindow *w, /* Window under consideration */ + Rect *out, /* Pointer to rectangle of outside area of * a window. */ - Rect *in; /* Pointer to rectangle to be filled in with + Rect *in) /* Pointer to rectangle to be filled in with * inside area corresponding to out. */ { @@ -435,8 +435,8 @@ void WindInToOut(w, in, out) */ void -WindUnder(w) - MagWindow *w; /* the window to be moved */ +WindUnder( + MagWindow *w) /* the window to be moved */ { Rect area; MagWindow *w2; @@ -492,8 +492,8 @@ WindUnder(w) */ void -WindOver(w) - MagWindow *w; /* the window to be moved */ +WindOver( + MagWindow *w) /* the window to be moved */ { LinkedRect *r; Rect area; @@ -557,9 +557,9 @@ WindOver(w) */ bool -windFindUnobscured(area, okArea) - Rect *area; /* Area that may be obscured. */ - Rect *okArea; /* Modified to contain one of the +windFindUnobscured( + Rect *area, /* Area that may be obscured. */ + Rect *okArea) /* Modified to contain one of the * unobscured areas. */ { @@ -593,14 +593,14 @@ windFindUnobscured(area, okArea) */ void -WindReframe(w, r, inside, move) - MagWindow *w; /* the window to be reframed */ - Rect *r; /* the new location in screen coordinates */ - bool inside; /* TRUE if the rectangle is the screen location of +WindReframe( + MagWindow *w, /* the window to be reframed */ + Rect *r, /* the new location in screen coordinates */ + bool inside, /* TRUE if the rectangle is the screen location of * the inside of the window, FALSE if the above * rectangle includes border areas. */ - bool move; /* Move the coordinate system of the window the same + bool move) /* Move the coordinate system of the window the same * amount as the lower left corner of the window? */ { @@ -721,10 +721,9 @@ WindReframe(w, r, inside, move) } bool -windReframeFunc(area, w) - Rect *area; /* Area to redisplay. */ - MagWindow *w; /* Window in which to redisplay. */ - +windReframeFunc( + Rect *area, /* Area to redisplay. */ + MagWindow *w) /* Window in which to redisplay. */ { WindAreaChanged(w, area); return FALSE; @@ -749,8 +748,8 @@ windReframeFunc(area, w) */ void -WindFullScreen(w) - MagWindow *w; /* Window to be blown up or shrunk back. */ +WindFullScreen( + MagWindow *w) /* Window to be blown up or shrunk back. */ { int i; MagWindow *w2; diff --git a/windows/windSearch.c b/windows/windSearch.c index c35be39f9..59e5db45c 100644 --- a/windows/windSearch.c +++ b/windows/windSearch.c @@ -51,9 +51,9 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$"; */ MagWindow * -windSearchPoint(p, inside) - Point *p; /* A point in screen coordinates */ - bool *inside; /* A pointer to a boolean variable that is set to +windSearchPoint( + Point *p, /* A point in screen coordinates */ + bool *inside) /* A pointer to a boolean variable that is set to * TRUE if the point is in the interior of the window, * and FALSE if it is in the border. If this pointer * is NULL then 'inside' is not filled in. @@ -92,8 +92,8 @@ windSearchPoint(p, inside) */ MagWindow * -WindSearchWid(wid) - int wid; +WindSearchWid( + int wid) { MagWindow *w; for(w = windTopWindow; w != (MagWindow *) NULL; w = w->w_nextWindow) { @@ -119,8 +119,8 @@ WindSearchWid(wid) */ MagWindow * -WindSearchData(grdata) - ClientData grdata; +WindSearchData( + ClientData grdata) { MagWindow *w; for(w = windTopWindow; w != (MagWindow *) NULL; w = w->w_nextWindow) { @@ -158,22 +158,22 @@ WindSearchData(grdata) */ int -WindSearch(client, surfaceID, surfaceArea, func, clientData) - WindClient client; /* Search for the windows that belong to +WindSearch( + WindClient client, /* Search for the windows that belong to * this client. NULL means all clients. */ - ClientData surfaceID; /* The unique ID of the surface that we + ClientData surfaceID, /* The unique ID of the surface that we * are looking for. If NULL then look for * any surface. */ - Rect *surfaceArea; /* The area that we are looking for in surface + Rect *surfaceArea, /* The area that we are looking for in surface * coordinates. If NULL then match without * regard to the area in the window. */ - int (*func)(); /* The function to call with each window + int (*func)(), /* The function to call with each window * that matches. */ - ClientData clientData; /* The client data to be passed to the caller's + ClientData clientData) /* The client data to be passed to the caller's * function. */ { diff --git a/windows/windSend.c b/windows/windSend.c index 6bb4470fc..be9428f84 100644 --- a/windows/windSend.c +++ b/windows/windSend.c @@ -83,10 +83,10 @@ extern void windHelp(); */ int -WindSendCommand(w, cmd, quiet) - MagWindow *w; - TxCommand *cmd; /* A pointer to a command */ - bool quiet; /* Don't print error/warning messages if this is set */ +WindSendCommand( + MagWindow *w, + TxCommand *cmd, /* A pointer to a command */ + bool quiet) /* Don't print error/warning messages if this is set */ { int windCmdNum, clientCmdNum; clientRec *rc; @@ -351,8 +351,8 @@ WindSendCommand(w, cmd, quiet) */ void -WindGrabInput(client) - WindClient client; +WindGrabInput( + WindClient client) { ASSERT( client != NULL, "WindGrabInput"); StackPush( (ClientData) windGrabber, windGrabberStack); @@ -376,8 +376,8 @@ WindGrabInput(client) */ void -WindReleaseInput(client) - WindClient client; +WindReleaseInput( + WindClient client) { ASSERT( client == windGrabber, "WindReleaseInput"); windGrabber = (WindClient) StackPop(windGrabberStack); @@ -399,12 +399,12 @@ WindReleaseInput(client) */ void -windHelp(cmd, name, table) - TxCommand *cmd; /* Information about command options. */ - char *name; /* Name of client for whom help is being +windHelp( + TxCommand *cmd, /* Information about command options. */ + char *name, /* Name of client for whom help is being * printed. */ - char *table[]; /* Client's command table. */ + char *table[]) /* Client's command table. */ { static char *capName = NULL; static char patString[200], *pattern; diff --git a/windows/windTrans.c b/windows/windTrans.c index ac3679d91..359bb3266 100644 --- a/windows/windTrans.c +++ b/windows/windTrans.c @@ -45,12 +45,12 @@ static char rcsid[] __attribute__ ((unused)) = "$Header$"; */ void -WindScreenToSurface(w, screen, surface) - MagWindow *w; /* Window in whose coordinates screen is +WindScreenToSurface( + MagWindow *w, /* Window in whose coordinates screen is * is defined. */ - Rect *screen; /* A rectangle in screen coordinates */ - Rect *surface; /* A pointer to a rectangle to be filled + Rect *screen, /* A rectangle in screen coordinates */ + Rect *surface) /* A pointer to a rectangle to be filled * in with a rectangle in surface coords that * is big enough to contain everything * displayed within the screen rectangle. @@ -87,15 +87,15 @@ WindScreenToSurface(w, screen, surface) */ void -WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox) - MagWindow *w; /* Window in whose coordinate system the +WindPointToSurface( + MagWindow *w, /* Window in whose coordinate system the * transformation is to be done. */ - Point *screenPoint; /* The point in screen coordinates. */ - Point *surfacePoint;/* Filled in with the nearest surface coordinate. + Point *screenPoint, /* The point in screen coordinates. */ + Point *surfacePoint, /* Filled in with the nearest surface coordinate. * Nothing is filled in if the pointer is NULL. */ - Rect *surfaceBox; /* Filled in with a box in surface coordinates that + Rect *surfaceBox) /* Filled in with a box in surface coordinates that * surrounds the point. It is not filled in if this * is a NULL pointer. */ @@ -175,12 +175,12 @@ WindPointToSurface(w, screenPoint, surfacePoint, surfaceBox) */ void -WindSurfaceToScreen(w, surface, screen) - MagWindow *w; /* Window in whose coordinate system the +WindSurfaceToScreen( + MagWindow *w, /* Window in whose coordinate system the * transform is to be done. */ - Rect *surface; /* Rectangle in surface coordinates of w. */ - Rect *screen; /* Rectangle filled in with screen coordinates + Rect *surface, /* Rectangle in surface coordinates of w. */ + Rect *screen) /* Rectangle filled in with screen coordinates * (in w) of surface. */ { @@ -265,10 +265,10 @@ WindSurfaceToScreen(w, surface, screen) */ void -WindSurfaceToScreenNoClip(w, surface, screen) - MagWindow *w; - Rect *surface; - Rect *screen; +WindSurfaceToScreenNoClip( + MagWindow *w, + Rect *surface, + Rect *screen) { dlong tmp, dval; @@ -306,12 +306,12 @@ WindSurfaceToScreenNoClip(w, surface, screen) */ void -WindPointToScreen(w, surface, screen) - MagWindow *w; /* Window in whose coordinate system the +WindPointToScreen( + MagWindow *w, /* Window in whose coordinate system the * transform is to be done. */ - Point *surface; /* Point in surface coordinates of w. */ - Point *screen; /* Point filled in with screen coordinates + Point *surface, /* Point in surface coordinates of w. */ + Point *screen) /* Point filled in with screen coordinates * (in w) of surface. */ { @@ -352,12 +352,12 @@ WindPointToScreen(w, surface, screen) */ void -windScreenToFrame(w, screen, frame) - MagWindow *w; /* Window in whose coordinate system the +windScreenToFrame( + MagWindow *w, /* Window in whose coordinate system the * transform is to be done. */ - Point *screen; /* Point in screen coordinates of w. */ - Point *frame; /* Point filled in with frame coordinates. + Point *screen, /* Point in screen coordinates of w. */ + Point *frame) /* Point filled in with frame coordinates. */ { switch ( WindPackageType ) diff --git a/windows/windView.c b/windows/windView.c index fb201dd55..4064e702f 100644 --- a/windows/windView.c +++ b/windows/windView.c @@ -62,8 +62,8 @@ extern void windNewView(); */ void -windFixSurfaceArea(w) - MagWindow *w; /* Window to fix up. */ +windFixSurfaceArea( + MagWindow *w) /* Window to fix up. */ { Rect newArea, tmp; @@ -92,8 +92,8 @@ windFixSurfaceArea(w) */ void -WindUnload(surfaceID) - ClientData surfaceID; /* A unique ID for this surface */ +WindUnload( + ClientData surfaceID) /* A unique ID for this surface */ { MagWindow *mw; @@ -120,11 +120,11 @@ WindUnload(surfaceID) */ bool -WindLoad(w, client, surfaceID, surfaceArea) - MagWindow *w; - WindClient client; /* The unique identifier of the client */ - ClientData surfaceID; /* A unique ID for this surface */ - Rect *surfaceArea; /* The area that should appear in the window */ +WindLoad( + MagWindow *w, + WindClient client, /* The unique identifier of the client */ + ClientData surfaceID, /* A unique ID for this surface */ + Rect *surfaceArea) /* The area that should appear in the window */ { if (client != w->w_client) return FALSE; @@ -151,9 +151,9 @@ WindLoad(w, client, surfaceID, surfaceArea) */ void -WindMove(w, surfaceArea) - MagWindow *w; /* the window to be panned */ - Rect *surfaceArea; /* The area to be viewed */ +WindMove( + MagWindow *w, /* the window to be panned */ + Rect *surfaceArea) /* The area to be viewed */ { int size, xscale, yscale; int halfSizePixels, halfSizeUnits; @@ -232,9 +232,9 @@ WindMove(w, surfaceArea) */ void -WindZoom(w, factor) - MagWindow *w; /* the window to be zoomed */ - float factor; /* The amount to zoom by (1 is no change), +WindZoom( + MagWindow *w, /* the window to be zoomed */ + float factor) /* The amount to zoom by (1 is no change), * greater than 1 is a larger magnification * (zoom in), and less than 1 is less mag. * (zoom out) ) @@ -274,8 +274,9 @@ WindZoom(w, factor) */ void -WindScale(scalen, scaled) - int scalen, scaled; +WindScale( + int scalen, + int scaled) { MagWindow *w2; Rect newArea; @@ -313,8 +314,9 @@ WindScale(scalen, scaled) */ void -WindTranslate(origx, origy) - int origx, origy; +WindTranslate( + int origx, + int origy) { extern bool DBMovePoint(); MagWindow *w2; @@ -355,8 +357,8 @@ WindTranslate(origx, origy) /* ARGSUSED */ void -WindView(w) - MagWindow *w; +WindView( + MagWindow *w) { Rect bbox; #define SLOP 10 /* Amount of border (in fraction of a screenfull) @@ -399,15 +401,15 @@ WindView(w) */ void -WindScroll(w, surfaceOffset, screenOffset) - MagWindow *w; - Point *surfaceOffset; /* An offset in surface coordinates. The +WindScroll( + MagWindow *w, + Point *surfaceOffset, /* An offset in surface coordinates. The * screen point that used to display surface * point (0,0) will now display surface point * surfaceOffset. Can be NULL to indicate * no offset. */ - Point *screenOffset; /* An additional offset in screen coordinates. + Point *screenOffset) /* An additional offset in screen coordinates. * Can be NULL to indicate no offset. If * non-NULL, then after scrolling according * to surfaceOffset, the view is adjusted again diff --git a/windows/windows.h b/windows/windows.h index cd1b2c095..e41c91138 100644 --- a/windows/windows.h +++ b/windows/windows.h @@ -26,6 +26,12 @@ #include "utils/magic.h" #include "utils/geometry.h" +/* Forward declarations to avoid circular includes */ +struct GR_GLY2; +typedef struct GR_GLY2 GrGlyph; +struct TxCommand_; +typedef struct TxCommand_ TxCommand; + /* SUBPIXELBITS represents a fixed-point shift for representing the */ /* scale factor between the screen and the layout. It is only */ /* necessary that the screen resolution * SUBPIXEL does not overflow */ @@ -236,8 +242,8 @@ typedef struct WIND_S1 { #define WIND_NO_WINDOW -3 /* Use NULL for the window */ /* utility procs & special stuff */ -extern MagWindow *WindCreate(); -extern WindClient WindGetClient(); +extern MagWindow *WindCreate(WindClient client, Rect *frameArea, bool isHint, int argc, char *argv[]); +extern WindClient WindGetClient(char *clientName, bool exact); extern WindClient WindNextClient(); extern WindClient WindAddClient(); extern char *WindGetClientName(); @@ -246,10 +252,10 @@ extern void WindUpdate(); extern void WindDrawBorder(); extern void WindOutToIn(); extern void WindInToOut(); -extern void WindSetWindowAreas(); +extern void WindSetWindowAreas(MagWindow *w); extern void windFixSurfaceArea(); -extern int WindExecute(); -extern void WindAddCommand(); +extern int WindExecute(MagWindow *w, WindClient rc, TxCommand *cmd); +extern void WindAddCommand(WindClient rc, char *text, void (*func)(), bool dynamic); extern int WindReplaceCommand(); extern const char * const *WindGetCommandTable(); extern int windCheckOnlyWindow(MagWindow **, WindClient); @@ -262,8 +268,8 @@ extern MagWindow *WindSearchData(); /* procs for moving the surface inside of a window (changing the view) */ -extern void WindZoom(); -extern void WindMove(); +extern void WindZoom(MagWindow *w, float factor); +extern void WindMove(MagWindow *w, Rect *surfaceArea); extern void WindView(); extern void WindScroll(); @@ -271,21 +277,21 @@ extern void WindScroll(); /* procs for moving the window itself */ extern void WindOver(); extern void WindUnder(); -extern void WindReframe(); +extern void WindReframe(MagWindow *w, Rect *r, bool inside, bool move); extern void WindFullScreen(); /* procs to transform into and out of screen coordinates */ extern void WindScreenToSurface(); -extern void WindSurfaceToScreen(); -extern void WindPointToSurface(); +extern void WindSurfaceToScreen(MagWindow *w, Rect *surface, Rect *screen); +extern void WindPointToSurface(MagWindow *w, Point *screenPoint, Point *surfacePoint, Rect *surfaceBox); extern void WindPointToScreen(); extern void WindSurfaceToScreenNoClip(); /* procs to change things or inform the window manager about changes */ -extern void WindCaption(); -extern void WindAreaChanged(); +extern void WindCaption(MagWindow *w, char *caption); +extern void WindAreaChanged(MagWindow *w, Rect *area); extern void WindIconChanged(); extern bool WindLoad(); extern void WindSeparateRedisplay(); @@ -302,7 +308,7 @@ extern void WindRedisplay(); extern void windUnlink(); extern void windReClip(); extern void windFree(); -extern int WindSendCommand(); +extern int WindSendCommand(MagWindow *w, TxCommand *cmd, bool quiet); /* interface variables */ extern int WindDefaultFlags; /* Mask of properties applied to new windows */