summaryrefslogtreecommitdiffstats
path: root/xlib
diff options
context:
space:
mode:
authornijtmans <nijtmans>2008-10-17 23:18:37 (GMT)
committernijtmans <nijtmans>2008-10-17 23:18:37 (GMT)
commitf9bdfaa967982fbe680e45cd3a3f9873a71ebe8f (patch)
tree44f5a027c41b824d344a2113ff678351840eaaec /xlib
parent803826de028dcbb2cb0ff3392c7801bf3f5c83e9 (diff)
downloadtk-f9bdfaa967982fbe680e45cd3a3f9873a71ebe8f.zip
tk-f9bdfaa967982fbe680e45cd3a3f9873a71ebe8f.tar.gz
tk-f9bdfaa967982fbe680e45cd3a3f9873a71ebe8f.tar.bz2
Add "const" to many internal
const tables, so those will be put by the C-compiler in the TEXT segment in stead of the DATA segment. This makes those table sharable in shared libraries.
Diffstat (limited to 'xlib')
-rw-r--r--xlib/xcolors.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlib/xcolors.c b/xlib/xcolors.c
index 0120579..4122b86 100644
--- a/xlib/xcolors.c
+++ b/xlib/xcolors.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: xcolors.c,v 1.7 2007/01/02 23:39:40 dkf Exp $
+ * RCS: @(#) $Id: xcolors.c,v 1.8 2008/10/17 23:18:38 nijtmans Exp $
*/
#include <tkInt.h>
@@ -34,11 +34,11 @@ static int FindColor(const char *name, XColor *colorPtr);
*/
typedef struct {
- char *name;
+ const char *name;
unsigned char red, green, blue;
} XColorEntry;
-static XColorEntry xColors[] = {
+static const XColorEntry xColors[] = {
{ "alice blue", 240, 248, 255 },
{ "AliceBlue", 240, 248, 255 },
{ "antique white", 250, 235, 215 },
@@ -825,7 +825,7 @@ FindColor(
*/
if (numXColors == 0) {
- XColorEntry *ePtr;
+ const XColorEntry *ePtr;
for (ePtr = xColors; ePtr->name != NULL; ePtr++) {
numXColors++;
}