LookupFull() constify call-site

lef/lefRead.c LookupFull() constify call-site
lef/defRead.c LookupFull() constify call-site
graphics/grDStyle.c: LookupFull() constify call-site
This commit is contained in:
Darryl L. Miles 2024-10-10 20:16:01 +01:00 committed by Tim Edwards
parent 14b6453707
commit a3dce62887
3 changed files with 36 additions and 36 deletions

View File

@ -71,7 +71,7 @@ global int **GrStippleTable = NULL;
global int grNumStipples = 0; global int grNumStipples = 0;
/* MUST be the same indices as the constants in graphicsInt.h */ /* MUST be the same indices as the constants in graphicsInt.h */
char *fillStyles[] = { const char * const fillStyles[] = {
"solid", "solid",
"cross", "cross",
"outline", "outline",

View File

@ -106,7 +106,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
lefRule *rule = NULL; lefRule *rule = NULL;
int keyword; int keyword;
static char *specnet_keys[] = { static const char * const specnet_keys[] = {
"SHAPE", "SHAPE",
"STYLE", "STYLE",
"USE", "USE",
@ -124,7 +124,7 @@ DefAddRoutes(rootDef, f, oscale, special, netname, ruleset, defLayerMap, annotat
NULL NULL
}; };
static char *specnet_shape_keys[] = { static const char * const specnet_shape_keys[] = {
"RING", "RING",
"PADRING", "PADRING",
"BLOCKRING", "BLOCKRING",
@ -800,13 +800,13 @@ DefReadNonDefaultRules(f, rootDef, sname, oscale, total)
lefRule *rule = NULL; lefRule *rule = NULL;
bool inlayer; bool inlayer;
static char *nondef_keys[] = { static const char * const nondef_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *nondef_property_keys[] = { static const char * const nondef_property_keys[] = {
"HARDSPACING", "HARDSPACING",
"LAYER", "LAYER",
"VIA", "VIA",
@ -1060,13 +1060,13 @@ DefReadNets(f, rootDef, sname, oscale, special, dolabels, annotate, total)
HashEntry *he; HashEntry *he;
bool needanno; bool needanno;
static char *net_keys[] = { static const char * const net_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *net_property_keys[] = { static const char * const net_property_keys[] = {
"USE", "USE",
"ROUTED", "ROUTED",
"NOSHIELD", "NOSHIELD",
@ -1309,7 +1309,7 @@ DefReadLocation(use, f, oscale, tptr, noplace)
float x, y; float x, y;
Transform t2; Transform t2;
static char *orientations[] = { static const char * const orientations[] = {
"N", "S", "E", "W", "FN", "FS", "FE", "FW" "N", "S", "E", "W", "FN", "FS", "FE", "FW"
}; };
@ -1457,13 +1457,13 @@ DefReadPins(f, rootDef, sname, oscale, total, annotate)
bool pending = FALSE; bool pending = FALSE;
bool hasports = FALSE; bool hasports = FALSE;
static char *pin_keys[] = { static const char * const pin_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *pin_property_keys[] = { static const char * const pin_property_keys[] = {
"NET", "NET",
"DIRECTION", "DIRECTION",
"LAYER", "LAYER",
@ -1475,7 +1475,7 @@ DefReadPins(f, rootDef, sname, oscale, total, annotate)
NULL NULL
}; };
static char *pin_classes[] = { static const char * const pin_classes[] = {
"DEFAULT", "DEFAULT",
"INPUT", "INPUT",
"OUTPUT TRISTATE", "OUTPUT TRISTATE",
@ -1485,7 +1485,7 @@ DefReadPins(f, rootDef, sname, oscale, total, annotate)
NULL NULL
}; };
static char *pin_uses[] = { static const char * const pin_uses[] = {
"DEFAULT", "DEFAULT",
"SIGNAL", "SIGNAL",
"POWER", "POWER",
@ -1778,13 +1778,13 @@ DefReadBlockages(f, rootDef, sname, oscale, total)
lefLayer *lefl; lefLayer *lefl;
HashEntry *he; HashEntry *he;
static char *block_keys[] = { static const char * const block_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *block_property_keys[] = { static const char * const block_property_keys[] = {
"RECT", "RECT",
"LAYER", "LAYER",
NULL NULL
@ -1903,13 +1903,13 @@ DefReadVias(f, sname, oscale, total)
int rows = 1, cols = 1; int rows = 1, cols = 1;
TileType tlayer, clayer, blayer; TileType tlayer, clayer, blayer;
static char *via_keys[] = { static const char * const via_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *via_property_keys[] = { static const char * const via_property_keys[] = {
"RECT", "RECT",
"VIARULE", "VIARULE",
"CUTSIZE", "CUTSIZE",
@ -2179,13 +2179,13 @@ DefReadComponents(f, rootDef, sname, oscale, total)
int keyword, subkey, values; int keyword, subkey, values;
int processed = 0; int processed = 0;
static char *component_keys[] = { static const char * const component_keys[] = {
"-", "-",
"END", "END",
NULL NULL
}; };
static char *property_keys[] = { static const char * const property_keys[] = {
"FIXED", "FIXED",
"COVER", "COVER",
"PLACED", "PLACED",
@ -2398,7 +2398,7 @@ DefRead(inName, dolabels, annotate, noblockage)
float oscale; float oscale;
Rect *dierect; Rect *dierect;
static char *sections[] = { static const char * const sections[] = {
"VERSION", "VERSION",
"NAMESCASESENSITIVE", "NAMESCASESENSITIVE",
"UNITS", "UNITS",

View File

@ -462,9 +462,9 @@ LefParseEndStatement(f, match)
{ {
char *token; char *token;
int keyword, words; int keyword, words;
char *match_name[2]; const char * match_name[2];
static char *end_section[] = { static const char * const end_section[] = {
"END", "END",
"ENDEXT", "ENDEXT",
NULL NULL
@ -529,7 +529,7 @@ LefSkipSection(f, section)
{ {
char *token; char *token;
int keyword, result; int keyword, result;
static char *end_section[] = { static const char * const end_section[] = {
"END", "END",
"ENDEXT", "ENDEXT",
NULL NULL
@ -1203,7 +1203,7 @@ LefReadGeometry(lefMacro, f, oscale, do_list, is_imported)
Rect *paintrect; Rect *paintrect;
const Rect *contact = NULL; const Rect *contact = NULL;
static char *geometry_keys[] = { static const char * const geometry_keys[] = {
"LAYER", "LAYER",
"WIDTH", "WIDTH",
"PATH", "PATH",
@ -1526,7 +1526,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
Label *firstlab; Label *firstlab;
bool firstport = TRUE; bool firstport = TRUE;
static char *pin_keys[] = { static const char * const pin_keys[] = {
"DIRECTION", "DIRECTION",
"USE", "USE",
"PORT", "PORT",
@ -1545,7 +1545,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
NULL NULL
}; };
static char *pin_classes[] = { static const char * const pin_classes[] = {
"DEFAULT", "DEFAULT",
"INPUT", "INPUT",
"OUTPUT", "OUTPUT",
@ -1555,7 +1555,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
NULL NULL
}; };
static int lef_class_to_bitmask[] = { static const int lef_class_to_bitmask[] = {
PORT_CLASS_DEFAULT, PORT_CLASS_DEFAULT,
PORT_CLASS_INPUT, PORT_CLASS_INPUT,
PORT_CLASS_OUTPUT, PORT_CLASS_OUTPUT,
@ -1564,7 +1564,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
PORT_CLASS_FEEDTHROUGH PORT_CLASS_FEEDTHROUGH
}; };
static char *pin_uses[] = { static const char * const pin_uses[] = {
"DEFAULT", "DEFAULT",
"SIGNAL", "SIGNAL",
"ANALOG", "ANALOG",
@ -1574,7 +1574,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
NULL NULL
}; };
static int lef_use_to_bitmask[] = { static const int lef_use_to_bitmask[] = {
PORT_USE_DEFAULT, PORT_USE_DEFAULT,
PORT_USE_SIGNAL, PORT_USE_SIGNAL,
PORT_USE_ANALOG, PORT_USE_ANALOG,
@ -1583,7 +1583,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
PORT_USE_CLOCK PORT_USE_CLOCK
}; };
static char *pin_shapes[] = { static const char * const pin_shapes[] = {
"DEFAULT", "DEFAULT",
"ABUTMENT", "ABUTMENT",
"RING", "RING",
@ -1591,7 +1591,7 @@ LefReadPin(lefMacro, f, pinname, pinNum, oscale, is_imported)
NULL NULL
}; };
static int lef_shape_to_bitmask[] = { static const int lef_shape_to_bitmask[] = {
PORT_SHAPE_DEFAULT, PORT_SHAPE_DEFAULT,
PORT_SHAPE_ABUT, PORT_SHAPE_ABUT,
PORT_SHAPE_RING, PORT_SHAPE_RING,
@ -1878,7 +1878,7 @@ LefReadNonDefaultRule(f, rname, oscale)
int idx; int idx;
bool inlayer, done; bool inlayer, done;
static char *nondef_property_keys[] = { static const char * const nondef_property_keys[] = {
"HARDSPACING", "HARDSPACING",
"LAYER", "LAYER",
"END", "END",
@ -2094,7 +2094,7 @@ LefReadMacro(f, mname, oscale, importForeign, doAnnotate, lefTimestamp)
bool has_size, is_imported = FALSE, propfound; bool has_size, is_imported = FALSE, propfound;
Rect lefBBox; Rect lefBBox;
static char *macro_keys[] = { static const char * const macro_keys[] = {
"CLASS", "CLASS",
"SIZE", "SIZE",
"ORIGIN", "ORIGIN",
@ -2659,7 +2659,7 @@ LefReadLayerSection(f, lname, mode, lefl)
float fvalue, oscale; float fvalue, oscale;
/* These are defined in the order of CLASS_* in lefInt.h */ /* These are defined in the order of CLASS_* in lefInt.h */
static char *layer_type_keys[] = { static const char * const layer_type_keys[] = {
"ROUTING", "ROUTING",
"CUT", "CUT",
"MASTERSLICE", "MASTERSLICE",
@ -2667,7 +2667,7 @@ LefReadLayerSection(f, lname, mode, lefl)
NULL NULL
}; };
static char *layer_keys[] = { static const char * const layer_keys[] = {
"TYPE", "TYPE",
"WIDTH", "WIDTH",
"MAXWIDTH", "MAXWIDTH",
@ -2704,7 +2704,7 @@ LefReadLayerSection(f, lname, mode, lefl)
NULL NULL
}; };
static char *spacing_keys[] = { static const char * const spacing_keys[] = {
"RANGE", "RANGE",
";", ";",
NULL NULL
@ -2898,7 +2898,7 @@ LefRead(inName, importForeign, doAnnotate, lefTimestamp)
HashEntry *he; HashEntry *he;
lefLayer *lefl; lefLayer *lefl;
static char *sections[] = { static const char * const sections[] = {
"VERSION", "VERSION",
"BUSBITCHARS", "BUSBITCHARS",
"DIVIDERCHAR", "DIVIDERCHAR",