diff --git a/gcr/gcrShwFlgs.c b/gcr/gcrShwFlgs.c index 1c8b1e18..35fb85c8 100644 --- a/gcr/gcrShwFlgs.c +++ b/gcr/gcrShwFlgs.c @@ -38,15 +38,15 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #define MAXFLAGS 17 -char * GCRFlagNames[]= +const char * const GCRFlagNames[]= {"blkb", "blkm", "blkp", "cc", "ce", "r", "tc", "te", "u", "v2", "vl", "vd", "vm", "vr", "vu", "x", "z", 0}; -int GCRFlagValue[]= +const int GCRFlagValue[]= { 3, 1, 2, 256, 1024, 8, 128, 512, 4, 64, 32, 32768, 2048, 8192, 16384, 16, 4096}; -char * GCRFlagDescr[]={ +const char * const GCRFlagDescr[]={ "3 Both layers are blocked", "1 Location is blocked with metal", "2 Location is blocked with poly", diff --git a/irouter/irCommand.c b/irouter/irCommand.c index 78d0685a..25739887 100644 --- a/irouter/irCommand.c +++ b/irouter/irCommand.c @@ -1442,7 +1442,7 @@ irLayersCmd(w, cmd) */ /* Route options Table */ -static char* rOptions[] = { +static const char* const rOptions[] = { "-dbox", /* 0 */ "-dlabel", /* 1 */ "-dlayers", /* 2 */ diff --git a/irouter/irRoute.c b/irouter/irRoute.c index 96a96e3b..19b54487 100644 --- a/irouter/irRoute.c +++ b/irouter/irRoute.c @@ -927,7 +927,7 @@ irChooseEndPtLayers(routeUse,expansionMask,endPt,argLayers,endPtName) List *presentContacts; List *presentContactLayers; - static char *actionNames[] = { "no", "yes", 0 }; + static const char * const actionNames[] = { "no", "yes", 0 }; List *l; RouteLayer *rL; diff --git a/lef/lefCmd.c b/lef/lefCmd.c index 94650f68..784b722c 100644 --- a/lef/lefCmd.c +++ b/lef/lefCmd.c @@ -80,7 +80,8 @@ CmdLef(w, cmd) TxCommand *cmd; { int option, i, cargs, units = 1000; /* Default nanometers */ - char **msg, *namep; + const char * const *msg; + char *namep; CellUse *selectedUse; CellDef *selectedDef; bool is_lef; @@ -148,7 +149,7 @@ CmdLef(w, cmd) * sensible interpretation was possible. */ - static char *cmdLefOption[] = + static const char * const cmdLefOption[] = { "read [filename] read a LEF file filename[.lef]\n" " read [filename] -import read a LEF file; import cells from .mag files\n" @@ -167,7 +168,7 @@ CmdLef(w, cmd) NULL }; - static char *cmdDefOption[] = + static const char * const cmdDefOption[] = { "read [filename] read a DEF file filename[.def]\n" " read [filename] -labels read a DEF file with net labeling\n" diff --git a/lef/lefTech.c b/lef/lefTech.c index 48e49ca7..cfa24f2f 100644 --- a/lef/lefTech.c +++ b/lef/lefTech.c @@ -213,7 +213,7 @@ LefTechLine(sectionName, argc, argv) TileTypeBitMask mmask; lefLayer *lefl, *newlefl; int i, option; - static char *keywords[] = { + static const char * const keywords[] = { "obstruction", "layer", "route", "routing", "masterslice", "cut", "contact", "overlap", "bound", "ignore", NULL }; diff --git a/netmenu/NMcmdAK.c b/netmenu/NMcmdAK.c index 5e0a82c7..f1d0faff 100644 --- a/netmenu/NMcmdAK.c +++ b/netmenu/NMcmdAK.c @@ -161,7 +161,7 @@ NMCmdCleanup(w, cmd) { char answer[30]; int indx, defaultValue; - static char *options[] = {"abort", "dnet", "dterm", "skip", NULL}; + static const char * const options[] = {"abort", "dnet", "dterm", "skip", NULL}; if (p->nmcl_problem == NMCL_ONETERM) { diff --git a/netmenu/NMcmdLZ.c b/netmenu/NMcmdLZ.c index b9dcef42..1aad211e 100644 --- a/netmenu/NMcmdLZ.c +++ b/netmenu/NMcmdLZ.c @@ -235,7 +235,7 @@ NMCmdPushButton(w, cmd) TxCommand *cmd; /* Contains the command's argc and argv. */ { int button, action; - static char *NMButton[] = {"left", "middle", "right", NULL}; + static const char * const NMButton[] = {"left", "middle", "right", NULL}; if (cmd->tx_argc != 2) { diff --git a/netmenu/NMnetlist.c b/netmenu/NMnetlist.c index 26072dd0..c4cf0892 100644 --- a/netmenu/NMnetlist.c +++ b/netmenu/NMnetlist.c @@ -108,7 +108,7 @@ Netlist *nmListHead = NULL; /* The first netlist in the linked /* Used in asking the user for confirmation: */ -static char *(yesno[]) = {"no", "yes", NULL}; +static const char * const yesno[] = {"no", "yes", NULL}; /* @@ -881,7 +881,7 @@ void NMWriteAll() { Netlist *nl, *saveCurrent; - static char *(options[]) = {"write", "skip", "abort", NULL}; + static const char * const options[] = {"write", "skip", "abort", NULL}; char answer[10]; int indx; diff --git a/plot/plotCmd.c b/plot/plotCmd.c index a8d1a0b7..bee927e6 100644 --- a/plot/plotCmd.c +++ b/plot/plotCmd.c @@ -91,7 +91,7 @@ CmdPlot(w, cmd) TxCommand *cmd; { int option; - char **msg; + const char * const *msg; MagWindow *window; DBWclientRec *crec; TileTypeBitMask mask; @@ -105,7 +105,7 @@ CmdPlot(w, cmd) extern void GrTCairoPlotSVG(); #endif - static char *cmdPlotOption[] = + static const char * const cmdPlotOption[] = { "postscript file [layers] generate PostScript file for what's\n\ underneath the box", diff --git a/plot/plotMain.c b/plot/plotMain.c index 9583c2d4..e1f94d22 100644 --- a/plot/plotMain.c +++ b/plot/plotMain.c @@ -52,7 +52,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ /* remain in the following lists so that magic doesn't complain when */ /* encountering these styles in the technology file. */ -static char *plotStyles[] = /* Names of tech subsections. */ +static const char * const plotStyles[] = /* Names of tech subsections. */ { "postscript", "pnm", @@ -64,7 +64,7 @@ static char *plotStyles[] = /* Names of tech subsections. */ }; /* These names need to match the plot types enumerated in plotInt.h */ -static char *plotTypeNames[] = +static const char * const plotTypeNames[] = { "versatec_color", "versatec_bw", @@ -384,8 +384,8 @@ PlotSetParam(name, value) char *value; /* New value for the parameter. */ { int indx, i; - static char *tfNames[] = { "false", "true", 0 }; - static char *paramNames[] = + static const char * const tfNames[] = { "false", "true", 0 }; + static const char * const paramNames[] = { "showcellnames", "ps_cellidfont", diff --git a/plot/plotVers.c b/plot/plotVers.c index 7e7df395..5f37573f 100644 --- a/plot/plotVers.c +++ b/plot/plotVers.c @@ -1074,7 +1074,7 @@ PlotVersatec(scx, layers, xMask, user_scale) */ int user_scale; /* Scalefactor of output */ { - static char *yesNo[] = {"no", "yes", NULL}; + static const char * const yesNo[] = {"no", "yes", NULL}; int dotsAcross, dotsDown, swathsDown, scaleDown; int mag_width; /* lambda */ float width; /* inches */ diff --git a/plow/PlowCmd.c b/plow/PlowCmd.c index bad8bb03..73120fe2 100644 --- a/plow/PlowCmd.c +++ b/plow/PlowCmd.c @@ -87,14 +87,15 @@ CmdPlow(w, cmd) { int xdelta, ydelta, absX, absY; int option, dir, distance; - char *layers, **msg; + char *layers; + const char * const *msg; TileTypeBitMask mask; Rect rootBox, editBox, newBox; CellDef *rootDef, *editDef; Point rootPoint; MagWindow *window; Transform t; - static char *cmdPlowOption[] = + static const char * const cmdPlowOption[] = { "boundary set boundary around area plowing may affect", "help print this help information", diff --git a/resis/ResRex.c b/resis/ResRex.c index 83d2f920..a721f3b4 100644 --- a/resis/ResRex.c +++ b/resis/ResRex.c @@ -256,14 +256,14 @@ CmdExtResis(win, cmd) extern int resSubcircuitFunc(); /* Forward declaration */ - static char *onOff[] = + static const char * const onOff[] = { "off", "on", NULL }; - static char *cmdExtresisCmd[] = + static const char * const cmdExtresisCmd[] = { "all extract all the nets", "threshold [value] set minimum resistor extraction threshold", diff --git a/router/rtrCmd.c b/router/rtrCmd.c index 7eeb0a6d..b2e68fe1 100644 --- a/router/rtrCmd.c +++ b/router/rtrCmd.c @@ -505,7 +505,7 @@ CmdRoute(w, cmd) NLNetList netList; char *netListName; - static char *cmdRouteOption[] = + static const char * const cmdRouteOption[] = { "*checks toggle column checking", "*debug toggle router trace messages", diff --git a/windows/windCmdSZ.c b/windows/windCmdSZ.c index a665aaa2..7d4c7299 100644 --- a/windows/windCmdSZ.c +++ b/windows/windCmdSZ.c @@ -990,8 +990,8 @@ windScrollBarsCmd(w, cmd) TxCommand *cmd; { int place; - static char *onoff[] = {"on", "off", 0}; - static bool truth[] = {TRUE, FALSE}; + static const char * const onoff[] = {"on", "off", 0}; + static const bool truth[] = {TRUE, FALSE}; if (cmd->tx_argc != 2) goto usage;