diff --git a/lef/defRead.c b/lef/defRead.c index 6293faa2..e5ed39f9 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -79,15 +79,15 @@ enum def_netspecial_shape_keys { DEF_SPECNET_SHAPE_DRCFILL}; char * -DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotate) - CellDef *rootDef; /* Cell to paint */ - FILE *f; /* Input file */ - float oscale; /* Scale factor between LEF and magic units */ - bool special; /* True if this section is SPECIALNETS */ - char *netname; /* Name of the net, if net is to be labeled */ - LefRules *ruleset; /* Non-default rule, or NULL */ - LefMapping *defLayerMap; /* magic-to-lef layer mapping array */ - bool annotate; /* If TRUE, do not generate any geometry */ +DefAddRoutes( + CellDef *rootDef, /* Cell to paint */ + FILE *f, /* Input file */ + float oscale, /* Scale factor between LEF and magic units */ + bool special, /* True if this section is SPECIALNETS */ + char *netname, /* Name of the net, if net is to be labeled */ + LefRules *ruleset, /* Non-default rule, or NULL */ + LefMapping *defLayerMap, /* magic-to-lef layer mapping array */ + bool annotate) /* If TRUE, do not generate any geometry */ { char *token; LinkedRect *routeList, *newRoute = NULL, *routeTop = NULL; @@ -784,12 +784,12 @@ enum def_nondefprop_keys { DEF_NONDEFPROP_DONE}; void -DefReadNonDefaultRules(f, rootDef, sname, oscale, total) - FILE *f; - CellDef *rootDef; - char *sname; - float oscale; - int total; +DefReadNonDefaultRules( + FILE *f, + CellDef *rootDef, + const char *sname, + float oscale, + int total) { char *token; int keyword, subkey; @@ -1006,9 +1006,9 @@ DefReadNonDefaultRules(f, rootDef, sname, oscale, total) */ int -defFoundOneFunc(tile, tret) - Tile *tile; - Tile **tret; +defFoundOneFunc( + Tile *tile, + Tile **tret) { *tret = tile; return 1; @@ -1042,15 +1042,15 @@ enum def_netprop_keys { }; void -DefReadNets(f, rootDef, sname, oscale, special, dolabels, annotate, total) - FILE *f; - CellDef *rootDef; - char *sname; - float oscale; - bool special; /* True if this section is SPECIALNETS */ - bool dolabels; /* If true, create a label for each net */ - bool annotate; /* If true, create labels, not geometry */ - int total; +DefReadNets( + FILE *f, + CellDef *rootDef, + const char *sname, + float oscale, + bool special, /* True if this section is SPECIALNETS */ + bool dolabels, /* If true, create a label for each net */ + bool annotate, /* If true, create labels, not geometry */ + int total) { char *token; char *netname = NULL, *prnet; @@ -1296,12 +1296,12 @@ enum def_orient {DEF_NORTH, DEF_SOUTH, DEF_EAST, DEF_WEST, DEF_FLIPPED_WEST}; int -DefReadLocation(use, f, oscale, tptr, noplace) - CellUse *use; - FILE *f; - float oscale; - Transform *tptr; - bool noplace; +DefReadLocation( + CellUse *use, + FILE *f, + float oscale, + Transform *tptr, + bool noplace) { const Rect *r; Rect tr, rect; @@ -1434,13 +1434,13 @@ enum def_pins_prop_keys { DEF_PINS_PROP_PORT, DEF_PINS_PROP_SPECIAL}; void -DefReadPins(f, rootDef, sname, oscale, total, annotate) - FILE *f; - CellDef *rootDef; - char *sname; - float oscale; - int total; - bool annotate; +DefReadPins( + FILE *f, + CellDef *rootDef, + const char *sname, + float oscale, + int total, + bool annotate) { char *token; char pinname[LEF_LINE_MAX]; @@ -1764,12 +1764,12 @@ enum def_block_prop_keys { DEF_BLOCK_PROP_RECT = 0, DEF_BLOCK_PROP_LAYER}; void -DefReadBlockages(f, rootDef, sname, oscale, total) - FILE *f; - CellDef *rootDef; - char *sname; - float oscale; - int total; +DefReadBlockages( + FILE *f, + CellDef *rootDef, + const char *sname, + float oscale, + int total) { char *token; int keyword, subkey, values; @@ -1882,11 +1882,11 @@ enum def_vias_prop_keys { DEF_VIAS_PROP_ROWCOL}; void -DefReadVias(f, sname, oscale, total) - FILE *f; - char *sname; - float oscale; - int total; +DefReadVias( + FILE *f, + const char *sname, + float oscale, + int total) { char *token; char vianame[LEF_LINE_MAX]; @@ -2165,12 +2165,12 @@ enum def_prop_keys { DEF_PROP_EEQMASTER}; void -DefReadComponents(f, rootDef, sname, oscale, total) - FILE *f; - CellDef *rootDef; - char *sname; - float oscale; - int total; +DefReadComponents( + FILE *f, + CellDef *rootDef, + const char *sname, + float oscale, + int total) { CellDef *defMacro; CellUse *defUse; @@ -2384,11 +2384,11 @@ enum def_sections {DEF_VERSION = 0, DEF_NAMESCASESENSITIVE, DEF_NONDEFAULTRULES, DEF_END}; void -DefRead(inName, dolabels, annotate, noblockage) - char *inName; - bool dolabels; - bool annotate; - bool noblockage; +DefRead( + char *inName, + bool dolabels, + bool annotate, + bool noblockage) { CellDef *rootDef; FILE *f; diff --git a/lef/defWrite.c b/lef/defWrite.c index 8ce03169..8624c730 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -101,11 +101,11 @@ char *defGetType(); /* Forward declaration */ */ void -defWriteHeader(def, f, oscale, units) - CellDef *def; /* Def for which to generate DEF output */ - FILE *f; /* Output to this file */ - float oscale; - int units; /* Units for UNITS; could be derived from oscale */ +defWriteHeader( + CellDef *def, /* Def for which to generate DEF output */ + FILE *f, /* Output to this file */ + float oscale, + int units) /* Units for UNITS; could be derived from oscale */ { TileType type; char *propvalue; @@ -192,7 +192,8 @@ defWriteHeader(def, f, oscale, units) */ char * -defTransPos(Transform *t) +defTransPos( + Transform *t) { static char *def_orient[] = { "N", "S", "E", "W", "FN", "FS", "FE", "FW" @@ -242,9 +243,9 @@ defTransPos(Transform *t) */ NetCount -defCountNets(rootDef, allSpecial) - CellDef *rootDef; - bool allSpecial; +defCountNets( + CellDef *rootDef, + bool allSpecial) { NetCount total; int defnodeCount(); @@ -286,11 +287,11 @@ defCountNets(rootDef, allSpecial) /* Callback function used by defCountNets */ int -defnodeCount(node, res, cap, total) - EFNode *node; - int res; /* not used */ - EFCapValue cap; /* not used */ - NetCount *total; +defnodeCount( + EFNode *node, + int res, /* not used */ + EFCapValue cap, /* not used */ + NetCount *total) { HierName *hierName; char ndn[256]; @@ -392,10 +393,10 @@ defnodeCount(node, res, cap, total) */ void -defHNsprintf(str, hierName, divchar) - char *str; - HierName *hierName; - char divchar; +defHNsprintf( + char *str, + HierName *hierName, + char divchar) { bool trimGlob, trimLocal; char *s, *cp, c; @@ -463,8 +464,8 @@ char *defHNsprintfPrefix(hierName, str, divchar) */ char * -nodeDefName(hname) - HierName *hname; +nodeDefName( + HierName *hname) { EFNodeName *nn; HashEntry *he; @@ -503,9 +504,9 @@ nodeDefName(hname) #define MAX_DEF_COLUMNS 70 void -defCheckForBreak(addlen, defdata) - int addlen; - DefData *defdata; +defCheckForBreak( + int addlen, + DefData *defdata) { defdata->outcolumn += addlen; if (defdata->outcolumn > MAX_DEF_COLUMNS) @@ -526,9 +527,9 @@ defCheckForBreak(addlen, defdata) */ void -defWriteRouteWidth(defdata, width) - DefData *defdata; - int width; +defWriteRouteWidth( + DefData *defdata, + int width) { float oscale = defdata->scale; char numstr[32]; @@ -558,10 +559,11 @@ defWriteRouteWidth(defdata, width) */ void -defWriteCoord(defdata, x, y, orient) - DefData *defdata; - float x, y; - unsigned char orient; +defWriteCoord( + DefData *defdata, + float x, + float y, + unsigned char orient) { FILE *f = defdata->f; char numstr[32]; @@ -629,13 +631,13 @@ defWriteCoord(defdata, x, y, orient) */ void -defWriteNets(f, rootDef, oscale, MagicToLefTable, defViaTable, specialmode) - FILE *f; /* File to write to */ - CellDef *rootDef; /* Cell definition to use */ - float oscale; /* Output scale factor */ - LefMapping *MagicToLefTable; /* Magic to LEF layer mapping */ - HashTable *defViaTable; /* Hash table of contact positions */ - unsigned char specialmode; /* What to write as a SPECIALNET */ +defWriteNets( + FILE *f, /* File to write to */ + CellDef *rootDef, /* Cell definition to use */ + float oscale, /* Output scale factor */ + LefMapping *MagicToLefTable, /* Magic to LEF layer mapping */ + HashTable *defViaTable, /* Hash table of contact positions */ + unsigned char specialmode) /* What to write as a SPECIALNET */ { DefData defdata; int defnodeVisit(); @@ -653,11 +655,11 @@ defWriteNets(f, rootDef, oscale, MagicToLefTable, defViaTable, specialmode) } int -defnodeVisit(node, res, cap, defdata) - EFNode *node; - int res; - EFCapValue cap; - DefData *defdata; +defnodeVisit( + EFNode *node, + int res, + EFCapValue cap, + DefData *defdata) { HierName *hierName; char *ndn; @@ -843,9 +845,9 @@ defnodeVisit(node, res, cap, defdata) /* sets the lower bound of the clip line for extending a wire upward */ int -defMaxWireFunc(tile, yclip) - Tile *tile; - int *yclip; +defMaxWireFunc( + Tile *tile, + int *yclip) { if (BOTTOM(tile) < (*yclip)) *yclip = BOTTOM(tile); return 0; @@ -855,9 +857,9 @@ defMaxWireFunc(tile, yclip) /* sets the upper bound of the clip line for extending a wire downward */ int -defMinWireFunc(tile, yclip) - Tile *tile; - int *yclip; +defMinWireFunc( + Tile *tile, + int *yclip) { if (TOP(tile) > (*yclip)) *yclip = TOP(tile); return 0; @@ -872,9 +874,9 @@ defMinWireFunc(tile, yclip) /* function when it is processed. */ int -defExemptWireFunc(tile, rect) - Tile *tile; - Rect *rect; +defExemptWireFunc( + Tile *tile, + Rect *rect) { Rect r; @@ -897,9 +899,9 @@ defExemptWireFunc(tile, rect) /* so we can look for attaching material. */ int -defPortTileFunc(tile, cx) - Tile *tile; - TreeContext *cx; +defPortTileFunc( + Tile *tile, + TreeContext *cx) { SearchContext *scx = cx->tc_scx; Rect *rport = (Rect *)cx->tc_filter->tf_arg; @@ -922,10 +924,10 @@ defPortTileFunc(tile, cx) /* the DEF file. */ int -defNetGeometryFunc(tile, plane, defdata) - Tile *tile; /* Tile being visited */ - int plane; /* Plane of the tile being visited */ - DefData *defdata; /* Data passed to this function */ +defNetGeometryFunc( + Tile *tile, /* Tile being visited */ + int plane, /* Plane of the tile being visited */ + DefData *defdata) /* Data passed to this function */ { FILE *f = defdata->f; CellDef *def = defdata->def; @@ -1647,11 +1649,11 @@ defNetGeometryFunc(tile, plane, defdata) */ int -defCountVias(rootDef, MagicToLefTable, defViaTable, oscale) - CellDef *rootDef; - LefMapping *MagicToLefTable; - HashTable *defViaTable; - float oscale; +defCountVias( + CellDef *rootDef, + LefMapping *MagicToLefTable, + HashTable *defViaTable, + float oscale) { TileTypeBitMask contactMask, *rmask; TileType ttype, stype; @@ -1701,8 +1703,8 @@ defCountVias(rootDef, MagicToLefTable, defViaTable, oscale) /* Simple callback function used by defCountViaFunc */ int -defCheckFunc(tile) - Tile *tile; +defCheckFunc( + Tile *tile) { return 1; } @@ -1710,9 +1712,9 @@ defCheckFunc(tile) /* Callback function used by defCountVias */ int -defCountViaFunc(tile, cviadata) - Tile *tile; - CViaData *cviadata; +defCountViaFunc( + Tile *tile, + CViaData *cviadata) { TileType ttype = TiGetType(tile), ctype, rtype; TileTypeBitMask *rmask, *rmask2; @@ -2021,10 +2023,10 @@ defCountViaFunc(tile, cviadata) */ char * -defGetType(ttype, lefptr, do_vias) - TileType ttype; - lefLayer **lefptr; - bool do_vias; +defGetType( + TileType ttype, + lefLayer **lefptr, + bool do_vias) { HashSearch hs; HashEntry *he; @@ -2079,11 +2081,11 @@ defGetType(ttype, lefptr, do_vias) */ void -defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) - FILE *f; /* File to write to */ - CellDef *rootDef; /* Cell definition to use */ - float oscale; /* Output scale factor */ - LefMapping *lefMagicToLefLayer; +defWriteVias( + FILE *f, /* File to write to */ + CellDef *rootDef, /* Cell definition to use */ + float oscale, /* Output scale factor */ + LefMapping *lefMagicToLefLayer) { HashSearch hs; HashEntry *he; @@ -2258,8 +2260,8 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) */ int -defCountComponents(rootDef) - CellDef *rootDef; +defCountComponents( + CellDef *rootDef) { pointertype total; int defCountCompFunc(); @@ -2274,9 +2276,9 @@ defCountComponents(rootDef) /* Callback function used by defCountComponents */ int -defCountCompFunc(cellUse, total) - CellUse *cellUse; - pointertype *total; +defCountCompFunc( + CellUse *cellUse, + pointertype *total) { /* Ignore any cellUse that does not have an identifier string. */ if (cellUse->cu_id == NULL) return 0; @@ -2309,8 +2311,8 @@ defCountCompFunc(cellUse, total) */ int -defCountPins(rootDef) - CellDef *rootDef; +defCountPins( + CellDef *rootDef) { int total; Label *lab; @@ -2344,11 +2346,11 @@ defCountPins(rootDef) */ void -defWritePins(f, rootDef, lefMagicToLefLayer, oscale) - FILE *f; /* File to write to */ - CellDef *rootDef; /* Cell definition to use */ - LefMapping *lefMagicToLefLayer; /* Magic to LEF layer name mapping */ - float oscale; /* Output scale factor */ +defWritePins( + FILE *f, /* File to write to */ + CellDef *rootDef, /* Cell definition to use */ + LefMapping *lefMagicToLefLayer, /* Magic to LEF layer name mapping */ + float oscale) /* Output scale factor */ { Label *lab; int lwidth, lheight; @@ -2447,11 +2449,11 @@ defWritePins(f, rootDef, lefMagicToLefLayer, oscale) */ void -defWriteBlockages(f, rootDef, oscale, MagicToLefTable) - FILE *f; /* File to write to */ - CellDef *rootDef; /* Cell definition to use */ - float oscale; /* Output scale factor */ - LefMapping *MagicToLefTable; /* Magic to LEF layer mapping */ +defWriteBlockages( + FILE *f, /* File to write to */ + CellDef *rootDef, /* Cell definition to use */ + float oscale, /* Output scale factor */ + LefMapping *MagicToLefTable) /* Magic to LEF layer mapping */ { DefObsData defobsdata; lefLayer *lefl; @@ -2581,11 +2583,11 @@ defWriteBlockages(f, rootDef, oscale, MagicToLefTable) } int -defblockageVisit(node, res, cap, defobsdata) - EFNode *node; - int res; - EFCapValue cap; - DefObsData *defobsdata; +defblockageVisit( + EFNode *node, + int res, + EFCapValue cap, + DefObsData *defobsdata) { CellDef *def = defobsdata->def; TileType magictype; @@ -2619,10 +2621,10 @@ defblockageVisit(node, res, cap, defobsdata) /* for a net. */ int -defBlockageGeometryFunc(tile, plane, defobsdata) - Tile *tile; /* Tile being visited */ - int plane; /* Plane of the tile being visited */ - DefObsData *defobsdata; /* Data passed to this function */ +defBlockageGeometryFunc( + Tile *tile, /* Tile being visited */ + int plane, /* Plane of the tile being visited */ + DefObsData *defobsdata) /* Data passed to this function */ { TileType ttype = TiGetTypeExact(tile); TileType loctype; @@ -2678,9 +2680,9 @@ defBlockageGeometryFunc(tile, plane, defobsdata) /* pulled from all non-electrical obstruction types. */ int -defSimpleBlockageFunc(tile, defobsdata) - Tile *tile; /* Tile being visited */ - DefObsData *defobsdata; /* Data passed to this function */ +defSimpleBlockageFunc( + Tile *tile, /* Tile being visited */ + DefObsData *defobsdata) /* Data passed to this function */ { TileType ttype = TiGetTypeExact(tile); TileType loctype; @@ -2732,10 +2734,10 @@ defSimpleBlockageFunc(tile, defobsdata) */ void -defWriteComponents(f, rootDef, oscale) - FILE *f; /* File to write to */ - CellDef *rootDef; /* Cell definition to use */ - float oscale; /* Output scale factor */ +defWriteComponents( + FILE *f, /* File to write to */ + CellDef *rootDef, /* Cell definition to use */ + float oscale) /* Output scale factor */ { DefData defdata; int defComponentFunc(); /* Forward declaration */ @@ -2749,11 +2751,12 @@ defWriteComponents(f, rootDef, oscale) /* Callback function used by defWriteComponents for array members */ int -arrayDefFunc(use, transform, x, y, defdata) - CellUse *use; /* CellUse for array element */ - Transform *transform; /* Transform from use to parent */ - int x, y; /* Indices of element */ - DefData *defdata; +arrayDefFunc( + CellUse *use, /* CellUse for array element */ + Transform *transform, /* Transform from use to parent */ + int x, /* Indices of element */ + int y, + DefData *defdata) { int sx = use->cu_xhi - use->cu_xlo; int sy = use->cu_yhi - use->cu_ylo; @@ -2796,9 +2799,9 @@ arrayDefFunc(use, transform, x, y, defdata) /* Callback function used by defWriteComponents */ int -defComponentFunc(cellUse, defdata) - CellUse *cellUse; - DefData *defdata; +defComponentFunc( + CellUse *cellUse, + DefData *defdata) { FILE *f = defdata->f; float oscale = defdata->scale; @@ -2876,8 +2879,8 @@ defComponentFunc(cellUse, defdata) */ LefMapping * -defMakeInverseLayerMap(do_vias) - bool do_vias; +defMakeInverseLayerMap( + bool do_vias) { LefMapping *lefMagicToLefLayer; lefLayer *lefl; @@ -2936,12 +2939,12 @@ defMakeInverseLayerMap(do_vias) */ void -DefWriteCell(def, outName, allSpecial, units, analRetentive) - CellDef *def; /* Cell being written */ - char *outName; /* Name of output file, or NULL. */ - bool allSpecial; /* Treat all nets as SPECIALNETS? */ - int units; /* Force units to this value (default 1000) */ - bool analRetentive; /* Force compatibility with stupid tools */ +DefWriteCell( + CellDef *def, /* Cell being written */ + char *outName, /* Name of output file, or NULL. */ + bool allSpecial, /* Treat all nets as SPECIALNETS? */ + int units, /* Force units to this value (default 1000) */ + bool analRetentive) /* Force compatibility with stupid tools */ { char *filename, *filename1, *filename2; char line[2048]; diff --git a/lef/lefCmd.c b/lef/lefCmd.c index 784b722c..61bae974 100644 --- a/lef/lefCmd.c +++ b/lef/lefCmd.c @@ -75,9 +75,9 @@ linkedNetName *lefIgnoreNets = NULL; /* Nets names to ignore for antenna area */ #define LEF_HELP 5 void -CmdLef(w, cmd) - MagWindow *w; - TxCommand *cmd; +CmdLef( + MagWindow *w, + TxCommand *cmd) { int option, i, cargs, units = 1000; /* Default nanometers */ const char * const *msg; diff --git a/lef/lefRead.c b/lef/lefRead.c index 82bb048a..b2fb3ce5 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -82,10 +82,10 @@ HashTable lefDefInitHash; #define PRINT_INTERVAL 5 /* print status at 4 second intervals */ void -LefEstimate(processed, total, item_name) - int processed; - int total; - char *item_name; +LefEstimate( + int processed, + int total, + char *item_name) { static int check_interval, partition; static struct timeval tv_start; @@ -137,10 +137,10 @@ LefEstimate(processed, total, item_name) #if 0 void -LefEstimate(processed, total, item_name) - int processed; - int total; - char *item_name; +LefEstimate( + int processed, + int total, + char *item_name) { static int check_interval, partition; static struct timeval tv_start; @@ -217,9 +217,9 @@ LefEstimate(processed, total, item_name) */ char * -LefNextToken(f, ignore_eol) - FILE *f; - bool ignore_eol; +LefNextToken( + FILE *f, + bool ignore_eol) { static char line[LEF_LINE_MAX + 2]; /* input buffer */ static char *nexttoken = NULL; /* pointer to next token */ @@ -306,7 +306,9 @@ LefNextToken(f, ignore_eol) */ void -LefError(int type, const char *fmt, ...) +LefError( + int type, + const char *fmt, ...) { static int errors = 0, warnings = 0, messages = 0; va_list args; @@ -456,9 +458,9 @@ LefError(int type, const char *fmt, ...) */ int -LefParseEndStatement(f, match) - FILE *f; - const char *match; +LefParseEndStatement( + FILE *f, + const char *match) { char *token; int keyword, words; @@ -523,9 +525,9 @@ LefParseEndStatement(f, match) */ void -LefSkipSection(f, section) - FILE *f; - const char *section; +LefSkipSection( + FILE *f, + const char *section) { const char *token; int keyword, result; @@ -571,8 +573,8 @@ LefSkipSection(f, section) */ CellDef * -lefFindCell(name) - char *name; /* Name of the cell to search for */ +lefFindCell( + char *name) /* Name of the cell to search for */ { HashEntry *h; CellDef *def; @@ -602,8 +604,8 @@ lefFindCell(name) */ char * -LefLower(token) - char *token; +LefLower( + char *token) { char *tptr; @@ -634,9 +636,9 @@ LefLower(token) */ lefLayer * -LefRedefined(lefl, redefname) - lefLayer *lefl; - char *redefname; +LefRedefined( + lefLayer *lefl, + char *redefname) { lefLayer *slef, *newlefl; char *altName; @@ -718,11 +720,11 @@ LefRedefined(lefl, redefname) */ TileType -LefReadLayers(f, obstruct, lreturn, rreturn) - FILE *f; - bool obstruct; - TileType *lreturn; - const Rect **rreturn; +LefReadLayers( + FILE *f, + bool obstruct, + TileType *lreturn, + const Rect **rreturn) { char *token; TileType curlayer = -1; @@ -806,9 +808,9 @@ LefReadLayers(f, obstruct, lreturn, rreturn) */ TileType -LefReadLayer(f, obstruct) - FILE *f; - bool obstruct; +LefReadLayer( + FILE *f, + bool obstruct) { return LefReadLayers(f, obstruct, (TileType *)NULL, (const Rect **)NULL); } @@ -838,9 +840,10 @@ LefReadLayer(f, obstruct) */ int -LefReadLefPoint(f, xp, yp) - FILE *f; - float *xp, *yp; +LefReadLefPoint( + FILE *f, + float *xp, + float *yp) { char *token; bool needMatch = FALSE; @@ -885,10 +888,10 @@ LefReadLefPoint(f, xp, yp) */ Rect * -LefReadRect(f, curlayer, oscale) - FILE *f; - TileType curlayer; - float oscale; +LefReadRect( + FILE *f, + TileType curlayer, + float oscale) { char *token; float llx, lly, urx, ury; @@ -983,11 +986,11 @@ parse_error: */ Point * -LefReadPolygon(f, curlayer, oscale, ppoints) - FILE *f; - TileType curlayer; - float oscale; - int *ppoints; +LefReadPolygon( + FILE *f, + TileType curlayer, + float oscale, + int *ppoints) { LinkedRect *lr = NULL, *newRect; Point *plist = NULL; @@ -1059,12 +1062,12 @@ LefReadPolygon(f, curlayer, oscale, ppoints) */ LinkedRect * -LefPaintPolygon(lefMacro, pointList, points, curlayer, keep) - CellDef *lefMacro; - Point *pointList; - int points; - TileType curlayer; - bool keep; +LefPaintPolygon( + CellDef *lefMacro, + Point *pointList, + int points, + TileType curlayer, + bool keep) { int pNum; PaintUndoInfo ui; @@ -1111,9 +1114,9 @@ typedef struct _plane_type { *------------------------------------------------------------ */ int -lefConnectFunc(tile, cxp) - Tile *tile; - TreeContext *cxp; +lefConnectFunc( + Tile *tile, + TreeContext *cxp) { SearchContext *scx = cxp->tc_scx; PlaneType *pt = (PlaneType *)cxp->tc_filter->tf_arg; @@ -1145,9 +1148,9 @@ lefConnectFunc(tile, cxp) */ int -lefUnconnectFunc(tile, clientdata) - Tile *tile; - ClientData clientdata; /* (unused) */ +lefUnconnectFunc( + Tile *tile, + ClientData clientdata) /* (unused) */ { return 1; } @@ -1186,12 +1189,12 @@ enum lef_geometry_keys {LEF_LAYER = 0, LEF_WIDTH, LEF_PATH, LEF_GEOMETRY_END}; LinkedRect * -LefReadGeometry(lefMacro, f, oscale, do_list, is_imported) - CellDef *lefMacro; - FILE *f; - float oscale; - bool do_list; - bool is_imported; +LefReadGeometry( + CellDef *lefMacro, + FILE *f, + float oscale, + bool do_list, + bool is_imported) { TileType curlayer = -1, otherlayer = -1; @@ -1387,15 +1390,17 @@ LefReadGeometry(lefMacro, f, oscale, do_list, is_imported) */ void -LefReadPort(lefMacro, f, pinName, pinNum, pinDir, pinUse, pinShape, oscale, - is_imported, lanno) - CellDef *lefMacro; - FILE *f; - char *pinName; - int pinNum, pinDir, pinUse, pinShape; - float oscale; - bool is_imported; - Label *lanno; +LefReadPort( + CellDef *lefMacro, + FILE *f, + char *pinName, + int pinNum, + int pinDir, + int pinUse, + int pinShape, + float oscale, + bool is_imported, + Label *lanno) { Label *newlab; LinkedRect *rectList; @@ -1509,13 +1514,13 @@ enum lef_pin_keys {LEF_DIRECTION = 0, LEF_USE, LEF_PORT, LEF_CAPACITANCE, LEF_SHAPE, LEF_NETEXPR, LEF_PIN_END}; void -LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported) - CellDef *lefMacro; - FILE *f; - char *pinname; - int pinNum; - float oscale; - bool is_imported; +LefReadPin( + CellDef *lefMacro, + FILE *f, + char *pinname, + int pinNum, + float oscale, + bool is_imported) { char *token; char *testpin = pinname; @@ -1826,8 +1831,8 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported) */ void -LefEndStatement(f) - FILE *f; +LefEndStatement( + FILE *f) { char *token; @@ -1861,10 +1866,10 @@ enum lef_nondefprop_keys { LEF_NONDEFLAYER_SPACE, LEF_NONDEFLAYER_EXT}; void -LefReadNonDefaultRule(f, rname, oscale) - FILE *f; /* LEF file being read */ - char *rname; /* name of the rule */ - float oscale; /* scale factor um->magic units */ +LefReadNonDefaultRule( + FILE *f, /* LEF file being read */ + char *rname, /* name of the rule */ + float oscale) /* scale factor um->magic units */ { char *token; char tsave[128]; @@ -2071,17 +2076,17 @@ enum lef_macro_keys {LEF_CLASS = 0, LEF_SIZE, LEF_ORIGIN, LEF_TIMING, LEF_FOREIGN, LEF_PROPERTY, LEF_MACRO_END}; void -LefReadMacro(f, mname, oscale, importForeign, doAnnotate, lefTimestamp) - FILE *f; /* LEF file being read */ - char *mname; /* name of the macro */ - float oscale; /* scale factor um->magic units */ - bool importForeign; /* Whether we should try to read +LefReadMacro( + FILE *f, /* LEF file being read */ + char *mname, /* name of the macro */ + float oscale, /* scale factor um->magic units */ + bool importForeign, /* Whether we should try to read * in a cell. */ - bool doAnnotate; /* If true, ignore all macros that are + bool doAnnotate, /* If true, ignore all macros that are * not already CellDefs. */ - int lefTimestamp; /* If not -1, use the value pointed to + int lefTimestamp) /* If not -1, use the value pointed to * as the CellDef's timestamp. */ { @@ -2472,20 +2477,23 @@ void LefGrowVia(curlayer, currect, lefl) */ void -LefGenViaGeometry(f, lefl, sizex, sizey, spacex, spacey, - encbx, encby, enctx, encty, rows, cols, - tlayer, clayer, blayer, oscale) - FILE *f; /* LEF file being read */ - lefLayer *lefl; /* pointer to via info */ - int sizex, sizey; /* cut size */ - int spacex, spacey; /* cut spacing */ - int encbx, encby; /* bottom enclosure of cuts */ - int enctx, encty; /* top enclosure of cuts */ - int rows, cols; /* number of cut rows and columns */ - TileType tlayer; /* Top layer type */ - TileType clayer; /* Cut layer type */ - TileType blayer; /* Bottom layer type */ - float oscale; /* output scaling */ +LefGenViaGeometry( + FILE *f, /* LEF file being read */ + lefLayer *lefl, /* pointer to via info */ + int sizex, /* cut size */ + int sizey, + int spacex, /* cut spacing */ + int spacey, + int encbx, /* bottom enclosure of cuts */ + int encby, + int enctx, /* top enclosure of cuts */ + int encty, + int rows, /* number of cut rows and columns */ + int cols, + TileType tlayer, /* Top layer type */ + TileType clayer, /* Cut layer type */ + TileType blayer, /* Bottom layer type */ + float oscale) /* output scaling */ { Rect rect; int i, j, x, y, w, h, sw, sh; @@ -2570,11 +2578,11 @@ LefGenViaGeometry(f, lefl, sizex, sizey, spacex, spacey, */ void -LefAddViaGeometry(f, lefl, curlayer, oscale) - FILE *f; /* LEF file being read */ - lefLayer *lefl; /* pointer to via info */ - TileType curlayer; /* current tile type */ - float oscale; /* output scaling */ +LefAddViaGeometry( + FILE *f, /* LEF file being read */ + lefLayer *lefl, /* pointer to via info */ + TileType curlayer, /* current tile type */ + float oscale) /* output scaling */ { Rect *currect; LinkedRect *viaLR; @@ -2646,11 +2654,11 @@ enum lef_layer_keys {LEF_LAYER_TYPE=0, LEF_LAYER_WIDTH, LEF_VIARULE_GENERATE, LEF_LAYER_END}; void -LefReadLayerSection(f, lname, mode, lefl) - FILE *f; /* LEF file being read */ - char *lname; /* name of the layer */ - int mode; /* layer, via, or viarule */ - lefLayer *lefl; /* pointer to layer info */ +LefReadLayerSection( + FILE *f, /* LEF file being read */ + char *lname, /* name of the layer */ + int mode, /* layer, via, or viarule */ + lefLayer *lefl) /* pointer to layer info */ { char *token; int keyword, typekey; @@ -2883,11 +2891,11 @@ enum lef_sections {LEF_VERSION = 0, LEF_END}; void -LefRead(inName, importForeign, doAnnotate, lefTimestamp) - char *inName; - bool importForeign; - bool doAnnotate; - int lefTimestamp; +LefRead( + char *inName, + bool importForeign, + bool doAnnotate, + int lefTimestamp) { FILE *f; char *filename; diff --git a/lef/lefTech.c b/lef/lefTech.c index cfa24f2f..75c3401c 100644 --- a/lef/lefTech.c +++ b/lef/lefTech.c @@ -69,7 +69,7 @@ HashTable LefNonDefaultRules; */ void -LefInit() +LefInit(void) { /* Ensure that the table has a null entry so we don't run HashKill */ /* on it when we to the tech initialization. */ @@ -95,7 +95,7 @@ LefInit() */ void -LefTechInit() +LefTechInit(void) { HashSearch hs; HashEntry *he; @@ -148,7 +148,7 @@ LefTechInit() */ void -lefRemoveGeneratedVias() +lefRemoveGeneratedVias(void) { HashSearch hs; HashEntry *he; @@ -202,10 +202,10 @@ lefRemoveGeneratedVias() #define LEFTECH_IGNORE 9 bool -LefTechLine(sectionName, argc, argv) - char *sectionName; /* Name of this section (unused). */ - int argc; /* Number of arguments on line. */ - char *argv[]; /* Pointers to fields of line. */ +LefTechLine( + char *sectionName, /* Name of this section (unused). */ + int argc, /* Number of arguments on line. */ + char *argv[]) /* Pointers to fields of line. */ { bool isObstruction, isContact, isInactive; HashEntry *he; @@ -413,8 +413,9 @@ LefTechLine(sectionName, argc, argv) */ void -LefTechScale(scalen, scaled) - int scalen, scaled; +LefTechScale( + int scalen, + int scaled) { HashSearch hs; HashEntry *he; @@ -474,7 +475,7 @@ LefTechScale(scalen, scaled) */ void -LefTechSetDefaults() +LefTechSetDefaults(void) { HashSearch hs; HashEntry *he; diff --git a/lef/lefWrite.c b/lef/lefWrite.c index dab2fe52..49178868 100644 --- a/lef/lefWrite.c +++ b/lef/lefWrite.c @@ -87,7 +87,9 @@ int LEFdbUnits = 1000; */ const char * -lefPrint(char *leffmt, float invalue) +lefPrint( + char *leffmt, + float invalue) { float value, r, l; @@ -145,19 +147,19 @@ lefPrint(char *leffmt, float invalue) */ FILE * -lefFileOpen(def, file, suffix, mode, prealfile) - CellDef *def; /* Cell whose .lef file is to be written. Should +lefFileOpen( + CellDef *def, /* Cell whose .lef file is to be written. Should * be NULL if file is being opened for reading. */ - char *file; /* If non-NULL, open 'name'.lef; otherwise, + char *file, /* If non-NULL, open 'name'.lef; otherwise, * derive filename from 'def' as described * above. */ - char *suffix; /* Either ".lef" for LEF files or ".def" for DEF files */ - char *mode; /* Either "r" or "w", the mode in which the LEF/DEF + char *suffix, /* Either ".lef" for LEF files or ".def" for DEF files */ + char *mode, /* Either "r" or "w", the mode in which the LEF/DEF * 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 LEF/DEF file. */ { @@ -248,12 +250,12 @@ lefFileOpen(def, file, suffix, mode, prealfile) */ void -lefWriteHeader(def, f, lefTech, propTable, siteTable) - CellDef *def; /* Def for which to generate LEF output */ - FILE *f; /* Output to this file */ - bool lefTech; /* If TRUE, write layer information */ - HashTable *propTable; /* Hash table of property definitions */ - HashTable *siteTable; /* Hash table of sites used */ +lefWriteHeader( + CellDef *def, /* Def for which to generate LEF output */ + FILE *f, /* Output to this file */ + bool lefTech, /* If TRUE, write layer information */ + HashTable *propTable, /* Hash table of property definitions */ + HashTable *siteTable) /* Hash table of sites used */ { TileType type; HashSearch hs; @@ -496,9 +498,9 @@ typedef struct */ int -lefEraseGeometry(tile, cdata) - Tile *tile; - ClientData cdata; +lefEraseGeometry( + Tile *tile, + ClientData cdata) { lefClient *lefdata = (lefClient *)cdata; CellDef *flatDef = lefdata->lefFlat; @@ -538,9 +540,9 @@ lefEraseGeometry(tile, cdata) */ int -lefGetBound(tile, cdata) - Tile *tile; - ClientData cdata; +lefGetBound( + Tile *tile, + ClientData cdata) { Rect *boundary = (Rect *)cdata; Rect area; @@ -566,9 +568,9 @@ lefGetBound(tile, cdata) */ int -lefHasPaint(tile, clientData) - Tile *tile; - ClientData clientData; +lefHasPaint( + Tile *tile, + ClientData clientData) { return 1; } @@ -585,9 +587,9 @@ lefHasPaint(tile, clientData) */ int -lefAccumulateArea(tile, cdata) - Tile *tile; - ClientData cdata; +lefAccumulateArea( + Tile *tile, + ClientData cdata) { int *area = (int *)cdata; Rect rarea; @@ -611,9 +613,9 @@ lefAccumulateArea(tile, cdata) */ int -lefFindTopmost(tile, cdata) - Tile *tile; - ClientData cdata; +lefFindTopmost( + Tile *tile, + ClientData cdata) { return 1; /* Stop processing on the first tile found */ } @@ -633,9 +635,9 @@ lefFindTopmost(tile, cdata) */ int -lefYankGeometry(tile, cdata) - Tile *tile; - ClientData cdata; +lefYankGeometry( + Tile *tile, + ClientData cdata) { lefClient *lefdata = (lefClient *)cdata; Rect area; @@ -724,9 +726,9 @@ lefYankGeometry(tile, cdata) */ int -lefYankContacts(tile, cdata) - Tile *tile; - ClientData cdata; +lefYankContacts( + Tile *tile, + ClientData cdata) { lefClient *lefdata = (lefClient *)cdata; Rect area; @@ -793,9 +795,9 @@ lefYankContacts(tile, cdata) */ int -lefWriteGeometry(tile, cdata) - Tile *tile; - ClientData cdata; +lefWriteGeometry( + Tile *tile, + ClientData cdata) { lefClient *lefdata = (lefClient *)cdata; FILE *f = lefdata->file; @@ -952,8 +954,8 @@ lefWriteGeometry(tile, cdata) */ char * -MakeLegalLEFSyntax(text) - char *text; +MakeLegalLEFSyntax( + char *text) { static char *badLEFchars = ";# -*$\n"; char *cptr, *bptr; @@ -1003,9 +1005,9 @@ typedef struct _labelLinkedList { */ bool -LefWritePinHeader(f, lab) - FILE *f; - Label *lab; +LefWritePinHeader( + FILE *f, + Label *lab) { bool ispwrrail = FALSE; @@ -1119,14 +1121,14 @@ LefWritePinHeader(f, lab) */ void -lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster) - CellDef *def; /* Def for which to generate LEF output */ - FILE *f; /* Output to this file */ - float scale; /* Output distance units conversion factor */ - int setback; /* If >= 0, hide all detail except pins inside setback */ - int pinonly; /* If >= 0, only place pins where labels are defined */ - bool toplayer; /* If TRUE, only output topmost layer of pins */ - bool domaster; /* If TRUE, write masterslice layers */ +lefWriteMacro( + CellDef *def, /* Def for which to generate LEF output */ + FILE *f, /* Output to this file */ + float scale, /* Output distance units conversion factor */ + int setback, /* If >= 0, hide all detail except pins inside setback */ + int pinonly, /* If >= 0, only place pins where labels are defined */ + bool toplayer, /* If TRUE, only output topmost layer of pins */ + bool domaster) /* If TRUE, write masterslice layers */ { bool propfound, ispwrrail; char *propvalue, *class = NULL; @@ -2069,10 +2071,10 @@ lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster) *------------------------------------------------------------ */ int -lefGetSites(stackItem, i, clientData) - ClientData stackItem; - int i; - ClientData clientData; +lefGetSites( + ClientData stackItem, + int i, + ClientData clientData) { CellDef *def = (CellDef *)stackItem; HashTable *lefSiteTbl = (HashTable *)clientData; @@ -2099,10 +2101,10 @@ lefGetSites(stackItem, i, clientData) *------------------------------------------------------------ */ int -lefGetProperties(stackItem, i, clientData) - ClientData stackItem; - int i; - ClientData clientData; +lefGetProperties( + ClientData stackItem, + int i, + ClientData clientData) { CellDef *def = (CellDef *)stackItem; HashTable *lefPropTbl = (HashTable *)clientData; @@ -2171,16 +2173,15 @@ lefGetProperties(stackItem, i, clientData) */ void -LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer, - lefDoMaster, recurse) - CellUse *rootUse; - bool writeTopCell; - bool lefTech; - int lefHide; - int lefPinOnly; - bool lefTopLayer; - bool lefDoMaster; - bool recurse; +LefWriteAll( + CellUse *rootUse, + bool writeTopCell, + bool lefTech, + int lefHide, + int lefPinOnly, + bool lefTopLayer, + bool lefDoMaster, + bool recurse) { HashTable propHashTbl, siteHashTbl; CellDef *def, *rootdef, *err_def; @@ -2268,8 +2269,8 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer, */ int -lefDefInitFunc(def) - CellDef *def; +lefDefInitFunc( + CellDef *def) { def->cd_client = (ClientData) 0; return (0); @@ -2282,9 +2283,9 @@ lefDefInitFunc(def) */ int -lefDefPushFunc(use, recurse) - CellUse *use; - bool *recurse; +lefDefPushFunc( + CellUse *use, + bool *recurse) { CellDef *def = use->cu_def; @@ -2315,16 +2316,15 @@ lefDefPushFunc(use, recurse) */ void -LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefPinOnly, lefTopLayer, - lefDoMaster) - CellDef *def; /* Cell being written */ - char *outName; /* Name of output file, or NULL. */ - bool isRoot; /* Is this the root cell? */ - bool lefTech; /* Output layer information if TRUE */ - int lefHide; /* Hide detail other than pins if >= 0 */ - int lefPinOnly; /* Only generate pins on label areas */ - bool lefTopLayer; /* Use only topmost layer of pin if TRUE */ - bool lefDoMaster; /* Write masterslice layers if TRUE */ +LefWriteCell( + CellDef *def, /* Cell being written */ + char *outName, /* Name of output file, or NULL. */ + bool isRoot, /* Is this the root cell? */ + bool lefTech, /* Output layer information if TRUE */ + int lefHide, /* Hide detail other than pins if >= 0 */ + int lefPinOnly, /* Only generate pins on label areas */ + bool lefTopLayer, /* Use only topmost layer of pin if TRUE */ + bool lefDoMaster) /* Write masterslice layers if TRUE */ { char *filename; FILE *f; diff --git a/lef/tcllef.c b/lef/tcllef.c index 878d7af9..44790c5f 100644 --- a/lef/tcllef.c +++ b/lef/tcllef.c @@ -35,8 +35,8 @@ extern void CmdLef(); */ int -Magiclef_Init(interp) - Tcl_Interp *interp; +Magiclef_Init( + Tcl_Interp *interp) { /* Sanity checks! */ if (interp == NULL) return TCL_ERROR;