DRI.c | 2 +- Device.c | 2 +- Extensions.c | 2 +- Files.c | 2 +- Flags.c | 2 +- Input.c | 2 +- Keyboard.c | 4 ++-- Layout.c | 4 ++-- Module.c | 4 ++-- Monitor.c | 8 ++++---- Pointer.c | 4 ++-- Screen.c | 4 ++-- Vendor.c | 4 ++-- Video.c | 4 ++-- configProcs.h | 6 +++--- read.c | 2 +- scan.c | 22 +++++++++------------- 17 files changed, 37 insertions(+), 41 deletions(-) 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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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 20 May 2005 22:39:18 -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;