diff --git a/cif/CIFrdutils.c b/cif/CIFrdutils.c index d1af7be5..f190a2ac 100644 --- a/cif/CIFrdutils.c +++ b/cif/CIFrdutils.c @@ -1469,9 +1469,9 @@ cifParseComment(void) * ---------------------------------------------------------------------------- */ -Transform * +const Transform * CIFDirectionToTrans( - Point *point) /* Direction vector from origin. */ + const Point *point) /* Direction vector from origin. */ { if ((point->p_x != 0) && (point->p_y == 0)) { diff --git a/cif/CIFread.h b/cif/CIFread.h index 57f49e4a..c5400391 100644 --- a/cif/CIFread.h +++ b/cif/CIFread.h @@ -176,16 +176,14 @@ extern void CIFReadCellInit(int ptrkeys); extern void CIFReadCellCleanup(int filetype); extern LinkedRect *CIFPolyToRects(CIFPath *path, Plane *plane, PaintResultType *resultTbl, PaintUndoInfo *ui, bool isCalma); -extern Transform *CIFDirectionToTrans(Point *point); +extern const Transform *CIFDirectionToTrans(const Point *point); extern int CIFReadNameToType(char *name, bool newOK); extern int CIFCalmaLayerToCifLayer(int layer, int datatype, CIFReadStyle *calmaStyle); - extern void CIFPropRecordPath(CellDef *def, CIFPath *pathheadp, bool iswire, char *propname); extern void CIFPaintWirePath(CIFPath *pathheadp, int width, bool endcap, Plane *plane, PaintResultType *ptable, PaintUndoInfo *ui); extern void CIFMakeManhattanPath(CIFPath *pathHead, Plane *plane, PaintResultType *resultTbl, PaintUndoInfo *ui); - extern int CIFEdgeDirection(CIFPath *first, CIFPath *last); /* Variable argument procedures require complete prototype */ diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 5d8f7d46..442a2542 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -4828,7 +4828,8 @@ cmdDumpParseArgs( CellDef *def, *rootDef, *editDef; bool hasChild, hasRoot, hasTrans; Rect rootBox, bbox; - Transform *tx_cell, trans_cell; + const Transform *tx_cell; + Transform trans_cell; char **av; char *cellnameptr, *fullpathname; int ac, clen; diff --git a/lef/defRead.c b/lef/defRead.c index c2753d1b..56effd90 100644 --- a/lef/defRead.c +++ b/lef/defRead.c @@ -1302,7 +1302,8 @@ DefReadLocation(use, f, oscale, tptr, noplace) Transform *tptr; bool noplace; { - Rect *r, tr, rect; + const Rect *r; + Rect tr, rect; int keyword; char *token; float x, y; diff --git a/lef/lefRead.c b/lef/lefRead.c index 22f526ea..b10934f3 100644 --- a/lef/lefRead.c +++ b/lef/lefRead.c @@ -722,7 +722,7 @@ LefReadLayers(f, obstruct, lreturn, rreturn) FILE *f; bool obstruct; TileType *lreturn; - Rect **rreturn; + const Rect **rreturn; { char *token; TileType curlayer = -1; @@ -810,7 +810,7 @@ LefReadLayer(f, obstruct) FILE *f; bool obstruct; { - return LefReadLayers(f, obstruct, (TileType *)NULL, (Rect **)NULL); + return LefReadLayers(f, obstruct, (TileType *)NULL, (const Rect **)NULL); } /* @@ -1200,7 +1200,8 @@ LefReadGeometry(lefMacro, f, oscale, do_list, is_imported) LinkedRect *newRect, *rectList; Point *pointList; int points; - Rect *paintrect, *contact = NULL; + Rect *paintrect; + const Rect *contact = NULL; static char *geometry_keys[] = { "LAYER", diff --git a/utils/geometry.c b/utils/geometry.c index fff7c9c2..7d751e33 100644 --- a/utils/geometry.c +++ b/utils/geometry.c @@ -36,26 +36,26 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ *------------------------------------------------------------------- */ -global Transform GeoIdentityTransform = { 1, 0, 0, 0, 1, 0 }; -global Transform GeoUpsideDownTransform = { 1, 0, 0, 0, -1, 0 }; -global Transform GeoSidewaysTransform = { -1, 0, 0, 0, 1, 0 }; -global Transform Geo90Transform = { 0, 1, 0, -1, 0, 0 }; -global Transform Geo180Transform = { -1, 0, 0, 0, -1, 0 }; -global Transform Geo270Transform = { 0, -1, 0, 1, 0, 0 }; +global const Transform GeoIdentityTransform = { 1, 0, 0, 0, 1, 0 }; +global const Transform GeoUpsideDownTransform = { 1, 0, 0, 0, -1, 0 }; +global const Transform GeoSidewaysTransform = { -1, 0, 0, 0, 1, 0 }; +global const Transform Geo90Transform = { 0, 1, 0, -1, 0, 0 }; +global const Transform Geo180Transform = { -1, 0, 0, 0, -1, 0 }; +global const Transform Geo270Transform = { 0, -1, 0, 1, 0, 0 }; /* * Additional Transforms (Reflections at 45 and 135 degrees) */ -global Transform GeoRef45Transform = { 0, 1, 0, 1, 0, 0 }; -global Transform GeoRef135Transform = { 0, -1, 0, -1, 0, 0 }; +global const Transform GeoRef45Transform = { 0, 1, 0, 1, 0, 0 }; +global const Transform GeoRef135Transform = { 0, -1, 0, -1, 0, 0 }; /* *------------------------------------------------------------------- * Declaration of the table of opposite directions: *------------------------------------------------------------------- */ -global int GeoOppositePos[] = +global const int GeoOppositePos[] = { GEO_CENTER, /* GEO_CENTER */ GEO_SOUTH, /* GEO_NORTH */ @@ -74,9 +74,9 @@ global int GeoOppositePos[] = *------------------------------------------------------------------- */ -global Rect GeoNullRect = { {0, 0}, {0, 0} }; -global Rect GeoInvertedRect = { {0, 0}, {-1, -1} }; -global Point GeoOrigin = { 0, 0 }; +global const Rect GeoNullRect = { {0, 0}, {0, 0} }; +global const Rect GeoInvertedRect = { {0, 0}, {-1, -1} }; +global const Point GeoOrigin = { 0, 0 }; /*------------------------------------------------------------------- diff --git a/utils/geometry.h b/utils/geometry.h index 5ea15b55..fc82835e 100644 --- a/utils/geometry.h +++ b/utils/geometry.h @@ -211,19 +211,19 @@ extern void GeoScaleTrans(const Transform *trans1, int m, Transform *trans2); *------------------------------------------------------------------- */ -extern Transform GeoIdentityTransform; -extern Transform GeoUpsideDownTransform; -extern Transform GeoSidewaysTransform; -extern Transform Geo90Transform; -extern Transform Geo180Transform; -extern Transform Geo270Transform; -extern Transform GeoRef45Transform; -extern Transform GeoRef135Transform; +extern const Transform GeoIdentityTransform; +extern const Transform GeoUpsideDownTransform; +extern const Transform GeoSidewaysTransform; +extern const Transform Geo90Transform; +extern const Transform Geo180Transform; +extern const Transform Geo270Transform; +extern const Transform GeoRef45Transform; +extern const Transform GeoRef135Transform; -extern Rect GeoNullRect; -extern Rect GeoInvertedRect; -extern Point GeoOrigin; +extern const Rect GeoNullRect; +extern const Rect GeoInvertedRect; +extern const Point GeoOrigin; -extern int GeoOppositePos[]; +extern const int GeoOppositePos[]; #endif /* _GEOMETRY_H */