aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/parser
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-26 20:05:50 +0100
committermarha <marha@users.sourceforge.net>2014-01-26 20:10:14 +0100
commit30af30b78075159fce477ae99cc72540133714d0 (patch)
tree1028af42bd030d09bf9c9cb6085665300326abc6 /xorg-server/hw/xfree86/parser
parent775780ea274e6602c2d64de33a98ee35979cc330 (diff)
downloadvcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.gz
vcxsrv-30af30b78075159fce477ae99cc72540133714d0.tar.bz2
vcxsrv-30af30b78075159fce477ae99cc72540133714d0.zip
xserver randrproto libxtrans fontconfig libxcb xcb-proto mesa git update 26 Jan 2014
xserver commit c1ce807d9f18f215332d7eeb844e8c640f71c53c libxcb commit e7263931aff3e3450dc938ad465a7577f943549f libxcb/xcb-proto commit d898fd39ad6c82207eb78666b2daad982dd757b5 randrproto commit a4a6694c059d74247c16527eef4a0ec9f56bbef6 libxtrans commit e1e6121a1638d43d9929589b4723da2b38cb6b44 fontconfig commit e2b406053c2937799da8636c56b72a77998bcab0 mesa commit 07149f0252c52b4ac58b6df4e307fd786b49b490
Diffstat (limited to 'xorg-server/hw/xfree86/parser')
-rw-r--r--xorg-server/hw/xfree86/parser/Configint.h2
-rw-r--r--xorg-server/hw/xfree86/parser/DRI.c13
-rw-r--r--xorg-server/hw/xfree86/parser/Device.c45
-rw-r--r--xorg-server/hw/xfree86/parser/Extensions.c3
-rw-r--r--xorg-server/hw/xfree86/parser/Files.c15
-rw-r--r--xorg-server/hw/xfree86/parser/Flags.c15
-rw-r--r--xorg-server/hw/xfree86/parser/Input.c11
-rw-r--r--xorg-server/hw/xfree86/parser/InputClass.c71
-rw-r--r--xorg-server/hw/xfree86/parser/Layout.c33
-rw-r--r--xorg-server/hw/xfree86/parser/Module.c15
-rw-r--r--xorg-server/hw/xfree86/parser/Monitor.c87
-rw-r--r--xorg-server/hw/xfree86/parser/Pointer.c35
-rw-r--r--xorg-server/hw/xfree86/parser/Screen.c63
-rw-r--r--xorg-server/hw/xfree86/parser/Vendor.c9
-rw-r--r--xorg-server/hw/xfree86/parser/Video.c17
-rw-r--r--xorg-server/hw/xfree86/parser/read.c103
-rw-r--r--xorg-server/hw/xfree86/parser/scan.c24
17 files changed, 274 insertions, 287 deletions
diff --git a/xorg-server/hw/xfree86/parser/Configint.h b/xorg-server/hw/xfree86/parser/Configint.h
index 62e514201..e85322006 100644
--- a/xorg-server/hw/xfree86/parser/Configint.h
+++ b/xorg-server/hw/xfree86/parser/Configint.h
@@ -79,6 +79,8 @@ typedef struct {
ParserNumType numType; /* used to enforce correct number formatting */
} LexRec, *LexPtr;
+extern LexRec xf86_lex_val;
+
#ifndef TRUE
#define TRUE 1
#endif
diff --git a/xorg-server/hw/xfree86/parser/DRI.c b/xorg-server/hw/xfree86/parser/DRI.c
index e8d26255f..ad053f746 100644
--- a/xorg-server/hw/xfree86/parser/DRI.c
+++ b/xorg-server/hw/xfree86/parser/DRI.c
@@ -35,7 +35,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec DRITab[] = {
{ENDSECTION, "endsection"},
@@ -59,24 +58,24 @@ xf86parseDRISection(void)
switch (token) {
case GROUP:
if ((token = xf86getSubToken(&(ptr->dri_comment))) == STRING)
- ptr->dri_group_name = val.str;
+ ptr->dri_group_name = xf86_lex_val.str;
else if (token == NUMBER)
- ptr->dri_group = val.num;
+ ptr->dri_group = xf86_lex_val.num;
else
Error(GROUP_MSG);
break;
case MODE:
if (xf86getSubToken(&(ptr->dri_comment)) != NUMBER)
Error(NUMBER_MSG, "Mode");
- if (val.numType != PARSE_OCTAL)
- Error(MUST_BE_OCTAL_MSG, val.num);
- ptr->dri_mode = val.num;
+ if (xf86_lex_val.numType != PARSE_OCTAL)
+ Error(MUST_BE_OCTAL_MSG, xf86_lex_val.num);
+ ptr->dri_mode = xf86_lex_val.num;
break;
case EOF_TOKEN:
Error(UNEXPECTED_EOF_MSG);
break;
case COMMENT:
- ptr->dri_comment = xf86addComment(ptr->dri_comment, val.str);
+ ptr->dri_comment = xf86addComment(ptr->dri_comment, xf86_lex_val.str);
break;
default:
Error(INVALID_KEYWORD_MSG, xf86tokenString());
diff --git a/xorg-server/hw/xfree86/parser/Device.c b/xorg-server/hw/xfree86/parser/Device.c
index bb1ba88fb..073171f22 100644
--- a/xorg-server/hw/xfree86/parser/Device.c
+++ b/xorg-server/hw/xfree86/parser/Device.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static
xf86ConfigSymTabRec DeviceTab[] = {
@@ -107,45 +106,45 @@ xf86parseDeviceSection(void)
while ((token = xf86getToken(DeviceTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->dev_comment = xf86addComment(ptr->dev_comment, val.str);
+ ptr->dev_comment = xf86addComment(ptr->dev_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->dev_identifier = val.str;
+ ptr->dev_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case VENDOR:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Vendor");
- ptr->dev_vendor = val.str;
+ ptr->dev_vendor = xf86_lex_val.str;
break;
case BOARD:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Board");
- ptr->dev_board = val.str;
+ ptr->dev_board = xf86_lex_val.str;
break;
case CHIPSET:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Chipset");
- ptr->dev_chipset = val.str;
+ ptr->dev_chipset = xf86_lex_val.str;
break;
case CARD:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Card");
- ptr->dev_card = val.str;
+ ptr->dev_card = xf86_lex_val.str;
break;
case DRIVER:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- ptr->dev_driver = val.str;
+ ptr->dev_driver = xf86_lex_val.str;
break;
case RAMDAC:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "Ramdac");
- ptr->dev_ramdac = val.str;
+ ptr->dev_ramdac = xf86_lex_val.str;
break;
case DACSPEED:
for (i = 0; i < CONF_MAXDACSPEEDS; i++)
@@ -154,11 +153,11 @@ xf86parseDeviceSection(void)
Error(DACSPEED_MSG, CONF_MAXDACSPEEDS);
}
else {
- ptr->dev_dacSpeeds[0] = (int) (val.realnum * 1000.0 + 0.5);
+ ptr->dev_dacSpeeds[0] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5);
for (i = 1; i < CONF_MAXDACSPEEDS; i++) {
if (xf86getSubToken(&(ptr->dev_comment)) == NUMBER)
ptr->dev_dacSpeeds[i] = (int)
- (val.realnum * 1000.0 + 0.5);
+ (xf86_lex_val.realnum * 1000.0 + 0.5);
else {
xf86unGetToken(token);
break;
@@ -169,44 +168,44 @@ xf86parseDeviceSection(void)
case VIDEORAM:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "VideoRam");
- ptr->dev_videoram = val.num;
+ ptr->dev_videoram = xf86_lex_val.num;
break;
case BIOSBASE:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "BIOSBase");
- ptr->dev_bios_base = val.num;
+ ptr->dev_bios_base = xf86_lex_val.num;
break;
case MEMBASE:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "MemBase");
- ptr->dev_mem_base = val.num;
+ ptr->dev_mem_base = xf86_lex_val.num;
break;
case IOBASE:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "IOBase");
- ptr->dev_io_base = val.num;
+ ptr->dev_io_base = xf86_lex_val.num;
break;
case CLOCKCHIP:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "ClockChip");
- ptr->dev_clockchip = val.str;
+ ptr->dev_clockchip = xf86_lex_val.str;
break;
case CHIPID:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "ChipID");
- ptr->dev_chipid = val.num;
+ ptr->dev_chipid = xf86_lex_val.num;
break;
case CHIPREV:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "ChipRev");
- ptr->dev_chiprev = val.num;
+ ptr->dev_chiprev = xf86_lex_val.num;
break;
case CLOCKS:
token = xf86getSubToken(&(ptr->dev_comment));
for (i = ptr->dev_clocks;
token == NUMBER && i < CONF_MAXCLOCKS; i++) {
- ptr->dev_clock[i] = (int) (val.realnum * 1000.0 + 0.5);
+ ptr->dev_clock[i] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5);
token = xf86getSubToken(&(ptr->dev_comment));
}
ptr->dev_clocks = i;
@@ -215,7 +214,7 @@ xf86parseDeviceSection(void)
case TEXTCLOCKFRQ:
if ((token = xf86getSubToken(&(ptr->dev_comment))) != NUMBER)
Error(NUMBER_MSG, "TextClockFreq");
- ptr->dev_textclockfreq = (int) (val.realnum * 1000.0 + 0.5);
+ ptr->dev_textclockfreq = (int) (xf86_lex_val.realnum * 1000.0 + 0.5);
break;
case OPTION:
ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst);
@@ -223,17 +222,17 @@ xf86parseDeviceSection(void)
case BUSID:
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
Error(QUOTE_MSG, "BusID");
- ptr->dev_busid = val.str;
+ ptr->dev_busid = xf86_lex_val.str;
break;
case IRQ:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(QUOTE_MSG, "IRQ");
- ptr->dev_irq = val.num;
+ ptr->dev_irq = xf86_lex_val.num;
break;
case SCREEN:
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
Error(NUMBER_MSG, "Screen");
- ptr->dev_screen = val.num;
+ ptr->dev_screen = xf86_lex_val.num;
break;
case EOF_TOKEN:
Error(UNEXPECTED_EOF_MSG);
diff --git a/xorg-server/hw/xfree86/parser/Extensions.c b/xorg-server/hw/xfree86/parser/Extensions.c
index ec0bda4c0..b5ba72e5f 100644
--- a/xorg-server/hw/xfree86/parser/Extensions.c
+++ b/xorg-server/hw/xfree86/parser/Extensions.c
@@ -39,7 +39,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec ExtensionsTab[] = {
{ENDSECTION, "endsection"},
@@ -66,7 +65,7 @@ xf86parseExtensionsSection(void)
break;
case COMMENT:
ptr->extensions_comment =
- xf86addComment(ptr->extensions_comment, val.str);
+ xf86addComment(ptr->extensions_comment, xf86_lex_val.str);
break;
default:
Error(INVALID_KEYWORD_MSG, xf86tokenString());
diff --git a/xorg-server/hw/xfree86/parser/Files.c b/xorg-server/hw/xfree86/parser/Files.c
index a6e18dd2c..24940a9c2 100644
--- a/xorg-server/hw/xfree86/parser/Files.c
+++ b/xorg-server/hw/xfree86/parser/Files.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec FilesTab[] = {
{ENDSECTION, "endsection"},
@@ -89,13 +88,13 @@ xf86parseFilesSection(void)
while ((token = xf86getToken(FilesTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->file_comment = xf86addComment(ptr->file_comment, val.str);
+ ptr->file_comment = xf86addComment(ptr->file_comment, xf86_lex_val.str);
break;
case FONTPATH:
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
Error(QUOTE_MSG, "FontPath");
j = FALSE;
- str = val.str;
+ str = xf86_lex_val.str;
if (ptr->file_fontpath == NULL) {
ptr->file_fontpath = calloc(1, 1);
i = strlen(str) + 1;
@@ -112,13 +111,13 @@ xf86parseFilesSection(void)
strcat(ptr->file_fontpath, ",");
strcat(ptr->file_fontpath, str);
- free(val.str);
+ free(xf86_lex_val.str);
break;
case MODULEPATH:
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
Error(QUOTE_MSG, "ModulePath");
l = FALSE;
- str = val.str;
+ str = xf86_lex_val.str;
if (ptr->file_modulepath == NULL) {
ptr->file_modulepath = malloc(1);
ptr->file_modulepath[0] = '\0';
@@ -137,17 +136,17 @@ xf86parseFilesSection(void)
strcat(ptr->file_modulepath, ",");
strcat(ptr->file_modulepath, str);
- free(val.str);
+ free(xf86_lex_val.str);
break;
case LOGFILEPATH:
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
Error(QUOTE_MSG, "LogFile");
- ptr->file_logfile = val.str;
+ ptr->file_logfile = xf86_lex_val.str;
break;
case XKBDIR:
if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING)
Error(QUOTE_MSG, "XkbDir");
- ptr->file_xkbdir = val.str;
+ ptr->file_xkbdir = xf86_lex_val.str;
break;
case EOF_TOKEN:
Error(UNEXPECTED_EOF_MSG);
diff --git a/xorg-server/hw/xfree86/parser/Flags.c b/xorg-server/hw/xfree86/parser/Flags.c
index 326c6b77d..71b50acf7 100644
--- a/xorg-server/hw/xfree86/parser/Flags.c
+++ b/xorg-server/hw/xfree86/parser/Flags.c
@@ -62,7 +62,6 @@
#include "Xprintf.h"
#include "optionstr.h"
-extern LexRec val;
static xf86ConfigSymTabRec ServerFlagsTab[] = {
{ENDSECTION, "endsection"},
@@ -99,7 +98,7 @@ xf86parseFlagsSection(void)
switch (token) {
case COMMENT:
- ptr->flg_comment = xf86addComment(ptr->flg_comment, val.str);
+ ptr->flg_comment = xf86addComment(ptr->flg_comment, xf86_lex_val.str);
break;
/*
* these old keywords are turned into standard generic options.
@@ -135,12 +134,12 @@ xf86parseFlagsSection(void)
if (strvalue) {
if (tokentype != STRING)
Error(QUOTE_MSG, tmp);
- valstr = val.str;
+ valstr = xf86_lex_val.str;
}
else {
if (tokentype != NUMBER)
Error(NUMBER_MSG, tmp);
- if (asprintf(&valstr, "%d", val.num) == -1)
+ if (asprintf(&valstr, "%d", xf86_lex_val.num) == -1)
valstr = NULL;
}
}
@@ -435,12 +434,12 @@ xf86parseOption(XF86OptionPtr head)
return head;
}
- name = val.str;
+ name = xf86_lex_val.str;
if ((token = xf86getSubToken(&comment)) == STRING) {
- option = xf86newOption(name, val.str);
+ option = xf86newOption(name, xf86_lex_val.str);
option->opt_comment = comment;
if ((token = xf86getToken(NULL)) == COMMENT)
- option->opt_comment = xf86addComment(option->opt_comment, val.str);
+ option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str);
else
xf86unGetToken(token);
}
@@ -448,7 +447,7 @@ xf86parseOption(XF86OptionPtr head)
option = xf86newOption(name, NULL);
option->opt_comment = comment;
if (token == COMMENT)
- option->opt_comment = xf86addComment(option->opt_comment, val.str);
+ option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str);
else
xf86unGetToken(token);
}
diff --git a/xorg-server/hw/xfree86/parser/Input.c b/xorg-server/hw/xfree86/parser/Input.c
index ff2b9acbc..1bfe5c100 100644
--- a/xorg-server/hw/xfree86/parser/Input.c
+++ b/xorg-server/hw/xfree86/parser/Input.c
@@ -61,7 +61,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static
xf86ConfigSymTabRec InputTab[] = {
@@ -85,25 +84,25 @@ xf86parseInputSection(void)
while ((token = xf86getToken(InputTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str);
+ ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->inp_identifier = val.str;
+ ptr->inp_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case DRIVER:
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- if (strcmp(val.str, "keyboard") == 0) {
+ if (strcmp(xf86_lex_val.str, "keyboard") == 0) {
ptr->inp_driver = strdup("kbd");
- free(val.str);
+ free(xf86_lex_val.str);
}
else
- ptr->inp_driver = val.str;
+ ptr->inp_driver = xf86_lex_val.str;
break;
case OPTION:
ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst);
diff --git a/xorg-server/hw/xfree86/parser/InputClass.c b/xorg-server/hw/xfree86/parser/InputClass.c
index a7f573e70..24a124691 100644
--- a/xorg-server/hw/xfree86/parser/InputClass.c
+++ b/xorg-server/hw/xfree86/parser/InputClass.c
@@ -33,7 +33,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static
xf86ConfigSymTabRec InputClassTab[] = {
@@ -97,25 +96,25 @@ xf86parseInputClassSection(void)
while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->comment = xf86addComment(ptr->comment, val.str);
+ ptr->comment = xf86addComment(ptr->comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->identifier = val.str;
+ ptr->identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case DRIVER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- if (strcmp(val.str, "keyboard") == 0) {
+ if (strcmp(xf86_lex_val.str, "keyboard") == 0) {
ptr->driver = strdup("kbd");
- free(val.str);
+ free(xf86_lex_val.str);
}
else
- ptr->driver = val.str;
+ ptr->driver = xf86_lex_val.str;
break;
case OPTION:
ptr->option_lst = xf86parseOption(ptr->option_lst);
@@ -124,69 +123,69 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchProduct");
add_group_entry(&ptr->match_product,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_VENDOR:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchVendor");
add_group_entry(&ptr->match_vendor,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_DEVICE_PATH:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDevicePath");
add_group_entry(&ptr->match_device,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_OS:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchOS");
- add_group_entry(&ptr->match_os, xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ add_group_entry(&ptr->match_os, xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_PNPID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchPnPID");
add_group_entry(&ptr->match_pnpid,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_USBID:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchUSBID");
add_group_entry(&ptr->match_usbid,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_DRIVER:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchDriver");
add_group_entry(&ptr->match_driver,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_TAG:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchTag");
- add_group_entry(&ptr->match_tag, xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ add_group_entry(&ptr->match_tag, xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_LAYOUT:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchLayout");
add_group_entry(&ptr->match_layout,
- xstrtokenize(val.str, TOKEN_SEP));
- free(val.str);
+ xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
+ free(xf86_lex_val.str);
break;
case MATCH_IS_KEYBOARD:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsKeyboard");
ptr->is_keyboard.set = xf86getBoolValue(&ptr->is_keyboard.val,
- val.str);
- free(val.str);
+ xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_keyboard.set)
Error(BOOL_MSG, "MatchIsKeyboard");
break;
@@ -194,8 +193,8 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsPointer");
ptr->is_pointer.set = xf86getBoolValue(&ptr->is_pointer.val,
- val.str);
- free(val.str);
+ xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_pointer.set)
Error(BOOL_MSG, "MatchIsPointer");
break;
@@ -203,16 +202,16 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsJoystick");
ptr->is_joystick.set = xf86getBoolValue(&ptr->is_joystick.val,
- val.str);
- free(val.str);
+ xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_joystick.set)
Error(BOOL_MSG, "MatchIsJoystick");
break;
case MATCH_IS_TABLET:
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsTablet");
- ptr->is_tablet.set = xf86getBoolValue(&ptr->is_tablet.val, val.str);
- free(val.str);
+ ptr->is_tablet.set = xf86getBoolValue(&ptr->is_tablet.val, xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_tablet.set)
Error(BOOL_MSG, "MatchIsTablet");
break;
@@ -220,8 +219,8 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsTouchpad");
ptr->is_touchpad.set = xf86getBoolValue(&ptr->is_touchpad.val,
- val.str);
- free(val.str);
+ xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_touchpad.set)
Error(BOOL_MSG, "MatchIsTouchpad");
break;
@@ -229,8 +228,8 @@ xf86parseInputClassSection(void)
if (xf86getSubToken(&(ptr->comment)) != STRING)
Error(QUOTE_MSG, "MatchIsTouchscreen");
ptr->is_touchscreen.set = xf86getBoolValue(&ptr->is_touchscreen.val,
- val.str);
- free(val.str);
+ xf86_lex_val.str);
+ free(xf86_lex_val.str);
if (!ptr->is_touchscreen.set)
Error(BOOL_MSG, "MatchIsTouchscreen");
break;
diff --git a/xorg-server/hw/xfree86/parser/Layout.c b/xorg-server/hw/xfree86/parser/Layout.c
index cbd8d247a..7be746f04 100644
--- a/xorg-server/hw/xfree86/parser/Layout.c
+++ b/xorg-server/hw/xfree86/parser/Layout.c
@@ -65,7 +65,6 @@
/* Needed for auto server layout */
extern int xf86CheckBoolOption(void *optlist, const char *name, int deflt);
-extern LexRec val;
static xf86ConfigSymTabRec LayoutTab[] = {
{ENDSECTION, "endsection"},
@@ -100,14 +99,14 @@ xf86parseLayoutSection(void)
while ((token = xf86getToken(LayoutTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->lay_comment = xf86addComment(ptr->lay_comment, val.str);
+ ptr->lay_comment = xf86addComment(ptr->lay_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->lay_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->lay_identifier = val.str;
+ ptr->lay_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case INACTIVE:
@@ -120,7 +119,7 @@ xf86parseLayoutSection(void)
free(iptr);
Error(INACTIVE_MSG);
}
- iptr->inactive_device_str = val.str;
+ iptr->inactive_device_str = xf86_lex_val.str;
ptr->lay_inactive_lst = (XF86ConfInactivePtr)
xf86addListItem((glp) ptr->lay_inactive_lst, (glp) iptr);
}
@@ -138,7 +137,7 @@ xf86parseLayoutSection(void)
aptr->adj_y = 0;
aptr->adj_refscreen = NULL;
if ((token = xf86getSubToken(&(ptr->lay_comment))) == NUMBER)
- aptr->adj_scrnum = val.num;
+ aptr->adj_scrnum = xf86_lex_val.num;
else
xf86unGetToken(token);
token = xf86getSubToken(&(ptr->lay_comment));
@@ -146,7 +145,7 @@ xf86parseLayoutSection(void)
free(aptr);
Error(SCREEN_MSG);
}
- aptr->adj_screen_str = val.str;
+ aptr->adj_screen_str = xf86_lex_val.str;
token = xf86getSubTokenWithTab(&(ptr->lay_comment), AdjTab);
switch (token) {
@@ -186,13 +185,13 @@ xf86parseLayoutSection(void)
if (absKeyword)
token = xf86getSubToken(&(ptr->lay_comment));
if (token == NUMBER) {
- aptr->adj_x = val.num;
+ aptr->adj_x = xf86_lex_val.num;
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
Error(INVALID_SCR_MSG);
}
- aptr->adj_y = val.num;
+ aptr->adj_y = xf86_lex_val.num;
}
else {
if (absKeyword) {
@@ -213,46 +212,46 @@ xf86parseLayoutSection(void)
free(aptr);
Error(INVALID_SCR_MSG);
}
- aptr->adj_refscreen = val.str;
+ aptr->adj_refscreen = xf86_lex_val.str;
if (aptr->adj_where == CONF_ADJ_RELATIVE) {
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
Error(INVALID_SCR_MSG);
}
- aptr->adj_x = val.num;
+ aptr->adj_x = xf86_lex_val.num;
token = xf86getSubToken(&(ptr->lay_comment));
if (token != NUMBER) {
free(aptr);
Error(INVALID_SCR_MSG);
}
- aptr->adj_y = val.num;
+ aptr->adj_y = xf86_lex_val.num;
}
break;
case CONF_ADJ_OBSOLETE:
/* top */
- aptr->adj_top_str = val.str;
+ aptr->adj_top_str = xf86_lex_val.str;
/* bottom */
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
free(aptr);
Error(SCREEN_MSG);
}
- aptr->adj_bottom_str = val.str;
+ aptr->adj_bottom_str = xf86_lex_val.str;
/* left */
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
free(aptr);
Error(SCREEN_MSG);
}
- aptr->adj_left_str = val.str;
+ aptr->adj_left_str = xf86_lex_val.str;
/* right */
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
free(aptr);
Error(SCREEN_MSG);
}
- aptr->adj_right_str = val.str;
+ aptr->adj_right_str = xf86_lex_val.str;
}
ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr)
@@ -270,10 +269,10 @@ xf86parseLayoutSection(void)
free(iptr);
Error(INPUTDEV_MSG);
}
- iptr->iref_inputdev_str = val.str;
+ iptr->iref_inputdev_str = xf86_lex_val.str;
while ((token = xf86getSubToken(&(ptr->lay_comment))) == STRING) {
iptr->iref_option_lst =
- xf86addNewOption(iptr->iref_option_lst, val.str, NULL);
+ xf86addNewOption(iptr->iref_option_lst, xf86_lex_val.str, NULL);
}
xf86unGetToken(token);
ptr->lay_input_lst = (XF86ConfInputrefPtr)
diff --git a/xorg-server/hw/xfree86/parser/Module.c b/xorg-server/hw/xfree86/parser/Module.c
index 243ba9195..e2d9120cb 100644
--- a/xorg-server/hw/xfree86/parser/Module.c
+++ b/xorg-server/hw/xfree86/parser/Module.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec SubModuleTab[] = {
{ENDSUBSECTION, "endsubsection"},
@@ -95,7 +94,7 @@ xf86parseModuleSubSection(XF86LoadPtr head, char *name)
while ((token = xf86getToken(SubModuleTab)) != ENDSUBSECTION) {
switch (token) {
case COMMENT:
- ptr->load_comment = xf86addComment(ptr->load_comment, val.str);
+ ptr->load_comment = xf86addComment(ptr->load_comment, xf86_lex_val.str);
break;
case OPTION:
ptr->load_opt = xf86parseOption(ptr->load_opt);
@@ -126,34 +125,34 @@ xf86parseModuleSection(void)
while ((token = xf86getToken(ModuleTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->mod_comment = xf86addComment(ptr->mod_comment, val.str);
+ ptr->mod_comment = xf86addComment(ptr->mod_comment, xf86_lex_val.str);
break;
case LOAD:
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
Error(QUOTE_MSG, "Load");
ptr->mod_load_lst =
- xf86addNewLoadDirective(ptr->mod_load_lst, val.str,
+ xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str,
XF86_LOAD_MODULE, NULL);
break;
case DISABLE:
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
Error(QUOTE_MSG, "Disable");
ptr->mod_disable_lst =
- xf86addNewLoadDirective(ptr->mod_disable_lst, val.str,
+ xf86addNewLoadDirective(ptr->mod_disable_lst, xf86_lex_val.str,
XF86_DISABLE_MODULE, NULL);
break;
case LOAD_DRIVER:
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
Error(QUOTE_MSG, "LoadDriver");
ptr->mod_load_lst =
- xf86addNewLoadDirective(ptr->mod_load_lst, val.str,
+ xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str,
XF86_LOAD_DRIVER, NULL);
break;
case SUBSECTION:
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
Error(QUOTE_MSG, "SubSection");
ptr->mod_load_lst =
- xf86parseModuleSubSection(ptr->mod_load_lst, val.str);
+ xf86parseModuleSubSection(ptr->mod_load_lst, xf86_lex_val.str);
break;
case EOF_TOKEN:
Error(UNEXPECTED_EOF_MSG);
@@ -232,7 +231,7 @@ xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type,
new->list.next = NULL;
if ((token = xf86getToken(NULL)) == COMMENT)
- new->load_comment = xf86addComment(new->load_comment, val.str);
+ new->load_comment = xf86addComment(new->load_comment, xf86_lex_val.str);
else
xf86unGetToken(token);
diff --git a/xorg-server/hw/xfree86/parser/Monitor.c b/xorg-server/hw/xfree86/parser/Monitor.c
index 36b4ebe35..8aebce079 100644
--- a/xorg-server/hw/xfree86/parser/Monitor.c
+++ b/xorg-server/hw/xfree86/parser/Monitor.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec MonitorTab[] = {
{ENDSECTION, "endsection"},
@@ -140,52 +139,52 @@ xf86parseModeLine(void)
/* Identifier */
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
Error("ModeLine identifier expected");
- ptr->ml_identifier = val.str;
+ ptr->ml_identifier = xf86_lex_val.str;
/* DotClock */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine dotclock expected");
- ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);
+ ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5);
/* HDisplay */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine Hdisplay expected");
- ptr->ml_hdisplay = val.num;
+ ptr->ml_hdisplay = xf86_lex_val.num;
/* HSyncStart */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine HSyncStart expected");
- ptr->ml_hsyncstart = val.num;
+ ptr->ml_hsyncstart = xf86_lex_val.num;
/* HSyncEnd */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine HSyncEnd expected");
- ptr->ml_hsyncend = val.num;
+ ptr->ml_hsyncend = xf86_lex_val.num;
/* HTotal */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine HTotal expected");
- ptr->ml_htotal = val.num;
+ ptr->ml_htotal = xf86_lex_val.num;
/* VDisplay */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine Vdisplay expected");
- ptr->ml_vdisplay = val.num;
+ ptr->ml_vdisplay = xf86_lex_val.num;
/* VSyncStart */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine VSyncStart expected");
- ptr->ml_vsyncstart = val.num;
+ ptr->ml_vsyncstart = xf86_lex_val.num;
/* VSyncEnd */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine VSyncEnd expected");
- ptr->ml_vsyncend = val.num;
+ ptr->ml_vsyncend = xf86_lex_val.num;
/* VTotal */
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("ModeLine VTotal expected");
- ptr->ml_vtotal = val.num;
+ ptr->ml_vtotal = xf86_lex_val.num;
token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab);
while ((token == TT_INTERLACE) || (token == TT_PHSYNC) ||
@@ -226,7 +225,7 @@ xf86parseModeLine(void)
case TT_HSKEW:
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error(NUMBER_MSG, "Hskew");
- ptr->ml_hskew = val.num;
+ ptr->ml_hskew = xf86_lex_val.num;
ptr->ml_flags |= XF86CONF_HSKEW;
break;
case TT_BCAST:
@@ -235,7 +234,7 @@ xf86parseModeLine(void)
case TT_VSCAN:
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error(NUMBER_MSG, "Vscan");
- ptr->ml_vscan = val.num;
+ ptr->ml_vscan = xf86_lex_val.num;
ptr->ml_flags |= XF86CONF_VSCAN;
break;
case EOF_TOKEN:
@@ -265,58 +264,58 @@ xf86parseVerboseMode(void)
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
Error("Mode name expected");
- ptr->ml_identifier = val.str;
+ ptr->ml_identifier = xf86_lex_val.str;
while ((token = xf86getToken(ModeTab)) != ENDMODE) {
switch (token) {
case COMMENT:
- ptr->ml_comment = xf86addComment(ptr->ml_comment, val.str);
+ ptr->ml_comment = xf86addComment(ptr->ml_comment, xf86_lex_val.str);
break;
case DOTCLOCK:
if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER)
Error(NUMBER_MSG, "DotClock");
- ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5);
+ ptr->ml_clock = (int) (xf86_lex_val.realnum * 1000.0 + 0.5);
had_dotclock = 1;
break;
case HTIMINGS:
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_hdisplay = val.num;
+ ptr->ml_hdisplay = xf86_lex_val.num;
else
Error("Horizontal display expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_hsyncstart = val.num;
+ ptr->ml_hsyncstart = xf86_lex_val.num;
else
Error("Horizontal sync start expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_hsyncend = val.num;
+ ptr->ml_hsyncend = xf86_lex_val.num;
else
Error("Horizontal sync end expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_htotal = val.num;
+ ptr->ml_htotal = xf86_lex_val.num;
else
Error("Horizontal total expected");
had_htimings = 1;
break;
case VTIMINGS:
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_vdisplay = val.num;
+ ptr->ml_vdisplay = xf86_lex_val.num;
else
Error("Vertical display expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_vsyncstart = val.num;
+ ptr->ml_vsyncstart = xf86_lex_val.num;
else
Error("Vertical sync start expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_vsyncend = val.num;
+ ptr->ml_vsyncend = xf86_lex_val.num;
else
Error("Vertical sync end expected");
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
- ptr->ml_vtotal = val.num;
+ ptr->ml_vtotal = xf86_lex_val.num;
else
Error("Vertical total expected");
had_vtimings = 1;
@@ -370,13 +369,13 @@ xf86parseVerboseMode(void)
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("Horizontal skew expected");
ptr->ml_flags |= XF86CONF_HSKEW;
- ptr->ml_hskew = val.num;
+ ptr->ml_hskew = xf86_lex_val.num;
break;
case VSCAN:
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
Error("Vertical scan count expected");
ptr->ml_flags |= XF86CONF_VSCAN;
- ptr->ml_vscan = val.num;
+ ptr->ml_vscan = xf86_lex_val.num;
break;
case EOF_TOKEN:
Error(UNEXPECTED_EOF_MSG);
@@ -413,25 +412,25 @@ xf86parseMonitorSection(void)
while ((token = xf86getToken(MonitorTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->mon_comment = xf86addComment(ptr->mon_comment, val.str);
+ ptr->mon_comment = xf86addComment(ptr->mon_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->mon_identifier = val.str;
+ ptr->mon_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case VENDOR:
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
Error(QUOTE_MSG, "Vendor");
- ptr->mon_vendor = val.str;
+ ptr->mon_vendor = xf86_lex_val.str;
break;
case MODEL:
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
Error(QUOTE_MSG, "ModelName");
- ptr->mon_modelname = val.str;
+ ptr->mon_modelname = xf86_lex_val.str;
break;
case MODE:
HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode,
@@ -444,10 +443,10 @@ xf86parseMonitorSection(void)
case DISPLAYSIZE:
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
Error(DISPLAYSIZE_MSG);
- ptr->mon_width = val.realnum;
+ ptr->mon_width = xf86_lex_val.realnum;
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
Error(DISPLAYSIZE_MSG);
- ptr->mon_height = val.realnum;
+ ptr->mon_height = xf86_lex_val.realnum;
break;
case HORIZSYNC:
@@ -456,7 +455,7 @@ xf86parseMonitorSection(void)
do {
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
Error("Sorry. Too many horizontal sync intervals.");
- ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum;
+ ptr->mon_hsync[ptr->mon_n_hsync].lo = xf86_lex_val.realnum;
switch (token = xf86getSubToken(&(ptr->mon_comment))) {
case COMMA:
ptr->mon_hsync[ptr->mon_n_hsync].hi =
@@ -464,10 +463,10 @@ xf86parseMonitorSection(void)
break;
case DASH:
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
- (float) val.realnum <
+ (float) xf86_lex_val.realnum <
ptr->mon_hsync[ptr->mon_n_hsync].lo)
Error(HORIZSYNC_MSG);
- ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum;
+ ptr->mon_hsync[ptr->mon_n_hsync].hi = xf86_lex_val.realnum;
if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA)
break;
ptr->mon_n_hsync++;
@@ -491,7 +490,7 @@ xf86parseMonitorSection(void)
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
Error(VERTREFRESH_MSG);
do {
- ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = val.realnum;
+ ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = xf86_lex_val.realnum;
switch (token = xf86getSubToken(&(ptr->mon_comment))) {
case COMMA:
ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi =
@@ -499,10 +498,10 @@ xf86parseMonitorSection(void)
break;
case DASH:
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
- (float) val.realnum <
+ (float) xf86_lex_val.realnum <
ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
Error(VERTREFRESH_MSG);
- ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum;
+ ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = xf86_lex_val.realnum;
if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA)
break;
ptr->mon_n_vrefresh++;
@@ -530,11 +529,11 @@ xf86parseMonitorSection(void)
}
else {
ptr->mon_gamma_red = ptr->mon_gamma_green =
- ptr->mon_gamma_blue = val.realnum;
+ ptr->mon_gamma_blue = xf86_lex_val.realnum;
if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) {
- ptr->mon_gamma_green = val.realnum;
+ ptr->mon_gamma_green = xf86_lex_val.realnum;
if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) {
- ptr->mon_gamma_blue = val.realnum;
+ ptr->mon_gamma_blue = xf86_lex_val.realnum;
}
else {
Error(INVALID_GAMMA_MSG);
@@ -558,7 +557,7 @@ xf86parseMonitorSection(void)
referenced here */
mptr = calloc(1, sizeof(XF86ConfModesLinkRec));
mptr->list.next = NULL;
- mptr->ml_modes_str = val.str;
+ mptr->ml_modes_str = xf86_lex_val.str;
mptr->ml_modes = NULL;
ptr->mon_modes_sect_lst = (XF86ConfModesLinkPtr)
xf86addListItem((GenericListPtr) ptr->mon_modes_sect_lst,
@@ -599,14 +598,14 @@ xf86parseModesSection(void)
while ((token = xf86getToken(ModesTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->modes_comment = xf86addComment(ptr->modes_comment, val.str);
+ ptr->modes_comment = xf86addComment(ptr->modes_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->modes_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->modes_identifier = val.str;
+ ptr->modes_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case MODE:
diff --git a/xorg-server/hw/xfree86/parser/Pointer.c b/xorg-server/hw/xfree86/parser/Pointer.c
index ff748d99a..fe60d95aa 100644
--- a/xorg-server/hw/xfree86/parser/Pointer.c
+++ b/xorg-server/hw/xfree86/parser/Pointer.c
@@ -61,7 +61,6 @@
#include "Configint.h"
#include "Xprintf.h"
-extern LexRec val;
static xf86ConfigSymTabRec PointerTab[] = {
{PROTOCOL, "protocol"},
@@ -104,19 +103,19 @@ xf86parsePointerSection(void)
while ((token = xf86getToken(PointerTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str);
+ ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str);
break;
case PROTOCOL:
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
Error(QUOTE_MSG, "Protocol");
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
- strdup("Protocol"), val.str);
+ strdup("Protocol"), xf86_lex_val.str);
break;
case PDEVICE:
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
Error(QUOTE_MSG, "Device");
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
- strdup("Device"), val.str);
+ strdup("Device"), xf86_lex_val.str);
break;
case EMULATE3:
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
@@ -124,9 +123,9 @@ xf86parsePointerSection(void)
NULL);
break;
case EM3TIMEOUT:
- if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0)
+ if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0)
Error(POSITIVE_INT_MSG, "Emulate3Timeout");
- s = xf86uLongToString(val.num);
+ s = xf86uLongToString(xf86_lex_val.num);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
strdup("Emulate3Timeout"),
s);
@@ -136,30 +135,30 @@ xf86parsePointerSection(void)
strdup("ChordMiddle"), NULL);
break;
case PBUTTONS:
- if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0)
+ if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0)
Error(POSITIVE_INT_MSG, "Buttons");
- s = xf86uLongToString(val.num);
+ s = xf86uLongToString(xf86_lex_val.num);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
strdup("Buttons"), s);
break;
case BAUDRATE:
- if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0)
+ if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0)
Error(POSITIVE_INT_MSG, "BaudRate");
- s = xf86uLongToString(val.num);
+ s = xf86uLongToString(xf86_lex_val.num);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
strdup("BaudRate"), s);
break;
case SAMPLERATE:
- if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0)
+ if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0)
Error(POSITIVE_INT_MSG, "SampleRate");
- s = xf86uLongToString(val.num);
+ s = xf86uLongToString(xf86_lex_val.num);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
strdup("SampleRate"), s);
break;
case PRESOLUTION:
- if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0)
+ if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0)
Error(POSITIVE_INT_MSG, "Resolution");
- s = xf86uLongToString(val.num);
+ s = xf86uLongToString(xf86_lex_val.num);
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
strdup("Resolution"), s);
break;
@@ -174,14 +173,14 @@ xf86parsePointerSection(void)
case ZAXISMAPPING:
switch (xf86getToken(ZMapTab)) {
case NUMBER:
- if (val.num < 0)
+ if (xf86_lex_val.num < 0)
Error(ZAXISMAPPING_MSG);
- val1 = val.num;
+ val1 = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER ||
- val.num < 0) {
+ xf86_lex_val.num < 0) {
Error(ZAXISMAPPING_MSG);
}
- if (asprintf(&s, "%lu %u", val1, val.num) == -1)
+ if (asprintf(&s, "%lu %u", val1, xf86_lex_val.num) == -1)
s = NULL;
break;
case XAXIS:
diff --git a/xorg-server/hw/xfree86/parser/Screen.c b/xorg-server/hw/xfree86/parser/Screen.c
index f294ec490..fecd57c0c 100644
--- a/xorg-server/hw/xfree86/parser/Screen.c
+++ b/xorg-server/hw/xfree86/parser/Screen.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec DisplayTab[] = {
{ENDSUBSECTION, "endsubsection"},
@@ -92,71 +91,71 @@ xf86parseDisplaySubSection(void)
while ((token = xf86getToken(DisplayTab)) != ENDSUBSECTION) {
switch (token) {
case COMMENT:
- ptr->disp_comment = xf86addComment(ptr->disp_comment, val.str);
+ ptr->disp_comment = xf86addComment(ptr->disp_comment, xf86_lex_val.str);
break;
case VIEWPORT:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(VIEWPORT_MSG);
- ptr->disp_frameX0 = val.num;
+ ptr->disp_frameX0 = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(VIEWPORT_MSG);
- ptr->disp_frameY0 = val.num;
+ ptr->disp_frameY0 = xf86_lex_val.num;
break;
case VIRTUAL:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(VIRTUAL_MSG);
- ptr->disp_virtualX = val.num;
+ ptr->disp_virtualX = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(VIRTUAL_MSG);
- ptr->disp_virtualY = val.num;
+ ptr->disp_virtualY = xf86_lex_val.num;
break;
case DEPTH:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(NUMBER_MSG, "Display");
- ptr->disp_depth = val.num;
+ ptr->disp_depth = xf86_lex_val.num;
break;
case BPP:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(NUMBER_MSG, "Display");
- ptr->disp_bpp = val.num;
+ ptr->disp_bpp = xf86_lex_val.num;
break;
case VISUAL:
if (xf86getSubToken(&(ptr->disp_comment)) != STRING)
Error(QUOTE_MSG, "Display");
- ptr->disp_visual = val.str;
+ ptr->disp_visual = xf86_lex_val.str;
break;
case WEIGHT:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WEIGHT_MSG);
- ptr->disp_weight.red = val.num;
+ ptr->disp_weight.red = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WEIGHT_MSG);
- ptr->disp_weight.green = val.num;
+ ptr->disp_weight.green = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WEIGHT_MSG);
- ptr->disp_weight.blue = val.num;
+ ptr->disp_weight.blue = xf86_lex_val.num;
break;
case BLACK_TOK:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(BLACK_MSG);
- ptr->disp_black.red = val.num;
+ ptr->disp_black.red = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(BLACK_MSG);
- ptr->disp_black.green = val.num;
+ ptr->disp_black.green = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(BLACK_MSG);
- ptr->disp_black.blue = val.num;
+ ptr->disp_black.blue = xf86_lex_val.num;
break;
case WHITE_TOK:
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WHITE_MSG);
- ptr->disp_white.red = val.num;
+ ptr->disp_white.red = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WHITE_MSG);
- ptr->disp_white.green = val.num;
+ ptr->disp_white.green = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
Error(WHITE_MSG);
- ptr->disp_white.blue = val.num;
+ ptr->disp_white.blue = xf86_lex_val.num;
break;
case MODES:
{
@@ -166,7 +165,7 @@ xf86parseDisplaySubSection(void)
xf86getSubTokenWithTab(&(ptr->disp_comment),
DisplayTab)) == STRING) {
mptr = calloc(1, sizeof(XF86ModeRec));
- mptr->mode_name = val.str;
+ mptr->mode_name = xf86_lex_val.str;
mptr->list.next = NULL;
ptr->disp_mode_lst = (XF86ModePtr)
xf86addListItem((glp) ptr->disp_mode_lst, (glp) mptr);
@@ -227,12 +226,12 @@ xf86parseScreenSection(void)
while ((token = xf86getToken(ScreenTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->scrn_comment = xf86addComment(ptr->scrn_comment, val.str);
+ ptr->scrn_comment = xf86addComment(ptr->scrn_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
- ptr->scrn_identifier = val.str;
+ ptr->scrn_identifier = xf86_lex_val.str;
if (has_ident || has_driver)
Error(ONLY_ONE_MSG, "Identifier or Driver");
has_ident = TRUE;
@@ -240,7 +239,7 @@ xf86parseScreenSection(void)
case OBSDRIVER:
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- ptr->scrn_obso_driver = val.str;
+ ptr->scrn_obso_driver = xf86_lex_val.str;
if (has_ident || has_driver)
Error(ONLY_ONE_MSG, "Identifier or Driver");
has_driver = TRUE;
@@ -248,27 +247,27 @@ xf86parseScreenSection(void)
case DEFAULTDEPTH:
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
Error(NUMBER_MSG, "DefaultDepth");
- ptr->scrn_defaultdepth = val.num;
+ ptr->scrn_defaultdepth = xf86_lex_val.num;
break;
case DEFAULTBPP:
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
Error(NUMBER_MSG, "DefaultBPP");
- ptr->scrn_defaultbpp = val.num;
+ ptr->scrn_defaultbpp = xf86_lex_val.num;
break;
case DEFAULTFBBPP:
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
Error(NUMBER_MSG, "DefaultFbBPP");
- ptr->scrn_defaultfbbpp = val.num;
+ ptr->scrn_defaultfbbpp = xf86_lex_val.num;
break;
case MDEVICE:
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
Error(QUOTE_MSG, "Device");
- ptr->scrn_device_str = val.str;
+ ptr->scrn_device_str = xf86_lex_val.str;
break;
case MONITOR:
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
Error(QUOTE_MSG, "Monitor");
- ptr->scrn_monitor_str = val.str;
+ ptr->scrn_monitor_str = xf86_lex_val.str;
break;
case VIDEOADAPTOR:
{
@@ -280,13 +279,13 @@ xf86parseScreenSection(void)
/* Don't allow duplicates */
for (aptr = ptr->scrn_adaptor_lst; aptr;
aptr = (XF86ConfAdaptorLinkPtr) aptr->list.next)
- if (xf86nameCompare(val.str, aptr->al_adaptor_str) == 0)
+ if (xf86nameCompare(xf86_lex_val.str, aptr->al_adaptor_str) == 0)
break;
if (aptr == NULL) {
aptr = calloc(1, sizeof(XF86ConfAdaptorLinkRec));
aptr->list.next = NULL;
- aptr->al_adaptor_str = val.str;
+ aptr->al_adaptor_str = xf86_lex_val.str;
ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr)
xf86addListItem((glp) ptr->scrn_adaptor_lst, (glp) aptr);
}
@@ -295,10 +294,10 @@ xf86parseScreenSection(void)
case VIRTUAL:
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
Error(VIRTUAL_MSG);
- ptr->scrn_virtualX = val.num;
+ ptr->scrn_virtualX = xf86_lex_val.num;
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
Error(VIRTUAL_MSG);
- ptr->scrn_virtualY = val.num;
+ ptr->scrn_virtualY = xf86_lex_val.num;
break;
case OPTION:
ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst);
@@ -307,7 +306,7 @@ xf86parseScreenSection(void)
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
Error(QUOTE_MSG, "SubSection");
{
- free(val.str);
+ free(xf86_lex_val.str);
HANDLE_LIST(scrn_display_lst, xf86parseDisplaySubSection,
XF86ConfDisplayPtr);
}
diff --git a/xorg-server/hw/xfree86/parser/Vendor.c b/xorg-server/hw/xfree86/parser/Vendor.c
index 9b7695c8e..2c870ae7f 100644
--- a/xorg-server/hw/xfree86/parser/Vendor.c
+++ b/xorg-server/hw/xfree86/parser/Vendor.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec VendorSubTab[] = {
{ENDSUBSECTION, "endsubsection"},
@@ -82,14 +81,14 @@ xf86parseVendorSubSection(void)
while ((token = xf86getToken(VendorSubTab)) != ENDSUBSECTION) {
switch (token) {
case COMMENT:
- ptr->vs_comment = xf86addComment(ptr->vs_comment, val.str);
+ ptr->vs_comment = xf86addComment(ptr->vs_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->vs_comment)))
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->vs_identifier = val.str;
+ ptr->vs_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case OPTION:
@@ -135,14 +134,14 @@ xf86parseVendorSection(void)
while ((token = xf86getToken(VendorTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->vnd_comment = xf86addComment(ptr->vnd_comment, val.str);
+ ptr->vnd_comment = xf86addComment(ptr->vnd_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->vnd_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->vnd_identifier = val.str;
+ ptr->vnd_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case OPTION:
diff --git a/xorg-server/hw/xfree86/parser/Video.c b/xorg-server/hw/xfree86/parser/Video.c
index 68d611ae7..93209c499 100644
--- a/xorg-server/hw/xfree86/parser/Video.c
+++ b/xorg-server/hw/xfree86/parser/Video.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec VideoPortTab[] = {
{ENDSUBSECTION, "endsubsection"},
@@ -97,14 +96,14 @@ xf86parseVideoPortSubSection(void)
while ((token = xf86getToken(VideoPortTab)) != ENDSUBSECTION) {
switch (token) {
case COMMENT:
- ptr->vp_comment = xf86addComment(ptr->vp_comment, val.str);
+ ptr->vp_comment = xf86addComment(ptr->vp_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->vp_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
- ptr->vp_identifier = val.str;
+ ptr->vp_identifier = xf86_lex_val.str;
has_ident = TRUE;
break;
case OPTION:
@@ -154,12 +153,12 @@ xf86parseVideoAdaptorSection(void)
while ((token = xf86getToken(VideoAdaptorTab)) != ENDSECTION) {
switch (token) {
case COMMENT:
- ptr->va_comment = xf86addComment(ptr->va_comment, val.str);
+ ptr->va_comment = xf86addComment(ptr->va_comment, xf86_lex_val.str);
break;
case IDENTIFIER:
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
Error(QUOTE_MSG, "Identifier");
- ptr->va_identifier = val.str;
+ ptr->va_identifier = xf86_lex_val.str;
if (has_ident == TRUE)
Error(MULTIPLE_MSG, "Identifier");
has_ident = TRUE;
@@ -167,22 +166,22 @@ xf86parseVideoAdaptorSection(void)
case VENDOR:
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
Error(QUOTE_MSG, "Vendor");
- ptr->va_vendor = val.str;
+ ptr->va_vendor = xf86_lex_val.str;
break;
case BOARD:
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
Error(QUOTE_MSG, "Board");
- ptr->va_board = val.str;
+ ptr->va_board = xf86_lex_val.str;
break;
case BUSID:
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
Error(QUOTE_MSG, "BusID");
- ptr->va_busid = val.str;
+ ptr->va_busid = xf86_lex_val.str;
break;
case DRIVER:
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
Error(QUOTE_MSG, "Driver");
- ptr->va_driver = val.str;
+ ptr->va_driver = xf86_lex_val.str;
break;
case OPTION:
ptr->va_option_lst = xf86parseOption(ptr->va_option_lst);
diff --git a/xorg-server/hw/xfree86/parser/read.c b/xorg-server/hw/xfree86/parser/read.c
index 6545bcdae..2478b074b 100644
--- a/xorg-server/hw/xfree86/parser/read.c
+++ b/xorg-server/hw/xfree86/parser/read.c
@@ -60,7 +60,6 @@
#include "xf86tokens.h"
#include "Configint.h"
-extern LexRec val;
static xf86ConfigSymTabRec TopLevelTab[] = {
{SECTION, "section"},
@@ -99,7 +98,7 @@ xf86readConfigFile(void)
while ((token = xf86getToken(TopLevelTab)) != EOF_TOKEN) {
switch (token) {
case COMMENT:
- ptr->conf_comment = xf86addComment(ptr->conf_comment, val.str);
+ ptr->conf_comment = xf86addComment(ptr->conf_comment, xf86_lex_val.str);
break;
case SECTION:
if (xf86getSubToken(&(ptr->conf_comment)) != STRING) {
@@ -107,101 +106,101 @@ xf86readConfigFile(void)
CLEANUP(ptr);
return NULL;
}
- xf86setSection(val.str);
- if (xf86nameCompare(val.str, "files") == 0) {
- free(val.str);
- val.str = NULL;
+ xf86setSection(xf86_lex_val.str);
+ if (xf86nameCompare(xf86_lex_val.str, "files") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_RETURN(conf_files, xf86parseFilesSection());
}
- else if (xf86nameCompare(val.str, "serverflags") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_RETURN(conf_flags, xf86parseFlagsSection());
}
- else if (xf86nameCompare(val.str, "pointer") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "pointer") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_input_lst, xf86parsePointerSection,
XF86ConfInputPtr);
}
- else if (xf86nameCompare(val.str, "videoadaptor") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "videoadaptor") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_videoadaptor_lst, xf86parseVideoAdaptorSection,
XF86ConfVideoAdaptorPtr);
}
- else if (xf86nameCompare(val.str, "device") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "device") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_device_lst, xf86parseDeviceSection,
XF86ConfDevicePtr);
}
- else if (xf86nameCompare(val.str, "monitor") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "monitor") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_monitor_lst, xf86parseMonitorSection,
XF86ConfMonitorPtr);
}
- else if (xf86nameCompare(val.str, "modes") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "modes") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_modes_lst, xf86parseModesSection,
XF86ConfModesPtr);
}
- else if (xf86nameCompare(val.str, "screen") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "screen") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_screen_lst, xf86parseScreenSection,
XF86ConfScreenPtr);
}
- else if (xf86nameCompare(val.str, "inputdevice") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "inputdevice") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_input_lst, xf86parseInputSection,
XF86ConfInputPtr);
}
- else if (xf86nameCompare(val.str, "inputclass") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "inputclass") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_inputclass_lst,
xf86parseInputClassSection, XF86ConfInputClassPtr);
}
- else if (xf86nameCompare(val.str, "module") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "module") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_RETURN(conf_modules, xf86parseModuleSection());
}
- else if (xf86nameCompare(val.str, "serverlayout") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "serverlayout") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_layout_lst, xf86parseLayoutSection,
XF86ConfLayoutPtr);
}
- else if (xf86nameCompare(val.str, "vendor") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "vendor") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_LIST(conf_vendor_lst, xf86parseVendorSection,
XF86ConfVendorPtr);
}
- else if (xf86nameCompare(val.str, "dri") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "dri") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_RETURN(conf_dri, xf86parseDRISection());
}
- else if (xf86nameCompare(val.str, "extensions") == 0) {
- free(val.str);
- val.str = NULL;
+ else if (xf86nameCompare(xf86_lex_val.str, "extensions") == 0) {
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
HANDLE_RETURN(conf_extensions, xf86parseExtensionsSection());
}
else {
- free(val.str);
- val.str = NULL;
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
Error(INVALID_SECTION_MSG, xf86tokenString());
}
break;
default:
- free(val.str);
- val.str = NULL;
+ free(xf86_lex_val.str);
+ xf86_lex_val.str = NULL;
Error(INVALID_KEYWORD_MSG, xf86tokenString());
}
}
diff --git a/xorg-server/hw/xfree86/parser/scan.c b/xorg-server/hw/xfree86/parser/scan.c
index 55a84426d..a6c12957b 100644
--- a/xorg-server/hw/xfree86/parser/scan.c
+++ b/xorg-server/hw/xfree86/parser/scan.c
@@ -103,7 +103,7 @@ static int numFiles = 0; /* number of config files */
static int curFileIndex = 0; /* index of current config file */
static int pushToken = LOCK_TOKEN;
static int eol_seen = 0; /* private state to handle comments */
-LexRec val;
+LexRec xf86_lex_val;
/*
* xf86getNextLine --
@@ -332,7 +332,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
/* XXX no private copy.
* Use xf86addComment when setting a comment.
*/
- val.str = configRBuf;
+ xf86_lex_val.str = configRBuf;
return COMMENT;
}
@@ -354,15 +354,15 @@ xf86getToken(xf86ConfigSymTabRec * tab)
if ((configBuf[configPos] == 'x') ||
(configBuf[configPos] == 'X')) {
base = 16;
- val.numType = PARSE_HEX;
+ xf86_lex_val.numType = PARSE_HEX;
}
else {
base = 8;
- val.numType = PARSE_OCTAL;
+ xf86_lex_val.numType = PARSE_OCTAL;
}
else {
base = 10;
- val.numType = PARSE_DECIMAL;
+ xf86_lex_val.numType = PARSE_DECIMAL;
}
configRBuf[0] = c;
@@ -374,8 +374,8 @@ xf86getToken(xf86ConfigSymTabRec * tab)
configRBuf[i++] = c;
configPos--; /* GJA -- one too far */
configRBuf[i] = '\0';
- val.num = strtoul(configRBuf, NULL, 0);
- val.realnum = atof(configRBuf);
+ xf86_lex_val.num = strtoul(configRBuf, NULL, 0);
+ xf86_lex_val.realnum = atof(configRBuf);
return NUMBER;
}
@@ -389,8 +389,8 @@ xf86getToken(xf86ConfigSymTabRec * tab)
}
while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0'));
configRBuf[i] = '\0';
- val.str = malloc(strlen(configRBuf) + 1);
- strcpy(val.str, configRBuf); /* private copy ! */
+ xf86_lex_val.str = malloc(strlen(configRBuf) + 1);
+ strcpy(xf86_lex_val.str, configRBuf); /* private copy ! */
return STRING;
}
@@ -452,7 +452,7 @@ xf86getSubToken(char **comment)
token = xf86getToken(NULL);
if (token == COMMENT) {
if (comment)
- *comment = xf86addComment(*comment, val.str);
+ *comment = xf86addComment(*comment, xf86_lex_val.str);
}
else
return token;
@@ -468,7 +468,7 @@ xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec * tab)
token = xf86getToken(tab);
if (token == COMMENT) {
if (comment)
- *comment = xf86addComment(*comment, val.str);
+ *comment = xf86addComment(*comment, xf86_lex_val.str);
}
else
return token;
@@ -1025,7 +1025,7 @@ xf86setSection(const char *section)
int
xf86getStringToken(xf86ConfigSymTabRec * tab)
{
- return StringToToken(val.str, tab);
+ return StringToToken(xf86_lex_val.str, tab);
}
static int