K&R lef/*.c: bulk function implementation conversion

Some function parameters (char *sname) have been made const due
referencing const data sources.

K&R obsolete syntax removal for C23 compatibility series
This commit is contained in:
Darryl L. Miles 2025-01-04 08:50:40 +00:00 committed by Tim Edwards
parent a1f7e4ed5e
commit 19e03fc4f8
7 changed files with 419 additions and 407 deletions

View File

@ -79,15 +79,15 @@ enum def_netspecial_shape_keys {
DEF_SPECNET_SHAPE_DRCFILL}; DEF_SPECNET_SHAPE_DRCFILL};
char * char *
DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotate) DefAddRoutes(
CellDef *rootDef; /* Cell to paint */ CellDef *rootDef, /* Cell to paint */
FILE *f; /* Input file */ FILE *f, /* Input file */
float oscale; /* Scale factor between LEF and magic units */ float oscale, /* Scale factor between LEF and magic units */
bool special; /* True if this section is SPECIALNETS */ bool special, /* True if this section is SPECIALNETS */
char *netname; /* Name of the net, if net is to be labeled */ char *netname, /* Name of the net, if net is to be labeled */
LefRules *ruleset; /* Non-default rule, or NULL */ LefRules *ruleset, /* Non-default rule, or NULL */
LefMapping *defLayerMap; /* magic-to-lef layer mapping array */ LefMapping *defLayerMap, /* magic-to-lef layer mapping array */
bool annotate; /* If TRUE, do not generate any geometry */ bool annotate) /* If TRUE, do not generate any geometry */
{ {
char *token; char *token;
LinkedRect *routeList, *newRoute = NULL, *routeTop = NULL; LinkedRect *routeList, *newRoute = NULL, *routeTop = NULL;
@ -784,12 +784,12 @@ enum def_nondefprop_keys {
DEF_NONDEFPROP_DONE}; DEF_NONDEFPROP_DONE};
void void
DefReadNonDefaultRules(f, rootDef, sname, oscale, total) DefReadNonDefaultRules(
FILE *f; FILE *f,
CellDef *rootDef; CellDef *rootDef,
char *sname; const char *sname,
float oscale; float oscale,
int total; int total)
{ {
char *token; char *token;
int keyword, subkey; int keyword, subkey;
@ -1006,9 +1006,9 @@ DefReadNonDefaultRules(f, rootDef, sname, oscale, total)
*/ */
int int
defFoundOneFunc(tile, tret) defFoundOneFunc(
Tile *tile; Tile *tile,
Tile **tret; Tile **tret)
{ {
*tret = tile; *tret = tile;
return 1; return 1;
@ -1042,15 +1042,15 @@ enum def_netprop_keys {
}; };
void void
DefReadNets(f, rootDef, sname, oscale, special, dolabels, annotate, total) DefReadNets(
FILE *f; FILE *f,
CellDef *rootDef; CellDef *rootDef,
char *sname; const char *sname,
float oscale; float oscale,
bool special; /* True if this section is SPECIALNETS */ bool special, /* True if this section is SPECIALNETS */
bool dolabels; /* If true, create a label for each net */ bool dolabels, /* If true, create a label for each net */
bool annotate; /* If true, create labels, not geometry */ bool annotate, /* If true, create labels, not geometry */
int total; int total)
{ {
char *token; char *token;
char *netname = NULL, *prnet; char *netname = NULL, *prnet;
@ -1296,12 +1296,12 @@ enum def_orient {DEF_NORTH, DEF_SOUTH, DEF_EAST, DEF_WEST,
DEF_FLIPPED_WEST}; DEF_FLIPPED_WEST};
int int
DefReadLocation(use, f, oscale, tptr, noplace) DefReadLocation(
CellUse *use; CellUse *use,
FILE *f; FILE *f,
float oscale; float oscale,
Transform *tptr; Transform *tptr,
bool noplace; bool noplace)
{ {
const Rect *r; const Rect *r;
Rect tr, rect; Rect tr, rect;
@ -1434,13 +1434,13 @@ enum def_pins_prop_keys {
DEF_PINS_PROP_PORT, DEF_PINS_PROP_SPECIAL}; DEF_PINS_PROP_PORT, DEF_PINS_PROP_SPECIAL};
void void
DefReadPins(f, rootDef, sname, oscale, total, annotate) DefReadPins(
FILE *f; FILE *f,
CellDef *rootDef; CellDef *rootDef,
char *sname; const char *sname,
float oscale; float oscale,
int total; int total,
bool annotate; bool annotate)
{ {
char *token; char *token;
char pinname[LEF_LINE_MAX]; char pinname[LEF_LINE_MAX];
@ -1764,12 +1764,12 @@ enum def_block_prop_keys {
DEF_BLOCK_PROP_RECT = 0, DEF_BLOCK_PROP_LAYER}; DEF_BLOCK_PROP_RECT = 0, DEF_BLOCK_PROP_LAYER};
void void
DefReadBlockages(f, rootDef, sname, oscale, total) DefReadBlockages(
FILE *f; FILE *f,
CellDef *rootDef; CellDef *rootDef,
char *sname; const char *sname,
float oscale; float oscale,
int total; int total)
{ {
char *token; char *token;
int keyword, subkey, values; int keyword, subkey, values;
@ -1882,11 +1882,11 @@ enum def_vias_prop_keys {
DEF_VIAS_PROP_ROWCOL}; DEF_VIAS_PROP_ROWCOL};
void void
DefReadVias(f, sname, oscale, total) DefReadVias(
FILE *f; FILE *f,
char *sname; const char *sname,
float oscale; float oscale,
int total; int total)
{ {
char *token; char *token;
char vianame[LEF_LINE_MAX]; char vianame[LEF_LINE_MAX];
@ -2165,12 +2165,12 @@ enum def_prop_keys {
DEF_PROP_EEQMASTER}; DEF_PROP_EEQMASTER};
void void
DefReadComponents(f, rootDef, sname, oscale, total) DefReadComponents(
FILE *f; FILE *f,
CellDef *rootDef; CellDef *rootDef,
char *sname; const char *sname,
float oscale; float oscale,
int total; int total)
{ {
CellDef *defMacro; CellDef *defMacro;
CellUse *defUse; CellUse *defUse;
@ -2384,11 +2384,11 @@ enum def_sections {DEF_VERSION = 0, DEF_NAMESCASESENSITIVE,
DEF_NONDEFAULTRULES, DEF_END}; DEF_NONDEFAULTRULES, DEF_END};
void void
DefRead(inName, dolabels, annotate, noblockage) DefRead(
char *inName; char *inName,
bool dolabels; bool dolabels,
bool annotate; bool annotate,
bool noblockage; bool noblockage)
{ {
CellDef *rootDef; CellDef *rootDef;
FILE *f; FILE *f;

View File

@ -101,11 +101,11 @@ char *defGetType(); /* Forward declaration */
*/ */
void void
defWriteHeader(def, f, oscale, units) defWriteHeader(
CellDef *def; /* Def for which to generate DEF output */ CellDef *def, /* Def for which to generate DEF output */
FILE *f; /* Output to this file */ FILE *f, /* Output to this file */
float oscale; float oscale,
int units; /* Units for UNITS; could be derived from oscale */ int units) /* Units for UNITS; could be derived from oscale */
{ {
TileType type; TileType type;
char *propvalue; char *propvalue;
@ -192,7 +192,8 @@ defWriteHeader(def, f, oscale, units)
*/ */
char * char *
defTransPos(Transform *t) defTransPos(
Transform *t)
{ {
static char *def_orient[] = { static char *def_orient[] = {
"N", "S", "E", "W", "FN", "FS", "FE", "FW" "N", "S", "E", "W", "FN", "FS", "FE", "FW"
@ -242,9 +243,9 @@ defTransPos(Transform *t)
*/ */
NetCount NetCount
defCountNets(rootDef, allSpecial) defCountNets(
CellDef *rootDef; CellDef *rootDef,
bool allSpecial; bool allSpecial)
{ {
NetCount total; NetCount total;
int defnodeCount(); int defnodeCount();
@ -286,11 +287,11 @@ defCountNets(rootDef, allSpecial)
/* Callback function used by defCountNets */ /* Callback function used by defCountNets */
int int
defnodeCount(node, res, cap, total) defnodeCount(
EFNode *node; EFNode *node,
int res; /* not used */ int res, /* not used */
EFCapValue cap; /* not used */ EFCapValue cap, /* not used */
NetCount *total; NetCount *total)
{ {
HierName *hierName; HierName *hierName;
char ndn[256]; char ndn[256];
@ -392,10 +393,10 @@ defnodeCount(node, res, cap, total)
*/ */
void void
defHNsprintf(str, hierName, divchar) defHNsprintf(
char *str; char *str,
HierName *hierName; HierName *hierName,
char divchar; char divchar)
{ {
bool trimGlob, trimLocal; bool trimGlob, trimLocal;
char *s, *cp, c; char *s, *cp, c;
@ -463,8 +464,8 @@ char *defHNsprintfPrefix(hierName, str, divchar)
*/ */
char * char *
nodeDefName(hname) nodeDefName(
HierName *hname; HierName *hname)
{ {
EFNodeName *nn; EFNodeName *nn;
HashEntry *he; HashEntry *he;
@ -503,9 +504,9 @@ nodeDefName(hname)
#define MAX_DEF_COLUMNS 70 #define MAX_DEF_COLUMNS 70
void void
defCheckForBreak(addlen, defdata) defCheckForBreak(
int addlen; int addlen,
DefData *defdata; DefData *defdata)
{ {
defdata->outcolumn += addlen; defdata->outcolumn += addlen;
if (defdata->outcolumn > MAX_DEF_COLUMNS) if (defdata->outcolumn > MAX_DEF_COLUMNS)
@ -526,9 +527,9 @@ defCheckForBreak(addlen, defdata)
*/ */
void void
defWriteRouteWidth(defdata, width) defWriteRouteWidth(
DefData *defdata; DefData *defdata,
int width; int width)
{ {
float oscale = defdata->scale; float oscale = defdata->scale;
char numstr[32]; char numstr[32];
@ -558,10 +559,11 @@ defWriteRouteWidth(defdata, width)
*/ */
void void
defWriteCoord(defdata, x, y, orient) defWriteCoord(
DefData *defdata; DefData *defdata,
float x, y; float x,
unsigned char orient; float y,
unsigned char orient)
{ {
FILE *f = defdata->f; FILE *f = defdata->f;
char numstr[32]; char numstr[32];
@ -629,13 +631,13 @@ defWriteCoord(defdata, x, y, orient)
*/ */
void void
defWriteNets(f, rootDef, oscale, MagicToLefTable, defViaTable, specialmode) defWriteNets(
FILE *f; /* File to write to */ FILE *f, /* File to write to */
CellDef *rootDef; /* Cell definition to use */ CellDef *rootDef, /* Cell definition to use */
float oscale; /* Output scale factor */ float oscale, /* Output scale factor */
LefMapping *MagicToLefTable; /* Magic to LEF layer mapping */ LefMapping *MagicToLefTable, /* Magic to LEF layer mapping */
HashTable *defViaTable; /* Hash table of contact positions */ HashTable *defViaTable, /* Hash table of contact positions */
unsigned char specialmode; /* What to write as a SPECIALNET */ unsigned char specialmode) /* What to write as a SPECIALNET */
{ {
DefData defdata; DefData defdata;
int defnodeVisit(); int defnodeVisit();
@ -653,11 +655,11 @@ defWriteNets(f, rootDef, oscale, MagicToLefTable, defViaTable, specialmode)
} }
int int
defnodeVisit(node, res, cap, defdata) defnodeVisit(
EFNode *node; EFNode *node,
int res; int res,
EFCapValue cap; EFCapValue cap,
DefData *defdata; DefData *defdata)
{ {
HierName *hierName; HierName *hierName;
char *ndn; char *ndn;
@ -843,9 +845,9 @@ defnodeVisit(node, res, cap, defdata)
/* sets the lower bound of the clip line for extending a wire upward */ /* sets the lower bound of the clip line for extending a wire upward */
int int
defMaxWireFunc(tile, yclip) defMaxWireFunc(
Tile *tile; Tile *tile,
int *yclip; int *yclip)
{ {
if (BOTTOM(tile) < (*yclip)) *yclip = BOTTOM(tile); if (BOTTOM(tile) < (*yclip)) *yclip = BOTTOM(tile);
return 0; return 0;
@ -855,9 +857,9 @@ defMaxWireFunc(tile, yclip)
/* sets the upper bound of the clip line for extending a wire downward */ /* sets the upper bound of the clip line for extending a wire downward */
int int
defMinWireFunc(tile, yclip) defMinWireFunc(
Tile *tile; Tile *tile,
int *yclip; int *yclip)
{ {
if (TOP(tile) > (*yclip)) *yclip = TOP(tile); if (TOP(tile) > (*yclip)) *yclip = TOP(tile);
return 0; return 0;
@ -872,9 +874,9 @@ defMinWireFunc(tile, yclip)
/* function when it is processed. */ /* function when it is processed. */
int int
defExemptWireFunc(tile, rect) defExemptWireFunc(
Tile *tile; Tile *tile,
Rect *rect; Rect *rect)
{ {
Rect r; Rect r;
@ -897,9 +899,9 @@ defExemptWireFunc(tile, rect)
/* so we can look for attaching material. */ /* so we can look for attaching material. */
int int
defPortTileFunc(tile, cx) defPortTileFunc(
Tile *tile; Tile *tile,
TreeContext *cx; TreeContext *cx)
{ {
SearchContext *scx = cx->tc_scx; SearchContext *scx = cx->tc_scx;
Rect *rport = (Rect *)cx->tc_filter->tf_arg; Rect *rport = (Rect *)cx->tc_filter->tf_arg;
@ -922,10 +924,10 @@ defPortTileFunc(tile, cx)
/* the DEF file. */ /* the DEF file. */
int int
defNetGeometryFunc(tile, plane, defdata) defNetGeometryFunc(
Tile *tile; /* Tile being visited */ Tile *tile, /* Tile being visited */
int plane; /* Plane of the tile being visited */ int plane, /* Plane of the tile being visited */
DefData *defdata; /* Data passed to this function */ DefData *defdata) /* Data passed to this function */
{ {
FILE *f = defdata->f; FILE *f = defdata->f;
CellDef *def = defdata->def; CellDef *def = defdata->def;
@ -1647,11 +1649,11 @@ defNetGeometryFunc(tile, plane, defdata)
*/ */
int int
defCountVias(rootDef, MagicToLefTable, defViaTable, oscale) defCountVias(
CellDef *rootDef; CellDef *rootDef,
LefMapping *MagicToLefTable; LefMapping *MagicToLefTable,
HashTable *defViaTable; HashTable *defViaTable,
float oscale; float oscale)
{ {
TileTypeBitMask contactMask, *rmask; TileTypeBitMask contactMask, *rmask;
TileType ttype, stype; TileType ttype, stype;
@ -1701,8 +1703,8 @@ defCountVias(rootDef, MagicToLefTable, defViaTable, oscale)
/* Simple callback function used by defCountViaFunc */ /* Simple callback function used by defCountViaFunc */
int int
defCheckFunc(tile) defCheckFunc(
Tile *tile; Tile *tile)
{ {
return 1; return 1;
} }
@ -1710,9 +1712,9 @@ defCheckFunc(tile)
/* Callback function used by defCountVias */ /* Callback function used by defCountVias */
int int
defCountViaFunc(tile, cviadata) defCountViaFunc(
Tile *tile; Tile *tile,
CViaData *cviadata; CViaData *cviadata)
{ {
TileType ttype = TiGetType(tile), ctype, rtype; TileType ttype = TiGetType(tile), ctype, rtype;
TileTypeBitMask *rmask, *rmask2; TileTypeBitMask *rmask, *rmask2;
@ -2021,10 +2023,10 @@ defCountViaFunc(tile, cviadata)
*/ */
char * char *
defGetType(ttype, lefptr, do_vias) defGetType(
TileType ttype; TileType ttype,
lefLayer **lefptr; lefLayer **lefptr,
bool do_vias; bool do_vias)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;
@ -2079,11 +2081,11 @@ defGetType(ttype, lefptr, do_vias)
*/ */
void void
defWriteVias(f, rootDef, oscale, lefMagicToLefLayer) defWriteVias(
FILE *f; /* File to write to */ FILE *f, /* File to write to */
CellDef *rootDef; /* Cell definition to use */ CellDef *rootDef, /* Cell definition to use */
float oscale; /* Output scale factor */ float oscale, /* Output scale factor */
LefMapping *lefMagicToLefLayer; LefMapping *lefMagicToLefLayer)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;
@ -2258,8 +2260,8 @@ defWriteVias(f, rootDef, oscale, lefMagicToLefLayer)
*/ */
int int
defCountComponents(rootDef) defCountComponents(
CellDef *rootDef; CellDef *rootDef)
{ {
pointertype total; pointertype total;
int defCountCompFunc(); int defCountCompFunc();
@ -2274,9 +2276,9 @@ defCountComponents(rootDef)
/* Callback function used by defCountComponents */ /* Callback function used by defCountComponents */
int int
defCountCompFunc(cellUse, total) defCountCompFunc(
CellUse *cellUse; CellUse *cellUse,
pointertype *total; pointertype *total)
{ {
/* Ignore any cellUse that does not have an identifier string. */ /* Ignore any cellUse that does not have an identifier string. */
if (cellUse->cu_id == NULL) return 0; if (cellUse->cu_id == NULL) return 0;
@ -2309,8 +2311,8 @@ defCountCompFunc(cellUse, total)
*/ */
int int
defCountPins(rootDef) defCountPins(
CellDef *rootDef; CellDef *rootDef)
{ {
int total; int total;
Label *lab; Label *lab;
@ -2344,11 +2346,11 @@ defCountPins(rootDef)
*/ */
void void
defWritePins(f, rootDef, lefMagicToLefLayer, oscale) defWritePins(
FILE *f; /* File to write to */ FILE *f, /* File to write to */
CellDef *rootDef; /* Cell definition to use */ CellDef *rootDef, /* Cell definition to use */
LefMapping *lefMagicToLefLayer; /* Magic to LEF layer name mapping */ LefMapping *lefMagicToLefLayer, /* Magic to LEF layer name mapping */
float oscale; /* Output scale factor */ float oscale) /* Output scale factor */
{ {
Label *lab; Label *lab;
int lwidth, lheight; int lwidth, lheight;
@ -2447,11 +2449,11 @@ defWritePins(f, rootDef, lefMagicToLefLayer, oscale)
*/ */
void void
defWriteBlockages(f, rootDef, oscale, MagicToLefTable) defWriteBlockages(
FILE *f; /* File to write to */ FILE *f, /* File to write to */
CellDef *rootDef; /* Cell definition to use */ CellDef *rootDef, /* Cell definition to use */
float oscale; /* Output scale factor */ float oscale, /* Output scale factor */
LefMapping *MagicToLefTable; /* Magic to LEF layer mapping */ LefMapping *MagicToLefTable) /* Magic to LEF layer mapping */
{ {
DefObsData defobsdata; DefObsData defobsdata;
lefLayer *lefl; lefLayer *lefl;
@ -2581,11 +2583,11 @@ defWriteBlockages(f, rootDef, oscale, MagicToLefTable)
} }
int int
defblockageVisit(node, res, cap, defobsdata) defblockageVisit(
EFNode *node; EFNode *node,
int res; int res,
EFCapValue cap; EFCapValue cap,
DefObsData *defobsdata; DefObsData *defobsdata)
{ {
CellDef *def = defobsdata->def; CellDef *def = defobsdata->def;
TileType magictype; TileType magictype;
@ -2619,10 +2621,10 @@ defblockageVisit(node, res, cap, defobsdata)
/* for a net. */ /* for a net. */
int int
defBlockageGeometryFunc(tile, plane, defobsdata) defBlockageGeometryFunc(
Tile *tile; /* Tile being visited */ Tile *tile, /* Tile being visited */
int plane; /* Plane of the tile being visited */ int plane, /* Plane of the tile being visited */
DefObsData *defobsdata; /* Data passed to this function */ DefObsData *defobsdata) /* Data passed to this function */
{ {
TileType ttype = TiGetTypeExact(tile); TileType ttype = TiGetTypeExact(tile);
TileType loctype; TileType loctype;
@ -2678,9 +2680,9 @@ defBlockageGeometryFunc(tile, plane, defobsdata)
/* pulled from all non-electrical obstruction types. */ /* pulled from all non-electrical obstruction types. */
int int
defSimpleBlockageFunc(tile, defobsdata) defSimpleBlockageFunc(
Tile *tile; /* Tile being visited */ Tile *tile, /* Tile being visited */
DefObsData *defobsdata; /* Data passed to this function */ DefObsData *defobsdata) /* Data passed to this function */
{ {
TileType ttype = TiGetTypeExact(tile); TileType ttype = TiGetTypeExact(tile);
TileType loctype; TileType loctype;
@ -2732,10 +2734,10 @@ defSimpleBlockageFunc(tile, defobsdata)
*/ */
void void
defWriteComponents(f, rootDef, oscale) defWriteComponents(
FILE *f; /* File to write to */ FILE *f, /* File to write to */
CellDef *rootDef; /* Cell definition to use */ CellDef *rootDef, /* Cell definition to use */
float oscale; /* Output scale factor */ float oscale) /* Output scale factor */
{ {
DefData defdata; DefData defdata;
int defComponentFunc(); /* Forward declaration */ int defComponentFunc(); /* Forward declaration */
@ -2749,11 +2751,12 @@ defWriteComponents(f, rootDef, oscale)
/* Callback function used by defWriteComponents for array members */ /* Callback function used by defWriteComponents for array members */
int int
arrayDefFunc(use, transform, x, y, defdata) arrayDefFunc(
CellUse *use; /* CellUse for array element */ CellUse *use, /* CellUse for array element */
Transform *transform; /* Transform from use to parent */ Transform *transform, /* Transform from use to parent */
int x, y; /* Indices of element */ int x, /* Indices of element */
DefData *defdata; int y,
DefData *defdata)
{ {
int sx = use->cu_xhi - use->cu_xlo; int sx = use->cu_xhi - use->cu_xlo;
int sy = use->cu_yhi - use->cu_ylo; int sy = use->cu_yhi - use->cu_ylo;
@ -2796,9 +2799,9 @@ arrayDefFunc(use, transform, x, y, defdata)
/* Callback function used by defWriteComponents */ /* Callback function used by defWriteComponents */
int int
defComponentFunc(cellUse, defdata) defComponentFunc(
CellUse *cellUse; CellUse *cellUse,
DefData *defdata; DefData *defdata)
{ {
FILE *f = defdata->f; FILE *f = defdata->f;
float oscale = defdata->scale; float oscale = defdata->scale;
@ -2876,8 +2879,8 @@ defComponentFunc(cellUse, defdata)
*/ */
LefMapping * LefMapping *
defMakeInverseLayerMap(do_vias) defMakeInverseLayerMap(
bool do_vias; bool do_vias)
{ {
LefMapping *lefMagicToLefLayer; LefMapping *lefMagicToLefLayer;
lefLayer *lefl; lefLayer *lefl;
@ -2936,12 +2939,12 @@ defMakeInverseLayerMap(do_vias)
*/ */
void void
DefWriteCell(def, outName, allSpecial, units, analRetentive) DefWriteCell(
CellDef *def; /* Cell being written */ CellDef *def, /* Cell being written */
char *outName; /* Name of output file, or NULL. */ char *outName, /* Name of output file, or NULL. */
bool allSpecial; /* Treat all nets as SPECIALNETS? */ bool allSpecial, /* Treat all nets as SPECIALNETS? */
int units; /* Force units to this value (default 1000) */ int units, /* Force units to this value (default 1000) */
bool analRetentive; /* Force compatibility with stupid tools */ bool analRetentive) /* Force compatibility with stupid tools */
{ {
char *filename, *filename1, *filename2; char *filename, *filename1, *filename2;
char line[2048]; char line[2048];

View File

@ -75,9 +75,9 @@ linkedNetName *lefIgnoreNets = NULL; /* Nets names to ignore for antenna area */
#define LEF_HELP 5 #define LEF_HELP 5
void void
CmdLef(w, cmd) CmdLef(
MagWindow *w; MagWindow *w,
TxCommand *cmd; TxCommand *cmd)
{ {
int option, i, cargs, units = 1000; /* Default nanometers */ int option, i, cargs, units = 1000; /* Default nanometers */
const char * const *msg; const char * const *msg;

View File

@ -82,10 +82,10 @@ HashTable lefDefInitHash;
#define PRINT_INTERVAL 5 /* print status at 4 second intervals */ #define PRINT_INTERVAL 5 /* print status at 4 second intervals */
void void
LefEstimate(processed, total, item_name) LefEstimate(
int processed; int processed,
int total; int total,
char *item_name; char *item_name)
{ {
static int check_interval, partition; static int check_interval, partition;
static struct timeval tv_start; static struct timeval tv_start;
@ -137,10 +137,10 @@ LefEstimate(processed, total, item_name)
#if 0 #if 0
void void
LefEstimate(processed, total, item_name) LefEstimate(
int processed; int processed,
int total; int total,
char *item_name; char *item_name)
{ {
static int check_interval, partition; static int check_interval, partition;
static struct timeval tv_start; static struct timeval tv_start;
@ -217,9 +217,9 @@ LefEstimate(processed, total, item_name)
*/ */
char * char *
LefNextToken(f, ignore_eol) LefNextToken(
FILE *f; FILE *f,
bool ignore_eol; bool ignore_eol)
{ {
static char line[LEF_LINE_MAX + 2]; /* input buffer */ static char line[LEF_LINE_MAX + 2]; /* input buffer */
static char *nexttoken = NULL; /* pointer to next token */ static char *nexttoken = NULL; /* pointer to next token */
@ -306,7 +306,9 @@ LefNextToken(f, ignore_eol)
*/ */
void void
LefError(int type, const char *fmt, ...) LefError(
int type,
const char *fmt, ...)
{ {
static int errors = 0, warnings = 0, messages = 0; static int errors = 0, warnings = 0, messages = 0;
va_list args; va_list args;
@ -456,9 +458,9 @@ LefError(int type, const char *fmt, ...)
*/ */
int int
LefParseEndStatement(f, match) LefParseEndStatement(
FILE *f; FILE *f,
const char *match; const char *match)
{ {
char *token; char *token;
int keyword, words; int keyword, words;
@ -523,9 +525,9 @@ LefParseEndStatement(f, match)
*/ */
void void
LefSkipSection(f, section) LefSkipSection(
FILE *f; FILE *f,
const char *section; const char *section)
{ {
const char *token; const char *token;
int keyword, result; int keyword, result;
@ -571,8 +573,8 @@ LefSkipSection(f, section)
*/ */
CellDef * CellDef *
lefFindCell(name) lefFindCell(
char *name; /* Name of the cell to search for */ char *name) /* Name of the cell to search for */
{ {
HashEntry *h; HashEntry *h;
CellDef *def; CellDef *def;
@ -602,8 +604,8 @@ lefFindCell(name)
*/ */
char * char *
LefLower(token) LefLower(
char *token; char *token)
{ {
char *tptr; char *tptr;
@ -634,9 +636,9 @@ LefLower(token)
*/ */
lefLayer * lefLayer *
LefRedefined(lefl, redefname) LefRedefined(
lefLayer *lefl; lefLayer *lefl,
char *redefname; char *redefname)
{ {
lefLayer *slef, *newlefl; lefLayer *slef, *newlefl;
char *altName; char *altName;
@ -718,11 +720,11 @@ LefRedefined(lefl, redefname)
*/ */
TileType TileType
LefReadLayers(f, obstruct, lreturn, rreturn) LefReadLayers(
FILE *f; FILE *f,
bool obstruct; bool obstruct,
TileType *lreturn; TileType *lreturn,
const Rect **rreturn; const Rect **rreturn)
{ {
char *token; char *token;
TileType curlayer = -1; TileType curlayer = -1;
@ -806,9 +808,9 @@ LefReadLayers(f, obstruct, lreturn, rreturn)
*/ */
TileType TileType
LefReadLayer(f, obstruct) LefReadLayer(
FILE *f; FILE *f,
bool obstruct; bool obstruct)
{ {
return LefReadLayers(f, obstruct, (TileType *)NULL, (const Rect **)NULL); return LefReadLayers(f, obstruct, (TileType *)NULL, (const Rect **)NULL);
} }
@ -838,9 +840,10 @@ LefReadLayer(f, obstruct)
*/ */
int int
LefReadLefPoint(f, xp, yp) LefReadLefPoint(
FILE *f; FILE *f,
float *xp, *yp; float *xp,
float *yp)
{ {
char *token; char *token;
bool needMatch = FALSE; bool needMatch = FALSE;
@ -885,10 +888,10 @@ LefReadLefPoint(f, xp, yp)
*/ */
Rect * Rect *
LefReadRect(f, curlayer, oscale) LefReadRect(
FILE *f; FILE *f,
TileType curlayer; TileType curlayer,
float oscale; float oscale)
{ {
char *token; char *token;
float llx, lly, urx, ury; float llx, lly, urx, ury;
@ -983,11 +986,11 @@ parse_error:
*/ */
Point * Point *
LefReadPolygon(f, curlayer, oscale, ppoints) LefReadPolygon(
FILE *f; FILE *f,
TileType curlayer; TileType curlayer,
float oscale; float oscale,
int *ppoints; int *ppoints)
{ {
LinkedRect *lr = NULL, *newRect; LinkedRect *lr = NULL, *newRect;
Point *plist = NULL; Point *plist = NULL;
@ -1059,12 +1062,12 @@ LefReadPolygon(f, curlayer, oscale, ppoints)
*/ */
LinkedRect * LinkedRect *
LefPaintPolygon(lefMacro, pointList, points, curlayer, keep) LefPaintPolygon(
CellDef *lefMacro; CellDef *lefMacro,
Point *pointList; Point *pointList,
int points; int points,
TileType curlayer; TileType curlayer,
bool keep; bool keep)
{ {
int pNum; int pNum;
PaintUndoInfo ui; PaintUndoInfo ui;
@ -1111,9 +1114,9 @@ typedef struct _plane_type {
*------------------------------------------------------------ *------------------------------------------------------------
*/ */
int int
lefConnectFunc(tile, cxp) lefConnectFunc(
Tile *tile; Tile *tile,
TreeContext *cxp; TreeContext *cxp)
{ {
SearchContext *scx = cxp->tc_scx; SearchContext *scx = cxp->tc_scx;
PlaneType *pt = (PlaneType *)cxp->tc_filter->tf_arg; PlaneType *pt = (PlaneType *)cxp->tc_filter->tf_arg;
@ -1145,9 +1148,9 @@ lefConnectFunc(tile, cxp)
*/ */
int int
lefUnconnectFunc(tile, clientdata) lefUnconnectFunc(
Tile *tile; Tile *tile,
ClientData clientdata; /* (unused) */ ClientData clientdata) /* (unused) */
{ {
return 1; return 1;
} }
@ -1186,12 +1189,12 @@ enum lef_geometry_keys {LEF_LAYER = 0, LEF_WIDTH, LEF_PATH,
LEF_GEOMETRY_END}; LEF_GEOMETRY_END};
LinkedRect * LinkedRect *
LefReadGeometry(lefMacro, f, oscale, do_list, is_imported) LefReadGeometry(
CellDef *lefMacro; CellDef *lefMacro,
FILE *f; FILE *f,
float oscale; float oscale,
bool do_list; bool do_list,
bool is_imported; bool is_imported)
{ {
TileType curlayer = -1, otherlayer = -1; TileType curlayer = -1, otherlayer = -1;
@ -1387,15 +1390,17 @@ LefReadGeometry(lefMacro, f, oscale, do_list, is_imported)
*/ */
void void
LefReadPort(lefMacro, f, pinName, pinNum, pinDir, pinUse, pinShape, oscale, LefReadPort(
is_imported, lanno) CellDef *lefMacro,
CellDef *lefMacro; FILE *f,
FILE *f; char *pinName,
char *pinName; int pinNum,
int pinNum, pinDir, pinUse, pinShape; int pinDir,
float oscale; int pinUse,
bool is_imported; int pinShape,
Label *lanno; float oscale,
bool is_imported,
Label *lanno)
{ {
Label *newlab; Label *newlab;
LinkedRect *rectList; 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}; LEF_SHAPE, LEF_NETEXPR, LEF_PIN_END};
void void
LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported) LefReadPin(
CellDef *lefMacro; CellDef *lefMacro,
FILE *f; FILE *f,
char *pinname; char *pinname,
int pinNum; int pinNum,
float oscale; float oscale,
bool is_imported; bool is_imported)
{ {
char *token; char *token;
char *testpin = pinname; char *testpin = pinname;
@ -1826,8 +1831,8 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
*/ */
void void
LefEndStatement(f) LefEndStatement(
FILE *f; FILE *f)
{ {
char *token; char *token;
@ -1861,10 +1866,10 @@ enum lef_nondefprop_keys {
LEF_NONDEFLAYER_SPACE, LEF_NONDEFLAYER_EXT}; LEF_NONDEFLAYER_SPACE, LEF_NONDEFLAYER_EXT};
void void
LefReadNonDefaultRule(f, rname, oscale) LefReadNonDefaultRule(
FILE *f; /* LEF file being read */ FILE *f, /* LEF file being read */
char *rname; /* name of the rule */ char *rname, /* name of the rule */
float oscale; /* scale factor um->magic units */ float oscale) /* scale factor um->magic units */
{ {
char *token; char *token;
char tsave[128]; 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}; LEF_TIMING, LEF_FOREIGN, LEF_PROPERTY, LEF_MACRO_END};
void void
LefReadMacro(f, mname, oscale, importForeign, doAnnotate, lefTimestamp) LefReadMacro(
FILE *f; /* LEF file being read */ FILE *f, /* LEF file being read */
char *mname; /* name of the macro */ char *mname, /* name of the macro */
float oscale; /* scale factor um->magic units */ float oscale, /* scale factor um->magic units */
bool importForeign; /* Whether we should try to read bool importForeign, /* Whether we should try to read
* in a cell. * in a cell.
*/ */
bool doAnnotate; /* If true, ignore all macros that are bool doAnnotate, /* If true, ignore all macros that are
* not already CellDefs. * 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. * as the CellDef's timestamp.
*/ */
{ {
@ -2472,20 +2477,23 @@ void LefGrowVia(curlayer, currect, lefl)
*/ */
void void
LefGenViaGeometry(f, lefl, sizex, sizey, spacex, spacey, LefGenViaGeometry(
encbx, encby, enctx, encty, rows, cols, FILE *f, /* LEF file being read */
tlayer, clayer, blayer, oscale) lefLayer *lefl, /* pointer to via info */
FILE *f; /* LEF file being read */ int sizex, /* cut size */
lefLayer *lefl; /* pointer to via info */ int sizey,
int sizex, sizey; /* cut size */ int spacex, /* cut spacing */
int spacex, spacey; /* cut spacing */ int spacey,
int encbx, encby; /* bottom enclosure of cuts */ int encbx, /* bottom enclosure of cuts */
int enctx, encty; /* top enclosure of cuts */ int encby,
int rows, cols; /* number of cut rows and columns */ int enctx, /* top enclosure of cuts */
TileType tlayer; /* Top layer type */ int encty,
TileType clayer; /* Cut layer type */ int rows, /* number of cut rows and columns */
TileType blayer; /* Bottom layer type */ int cols,
float oscale; /* output scaling */ TileType tlayer, /* Top layer type */
TileType clayer, /* Cut layer type */
TileType blayer, /* Bottom layer type */
float oscale) /* output scaling */
{ {
Rect rect; Rect rect;
int i, j, x, y, w, h, sw, sh; int i, j, x, y, w, h, sw, sh;
@ -2570,11 +2578,11 @@ LefGenViaGeometry(f, lefl, sizex, sizey, spacex, spacey,
*/ */
void void
LefAddViaGeometry(f, lefl, curlayer, oscale) LefAddViaGeometry(
FILE *f; /* LEF file being read */ FILE *f, /* LEF file being read */
lefLayer *lefl; /* pointer to via info */ lefLayer *lefl, /* pointer to via info */
TileType curlayer; /* current tile type */ TileType curlayer, /* current tile type */
float oscale; /* output scaling */ float oscale) /* output scaling */
{ {
Rect *currect; Rect *currect;
LinkedRect *viaLR; LinkedRect *viaLR;
@ -2646,11 +2654,11 @@ enum lef_layer_keys {LEF_LAYER_TYPE=0, LEF_LAYER_WIDTH,
LEF_VIARULE_GENERATE, LEF_LAYER_END}; LEF_VIARULE_GENERATE, LEF_LAYER_END};
void void
LefReadLayerSection(f, lname, mode, lefl) LefReadLayerSection(
FILE *f; /* LEF file being read */ FILE *f, /* LEF file being read */
char *lname; /* name of the layer */ char *lname, /* name of the layer */
int mode; /* layer, via, or viarule */ int mode, /* layer, via, or viarule */
lefLayer *lefl; /* pointer to layer info */ lefLayer *lefl) /* pointer to layer info */
{ {
char *token; char *token;
int keyword, typekey; int keyword, typekey;
@ -2883,11 +2891,11 @@ enum lef_sections {LEF_VERSION = 0,
LEF_END}; LEF_END};
void void
LefRead(inName, importForeign, doAnnotate, lefTimestamp) LefRead(
char *inName; char *inName,
bool importForeign; bool importForeign,
bool doAnnotate; bool doAnnotate,
int lefTimestamp; int lefTimestamp)
{ {
FILE *f; FILE *f;
char *filename; char *filename;

View File

@ -69,7 +69,7 @@ HashTable LefNonDefaultRules;
*/ */
void void
LefInit() LefInit(void)
{ {
/* Ensure that the table has a null entry so we don't run HashKill */ /* Ensure that the table has a null entry so we don't run HashKill */
/* on it when we to the tech initialization. */ /* on it when we to the tech initialization. */
@ -95,7 +95,7 @@ LefInit()
*/ */
void void
LefTechInit() LefTechInit(void)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;
@ -148,7 +148,7 @@ LefTechInit()
*/ */
void void
lefRemoveGeneratedVias() lefRemoveGeneratedVias(void)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;
@ -202,10 +202,10 @@ lefRemoveGeneratedVias()
#define LEFTECH_IGNORE 9 #define LEFTECH_IGNORE 9
bool bool
LefTechLine(sectionName, argc, argv) LefTechLine(
char *sectionName; /* Name of this section (unused). */ char *sectionName, /* Name of this section (unused). */
int argc; /* Number of arguments on line. */ int argc, /* Number of arguments on line. */
char *argv[]; /* Pointers to fields of line. */ char *argv[]) /* Pointers to fields of line. */
{ {
bool isObstruction, isContact, isInactive; bool isObstruction, isContact, isInactive;
HashEntry *he; HashEntry *he;
@ -413,8 +413,9 @@ LefTechLine(sectionName, argc, argv)
*/ */
void void
LefTechScale(scalen, scaled) LefTechScale(
int scalen, scaled; int scalen,
int scaled)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;
@ -474,7 +475,7 @@ LefTechScale(scalen, scaled)
*/ */
void void
LefTechSetDefaults() LefTechSetDefaults(void)
{ {
HashSearch hs; HashSearch hs;
HashEntry *he; HashEntry *he;

View File

@ -87,7 +87,9 @@ int LEFdbUnits = 1000;
*/ */
const char * const char *
lefPrint(char *leffmt, float invalue) lefPrint(
char *leffmt,
float invalue)
{ {
float value, r, l; float value, r, l;
@ -145,19 +147,19 @@ lefPrint(char *leffmt, float invalue)
*/ */
FILE * FILE *
lefFileOpen(def, file, suffix, mode, prealfile) lefFileOpen(
CellDef *def; /* Cell whose .lef file is to be written. Should CellDef *def, /* Cell whose .lef file is to be written. Should
* be NULL if file is being opened for reading. * 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 * derive filename from 'def' as described
* above. * above.
*/ */
char *suffix; /* Either ".lef" for LEF files or ".def" for DEF files */ 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 *mode, /* Either "r" or "w", the mode in which the LEF/DEF
* file is to be opened. * 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. * a string holding the name of the LEF/DEF file.
*/ */
{ {
@ -248,12 +250,12 @@ lefFileOpen(def, file, suffix, mode, prealfile)
*/ */
void void
lefWriteHeader(def, f, lefTech, propTable, siteTable) lefWriteHeader(
CellDef *def; /* Def for which to generate LEF output */ CellDef *def, /* Def for which to generate LEF output */
FILE *f; /* Output to this file */ FILE *f, /* Output to this file */
bool lefTech; /* If TRUE, write layer information */ bool lefTech, /* If TRUE, write layer information */
HashTable *propTable; /* Hash table of property definitions */ HashTable *propTable, /* Hash table of property definitions */
HashTable *siteTable; /* Hash table of sites used */ HashTable *siteTable) /* Hash table of sites used */
{ {
TileType type; TileType type;
HashSearch hs; HashSearch hs;
@ -496,9 +498,9 @@ typedef struct
*/ */
int int
lefEraseGeometry(tile, cdata) lefEraseGeometry(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
lefClient *lefdata = (lefClient *)cdata; lefClient *lefdata = (lefClient *)cdata;
CellDef *flatDef = lefdata->lefFlat; CellDef *flatDef = lefdata->lefFlat;
@ -538,9 +540,9 @@ lefEraseGeometry(tile, cdata)
*/ */
int int
lefGetBound(tile, cdata) lefGetBound(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
Rect *boundary = (Rect *)cdata; Rect *boundary = (Rect *)cdata;
Rect area; Rect area;
@ -566,9 +568,9 @@ lefGetBound(tile, cdata)
*/ */
int int
lefHasPaint(tile, clientData) lefHasPaint(
Tile *tile; Tile *tile,
ClientData clientData; ClientData clientData)
{ {
return 1; return 1;
} }
@ -585,9 +587,9 @@ lefHasPaint(tile, clientData)
*/ */
int int
lefAccumulateArea(tile, cdata) lefAccumulateArea(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
int *area = (int *)cdata; int *area = (int *)cdata;
Rect rarea; Rect rarea;
@ -611,9 +613,9 @@ lefAccumulateArea(tile, cdata)
*/ */
int int
lefFindTopmost(tile, cdata) lefFindTopmost(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
return 1; /* Stop processing on the first tile found */ return 1; /* Stop processing on the first tile found */
} }
@ -633,9 +635,9 @@ lefFindTopmost(tile, cdata)
*/ */
int int
lefYankGeometry(tile, cdata) lefYankGeometry(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
lefClient *lefdata = (lefClient *)cdata; lefClient *lefdata = (lefClient *)cdata;
Rect area; Rect area;
@ -724,9 +726,9 @@ lefYankGeometry(tile, cdata)
*/ */
int int
lefYankContacts(tile, cdata) lefYankContacts(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
lefClient *lefdata = (lefClient *)cdata; lefClient *lefdata = (lefClient *)cdata;
Rect area; Rect area;
@ -793,9 +795,9 @@ lefYankContacts(tile, cdata)
*/ */
int int
lefWriteGeometry(tile, cdata) lefWriteGeometry(
Tile *tile; Tile *tile,
ClientData cdata; ClientData cdata)
{ {
lefClient *lefdata = (lefClient *)cdata; lefClient *lefdata = (lefClient *)cdata;
FILE *f = lefdata->file; FILE *f = lefdata->file;
@ -952,8 +954,8 @@ lefWriteGeometry(tile, cdata)
*/ */
char * char *
MakeLegalLEFSyntax(text) MakeLegalLEFSyntax(
char *text; char *text)
{ {
static char *badLEFchars = ";# -*$\n"; static char *badLEFchars = ";# -*$\n";
char *cptr, *bptr; char *cptr, *bptr;
@ -1003,9 +1005,9 @@ typedef struct _labelLinkedList {
*/ */
bool bool
LefWritePinHeader(f, lab) LefWritePinHeader(
FILE *f; FILE *f,
Label *lab; Label *lab)
{ {
bool ispwrrail = FALSE; bool ispwrrail = FALSE;
@ -1119,14 +1121,14 @@ LefWritePinHeader(f, lab)
*/ */
void void
lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster) lefWriteMacro(
CellDef *def; /* Def for which to generate LEF output */ CellDef *def, /* Def for which to generate LEF output */
FILE *f; /* Output to this file */ FILE *f, /* Output to this file */
float scale; /* Output distance units conversion factor */ float scale, /* Output distance units conversion factor */
int setback; /* If >= 0, hide all detail except pins inside setback */ int setback, /* If >= 0, hide all detail except pins inside setback */
int pinonly; /* If >= 0, only place pins where labels are defined */ int pinonly, /* If >= 0, only place pins where labels are defined */
bool toplayer; /* If TRUE, only output topmost layer of pins */ bool toplayer, /* If TRUE, only output topmost layer of pins */
bool domaster; /* If TRUE, write masterslice layers */ bool domaster) /* If TRUE, write masterslice layers */
{ {
bool propfound, ispwrrail; bool propfound, ispwrrail;
char *propvalue, *class = NULL; char *propvalue, *class = NULL;
@ -2069,10 +2071,10 @@ lefWriteMacro(def, f, scale, setback, pinonly, toplayer, domaster)
*------------------------------------------------------------ *------------------------------------------------------------
*/ */
int int
lefGetSites(stackItem, i, clientData) lefGetSites(
ClientData stackItem; ClientData stackItem,
int i; int i,
ClientData clientData; ClientData clientData)
{ {
CellDef *def = (CellDef *)stackItem; CellDef *def = (CellDef *)stackItem;
HashTable *lefSiteTbl = (HashTable *)clientData; HashTable *lefSiteTbl = (HashTable *)clientData;
@ -2099,10 +2101,10 @@ lefGetSites(stackItem, i, clientData)
*------------------------------------------------------------ *------------------------------------------------------------
*/ */
int int
lefGetProperties(stackItem, i, clientData) lefGetProperties(
ClientData stackItem; ClientData stackItem,
int i; int i,
ClientData clientData; ClientData clientData)
{ {
CellDef *def = (CellDef *)stackItem; CellDef *def = (CellDef *)stackItem;
HashTable *lefPropTbl = (HashTable *)clientData; HashTable *lefPropTbl = (HashTable *)clientData;
@ -2171,16 +2173,15 @@ lefGetProperties(stackItem, i, clientData)
*/ */
void void
LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer, LefWriteAll(
lefDoMaster, recurse) CellUse *rootUse,
CellUse *rootUse; bool writeTopCell,
bool writeTopCell; bool lefTech,
bool lefTech; int lefHide,
int lefHide; int lefPinOnly,
int lefPinOnly; bool lefTopLayer,
bool lefTopLayer; bool lefDoMaster,
bool lefDoMaster; bool recurse)
bool recurse;
{ {
HashTable propHashTbl, siteHashTbl; HashTable propHashTbl, siteHashTbl;
CellDef *def, *rootdef, *err_def; CellDef *def, *rootdef, *err_def;
@ -2268,8 +2269,8 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer,
*/ */
int int
lefDefInitFunc(def) lefDefInitFunc(
CellDef *def; CellDef *def)
{ {
def->cd_client = (ClientData) 0; def->cd_client = (ClientData) 0;
return (0); return (0);
@ -2282,9 +2283,9 @@ lefDefInitFunc(def)
*/ */
int int
lefDefPushFunc(use, recurse) lefDefPushFunc(
CellUse *use; CellUse *use,
bool *recurse; bool *recurse)
{ {
CellDef *def = use->cu_def; CellDef *def = use->cu_def;
@ -2315,16 +2316,15 @@ lefDefPushFunc(use, recurse)
*/ */
void void
LefWriteCell(def, outName, isRoot, lefTech, lefHide, lefPinOnly, lefTopLayer, LefWriteCell(
lefDoMaster) CellDef *def, /* Cell being written */
CellDef *def; /* Cell being written */ char *outName, /* Name of output file, or NULL. */
char *outName; /* Name of output file, or NULL. */ bool isRoot, /* Is this the root cell? */
bool isRoot; /* Is this the root cell? */ bool lefTech, /* Output layer information if TRUE */
bool lefTech; /* Output layer information if TRUE */ int lefHide, /* Hide detail other than pins if >= 0 */
int lefHide; /* Hide detail other than pins if >= 0 */ int lefPinOnly, /* Only generate pins on label areas */
int lefPinOnly; /* Only generate pins on label areas */ bool lefTopLayer, /* Use only topmost layer of pin if TRUE */
bool lefTopLayer; /* Use only topmost layer of pin if TRUE */ bool lefDoMaster) /* Write masterslice layers if TRUE */
bool lefDoMaster; /* Write masterslice layers if TRUE */
{ {
char *filename; char *filename;
FILE *f; FILE *f;

View File

@ -35,8 +35,8 @@ extern void CmdLef();
*/ */
int int
Magiclef_Init(interp) Magiclef_Init(
Tcl_Interp *interp; Tcl_Interp *interp)
{ {
/* Sanity checks! */ /* Sanity checks! */
if (interp == NULL) return TCL_ERROR; if (interp == NULL) return TCL_ERROR;