lib/Xdmcp/Wraphelp.c | 6 - lib/font/fontfile/fontenc.c | 76 +++++++------- lib/font/util/utilbitmap.c | 2 lib/lbxutil/image/Imakefile | 2 lib/lbxutil/image/lbxbwcodes.h | 4 lib/lbxutil/image/lbxfax.h | 4 lib/lbxutil/image/misc.c | 6 - lib/xkbfile/cout.c | 2 programs/Xserver/composite/compext.c | 4 programs/Xserver/composite/compinit.c | 2 programs/Xserver/damageext/damageext.c | 4 programs/Xserver/damageext/damageextint.h | 3 programs/Xserver/hw/dmx/input/lnx-keyboard.c | 4 programs/Xserver/hw/xfree86/common/xf86.h | 2 programs/Xserver/hw/xfree86/common/xf86Debug.c | 3 programs/Xserver/hw/xfree86/common/xf86DefModes.c | 2 programs/Xserver/hw/xfree86/common/xf86KbdLnx.c | 4 programs/Xserver/hw/xfree86/common/xf86Keymap.h | 2 programs/Xserver/hw/xfree86/common/xf86Priv.h | 2 programs/Xserver/hw/xfree86/loader/dixsym.c | 2 programs/Xserver/hw/xfree86/loader/fontsym.c | 2 programs/Xserver/hw/xfree86/loader/loadmod.c | 2 programs/Xserver/hw/xfree86/loader/misym.c | 2 programs/Xserver/hw/xfree86/loader/xf86sym.c | 2 programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c | 4 programs/Xserver/hw/xfree86/parser/DRI.c | 2 programs/Xserver/hw/xfree86/parser/Device.c | 2 programs/Xserver/hw/xfree86/parser/Extensions.c | 2 programs/Xserver/hw/xfree86/parser/Files.c | 2 programs/Xserver/hw/xfree86/parser/Flags.c | 2 programs/Xserver/hw/xfree86/parser/Input.c | 2 programs/Xserver/hw/xfree86/parser/Keyboard.c | 4 programs/Xserver/hw/xfree86/parser/Layout.c | 4 programs/Xserver/hw/xfree86/parser/Module.c | 4 programs/Xserver/hw/xfree86/parser/Monitor.c | 8 - programs/Xserver/hw/xfree86/parser/Pointer.c | 4 programs/Xserver/hw/xfree86/parser/Screen.c | 4 programs/Xserver/hw/xfree86/parser/Vendor.c | 4 programs/Xserver/hw/xfree86/parser/Video.c | 4 programs/Xserver/hw/xfree86/parser/configProcs.h | 6 - programs/Xserver/hw/xfree86/parser/read.c | 2 programs/Xserver/hw/xfree86/parser/scan.c | 22 +--- programs/Xserver/mi/miinitext.c | 2 programs/Xserver/render/animcur.c | 4 programs/Xserver/render/glyph.c | 6 - programs/Xserver/render/glyphstr.h | 4 programs/Xserver/render/render.c | 7 - programs/Xserver/xfixes/xfixes.c | 4 programs/Xserver/xfixes/xfixesint.h | 4 programs/Xserver/xkb/xkbDflts.h | 2 50 files changed, 127 insertions(+), 132 deletions(-) Index: lib/Xdmcp/Wraphelp.c =================================================================== RCS file: /cvs/xorg/xc/lib/Xdmcp/Wraphelp.c,v retrieving revision 1.4 diff -u -d -r1.4 Wraphelp.c --- lib/Xdmcp/Wraphelp.c 24 Aug 2004 18:33:32 -0000 1.4 +++ lib/Xdmcp/Wraphelp.c 21 May 2005 01:04:05 -0000 @@ -63,7 +63,7 @@ * insure compliance. */ -static CARD32 skb[8][64] = { +static const CARD32 skb[8][64] = { /* for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ { 0x00000000,0x00000010,0x20000000,0x20000010, 0x00010000,0x00010010,0x20010000,0x20010010, @@ -203,7 +203,7 @@ }; -static CARD32 SPtrans[8][64] = { +static const CARD32 SPtrans[8][64] = { /* nibble 0 */ { 0x00410100, 0x00010000, 0x40400000, 0x40410100, 0x00400000, 0x40010100, 0x40010000, 0x40400000, @@ -369,7 +369,7 @@ #define HPERM_OP(a,t,n,m) ((t)=((((a)<<(16-(n)))^(a))&(m)),\ (a)=(a)^(t)^(t>>(16-(n))))\ -static char shifts2[16] = {0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0}; +static const char shifts2[16] = {0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0}; void _XdmcpAuthSetup(auth_cblock key, auth_wrapper_schedule schedule) { Index: lib/font/fontfile/fontenc.c =================================================================== RCS file: /cvs/xorg/xc/lib/font/fontfile/fontenc.c,v retrieving revision 1.2 diff -u -d -r1.2 fontenc.c --- lib/font/fontfile/fontenc.c 23 Apr 2004 18:44:21 -0000 1.2 +++ lib/font/fontfile/fontenc.c 21 May 2005 01:04:06 -0000 @@ -62,7 +62,7 @@ /* At any rate, no new hardcoded encodings will be added. */ -static FontMapRec iso10646[]= +static const FontMapRec iso10646[]= { {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, {0,0,0,0,0,0,0} @@ -73,7 +73,7 @@ There's not much more we can do with fonts without a Unicode cmap unless we are willing to combine cmaps (which we are not). */ -static unsigned short +static const unsigned short iso8859_1_apple_roman[]= { 0xCA, 0xC1, 0xA2, 0xA3, 0xDB, 0xB4, 0x00, 0xA4, 0xAC, 0xA9, 0xBB, 0xC7, 0xC2, 0x00, 0xA8, 0xF8, @@ -100,7 +100,7 @@ return 0; } -static FontMapRec iso8859_1[]= +static const FontMapRec iso8859_1[]= { {FONT_ENCODING_TRUETYPE,2,2,0,0,0,0}, /* ISO 8859-1 */ {FONT_ENCODING_UNICODE,0,0,0,0,0,0}, /* ISO 8859-1 coincides with Unicode*/ @@ -108,7 +108,7 @@ {0,0,0,0,0,0,0} }; -static unsigned short iso8859_2_tophalf[]= +static const unsigned short iso8859_2_tophalf[]= { 0x00A0, 0x0104, 0x02D8, 0x0141, 0x00A4, 0x013D, 0x015A, 0x00A7, 0x00A8, 0x0160, 0x015E, 0x0164, 0x0179, 0x00AD, 0x017D, 0x017B, 0x00B0, 0x0105, 0x02DB, 0x0142, 0x00B4, 0x013E, 0x015B, 0x02C7, @@ -122,10 +122,10 @@ 0x0111, 0x0144, 0x0148, 0x00F3, 0x00F4, 0x0151, 0x00F6, 0x00F7, 0x0159, 0x016F, 0x00FA, 0x0171, 0x00FC, 0x00FD, 0x0163, 0x02D9 }; -static FontEncSimpleMapRec iso8859_2_to_unicode_map= +static const FontEncSimpleMapRec iso8859_2_to_unicode_map= {0x60, 0, 0xA0, iso8859_2_tophalf }; -static unsigned short iso8859_2_apple_centeuro[]= +static const unsigned short iso8859_2_apple_centeuro[]= { 0xCA, 0x84, 0x00, 0xFC, 0x00, 0xBB, 0xE5, 0xA4, 0xAC, 0xE1, 0x00, 0xE8, 0x8F, 0x00, 0xEB, 0xFB, 0xA1, 0x88, 0x00, 0xB8, 0x00, 0xBC, 0xE6, 0xFF, @@ -151,7 +151,7 @@ } -static FontMapRec iso8859_2[]= +static const FontMapRec iso8859_2[]= { {FONT_ENCODING_UNICODE,0,0, FontEncSimpleRecode,0,&iso8859_2_to_unicode_map,0}, @@ -159,7 +159,7 @@ {0,0,0,0,0,0,0} }; -static unsigned short iso8859_3_tophalf[]= +static const unsigned short iso8859_3_tophalf[]= { 0x00A0, 0x0126, 0x02D8, 0x00A3, 0x00A4, 0x0000, 0x0124, 0x00A7, 0x00A8, 0x0130, 0x015E, 0x011E, 0x0134, 0x00AD, 0x0000, 0x017B, 0x00B0, 0x0127, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x0125, 0x00B7, @@ -173,10 +173,10 @@ 0x0000, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x0121, 0x00F6, 0x00F7, 0x011D, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x016D, 0x015D, 0x02D9}; -static FontEncSimpleMapRec iso8859_3_to_unicode_map= +static const FontEncSimpleMapRec iso8859_3_to_unicode_map= { 0x60, 0, 0xA0, iso8859_3_tophalf }; -static FontMapRec iso8859_3[]= +static const FontMapRec iso8859_3[]= { {FONT_ENCODING_UNICODE,0,0, FontEncSimpleRecode,0,&iso8859_3_to_unicode_map,0}, @@ -184,7 +184,7 @@ }; -static unsigned short iso8859_4_tophalf[]= +static const unsigned short iso8859_4_tophalf[]= { 0x00A0, 0x0104, 0x0138, 0x0156, 0x00A4, 0x0128, 0x013B, 0x00A7, 0x00A8, 0x0160, 0x0112, 0x0122, 0x0166, 0x00AD, 0x017D, 0x00AF, 0x00B0, 0x0105, 0x02DB, 0x0157, 0x00B4, 0x0129, 0x013C, 0x02C7, @@ -199,17 +199,17 @@ 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x0169, 0x016B, 0x02D9, }; -static FontEncSimpleMapRec iso8859_4_to_unicode_map= +static const FontEncSimpleMapRec iso8859_4_to_unicode_map= { 0x60, 0, 0xA0, iso8859_4_tophalf }; -static FontMapRec iso8859_4[]= +static const FontMapRec iso8859_4[]= { {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, &iso8859_4_to_unicode_map,0}, {0,0,0,0,0,0,0} }; -static unsigned short iso8859_5_tophalf[]= +static const unsigned short iso8859_5_tophalf[]= { 0x00A0, 0x0401, 0x0402, 0x0403, 0x0404, 0x0405, 0x0406, 0x0407, 0x0408, 0x0409, 0x040A, 0x040B, 0x040C, 0x00AD, 0x040E, 0x040F, 0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, @@ -223,10 +223,10 @@ 0x2116, 0x0451, 0x0452, 0x0453, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00A7, 0x045E, 0x045F}; -static FontEncSimpleMapRec iso8859_5_to_unicode_map= +static const FontEncSimpleMapRec iso8859_5_to_unicode_map= { 0x60, 0, 0xA0, iso8859_5_tophalf }; -static unsigned short +static const unsigned short iso8859_5_apple_cyrillic[]= { 0xCA, 0xDD, 0xAB, 0xAE, 0xB8, 0xC1, 0xA7, 0xBA, 0xB7, 0xBC, 0xBE, 0xCB, 0xCD, 0x00, 0xD8, 0xDA, @@ -251,7 +251,7 @@ else return 0; } -static FontMapRec iso8859_5[]= +static const FontMapRec iso8859_5[]= { {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, &iso8859_5_to_unicode_map,0}, @@ -276,7 +276,7 @@ return 0; } -static FontMapRec iso8859_6[]= +static const FontMapRec iso8859_6[]= { {FONT_ENCODING_UNICODE,0,0,iso8859_6_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -302,7 +302,7 @@ return 0; } -static FontMapRec iso8859_7[]= +static const FontMapRec iso8859_7[]= { {FONT_ENCODING_UNICODE,0,0,iso8859_7_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -323,7 +323,7 @@ return 0; } -static FontMapRec iso8859_8[]= +static const FontMapRec iso8859_8[]= { {FONT_ENCODING_UNICODE,0,0,iso8859_8_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -343,13 +343,13 @@ } } -static FontMapRec iso8859_9[]= +static const FontMapRec iso8859_9[]= { {FONT_ENCODING_UNICODE,0,0,iso8859_9_to_unicode,0,0,0}, {0,0,0,0,0,0,0} }; -static unsigned short iso8859_10_tophalf[]= +static const unsigned short iso8859_10_tophalf[]= { 0x00A0, 0x0104, 0x0112, 0x0122, 0x012A, 0x0128, 0x0136, 0x00A7, 0x013B, 0x0110, 0x0160, 0x0166, 0x017D, 0x00AD, 0x016A, 0x014A, 0x00B0, 0x0105, 0x0113, 0x0123, 0x012B, 0x0129, 0x0137, 0x00B7, @@ -363,10 +363,10 @@ 0x00F0, 0x0146, 0x014D, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x0169, 0x00F8, 0x0173, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x0138}; -static FontEncSimpleMapRec iso8859_10_to_unicode_map= +static const FontEncSimpleMapRec iso8859_10_to_unicode_map= { 0x60, 0, 0xA0, iso8859_10_tophalf }; -static FontMapRec iso8859_10[]= +static const FontMapRec iso8859_10[]= { {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, &iso8859_10_to_unicode_map,0}, @@ -389,13 +389,13 @@ } } -static FontMapRec iso8859_15[]= +static const FontMapRec iso8859_15[]= { {FONT_ENCODING_UNICODE,0,0,iso8859_15_to_unicode,0,0,0}, {0,0,0,0,0,0,0} }; -static unsigned short koi8_r_tophalf[]= +static const unsigned short koi8_r_tophalf[]= { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, 0x2591, 0x2592, 0x2593, 0x2320, 0x25A0, 0x2022, 0x221A, 0x2248, @@ -413,11 +413,11 @@ 0x041F, 0x042F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0416, 0x0412, 0x042C, 0x042B, 0x0417, 0x0428, 0x042D, 0x0429, 0x0427, 0x042A}; -static FontEncSimpleMapRec koi8_r_to_unicode_map= +static const FontEncSimpleMapRec koi8_r_to_unicode_map= { 0x80, 0, 0x80, koi8_r_tophalf }; -static FontMapRec koi8_r[]= +static const FontMapRec koi8_r[]= { {FONT_ENCODING_UNICODE,0,0,FontEncSimpleRecode,0, &koi8_r_to_unicode_map,0}, @@ -451,7 +451,7 @@ } } -static FontMapRec koi8_ru[]= +static const FontMapRec koi8_ru[]= { {FONT_ENCODING_UNICODE,0,0,koi8_ru_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -459,7 +459,7 @@ /* koi8-e, ISO-IR-111 or ECMA-Cyrillic */ -static unsigned short koi8_e_A0_BF[]= +static const unsigned short koi8_e_A0_BF[]= { 0x00A0, 0x0452, 0x0453, 0x0451, 0x0454, 0x0455, 0x0456, 0x0457, 0x0458, 0x0459, 0x045A, 0x045B, 0x045C, 0x00AD, 0x045E, 0x045F, 0x2116, 0x0402, 0x0403, 0x0401, 0x0404, 0x0405, 0x0406, 0x0407, @@ -476,7 +476,7 @@ return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); } -static FontMapRec koi8_e[]= +static const FontMapRec koi8_e[]= { {FONT_ENCODING_UNICODE,0,0,koi8_e_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -484,7 +484,7 @@ /* Koi8 unified */ -static unsigned short koi8_uni_80_BF[]= +static const unsigned short koi8_uni_80_BF[]= { 0x2500, 0x2502, 0x250C, 0x2510, 0x2514, 0x2518, 0x251C, 0x2524, 0x252C, 0x2534, 0x253C, 0x2580, 0x2584, 0x2588, 0x258C, 0x2590, 0x2591, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014, @@ -505,7 +505,7 @@ return FontEncSimpleRecode(koicode, &koi8_r_to_unicode_map); } -static FontMapRec koi8_uni[]= +static const FontMapRec koi8_uni[]= { {FONT_ENCODING_UNICODE,0,0,koi8_uni_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -529,7 +529,7 @@ } } -static FontMapRec koi8_u[]= +static const FontMapRec koi8_u[]= { {FONT_ENCODING_UNICODE,0,0,koi8_u_to_unicode,0,0,0}, {0,0,0,0,0,0,0} @@ -539,21 +539,21 @@ treated specially in ftenc.c, where we add usFirstCharIndex-0x20 to the glyph index before applying the cmap. Lovely design. */ -static FontMapRec microsoft_symbol[]= +static const FontMapRec microsoft_symbol[]= {{FONT_ENCODING_TRUETYPE,3,0,0,0,0,0}, /* You never know */ {FONT_ENCODING_TRUETYPE,3,1,0,0,0,0}, {0,0,0,0,0,0,0}}; -static FontMapRec apple_roman[]= +static const FontMapRec apple_roman[]= {{FONT_ENCODING_TRUETYPE,1,0,0,0,0,0}, {0,0,0,0,0,0,0}}; /* The data for recodings */ /* For compatibility with X11R6.4. Losers. */ -static char *iso8859_15_aliases[2]={"fcd8859-15",0}; +static const char *iso8859_15_aliases[2]={"fcd8859-15",0}; -static FontEncRec initial_encodings[]= +static const FontEncRec initial_encodings[]= { {"iso10646-1",0,256*256,0,iso10646,0,0,0}, /* Unicode */ {"iso8859-1",0,256,0,iso8859_1,0,0,0}, /* Latin 1 (West European) */ Index: lib/font/util/utilbitmap.c =================================================================== RCS file: /cvs/xorg/xc/lib/font/util/utilbitmap.c,v retrieving revision 1.3 diff -u -d -r1.3 utilbitmap.c --- lib/font/util/utilbitmap.c 10 Nov 2004 07:46:26 -0000 1.3 +++ lib/font/util/utilbitmap.c 21 May 2005 01:04:06 -0000 @@ -35,7 +35,7 @@ /* Utility functions for reformating font bitmaps */ -static unsigned char _reverse_byte[0x100] = { +static const unsigned char _reverse_byte[0x100] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, Index: lib/lbxutil/image/Imakefile =================================================================== RCS file: /cvs/xorg/xc/lib/lbxutil/image/Imakefile,v retrieving revision 1.2 diff -u -d -r1.2 Imakefile --- lib/lbxutil/image/Imakefile 23 Apr 2004 18:44:25 -0000 1.2 +++ lib/lbxutil/image/Imakefile 21 May 2005 01:04:06 -0000 @@ -23,7 +23,7 @@ g3states.h : mkg3states.c RemoveFiles($@ HostProgramTargetName(mkg3states)) -HostLinkRule(HostProgramTargetName(mkg3states), $(CFLAGS),mkg3states.c,$(LDLIBS)) - RunProgram(MKG3STATES,> g3_states_h) + RunProgram(MKG3STATES,-c > g3_states_h) $(MV) g3_states_h $@ RemoveFiles(HostProgramTargetName(mkg3states) g3_states_h) Index: lib/lbxutil/image/lbxbwcodes.h =================================================================== RCS file: /cvs/xorg/xc/lib/lbxutil/image/lbxbwcodes.h,v retrieving revision 1.2 diff -u -d -r1.2 lbxbwcodes.h --- lib/lbxutil/image/lbxbwcodes.h 23 Apr 2004 18:44:25 -0000 1.2 +++ lib/lbxutil/image/lbxbwcodes.h 21 May 2005 01:04:06 -0000 @@ -39,7 +39,7 @@ #define TIFFFaxWhiteCodes Darwin_X_TIFFFaxWhiteCodes #endif #endif -tableentry TIFFFaxWhiteCodes[] = { +const tableentry TIFFFaxWhiteCodes[] = { { 8, 0x35, 0 }, /* 0011 0101 */ { 6, 0x7, 1 }, /* 0001 11 */ { 4, 0x7, 2 }, /* 0111 */ @@ -156,7 +156,7 @@ #define TIFFFaxBlackCodes Darwin_X_TIFFFaxBlackCodes #endif #endif -tableentry TIFFFaxBlackCodes[] = { +const tableentry TIFFFaxBlackCodes[] = { { 10, 0x37, 0 }, /* 0000 1101 11 */ { 3, 0x2, 1 }, /* 010 */ { 2, 0x3, 2 }, /* 11 */ Index: lib/lbxutil/image/lbxfax.h =================================================================== RCS file: /cvs/xorg/xc/lib/lbxutil/image/lbxfax.h,v retrieving revision 1.2 diff -u -d -r1.2 lbxfax.h --- lib/lbxutil/image/lbxfax.h 23 Apr 2004 18:44:25 -0000 1.2 +++ lib/lbxutil/image/lbxfax.h 21 May 2005 01:04:06 -0000 @@ -52,8 +52,8 @@ #define TIFFFaxBlackCodes Darwin_X_TIFFFaxBlackCodes #endif #endif -extern tableentry TIFFFaxWhiteCodes[]; -extern tableentry TIFFFaxBlackCodes[]; +extern const tableentry TIFFFaxWhiteCodes[]; +extern const tableentry TIFFFaxBlackCodes[]; /* misc.c */ extern int LbxImageFindDiff ( unsigned char *cp, int bs, int be, int color ); Index: lib/lbxutil/image/misc.c =================================================================== RCS file: /cvs/xorg/xc/lib/lbxutil/image/misc.c,v retrieving revision 1.1.1.1 diff -u -d -r1.1.1.1 misc.c --- lib/lbxutil/image/misc.c 14 Nov 2003 16:48:50 -0000 1.1.1.1 +++ lib/lbxutil/image/misc.c 21 May 2005 01:04:06 -0000 @@ -30,7 +30,7 @@ #include "lbxfax.h" -static unsigned char zeroruns[256] = { +static const unsigned char zeroruns[256] = { 8, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, /* 0x00 - 0x0f */ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, /* 0x10 - 0x1f */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, /* 0x20 - 0x2f */ @@ -49,7 +49,7 @@ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0xf0 - 0xff */ }; -static unsigned char oneruns[256] = { +static const unsigned char oneruns[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 - 0x0f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10 - 0x1f */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0x20 - 0x2f */ @@ -69,7 +69,7 @@ }; -static unsigned char BitRevTable[256] = { +static const unsigned char BitRevTable[256] = { 0x00, 0x80, 0x40, 0xc0, 0x20, 0xa0, 0x60, 0xe0, 0x10, 0x90, 0x50, 0xd0, 0x30, 0xb0, 0x70, 0xf0, 0x08, 0x88, 0x48, 0xc8, 0x28, 0xa8, 0x68, 0xe8, Index: lib/xkbfile/cout.c =================================================================== RCS file: /cvs/xorg/xc/lib/xkbfile/cout.c,v retrieving revision 1.2 diff -u -d -r1.2 cout.c --- lib/xkbfile/cout.c 23 Apr 2004 18:44:26 -0000 1.2 +++ lib/xkbfile/cout.c 21 May 2005 01:04:06 -0000 @@ -249,7 +249,7 @@ fprintf(file,"/* compat name is \"%s\" */\n", XkbAtomText(dpy,xkb->names->compat,XkbCFile)); } - fprintf(file,"static XkbSymInterpretRec dfltSI[%d]= {\n", + fprintf(file,"static const XkbSymInterpretRec dfltSI[%d]= {\n", compat->num_si); interp= compat->sym_interpret; for (i=0;inum_si;i++,interp++) { Index: programs/Xserver/composite/compext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/composite/compext.c,v retrieving revision 1.2 diff -u -d -r1.2 compext.c --- programs/Xserver/composite/compext.c 31 Jul 2004 08:24:13 -0000 1.2 +++ programs/Xserver/composite/compext.c 21 May 2005 01:04:08 -0000 @@ -242,7 +242,7 @@ return(client->noClientException); } -int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { +static int (* const ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { ProcCompositeQueryVersion, ProcCompositeRedirectWindow, ProcCompositeRedirectSubwindows, @@ -350,7 +350,7 @@ return (*ProcCompositeVector[stuff->compositeReqType]) (client); } -int (*SProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { +static int (* const SProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { SProcCompositeQueryVersion, SProcCompositeRedirectWindow, SProcCompositeRedirectSubwindows, Index: programs/Xserver/composite/compinit.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/composite/compinit.c,v retrieving revision 1.6 diff -u -d -r1.6 compinit.c --- programs/Xserver/composite/compinit.c 13 Aug 2004 08:16:13 -0000 1.6 +++ programs/Xserver/composite/compinit.c 21 May 2005 01:04:08 -0000 @@ -143,7 +143,7 @@ CARD32 format; } CompAlternateVisual; -static CompAlternateVisual altVisuals[NUM_COMP_ALTERNATE_VISUALS] = { +static const CompAlternateVisual altVisuals[NUM_COMP_ALTERNATE_VISUALS] = { #if COMP_INCLUDE_RGB24_VISUAL { 24, PICT_r8g8b8 }, #endif Index: programs/Xserver/damageext/damageext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/damageext/damageext.c,v retrieving revision 1.3 diff -u -d -r1.3 damageext.c --- programs/Xserver/damageext/damageext.c 4 Dec 2004 00:42:50 -0000 1.3 +++ programs/Xserver/damageext/damageext.c 21 May 2005 01:04:08 -0000 @@ -282,7 +282,7 @@ #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) -int (*ProcDamageVector[XDamageNumberRequests])(ClientPtr) = { +static int (* const ProcDamageVector[XDamageNumberRequests])(ClientPtr) = { /*************** Version 1 ******************/ ProcDamageQueryVersion, ProcDamageCreate, @@ -356,7 +356,7 @@ return (*ProcDamageVector[stuff->damageReqType]) (client); } -int (*SProcDamageVector[XDamageNumberRequests])(ClientPtr) = { +static int (* const SProcDamageVector[XDamageNumberRequests])(ClientPtr) = { /*************** Version 1 ******************/ SProcDamageQueryVersion, SProcDamageCreate, Index: programs/Xserver/damageext/damageextint.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/damageext/damageextint.h,v retrieving revision 1.3 diff -u -d -r1.3 damageextint.h --- programs/Xserver/damageext/damageextint.h 4 Dec 2004 00:42:50 -0000 1.3 +++ programs/Xserver/damageext/damageextint.h 21 May 2005 01:04:08 -0000 @@ -63,9 +63,6 @@ XID id; } DamageExtRec, *DamageExtPtr; -extern int (*ProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr); -extern int (*SProcDamageVector[/*XDamageNumberRequests*/])(ClientPtr); - #define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ pDamageExt = SecurityLookupIDByType (client, rid, DamageExtType, mode); \ if (!pDamageExt) { \ Index: programs/Xserver/hw/dmx/input/lnx-keyboard.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/dmx/input/lnx-keyboard.c,v retrieving revision 1.2 diff -u -d -r1.2 lnx-keyboard.c --- programs/Xserver/hw/dmx/input/lnx-keyboard.c 20 Apr 2005 12:25:20 -0000 1.2 +++ programs/Xserver/hw/dmx/input/lnx-keyboard.c 21 May 2005 01:04:08 -0000 @@ -212,7 +212,7 @@ else priv->kbdState[byte] &= ~bit; } -static KeySym linux_to_x[256] = { +static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, @@ -282,7 +282,7 @@ /* * Maps the AT keycodes to Linux keycodes */ -static unsigned char at2lnx[NUM_KEYCODES] = +static const unsigned char at2lnx[NUM_KEYCODES] = { 0x01, /* KEY_Escape */ 0x02, /* KEY_1 */ 0x03, /* KEY_2 */ 0x04, /* KEY_3 */ Index: programs/Xserver/hw/xfree86/common/xf86.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86.h,v retrieving revision 1.4 diff -u -d -r1.4 xf86.h --- programs/Xserver/hw/xfree86/common/xf86.h 2 Dec 2004 21:58:58 -0000 1.4 +++ programs/Xserver/hw/xfree86/common/xf86.h 21 May 2005 01:04:08 -0000 @@ -84,7 +84,7 @@ /* variables for debugging */ #ifdef BUILDDEBUG -extern char* xf86p8bit[]; +extern const char xf86p8bit[][9]; extern CARD32 xf86DummyVar1; extern CARD32 xf86DummyVar2; extern CARD32 xf86DummyVar3; Index: programs/Xserver/hw/xfree86/common/xf86Debug.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Debug.c,v retrieving revision 1.2 diff -u -d -r1.2 xf86Debug.c --- programs/Xserver/hw/xfree86/common/xf86Debug.c 20 Apr 2005 12:25:21 -0000 1.2 +++ programs/Xserver/hw/xfree86/common/xf86Debug.c 21 May 2005 01:04:08 -0000 @@ -52,7 +52,8 @@ { } -char *xf86p8bit[] = { "00000000", "00000001", "00000010", "00000011", +const char xf86p8bit[][9] = { + "00000000", "00000001", "00000010", "00000011", "00000100", "00000101", "00000110", "00000111", "00001000", "00001001", "00001010", "00001011", "00001100", "00001101", "00001110", "00001111", Index: programs/Xserver/hw/xfree86/common/xf86DefModes.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86DefModes.c,v retrieving revision 1.2 diff -u -d -r1.2 xf86DefModes.c --- programs/Xserver/hw/xfree86/common/xf86DefModes.c 23 Apr 2004 19:20:32 -0000 1.2 +++ programs/Xserver/hw/xfree86/common/xf86DefModes.c 21 May 2005 01:04:08 -0000 @@ -22,7 +22,7 @@ #define MODEPREFIX(name) NULL, NULL, name, MODE_OK, M_T_DEFAULT #define MODESUFFIX 0,0, 0,0,0,0,0,0,0, 0,0,0,0,0,0,FALSE,FALSE,0,NULL,0,0.0,0.0 -DisplayModeRec xf86DefaultModes [] = { +const DisplayModeRec xf86DefaultModes [] = { /* 640x350 @ 85Hz (VESA) hsync: 37.9kHz */ {MODEPREFIX("640x350"),31500, 640,672,736,832,0, 350,382,385,445,0, V_PHSYNC | V_NVSYNC, MODESUFFIX}, {MODEPREFIX("320x175"),15750, 320,336,368,416,0, 175,191,192,222,0, V_PHSYNC | V_NVSYNC | V_DBLSCAN, MODESUFFIX}, Index: programs/Xserver/hw/xfree86/common/xf86KbdLnx.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86KbdLnx.c,v retrieving revision 1.2 diff -u -d -r1.2 xf86KbdLnx.c --- programs/Xserver/hw/xfree86/common/xf86KbdLnx.c 20 Apr 2005 12:25:21 -0000 1.2 +++ programs/Xserver/hw/xfree86/common/xf86KbdLnx.c 21 May 2005 01:04:08 -0000 @@ -165,7 +165,7 @@ #include -static KeySym linux_to_x[256] = { +static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, @@ -235,7 +235,7 @@ /* * Maps the AT keycodes to Linux keycodes */ -static unsigned char at2lnx[NUM_KEYCODES] = +static const unsigned char at2lnx[NUM_KEYCODES] = { 0x01, /* KEY_Escape */ 0x02, /* KEY_1 */ 0x03, /* KEY_2 */ 0x04, /* KEY_3 */ Index: programs/Xserver/hw/xfree86/common/xf86Keymap.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Keymap.h,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 xf86Keymap.h --- programs/Xserver/hw/xfree86/common/xf86Keymap.h 25 Nov 2003 19:28:33 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/common/xf86Keymap.h 21 May 2005 01:04:08 -0000 @@ -34,7 +34,7 @@ */ /* $XConsortium: xf86Keymap.h /main/14 1996/02/21 17:38:47 kaleb $ */ -static KeySym map[NUM_KEYCODES * GLYPHS_PER_KEY] = { +static const KeySym map[NUM_KEYCODES * GLYPHS_PER_KEY] = { #if !defined(__SOL8__) && (!defined(sun) || defined(i386)) Index: programs/Xserver/hw/xfree86/common/xf86Priv.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/common/xf86Priv.h,v retrieving revision 1.3 diff -u -d -r1.3 xf86Priv.h --- programs/Xserver/hw/xfree86/common/xf86Priv.h 28 Jan 2005 16:12:58 -0000 1.3 +++ programs/Xserver/hw/xfree86/common/xf86Priv.h 21 May 2005 01:04:08 -0000 @@ -162,7 +162,7 @@ /* xf86DefaultModes */ -extern DisplayModeRec xf86DefaultModes []; +extern const DisplayModeRec xf86DefaultModes []; /* xf86DoScanPci.c */ Index: programs/Xserver/hw/xfree86/loader/dixsym.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/dixsym.c,v retrieving revision 1.9 diff -u -d -r1.9 dixsym.c --- programs/Xserver/hw/xfree86/loader/dixsym.c 20 Apr 2005 12:25:34 -0000 1.9 +++ programs/Xserver/hw/xfree86/loader/dixsym.c 21 May 2005 01:04:08 -0000 @@ -93,7 +93,7 @@ /* DIX things */ -LOOKUP dixLookupTab[] = { +const LOOKUP dixLookupTab[] = { /* dix */ /* atom.c */ Index: programs/Xserver/hw/xfree86/loader/fontsym.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/fontsym.c,v retrieving revision 1.1.1.3 diff -u -d -r1.1.1.3 fontsym.c --- programs/Xserver/hw/xfree86/loader/fontsym.c 29 Jan 2004 08:08:46 -0000 1.1.1.3 +++ programs/Xserver/hw/xfree86/loader/fontsym.c 21 May 2005 01:04:08 -0000 @@ -42,7 +42,7 @@ #include "fontcache.h" #endif -LOOKUP fontLookupTab[] = { +const LOOKUP fontLookupTab[] = { SYMFUNC(TwoByteSwap) SYMFUNC(FourByteSwap) Index: programs/Xserver/hw/xfree86/loader/loadmod.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/loadmod.c,v retrieving revision 1.4 diff -u -d -r1.4 loadmod.c --- programs/Xserver/hw/xfree86/loader/loadmod.c 25 Apr 2005 00:25:39 -0000 1.4 +++ programs/Xserver/hw/xfree86/loader/loadmod.c 21 May 2005 01:04:08 -0000 @@ -218,7 +218,7 @@ * Standard set of module name patterns to check, in order of preference * These are regular expressions (suitable for use with POSIX regex(3)). */ -static PatternRec stdPatterns[] = { +static const PatternRec stdPatterns[] = { {"^lib(.*)\\.so$",}, {"^lib(.*)\\.a$",}, {"(.*)_drv\\.so$",}, Index: programs/Xserver/hw/xfree86/loader/misym.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/misym.c,v retrieving revision 1.2 diff -u -d -r1.2 misym.c --- programs/Xserver/hw/xfree86/loader/misym.c 23 Apr 2004 19:54:06 -0000 1.2 +++ programs/Xserver/hw/xfree86/loader/misym.c 21 May 2005 01:04:08 -0000 @@ -77,7 +77,7 @@ extern miPointerSpriteFuncRec miSpritePointerFuncs; -LOOKUP miLookupTab[] = { +const LOOKUP miLookupTab[] = { SYMFUNC(miClearToBackground) SYMFUNC(miSendGraphicsExpose) SYMFUNC(miModifyPixmapHeader) Index: programs/Xserver/hw/xfree86/loader/xf86sym.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c,v retrieving revision 1.10 diff -u -d -r1.10 xf86sym.c --- programs/Xserver/hw/xfree86/loader/xf86sym.c 22 Apr 2005 16:49:21 -0000 1.10 +++ programs/Xserver/hw/xfree86/loader/xf86sym.c 21 May 2005 01:04:08 -0000 @@ -243,7 +243,7 @@ /* XFree86 things */ -LOOKUP xfree86LookupTab[] = { +const LOOKUP xfree86LookupTab[] = { /* Public OSlib functions */ SYMFUNC(xf86ReadBIOS) Index: programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c,v retrieving revision 1.3 diff -u -d -r1.3 lnx_KbdMap.c --- programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c 20 Apr 2005 12:25:35 -0000 1.3 +++ programs/Xserver/hw/xfree86/os-support/linux/lnx_KbdMap.c 21 May 2005 01:04:08 -0000 @@ -107,7 +107,7 @@ #include -static KeySym linux_to_x[256] = { +static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, NoSymbol, XK_BackSpace, XK_Tab, XK_Linefeed, NoSymbol, @@ -177,7 +177,7 @@ /* * Maps the AT keycodes to Linux keycodes */ -static unsigned char at2lnx[NUM_KEYCODES] = +static const unsigned char at2lnx[NUM_KEYCODES] = { 0x01, /* KEY_Escape */ 0x02, /* KEY_1 */ 0x03, /* KEY_2 */ 0x04, /* KEY_3 */ Index: programs/Xserver/hw/xfree86/parser/DRI.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/DRI.c,v retrieving revision 1.2 diff -u -d -r1.2 DRI.c --- programs/Xserver/hw/xfree86/parser/DRI.c 23 Apr 2004 19:54:13 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/DRI.c 21 May 2005 01:04:08 -0000 @@ -34,7 +34,7 @@ extern LexRec val; -static xf86ConfigSymTabRec DRITab[] = +static const xf86ConfigSymTabRec DRITab[] = { {ENDSECTION, "endsection"}, {GROUP, "group"}, Index: programs/Xserver/hw/xfree86/parser/Device.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Device.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Device.c --- programs/Xserver/hw/xfree86/parser/Device.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Device.c 21 May 2005 01:04:08 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static +static const xf86ConfigSymTabRec DeviceTab[] = { {ENDSECTION, "endsection"}, Index: programs/Xserver/hw/xfree86/parser/Extensions.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Extensions.c,v retrieving revision 1.1 diff -u -d -r1.1 Extensions.c --- programs/Xserver/hw/xfree86/parser/Extensions.c 31 Jul 2004 09:14:06 -0000 1.1 +++ programs/Xserver/hw/xfree86/parser/Extensions.c 21 May 2005 01:04:08 -0000 @@ -37,7 +37,7 @@ extern LexRec val; -static xf86ConfigSymTabRec ExtensionsTab[] = +static const xf86ConfigSymTabRec ExtensionsTab[] = { {ENDSECTION, "endsection"}, {OPTION, "option"}, Index: programs/Xserver/hw/xfree86/parser/Files.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Files.c,v retrieving revision 1.2 diff -u -d -r1.2 Files.c --- programs/Xserver/hw/xfree86/parser/Files.c 20 Apr 2005 12:25:38 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/Files.c 21 May 2005 01:04:08 -0000 @@ -63,7 +63,7 @@ extern LexRec val; -static xf86ConfigSymTabRec FilesTab[] = +static const xf86ConfigSymTabRec FilesTab[] = { {ENDSECTION, "endsection"}, {FONTPATH, "fontpath"}, Index: programs/Xserver/hw/xfree86/parser/Flags.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Flags.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Flags.c --- programs/Xserver/hw/xfree86/parser/Flags.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Flags.c 21 May 2005 01:04:08 -0000 @@ -63,7 +63,7 @@ extern LexRec val; -static xf86ConfigSymTabRec ServerFlagsTab[] = +static const xf86ConfigSymTabRec ServerFlagsTab[] = { {ENDSECTION, "endsection"}, {NOTRAPSIGNALS, "notrapsignals"}, Index: programs/Xserver/hw/xfree86/parser/Input.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Input.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Input.c --- programs/Xserver/hw/xfree86/parser/Input.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Input.c 21 May 2005 01:04:08 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static +static const xf86ConfigSymTabRec InputTab[] = { {ENDSECTION, "endsection"}, Index: programs/Xserver/hw/xfree86/parser/Keyboard.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Keyboard.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Keyboard.c --- programs/Xserver/hw/xfree86/parser/Keyboard.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Keyboard.c 21 May 2005 01:04:08 -0000 @@ -63,7 +63,7 @@ extern LexRec val; -static xf86ConfigSymTabRec KeyboardTab[] = +static const xf86ConfigSymTabRec KeyboardTab[] = { {ENDSECTION, "endsection"}, {KPROTOCOL, "protocol"}, @@ -96,7 +96,7 @@ }; /* Obsolete */ -static xf86ConfigSymTabRec KeyMapTab[] = +static const xf86ConfigSymTabRec KeyMapTab[] = { {CONF_KM_META, "meta"}, {CONF_KM_COMPOSE, "compose"}, Index: programs/Xserver/hw/xfree86/parser/Layout.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Layout.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Layout.c --- programs/Xserver/hw/xfree86/parser/Layout.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Layout.c 21 May 2005 01:04:09 -0000 @@ -63,7 +63,7 @@ extern LexRec val; -static xf86ConfigSymTabRec LayoutTab[] = +static const xf86ConfigSymTabRec LayoutTab[] = { {ENDSECTION, "endsection"}, {SCREEN, "screen"}, @@ -74,7 +74,7 @@ {-1, ""}, }; -static xf86ConfigSymTabRec AdjTab[] = +static const xf86ConfigSymTabRec AdjTab[] = { {RIGHTOF, "rightof"}, {LEFTOF, "leftof"}, Index: programs/Xserver/hw/xfree86/parser/Module.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Module.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Module.c --- programs/Xserver/hw/xfree86/parser/Module.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Module.c 21 May 2005 01:04:09 -0000 @@ -62,14 +62,14 @@ extern LexRec val; -static xf86ConfigSymTabRec SubModuleTab[] = +static const xf86ConfigSymTabRec SubModuleTab[] = { {ENDSUBSECTION, "endsubsection"}, {OPTION, "option"}, {-1, ""}, }; -static xf86ConfigSymTabRec ModuleTab[] = +static const xf86ConfigSymTabRec ModuleTab[] = { {ENDSECTION, "endsection"}, {LOAD, "load"}, Index: programs/Xserver/hw/xfree86/parser/Monitor.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Monitor.c,v retrieving revision 1.2 diff -u -d -r1.2 Monitor.c --- programs/Xserver/hw/xfree86/parser/Monitor.c 23 Apr 2004 19:54:13 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/Monitor.c 21 May 2005 01:04:09 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static xf86ConfigSymTabRec MonitorTab[] = +static const xf86ConfigSymTabRec MonitorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, @@ -79,7 +79,7 @@ {-1, ""}, }; -static xf86ConfigSymTabRec ModesTab[] = +static const xf86ConfigSymTabRec ModesTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, @@ -88,7 +88,7 @@ {-1, ""}, }; -static xf86ConfigSymTabRec TimingTab[] = +static const xf86ConfigSymTabRec TimingTab[] = { {TT_INTERLACE, "interlace"}, {TT_PHSYNC, "+hsync"}, @@ -106,7 +106,7 @@ {-1, ""}, }; -static xf86ConfigSymTabRec ModeTab[] = +static const xf86ConfigSymTabRec ModeTab[] = { {DOTCLOCK, "dotclock"}, {HTIMINGS, "htimings"}, Index: programs/Xserver/hw/xfree86/parser/Pointer.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Pointer.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Pointer.c --- programs/Xserver/hw/xfree86/parser/Pointer.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Pointer.c 21 May 2005 01:04:09 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static xf86ConfigSymTabRec PointerTab[] = +static const xf86ConfigSymTabRec PointerTab[] = { {PROTOCOL, "protocol"}, {EMULATE3, "emulate3buttons"}, @@ -84,7 +84,7 @@ {-1, ""}, }; -static xf86ConfigSymTabRec ZMapTab[] = +static const xf86ConfigSymTabRec ZMapTab[] = { {XAXIS, "x"}, {YAXIS, "y"}, Index: programs/Xserver/hw/xfree86/parser/Screen.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Screen.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Screen.c --- programs/Xserver/hw/xfree86/parser/Screen.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Screen.c 21 May 2005 01:04:09 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static xf86ConfigSymTabRec DisplayTab[] = +static const xf86ConfigSymTabRec DisplayTab[] = { {ENDSUBSECTION, "endsubsection"}, {MODES, "modes"}, @@ -197,7 +197,7 @@ #undef CLEANUP -static xf86ConfigSymTabRec ScreenTab[] = +static const xf86ConfigSymTabRec ScreenTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, Index: programs/Xserver/hw/xfree86/parser/Vendor.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Vendor.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Vendor.c --- programs/Xserver/hw/xfree86/parser/Vendor.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Vendor.c 21 May 2005 01:04:09 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static xf86ConfigSymTabRec VendorSubTab[] = +static const xf86ConfigSymTabRec VendorSubTab[] = { {ENDSUBSECTION, "endsubsection"}, {IDENTIFIER, "identifier"}, @@ -116,7 +116,7 @@ #undef CLEANUP -static xf86ConfigSymTabRec VendorTab[] = +static const xf86ConfigSymTabRec VendorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, Index: programs/Xserver/hw/xfree86/parser/Video.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/Video.c,v retrieving revision 1.1.1.2 diff -u -d -r1.1.1.2 Video.c --- programs/Xserver/hw/xfree86/parser/Video.c 25 Nov 2003 19:28:54 -0000 1.1.1.2 +++ programs/Xserver/hw/xfree86/parser/Video.c 21 May 2005 01:04:09 -0000 @@ -61,7 +61,7 @@ extern LexRec val; -static xf86ConfigSymTabRec VideoPortTab[] = +static const xf86ConfigSymTabRec VideoPortTab[] = { {ENDSUBSECTION, "endsubsection"}, {IDENTIFIER, "identifier"}, @@ -115,7 +115,7 @@ #undef CLEANUP -static xf86ConfigSymTabRec VideoAdaptorTab[] = +static const xf86ConfigSymTabRec VideoAdaptorTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, Index: programs/Xserver/hw/xfree86/parser/configProcs.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/configProcs.h,v retrieving revision 1.2 diff -u -d -r1.2 configProcs.h --- programs/Xserver/hw/xfree86/parser/configProcs.h 31 Jul 2004 09:14:06 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/configProcs.h 21 May 2005 01:04:09 -0000 @@ -99,16 +99,16 @@ int xf86validateConfig(XF86ConfigPtr p); /* scan.c */ unsigned int xf86strToUL(char *str); -int xf86getToken(xf86ConfigSymTabRec *tab); +int xf86getToken(const xf86ConfigSymTabRec *tab); int xf86getSubToken(char **comment); -int xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec *tab); +int xf86getSubTokenWithTab(char **comment, const xf86ConfigSymTabRec *tab); void xf86unGetToken(int token); char *xf86tokenString(void); void xf86parseError(char *format, ...); void xf86parseWarning(char *format, ...); void xf86validationError(char *format, ...); void xf86setSection(char *section); -int xf86getStringToken(xf86ConfigSymTabRec *tab); +int xf86getStringToken(const xf86ConfigSymTabRec *tab); /* write.c */ /* DRI.c */ XF86ConfBuffersPtr xf86parseBuffers (void); Index: programs/Xserver/hw/xfree86/parser/read.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/read.c,v retrieving revision 1.2 diff -u -d -r1.2 read.c --- programs/Xserver/hw/xfree86/parser/read.c 31 Jul 2004 09:14:06 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/read.c 21 May 2005 01:04:09 -0000 @@ -62,7 +62,7 @@ extern LexRec val; -static xf86ConfigSymTabRec TopLevelTab[] = +static const xf86ConfigSymTabRec TopLevelTab[] = { {SECTION, "section"}, {-1, ""}, Index: programs/Xserver/hw/xfree86/parser/scan.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/parser/scan.c,v retrieving revision 1.2 diff -u -d -r1.2 scan.c --- programs/Xserver/hw/xfree86/parser/scan.c 23 Apr 2004 19:54:13 -0000 1.2 +++ programs/Xserver/hw/xfree86/parser/scan.c 21 May 2005 01:04:09 -0000 @@ -89,7 +89,7 @@ #define CONFIG_BUF_LEN 1024 -static int StringToToken (char *, xf86ConfigSymTabRec *); +static int StringToToken (char *, const xf86ConfigSymTabRec *); static FILE *configFile = NULL; static const char **builtinConfig = NULL; @@ -160,7 +160,7 @@ * pushToken. */ int -xf86getToken (xf86ConfigSymTabRec * tab) +xf86getToken (const xf86ConfigSymTabRec * tab) { int c, i; @@ -368,7 +368,7 @@ } int -xf86getSubTokenWithTab (char **comment, xf86ConfigSymTabRec *tab) +xf86getSubTokenWithTab (char **comment, const xf86ConfigSymTabRec *tab) { int token; @@ -494,6 +494,10 @@ } \ } while (0) +#define STRINGIZE(x) #x +static const char majorvers[] = STRINGIZE(XF86_VERSION_MAJOR); +#undef STRINGIZE + static char * DoSubstitution(const char *template, const char *cmdline, const char *projroot, int *cmdlineUsed, int *envUsed, char *XConfigFile) @@ -502,7 +506,6 @@ int i, l; static const char *env = NULL, *home = NULL; static char *hostname = NULL; - static char majorvers[3] = ""; #ifdef __UNIXOS2__ static char *x11root = NULL; #endif @@ -609,13 +612,6 @@ BAIL_OUT; break; case 'M': - if (!majorvers[0]) { - if (XF86_VERSION_MAJOR < 0 || XF86_VERSION_MAJOR > 99) { - fprintf(stderr, "XF86_VERSION_MAJOR is out of range\n"); - BAIL_OUT; - } else - sprintf(majorvers, "%d", XF86_VERSION_MAJOR); - } APPEND_STR(majorvers); break; case '%': @@ -840,13 +836,13 @@ * Lookup a string if it is actually a token in disguise. */ int -xf86getStringToken (xf86ConfigSymTabRec * tab) +xf86getStringToken (const xf86ConfigSymTabRec * tab) { return StringToToken (val.str, tab); } static int -StringToToken (char *str, xf86ConfigSymTabRec * tab) +StringToToken (char *str, const xf86ConfigSymTabRec * tab) { int i; Index: programs/Xserver/mi/miinitext.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/mi/miinitext.c,v retrieving revision 1.19 diff -u -d -r1.19 miinitext.c --- programs/Xserver/mi/miinitext.c 24 Apr 2005 01:10:12 -0000 1.19 +++ programs/Xserver/mi/miinitext.c 21 May 2005 01:04:09 -0000 @@ -715,7 +715,7 @@ #else /* XFree86LOADER */ /* List of built-in (statically linked) extensions */ -static ExtensionModule staticExtensions[] = { +static const ExtensionModule staticExtensions[] = { #ifdef BEZIER { BezierExtensionInit, "BEZIER", &noBezierExtension, NULL, NULL }, #endif Index: programs/Xserver/render/animcur.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/animcur.c,v retrieving revision 1.4 diff -u -d -r1.4 animcur.c --- programs/Xserver/render/animcur.c 20 Apr 2005 12:25:48 -0000 1.4 +++ programs/Xserver/render/animcur.c 21 May 2005 01:04:10 -0000 @@ -80,11 +80,11 @@ static unsigned char empty[4]; -static CursorBits animCursorBits = { +static CursorBits animCursorBits = { empty, empty, 2, 1, 1, 0, 0, 1 }; -int AnimCurScreenPrivateIndex = -1; +static int AnimCurScreenPrivateIndex = -1; int AnimCurGeneration; #define IsAnimCur(c) ((c)->bits == &animCursorBits) Index: programs/Xserver/render/glyph.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/glyph.c,v retrieving revision 1.4 diff -u -d -r1.4 glyph.c --- programs/Xserver/render/glyph.c 4 Dec 2004 00:43:13 -0000 1.4 +++ programs/Xserver/render/glyph.c 21 May 2005 01:04:10 -0000 @@ -44,7 +44,7 @@ * p and p-2 are both prime. These tables are sized to have an extra 10% * free to avoid exponential performance degradation as the hash table fills */ -static GlyphHashSetRec glyphHashSets[] = { +static const GlyphHashSetRec glyphHashSets[] = { { 32, 43, 41 }, { 64, 73, 71 }, { 128, 151, 149 }, @@ -78,7 +78,7 @@ GlyphHashRec globalGlyphs[GlyphFormatNum]; -GlyphHashSetPtr +const GlyphHashSetPtr FindGlyphHashSet (CARD32 filled) { int i; @@ -342,7 +342,7 @@ } Bool -AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet) +AllocateGlyphHash (GlyphHashPtr hash, const GlyphHashSetPtr hashSet) { hash->table = (GlyphRefPtr) xalloc (hashSet->size * sizeof (GlyphRefRec)); if (!hash->table) Index: programs/Xserver/render/glyphstr.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/glyphstr.h,v retrieving revision 1.5 diff -u -d -r1.5 glyphstr.h --- programs/Xserver/render/glyphstr.h 20 Apr 2005 12:25:48 -0000 1.5 +++ programs/Xserver/render/glyphstr.h 21 May 2005 01:04:10 -0000 @@ -91,7 +91,7 @@ extern GlyphHashRec globalGlyphs[GlyphFormatNum]; -GlyphHashSetPtr +const GlyphHashSetPtr FindGlyphHashSet (CARD32 filled); int @@ -128,7 +128,7 @@ AllocateGlyph (xGlyphInfo *gi, int format); Bool -AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet); +AllocateGlyphHash (GlyphHashPtr hash, const GlyphHashSetPtr hashSet); Bool ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global); Index: programs/Xserver/render/render.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/render/render.c,v retrieving revision 1.7 diff -u -d -r1.7 render.c --- programs/Xserver/render/render.c 20 Apr 2005 12:25:48 -0000 1.7 +++ programs/Xserver/render/render.c 21 May 2005 01:04:10 -0000 @@ -116,7 +116,8 @@ static int SProcRenderDispatch (ClientPtr pClient); -int (*ProcRenderVector[RenderNumberRequests])(ClientPtr) = { +/* XXX can't be const due to Xinerama */ +static int (*ProcRenderVector[RenderNumberRequests])(ClientPtr) = { ProcRenderQueryVersion, ProcRenderQueryPictFormats, ProcRenderQueryPictIndexValues, @@ -152,7 +153,7 @@ ProcRenderAddTraps, }; -int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = { +static int (* const SProcRenderVector[RenderNumberRequests])(ClientPtr) = { SProcRenderQueryVersion, SProcRenderQueryPictFormats, SProcRenderQueryPictIndexValues, @@ -1425,7 +1426,7 @@ #define DITHER_DIM 2 -static CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = { +static const CARD32 orderedDither[DITHER_DIM][DITHER_DIM] = { { 1, 3, }, { 4, 2, }, }; Index: programs/Xserver/xfixes/xfixes.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/xfixes/xfixes.c,v retrieving revision 1.4 diff -u -d -r1.4 xfixes.c --- programs/Xserver/xfixes/xfixes.c 4 Dec 2004 00:43:13 -0000 1.4 +++ programs/Xserver/xfixes/xfixes.c 21 May 2005 01:04:10 -0000 @@ -77,7 +77,7 @@ #define NUM_VERSION_REQUESTS (sizeof (version_requests) / sizeof (version_requests[0])) -int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { +int (* const ProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { /*************** Version 1 ******************/ ProcXFixesQueryVersion, ProcXFixesChangeSaveSet, @@ -137,7 +137,7 @@ return (*ProcXFixesVector[stuff->xfixesReqType]) (client); } -int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { +int (* const SProcXFixesVector[XFixesNumberRequests])(ClientPtr) = { /*************** Version 1 ******************/ SProcXFixesQueryVersion, SProcXFixesChangeSaveSet, Index: programs/Xserver/xfixes/xfixesint.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/xfixes/xfixesint.h,v retrieving revision 1.4 diff -u -d -r1.4 xfixesint.h --- programs/Xserver/xfixes/xfixesint.h 4 Dec 2004 00:43:13 -0000 1.4 +++ programs/Xserver/xfixes/xfixesint.h 21 May 2005 01:04:10 -0000 @@ -48,8 +48,8 @@ #define GetXFixesClient(pClient) ((XFixesClientPtr) (pClient)->devPrivates[XFixesClientPrivateIndex].ptr) -extern int (*ProcXFixesVector[XFixesNumberRequests])(ClientPtr); -extern int (*SProcXFixesVector[XFixesNumberRequests])(ClientPtr); +extern int (* const ProcXFixesVector[XFixesNumberRequests])(ClientPtr); +extern int (* const SProcXFixesVector[XFixesNumberRequests])(ClientPtr); /* Initialize extension at server startup time */ Index: programs/Xserver/xkb/xkbDflts.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/xkb/xkbDflts.h,v retrieving revision 1.2 diff -u -d -r1.2 xkbDflts.h --- programs/Xserver/xkb/xkbDflts.h 23 Apr 2004 19:54:30 -0000 1.2 +++ programs/Xserver/xkb/xkbDflts.h 21 May 2005 01:04:10 -0000 @@ -168,7 +168,7 @@ lnames_SHIFT_ALT[1]= GET_ATOM(dpy,"Shift+Alt"); } /* compat name is "default" */ -static XkbSymInterpretRec dfltSI[69]= { +static const XkbSymInterpretRec dfltSI[69]= { { XK_ISO_Level2_Latch, 0x0000, XkbSI_LevelOneOnly|XkbSI_Exactly, ShiftMask, 255,