Remove trailing whitespace.

This commit is contained in:
Tim 'mithro' Ansell 2020-05-22 15:37:41 -07:00 committed by Tim Edwards
parent e2f0832cdf
commit 2c066c8df0
1 changed files with 24 additions and 24 deletions

View File

@ -1,19 +1,19 @@
/* /*
* lefWrite.c -- * lefWrite.c --
* *
* This module incorporates the LEF/DEF format for standard-cell place and * This module incorporates the LEF/DEF format for standard-cell place and
* route. * route.
* *
* Version 0.1 (May 1, 2003): LEF output for cells, to include pointer to * Version 0.1 (May 1, 2003): LEF output for cells, to include pointer to
* GDS, automatic generation of GDS if not already made, bounding box export, * GDS, automatic generation of GDS if not already made, bounding box export,
* port export, export of irouter "fence", "magnet", and "rotate" layers * port export, export of irouter "fence", "magnet", and "rotate" layers
* for defining router hints, and generating areas for obstructions and * for defining router hints, and generating areas for obstructions and
* pin layers. * pin layers.
* *
*/ */
#ifndef lint #ifndef lint
static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/lefWrite.c,v 1.3 2010/06/24 12:37:18 tim Exp $"; static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/lef/lefWrite.c,v 1.3 2010/06/24 12:37:18 tim Exp $";
#endif /* not lint */ #endif /* not lint */
#include <stdio.h> #include <stdio.h>
@ -97,7 +97,7 @@ lefFileOpen(def, file, suffix, mode, prealfile)
int len; int len;
FILE *rfile; FILE *rfile;
if (file) if (file)
name = file; name = file;
else if (def && def->cd_file) else if (def && def->cd_file)
name = def->cd_file; name = def->cd_file;
@ -141,7 +141,7 @@ lefFileOpen(def, file, suffix, mode, prealfile)
if ((rfile = PaOpen(name, mode, locsuffix, Path, CellLibPath, prealfile)) != NULL) if ((rfile = PaOpen(name, mode, locsuffix, Path, CellLibPath, prealfile)) != NULL)
return rfile; return rfile;
if (def) if (def)
{ {
if (name == def->cd_name) return NULL; if (name == def->cd_name) return NULL;
name = def->cd_name; name = def->cd_name;
@ -226,7 +226,7 @@ lefWriteHeader(def, f, lefTech)
if (lefl->refCnt > 1) lefl->refCnt = -lefl->refCnt; if (lefl->refCnt > 1) lefl->refCnt = -lefl->refCnt;
/* Ignore obstruction-only layers */ /* Ignore obstruction-only layers */
if (lefl->type == -1) continue; if (lefl->type == -1) continue;
/* Ignore VIA types, report only CUT types here */ /* Ignore VIA types, report only CUT types here */
else if ((lefl->lefClass == CLASS_VIA) else if ((lefl->lefClass == CLASS_VIA)
@ -650,11 +650,11 @@ MakeLegalLEFSyntax(text)
if (*cptr == '\0' && *bptr == '\0') if (*cptr == '\0' && *bptr == '\0')
return text; return text;
rstr = StrDup((char **)NULL, text); rstr = StrDup((char **)NULL, text);
for (cptr = rstr; *cptr != '\0'; cptr++) for (cptr = rstr; *cptr != '\0'; cptr++)
for (bptr = badLEFchars; bptr != '\0'; bptr++) for (bptr = badLEFchars; bptr != '\0'; bptr++)
if (*cptr == *bptr) if (*cptr == *bptr)
{ {
*cptr = '_'; *cptr = '_';
break; break;
@ -662,7 +662,7 @@ MakeLegalLEFSyntax(text)
return rstr; return rstr;
} }
/* Linked list structure for holding PIN PORT geometry areas */ /* Linked list structure for holding PIN PORT geometry areas */
typedef struct _labelLinkedList { typedef struct _labelLinkedList {
@ -824,7 +824,7 @@ lefWriteMacro(def, f, scale, hide)
lefFlatUse.cu_expandMask = CU_DESCEND_SPECIAL; lefFlatUse.cu_expandMask = CU_DESCEND_SPECIAL;
lefFlatUse.cu_def = lefFlatDef; lefFlatUse.cu_def = lefFlatDef;
DBSetTrans(&lefFlatUse, &GeoIdentityTransform); DBSetTrans(&lefFlatUse, &GeoIdentityTransform);
lefSourceUse.cu_id = StrDup((char **)NULL, "Source cell"); lefSourceUse.cu_id = StrDup((char **)NULL, "Source cell");
lefSourceUse.cu_expandMask = CU_DESCEND_ALL; lefSourceUse.cu_expandMask = CU_DESCEND_ALL;
lefSourceUse.cu_def = def; lefSourceUse.cu_def = def;
@ -895,7 +895,7 @@ lefWriteMacro(def, f, scale, hide)
/* Macro header information (to be completed) */ /* Macro header information (to be completed) */
fprintf(f, "MACRO %s\n", def->cd_name); fprintf(f, "MACRO %s\n", def->cd_name);
/* LEF data is stored in the "cd_props" hash table. If the hash */ /* LEF data is stored in the "cd_props" hash table. If the hash */
/* table is NULL or a specific property undefined, then the LEF */ /* table is NULL or a specific property undefined, then the LEF */
@ -931,7 +931,7 @@ lefWriteMacro(def, f, scale, hide)
{ {
boundary.r_xbot = boundary.r_xtop = 0; boundary.r_xbot = boundary.r_xtop = 0;
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
DBSrPaintArea((Tile *)NULL, lefFlatUse.cu_def->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, lefFlatUse.cu_def->cd_planes[pNum],
&TiPlaneRect, &boundmask, lefGetBound, &TiPlaneRect, &boundmask, lefGetBound,
(ClientData)(&boundary)); (ClientData)(&boundary));
} }
@ -1106,7 +1106,7 @@ lefWriteMacro(def, f, scale, hide)
antgatearea = 0; antgatearea = 0;
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{ {
DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum],
&TiPlaneRect, &gatetypemask, &TiPlaneRect, &gatetypemask,
lefAccumulateArea, (ClientData) &antgatearea); lefAccumulateArea, (ClientData) &antgatearea);
// Stop after first plane with geometry to avoid double-counting // Stop after first plane with geometry to avoid double-counting
@ -1117,7 +1117,7 @@ lefWriteMacro(def, f, scale, hide)
antdiffarea = 0; antdiffarea = 0;
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{ {
DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum],
&TiPlaneRect, &difftypemask, &TiPlaneRect, &difftypemask,
lefAccumulateArea, (ClientData) &antdiffarea); lefAccumulateArea, (ClientData) &antdiffarea);
// Stop after first plane with geometry to avoid double-counting // Stop after first plane with geometry to avoid double-counting
@ -1134,11 +1134,11 @@ lefWriteMacro(def, f, scale, hide)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{ {
lc.pNum = pNum; lc.pNum = pNum;
DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum],
&TiPlaneRect, &DBAllButSpaceAndDRCBits, &TiPlaneRect, &DBAllButSpaceAndDRCBits,
lefYankGeometry, (ClientData) &lc); lefYankGeometry, (ClientData) &lc);
while (DBSrPaintArea((Tile *)NULL, lc.lefYank->cd_planes[pNum], while (DBSrPaintArea((Tile *)NULL, lc.lefYank->cd_planes[pNum],
&TiPlaneRect, &lc.rmask, &TiPlaneRect, &lc.rmask,
lefWriteGeometry, (ClientData) &lc) == 1) lefWriteGeometry, (ClientData) &lc) == 1)
{ {
@ -1158,7 +1158,7 @@ lefWriteMacro(def, f, scale, hide)
lc.needHeader = FALSE; lc.needHeader = FALSE;
} }
DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, SelectDef->cd_planes[pNum],
&TiPlaneRect, &DBAllButSpaceAndDRCBits, &TiPlaneRect, &DBAllButSpaceAndDRCBits,
lefEraseGeometry, (ClientData) &lc); lefEraseGeometry, (ClientData) &lc);
} }
@ -1243,7 +1243,7 @@ lefWriteMacro(def, f, scale, hide)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
if (TTMaskHasType(&DBPlaneTypes[pNum], ttype)) if (TTMaskHasType(&DBPlaneTypes[pNum], ttype))
{ {
DBSrPaintArea((Tile *)NULL, lefFlatUse.cu_def->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, lefFlatUse.cu_def->cd_planes[pNum],
&TiPlaneRect, &DBAllButSpaceAndDRCBits, &TiPlaneRect, &DBAllButSpaceAndDRCBits,
lefGetBound, (ClientData)(&layerBound)); lefGetBound, (ClientData)(&layerBound));
} }
@ -1277,7 +1277,7 @@ lefWriteMacro(def, f, scale, hide)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{ {
lc.pNum = pNum; lc.pNum = pNum;
DBSrPaintArea((Tile *)NULL, lefFlatDef->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, lefFlatDef->cd_planes[pNum],
&TiPlaneRect, &DBAllButSpaceAndDRCBits, &TiPlaneRect, &DBAllButSpaceAndDRCBits,
lefYankGeometry, (ClientData) &lc); lefYankGeometry, (ClientData) &lc);
} }
@ -1287,7 +1287,7 @@ lefWriteMacro(def, f, scale, hide)
for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++) for (pNum = PL_TECHDEPBASE; pNum < DBNumPlanes; pNum++)
{ {
DBSrPaintArea((Tile *)NULL, lc.lefYank->cd_planes[pNum], DBSrPaintArea((Tile *)NULL, lc.lefYank->cd_planes[pNum],
&TiPlaneRect, &lc.rmask, &TiPlaneRect, &lc.rmask,
lefWriteGeometry, (ClientData) &lc); lefWriteGeometry, (ClientData) &lc);
} }
@ -1394,14 +1394,14 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, recurse)
fclose(f); fclose(f);
StackFree(lefDefStack); StackFree(lefDefStack);
} }
/* /*
* Function to initialize the client data field of all * Function to initialize the client data field of all
* cell defs, in preparation for generating LEF output * cell defs, in preparation for generating LEF output
* for a subtree rooted at a particular def. * for a subtree rooted at a particular def.
*/ */
int int
lefDefInitFunc(def) lefDefInitFunc(def)
CellDef *def; CellDef *def;
{ {
@ -1418,7 +1418,7 @@ lefDefInitFunc(def)
int int
lefDefPushFunc(use, recurse) lefDefPushFunc(use, recurse)
CellUse *use; CellUse *use;
bool *recurse; bool *recurse;
{ {
CellDef *def = use->cu_def; CellDef *def = use->cu_def;