diff --git a/cmwind/CMWcmmnds.c b/cmwind/CMWcmmnds.c index 19357287..7a788d10 100644 --- a/cmwind/CMWcmmnds.c +++ b/cmwind/CMWcmmnds.c @@ -302,7 +302,7 @@ cmwPushbutton( TxCommand *cmd) { int button; - static char *cmwButton[] = {"left", "middle", "right", NULL}; + static const char * const cmwButton[] = {"left", "middle", "right", NULL}; if (cmd->tx_argc != 2) { diff --git a/commands/CmdAB.c b/commands/CmdAB.c index eb5ee4ad..4bed2eee 100644 --- a/commands/CmdAB.c +++ b/commands/CmdAB.c @@ -134,7 +134,7 @@ CmdArray( MagWindow *w, TxCommand *cmd) { - static char *cmdArrayOption[] = { + static const char * const cmdArrayOption[] = { "count [[xlo] xhi [ylo] yhi] array subcells", "width [value] set or return array x-spacing", "height [value] set or return array y-spacing", @@ -144,7 +144,7 @@ CmdArray( NULL }; - char **msg; + const char * const *msg; int option, locargc, argstart; bool doList = FALSE; ArrayInfo a; @@ -597,7 +597,7 @@ CmdBox( MagWindow *w, TxCommand *cmd) { - static char *cmdBoxOption[] = { + static const char * const cmdBoxOption[] = { "width [value] set or return box width", "height [value] set or return box height", "size [width height] set or return box size", @@ -626,7 +626,7 @@ CmdBox( bool needBox = TRUE; /* require that box be defined */ bool refEdit = FALSE; /* referenced to edit cell coordinates */ bool cursorRef = FALSE; /* reference position is the cursor */ - char **msg; + const char * const *msg; argc = cmd->tx_argc; if (argc > 7) goto badusage; diff --git a/commands/CmdCD.c b/commands/CmdCD.c index 442a2542..b82caec1 100644 --- a/commands/CmdCD.c +++ b/commands/CmdCD.c @@ -130,7 +130,8 @@ CmdCalma( TxCommand *cmd) { int option, ext, value; - char **msg, *namep, *dotptr; + const char * const *msg; + char *namep, *dotptr; char writeMode[3]; CellDef *rootDef; FILETYPE f; @@ -139,14 +140,14 @@ CmdCalma( gzFile fz; #endif - static char *gdsExts[] = {".gds", ".gds.gz", ".gds2", ".strm", "", NULL}; - static char *cmdCalmaYesNo[] = { + static const char * const gdsExts[] = {".gds", ".gds.gz", ".gds2", ".strm", "", NULL}; + static const char * const cmdCalmaYesNo[] = { "no", "false", "off", "0", "yes", "true", "on", "1", 0 }; - static char *cmdCalmaAllowDisallow[] = {"disallow", "0", "allow", "1", 0}; - static char *cmdCalmaPolygonType[] = {"none", "temporary", "keep", 0}; - static char *cmdCalmaWarnOptions[] = { "default", "none", "align", + static const char * const cmdCalmaAllowDisallow[] = {"disallow", "0", "allow", "1", 0}; + static const char * const cmdCalmaPolygonType[] = {"none", "temporary", "keep", 0}; + static const char * const cmdCalmaWarnOptions[] = { "default", "none", "align", "limit", "redirect", "help", 0 }; - static char *cmdCalmaOption[] = + static const char * const cmdCalmaOption[] = { "help print this help information", "abstract [allow|disallow]\n" @@ -1115,7 +1116,7 @@ CmdCellname( void (*func)(); CellDef *newDef, *cellDef; - static char *cmdCellOption[] = + static const char * const cmdCellOption[] = { "children list children of selected or named cell", "parents list parents of selected or named cell", @@ -1151,7 +1152,7 @@ CmdCellname( IDX_ORIENTATION, IDX_RENAME, IDX_READWRITE, IDX_MODIFIED } optionType; - static char *cmdCellnameYesNo[] = { + static const char * const cmdCellnameYesNo[] = { "no", "false", "off", "0", "yes", "true", "on", "1", 0 }; if (strstr(cmd->tx_argv[0], "in")) @@ -1720,7 +1721,8 @@ CmdCif( TxCommand *cmd) { int option, yesno; - char **msg, *namep; + const char * const *msg; + char *namep; CellDef *rootDef, *paintDef; Rect box; TileType layer; @@ -1735,11 +1737,11 @@ CmdCif( int argshift; char **argv = cmd->tx_argv; - static char *cmdCifWarnOptions[] = { "default", "none", "align", + static const char * const cmdCifWarnOptions[] = { "default", "none", "align", "limit", "redirect", "help", 0 }; - static char *cmdCifYesNo[] = { "no", "yes", 0 }; - static char *cmdCifInOut[] = { "input", "output", 0 }; - static char *cmdCifOption[] = + static const char * const cmdCifYesNo[] = { "no", "yes", 0 }; + static const char * const cmdCifInOut[] = { "input", "output", 0 }; + static const char * const cmdCifOption[] = { "*array layer display CIF layer under box (array only)", "*hier layer display CIF layer under box (hier only)", @@ -3692,7 +3694,7 @@ CmdCrash( { int option = -1; char *filename = NULL; - static char *cmdCrashOpt[] = {"save", "recover", 0}; + static const char * const cmdCrashOpt[] = {"save", "recover", 0}; if (cmd->tx_argc > 3) TxError("Usage: %s save|recover [filename]\n", cmd->tx_argv[0]); @@ -4000,7 +4002,7 @@ CmdDrc( CellDef * rootDef; Transform trans; MagWindow * window; - char **msg; + const char * const *msg; bool wizardHelp; bool incremental; bool doforall = FALSE; @@ -4016,7 +4018,7 @@ CmdDrc( Tcl_Obj *lobj; #endif - static char *cmdDrcOption[] = + static const char * const cmdDrcOption[] = { "*flatcheck check box area by flattening", "*halo [d] limit error checking to areas of d units", @@ -4971,10 +4973,10 @@ cmdDumpParseArgs( hasChild = hasRoot = hasTrans = FALSE; while (ac > 0) { - static char *kwdNames[] = { "child", "parent", "0", "90", "180", "270", + static const char * const kwdNames[] = { "child", "parent", "0", "90", "180", "270", "v", "0v", "90v", "180v", "270v", "h", "0h", "90h", "180h", "270h", 0 }; - static char *refPointNames[] = { "ll", "lr", "ul", "ur", 0 }; + static const char * const refPointNames[] = { "ll", "lr", "ul", "ur", 0 }; Label *lab; int n,p; diff --git a/commands/CmdE.c b/commands/CmdE.c index 0c42c745..1a43e2c2 100644 --- a/commands/CmdE.c +++ b/commands/CmdE.c @@ -311,14 +311,14 @@ CmdElement( { int option, type; - char **msg; + const char * const *msg; Rect area; int style; CellDef *def; CellUse *use; bool getopt; - static char *cmdElementOption[] = { + static const char * const cmdElementOption[] = { "add create a new element", "delete delete an existing element", "configure configure or query an existing element", @@ -328,14 +328,14 @@ CmdElement( NULL }; - static char *cmdElementType[] = { + static const char * const cmdElementType[] = { "line name style x1 y1 x2 y2", "rectangle name style llx lly urx ury", "text name style cx cy label", NULL }; - static char *cmdConfigureType[] = { + static const char * const cmdConfigureType[] = { "text get (or) replace ", "style get (or) add