mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-08-22 14:17:43 +02:00
LookupStruct() constify call-site
irouter/irTestCmd.c: LookupStruct() constify call-site irouter/irCommand.c: LookupStruct() constify call-site mzrouter/mzTestCmd.c: LookupStruct() constify call-site mzrouter/mzTech.c: LookupStruct() constify call-site router/rtrCmd.c: LookupStruct() constify call-site plow/PlowTest.c: LookupStruct() constify call-site plow/PlowTech.c: LookupStruct() constify call-site plot/plotVers.c: LookupStruct() constify call-site grouter/grouteTest.c: LookupStruct() constify call-site garouter/gaTest.c: LookupStruct() constify call-site extract/ExtTest.c: LookupStruct() constify call-site extract/ExtTech.c: LookupStruct() constify call-site extflat/EFread.c: LookupStruct() constify call-site DRCtech.c: LookupStruct() constify call-site debugFlags.c: LookupStruct() constify call-site CmdSubrs.c: LookupStruct() constify call-site geometry.c: LookupStruct() constify call-site set.c: LookupStruct() constify call-site
This commit is contained in:
committed by
Tim Edwards
parent
fb8f7b94aa
commit
14b6453707
+7
-7
@@ -89,14 +89,14 @@ typedef enum
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char *k_name;
|
||||
const char *k_name;
|
||||
int k_key;
|
||||
int k_minargs;
|
||||
int k_maxargs;
|
||||
char *k_usage;
|
||||
const char *k_usage;
|
||||
} keydesc;
|
||||
|
||||
static keydesc keyTable[] = {
|
||||
static const keydesc keyTable[] = {
|
||||
{"areacap", AREAC, 3, 3,
|
||||
"types capacitance"},
|
||||
|
||||
@@ -202,7 +202,7 @@ static keydesc keyTable[] = {
|
||||
|
||||
/* types are enumerated in extract.h */
|
||||
|
||||
static keydesc devTable[] = {
|
||||
static const keydesc devTable[] = {
|
||||
{"mosfet", DEV_MOSFET, 5, 10,
|
||||
"name gate-types src-types [drn-types] sub-types|None sub-node [gscap gccap]"},
|
||||
|
||||
@@ -1954,7 +1954,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||
TileTypeBitMask near, far, ov, shield, subsTypes, idTypes;
|
||||
char *subsName, *transName, *cp, *endptr, *paramName;
|
||||
TileType s, t, r, o;
|
||||
keydesc *kp, *dv;
|
||||
const keydesc *kp, *dv;
|
||||
bool isLinear;
|
||||
HashEntry *he;
|
||||
EdgeCap *cnew;
|
||||
@@ -1973,7 +1973,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||
return (TRUE);
|
||||
}
|
||||
|
||||
n = LookupStruct(argv[0], (LookupTable *) keyTable, sizeof keyTable[0]);
|
||||
n = LookupStruct(argv[0], (const LookupTable *) keyTable, sizeof keyTable[0]);
|
||||
if (n < 0)
|
||||
{
|
||||
TechError("Illegal keyword. Legal keywords are:\n\t");
|
||||
@@ -2343,7 +2343,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||
|
||||
/* Parse second argument for device type */
|
||||
|
||||
n = LookupStruct(argv[1], (LookupTable *)devTable, sizeof devTable[0]);
|
||||
n = LookupStruct(argv[1], (const LookupTable *)devTable, sizeof devTable[0]);
|
||||
if (n < 0)
|
||||
{
|
||||
TechError("Illegal device. Legal devices are:\n\t");
|
||||
|
||||
+3
-3
@@ -123,9 +123,9 @@ ExtractTest(w, cmd)
|
||||
typedef enum { CLRDEBUG, CLRLENGTH, DRIVER, DUMP, INTERACTIONS,
|
||||
INTERCOUNT, EXTPARENTS, RECEIVER, SETDEBUG, SHOWDEBUG,
|
||||
SHOWPARENTS, SHOWTECH, STATS, STEP, TIME } cmdType;
|
||||
static struct
|
||||
static const struct
|
||||
{
|
||||
char *cmd_name;
|
||||
const char *cmd_name;
|
||||
cmdType cmd_val;
|
||||
} cmds[] = {
|
||||
{"clrdebug", CLRDEBUG},
|
||||
@@ -163,7 +163,7 @@ ExtractTest(w, cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
n = LookupStruct(cmd->tx_argv[1], (LookupTable *) cmds, sizeof cmds[0]);
|
||||
n = LookupStruct(cmd->tx_argv[1], (const LookupTable *) cmds, sizeof cmds[0]);
|
||||
if (n < 0)
|
||||
{
|
||||
TxError("Unrecognized subcommand: %s\n", cmd->tx_argv[1]);
|
||||
|
||||
Reference in New Issue
Block a user