diff --git a/cmwind/CMWcmmnds.c b/cmwind/CMWcmmnds.c index 657cad56..94e3d7b8 100644 --- a/cmwind/CMWcmmnds.c +++ b/cmwind/CMWcmmnds.c @@ -143,8 +143,8 @@ cmwButtonDown( Point *p, int button) { - ColorBar *cb; - ColorPump *cp; + const ColorBar *cb; + const ColorPump *cp; Point surfacePoint; int x; double dx; @@ -598,8 +598,8 @@ cmwRedisplayFunc( * color bars in the window. */ { - ColorBar *cb; - ColorPump *cp; + const ColorBar *cb; + const ColorPump *cp; Rect screenR; CMWclientRec *cr = (CMWclientRec *) w->w_clientData; @@ -649,7 +649,7 @@ CMWCheckWritten(void) { bool indx; char *prompt; - static char *(yesno[]) = {"no", "yes", NULL}; + static const char * const (yesno[]) = {"no", "yes", NULL}; if (!cmwModified) return TRUE; prompt = TxPrintString("The color map has been modified.\n" diff --git a/cmwind/CMWmain.c b/cmwind/CMWmain.c index 3c1d6d6d..a05d3228 100644 --- a/cmwind/CMWmain.c +++ b/cmwind/CMWmain.c @@ -89,7 +89,7 @@ extern void CMWundoInit(void); * which pump is hit and which mouse button is used to hit it. */ -ColorBar colorBars[] = +const ColorBar const colorBars[] = { {"Red", CB_RED, STYLE_RED, {{ 2000, 8000}, {10000, 9000}}, {{ 2000, 9500}, {10000, 10500}}}, @@ -106,7 +106,7 @@ ColorBar colorBars[] = {0} }; -ColorPump colorPumps[] = +const ColorPump const colorPumps[] = { {CB_RED, -.0078, {{ 500, 8000}, { 1500, 9000}}}, {CB_RED, .0078, {{10500, 8000}, {11500, 9000}}}, @@ -123,13 +123,13 @@ ColorPump colorPumps[] = {-1} }; -Rect cmwCurrentColorArea = {{6000, 12000}, {18000, 15000}}; -Rect cmwCurrentColorTextBox = {{6000, 15500}, {18000, 16500}}; -char *cmwCurrentColorText = "Color Being Edited"; +const Rect cmwCurrentColorArea = {{6000, 12000}, {18000, 15000}}; +const Rect cmwCurrentColorTextBox = {{6000, 15500}, {18000, 16500}}; +const char * const cmwCurrentColorText = "Color Being Edited"; /* Bounding rectangle for entire window */ -Rect colorWindowRect = {{0, 1500}, {24000, 17000}}; +const Rect colorWindowRect = {{0, 1500}, {24000, 17000}}; /* * ---------------------------------------------------------------------------- @@ -250,8 +250,8 @@ CMWredisplay( Rect *clipArea) /* An area on the screen to clip to. */ { CMWclientRec *cr; - ColorBar *cb; - ColorPump *cp; + const ColorBar *cb; + const ColorPump *cp; Rect rect, screenR; Point screenP; double values[6], x; diff --git a/cmwind/cmwind.h b/cmwind/cmwind.h index 54e346e5..031c1c99 100644 --- a/cmwind/cmwind.h +++ b/cmwind/cmwind.h @@ -69,11 +69,11 @@ typedef struct extern void CMWloadWindow(MagWindow *, int); extern void CMWcommand(MagWindow *, TxCommand *); -extern Rect colorWindowRect; +extern const Rect colorWindowRect; extern WindClient CMWclientID; -extern ColorBar colorBars[]; -extern ColorPump colorPumps[]; -extern Rect cmwCurrentColorArea; +extern const ColorBar colorBars[]; +extern const ColorPump colorPumps[]; +extern const Rect cmwCurrentColorArea; extern void cmwUndoColor(int, int, int, int, int, int, int); extern bool CMWCheckWritten(void);