diff options
author | nijtmans <nijtmans@noemail.net> | 2008-10-17 23:18:36 (GMT) |
---|---|---|
committer | nijtmans <nijtmans@noemail.net> | 2008-10-17 23:18:36 (GMT) |
commit | 0e4c55ad7ee1dd9a2ee70ebce782873cab46f0cf (patch) | |
tree | 44f5a027c41b824d344a2113ff678351840eaaec /xlib | |
parent | 757fc57b54df134be23bb24b2ccba5d425df7063 (diff) | |
download | tk-0e4c55ad7ee1dd9a2ee70ebce782873cab46f0cf.zip tk-0e4c55ad7ee1dd9a2ee70ebce782873cab46f0cf.tar.gz tk-0e4c55ad7ee1dd9a2ee70ebce782873cab46f0cf.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.
FossilOrigin-Name: da3819dbb53904a418b6098f3b103df483c53304
Diffstat (limited to 'xlib')
-rw-r--r-- | xlib/xcolors.c | 8 |
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++; } |