aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86
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
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')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Config.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86Configure.c47
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c1
-rw-r--r--xorg-server/hw/xfree86/common/xf86Init.c4
-rw-r--r--xorg-server/hw/xfree86/common/xf86fbman.c3
-rw-r--r--xorg-server/hw/xfree86/ddc/interpret_edid.c137
-rw-r--r--xorg-server/hw/xfree86/ddc/xf86DDC.h2
-rw-r--r--xorg-server/hw/xfree86/dri/dri.c12
-rw-r--r--xorg-server/hw/xfree86/modes/xf86Crtc.c41
-rw-r--r--xorg-server/hw/xfree86/modes/xf86EdidModes.c4
-rw-r--r--xorg-server/hw/xfree86/modes/xf86RandR12.c1
-rw-r--r--xorg-server/hw/xfree86/os-support/linux/lnx_init.c1
-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
-rw-r--r--xorg-server/hw/xfree86/x86emu/ops.c168
30 files changed, 514 insertions, 472 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Config.c b/xorg-server/hw/xfree86/common/xf86Config.c
index 5be1693d8..258b22bfe 100644
--- a/xorg-server/hw/xfree86/common/xf86Config.c
+++ b/xorg-server/hw/xfree86/common/xf86Config.c
@@ -1677,7 +1677,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
*/
static Bool
configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
- XF86ConfigPtr xf86configptr)
+ XF86ConfigPtr conf_ptr)
{
MessageType from;
XF86ConfScreenPtr s;
@@ -1722,7 +1722,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
memset(&layout, 0, sizeof(layout));
layout.lay_identifier = servlayoutp->id;
- if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) {
+ if (xf86layoutAddInputDevices(conf_ptr, &layout) > 0) {
if (!configInputDevices(&layout, servlayoutp))
return FALSE;
from = X_DEFAULT;
diff --git a/xorg-server/hw/xfree86/common/xf86Configure.c b/xorg-server/hw/xfree86/common/xf86Configure.c
index 1348b2753..30dc5505c 100644
--- a/xorg-server/hw/xfree86/common/xf86Configure.c
+++ b/xorg-server/hw/xfree86/common/xf86Configure.c
@@ -206,17 +206,17 @@ configureScreenSection(int screennum)
ptr->scrn_device_str = tmp;
for (i = 0; i < sizeof(depths) / sizeof(depths[0]); i++) {
- XF86ConfDisplayPtr display;
+ XF86ConfDisplayPtr conf_display;
- display = calloc(1, sizeof(XF86ConfDisplayRec));
- display->disp_depth = depths[i];
- display->disp_black.red = display->disp_white.red = -1;
- display->disp_black.green = display->disp_white.green = -1;
- display->disp_black.blue = display->disp_white.blue = -1;
+ conf_display = calloc(1, sizeof(XF86ConfDisplayRec));
+ conf_display->disp_depth = depths[i];
+ conf_display->disp_black.red = conf_display->disp_white.red = -1;
+ conf_display->disp_black.green = conf_display->disp_white.green = -1;
+ conf_display->disp_black.blue = conf_display->disp_white.blue = -1;
ptr->scrn_display_lst = (XF86ConfDisplayPtr) xf86addListItem((glp) ptr->
scrn_display_lst,
(glp)
- display);
+ conf_display);
}
return ptr;
@@ -375,7 +375,6 @@ configureLayoutSection(void)
aptr->adj_refscreen = NULL;
}
else {
- char *tmp;
aptr->adj_where = CONF_ADJ_RIGHTOF;
XNFasprintf(&tmp, "Screen%d", scrnum - 1);
aptr->adj_refscreen = tmp;
@@ -586,24 +585,24 @@ DoConfigure(void)
/* Add device, monitor and screen sections for detected devices */
for (screennum = 0; screennum < nDevToConfig; screennum++) {
- XF86ConfDevicePtr DevicePtr;
- XF86ConfMonitorPtr MonitorPtr;
- XF86ConfScreenPtr ScreenPtr;
+ XF86ConfDevicePtr device_ptr;
+ XF86ConfMonitorPtr monitor_ptr;
+ XF86ConfScreenPtr screen_ptr;
- DevicePtr = configureDeviceSection(screennum);
+ device_ptr = configureDeviceSection(screennum);
xf86config->conf_device_lst = (XF86ConfDevicePtr) xf86addListItem((glp)
xf86config->
conf_device_lst,
(glp)
- DevicePtr);
- MonitorPtr = configureMonitorSection(screennum);
- xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) MonitorPtr);
- ScreenPtr = configureScreenSection(screennum);
+ device_ptr);
+ monitor_ptr = configureMonitorSection(screennum);
+ xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) monitor_ptr);
+ screen_ptr = configureScreenSection(screennum);
xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp)
xf86config->
conf_screen_lst,
(glp)
- ScreenPtr);
+ screen_ptr);
}
xf86config->conf_files = configureFilesSection();
@@ -714,27 +713,27 @@ DoConfigure(void)
xf86freeScreenList(xf86config->conf_screen_lst);
xf86config->conf_screen_lst = NULL;
for (j = 0; j < xf86NumScreens; j++) {
- XF86ConfMonitorPtr MonitorPtr;
- XF86ConfScreenPtr ScreenPtr;
+ XF86ConfMonitorPtr monitor_ptr;
+ XF86ConfScreenPtr screen_ptr;
ConfiguredMonitor = NULL;
if ((*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]],
PROBE_DETECT) &&
ConfiguredMonitor) {
- MonitorPtr = configureDDCMonitorSection(j);
+ monitor_ptr = configureDDCMonitorSection(j);
}
else {
- MonitorPtr = configureMonitorSection(j);
+ monitor_ptr = configureMonitorSection(j);
}
- ScreenPtr = configureScreenSection(j);
+ screen_ptr = configureScreenSection(j);
- xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) MonitorPtr);
+ xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) monitor_ptr);
xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp)
xf86config->
conf_screen_lst,
(glp)
- ScreenPtr);
+ screen_ptr);
}
if (xf86writeConfigFile(filename, xf86config) == 0) {
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index 0916deccf..2c0629d64 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -421,7 +421,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp,
* Check for DefaultDepth and DefaultFbBpp options in the
* Device sections.
*/
- int i;
GDevPtr device;
Bool found = FALSE;
diff --git a/xorg-server/hw/xfree86/common/xf86Init.c b/xorg-server/hw/xfree86/common/xf86Init.c
index 7c72aa964..9c8a86a39 100644
--- a/xorg-server/hw/xfree86/common/xf86Init.c
+++ b/xorg-server/hw/xfree86/common/xf86Init.c
@@ -309,7 +309,7 @@ xf86CreateRootWindow(WindowPtr pWin)
int err = Success;
ScreenPtr pScreen = pWin->drawable.pScreen;
RootWinPropPtr pProp;
- CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
+ CreateWindowProcPtr create_window = (CreateWindowProcPtr)
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
DebugF("xf86CreateRootWindow(%p)\n", pWin);
@@ -323,7 +323,7 @@ xf86CreateRootWindow(WindowPtr pWin)
}
/* Unhook this function ... */
- pScreen->CreateWindow = CreateWindow;
+ pScreen->CreateWindow = create_window;
dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL);
/* ... and call the previous CreateWindow fuction, if any */
diff --git a/xorg-server/hw/xfree86/common/xf86fbman.c b/xorg-server/hw/xfree86/common/xf86fbman.c
index dafaad304..db715bd2f 100644
--- a/xorg-server/hw/xfree86/common/xf86fbman.c
+++ b/xorg-server/hw/xfree86/common/xf86fbman.c
@@ -1122,11 +1122,8 @@ localQueryLargestOffscreenLinear(ScreenPtr pScreen,
if (localQueryLargestOffscreenArea(pScreen, &w, &h, gran,
FAVOR_WIDTH_THEN_AREA, priority)) {
- FBManagerPtr offman;
BoxPtr extents;
- offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
- xf86FBScreenKey);
extents = RegionExtents(offman->InitialBoxes);
if ((extents->x2 - extents->x1) == w)
*size = w * h;
diff --git a/xorg-server/hw/xfree86/ddc/interpret_edid.c b/xorg-server/hw/xfree86/ddc/interpret_edid.c
index 882a6b201..17a8f81c0 100644
--- a/xorg-server/hw/xfree86/ddc/interpret_edid.c
+++ b/xorg-server/hw/xfree86/ddc/interpret_edid.c
@@ -332,6 +332,97 @@ xf86ForEachVideoBlock(xf86MonPtr mon, handle_video_fn fn, void *data)
}
}
+static Bool
+cea_db_offsets(Uchar *cea, int *start, int *end)
+{
+ /* Data block offset in CEA extension block */
+ *start = CEA_EXT_MIN_DATA_OFFSET;
+ *end = cea[2];
+ if (*end == 0)
+ *end = CEA_EXT_MAX_DATA_OFFSET;
+ if (*end < CEA_EXT_MIN_DATA_OFFSET || *end > CEA_EXT_MAX_DATA_OFFSET)
+ return FALSE;
+ return TRUE;
+}
+
+static int
+cea_db_len(Uchar *db)
+{
+ return db[0] & 0x1f;
+}
+
+static int
+cea_db_tag(Uchar *db)
+{
+ return db[0] >> 5;
+}
+
+typedef void (*handle_cea_db_fn) (Uchar *, void *);
+
+static void
+cea_for_each_db(xf86MonPtr mon, handle_cea_db_fn fn, void *data)
+{
+ int i;
+
+ if (!mon)
+ return;
+
+ if (!(mon->flags & EDID_COMPLETE_RAWDATA))
+ return;
+
+ if (!mon->no_sections)
+ return;
+
+ if (!mon->rawData)
+ return;
+
+ for (i = 0; i < mon->no_sections; i++) {
+ int start, end, offset;
+ Uchar *ext;
+
+ ext = mon->rawData + EDID1_LEN * (i + 1);
+ if (ext[EXT_TAG] != CEA_EXT)
+ continue;
+
+ if (!cea_db_offsets(ext, &start, &end))
+ continue;
+
+ for (offset = start;
+ offset < end && offset + cea_db_len(&ext[offset]) < end;
+ offset += cea_db_len(&ext[offset]) + 1)
+ fn(&ext[offset], data);
+ }
+}
+
+struct find_hdmi_block_data {
+ struct cea_data_block *hdmi;
+};
+
+static void find_hdmi_block(Uchar *db, void *data)
+{
+ struct find_hdmi_block_data *result = data;
+ int oui;
+
+ if (cea_db_tag(db) != CEA_VENDOR_BLK)
+ return;
+
+ if (cea_db_len(db) < 5)
+ return;
+
+ oui = (db[3] << 16) | (db[2] << 8) | db[1];
+ if (oui == IEEE_ID_HDMI)
+ result->hdmi = (struct cea_data_block *)db;
+}
+
+struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon)
+{
+ struct find_hdmi_block_data result = { NULL };
+
+ cea_for_each_db(mon, find_hdmi_block, &result);
+
+ return result.hdmi;
+}
+
xf86MonPtr
xf86InterpretEEDID(int scrnIndex, Uchar * block)
{
@@ -666,49 +757,5 @@ validate_version(int scrnIndex, struct edid_version *r)
Bool
xf86MonitorIsHDMI(xf86MonPtr mon)
{
- int i = 0, version, offset;
- char *edid = NULL;
-
- if (!mon)
- return FALSE;
-
- if (!(mon->flags & EDID_COMPLETE_RAWDATA))
- return FALSE;
-
- if (!mon->no_sections)
- return FALSE;
-
- edid = (char *) mon->rawData;
- if (!edid)
- return FALSE;
-
- /* find the CEA extension block */
- for (i = 1; i <= mon->no_sections; i++)
- if (edid[i * 128] == 0x02)
- break;
- if (i == mon->no_sections + 1)
- return FALSE;
- edid += (i * 128);
-
- version = edid[1];
- offset = edid[2];
- if (version < 3 || offset < 4)
- return FALSE;
-
- /* walk the cea data blocks */
- for (i = 4; i < offset; i += (edid[i] & 0x1f) + 1) {
- char *x = edid + i;
-
- /* find a vendor specific block */
- if ((x[0] & 0xe0) >> 5 == 0x03) {
- int oui = (x[3] << 16) + (x[2] << 8) + x[1];
-
- /* find the HDMI vendor OUI */
- if (oui == 0x000c03)
- return TRUE;
- }
- }
-
- /* guess it's not HDMI after all */
- return FALSE;
+ return xf86MonitorFindHDMIBlock(mon) != NULL;
}
diff --git a/xorg-server/hw/xfree86/ddc/xf86DDC.h b/xorg-server/hw/xfree86/ddc/xf86DDC.h
index bdc7648a9..de8e71831 100644
--- a/xorg-server/hw/xfree86/ddc/xf86DDC.h
+++ b/xorg-server/hw/xfree86/ddc/xf86DDC.h
@@ -98,4 +98,6 @@ typedef void (*handle_video_fn) (struct cea_video_block *, void *);
void xf86ForEachVideoBlock(xf86MonPtr, handle_video_fn, void *);
+struct cea_data_block *xf86MonitorFindHDMIBlock(xf86MonPtr mon);
+
#endif
diff --git a/xorg-server/hw/xfree86/dri/dri.c b/xorg-server/hw/xfree86/dri/dri.c
index 38bfc1def..60339995d 100644
--- a/xorg-server/hw/xfree86/dri/dri.c
+++ b/xorg-server/hw/xfree86/dri/dri.c
@@ -460,14 +460,14 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
/* Add tags for reserved contexts */
if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD,
&reserved_count))) {
- int i;
+ int r;
void *tag;
- for (i = 0; i < reserved_count; i++) {
+ for (r = 0; r < reserved_count; r++) {
tag = DRICreateContextPrivFromHandle(pScreen,
- reserved[i],
+ reserved[r],
DRI_CONTEXT_RESERVED);
- drmAddContextTag(pDRIPriv->drmFD, reserved[i], tag);
+ drmAddContextTag(pDRIPriv->drmFD, reserved[r], tag);
}
drmFreeReservedContextList(reserved);
DRIDrvMsg(pScreen->myNum, X_INFO,
@@ -684,9 +684,9 @@ DRICloseScreen(ScreenPtr pScreen)
pDRIPriv->wrap.ClipNotify = NULL;
}
if (pDRIInfo->wrap.AdjustFrame) {
- ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
- pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame;
+ scrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame;
pDRIPriv->wrap.AdjustFrame = NULL;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c
index b2eb72e8e..87ba0b74e 100644
--- a/xorg-server/hw/xfree86/modes/xf86Crtc.c
+++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c
@@ -185,10 +185,10 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen)
Bool has_none = FALSE;
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
- int c, o;
+ int icrtc, o;
- for (c = 0; c < xf86_config->num_crtc; c++) {
- xf86CrtcPtr crtc = xf86_config->crtc[c];
+ for (icrtc = 0; icrtc < xf86_config->num_crtc; icrtc++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[icrtc];
for (o = 0; o < xf86_config->num_output; o++) {
xf86OutputPtr output = xf86_config->output[o];
@@ -216,20 +216,20 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen)
SubPixelVerticalBGR,
};
int rotate;
- int c;
+ int sc;
for (rotate = 0; rotate < 4; rotate++)
if (crtc->rotation & (1 << rotate))
break;
- for (c = 0; c < 4; c++)
- if (circle[c] == subpixel_order)
+ for (sc = 0; sc < 4; sc++)
+ if (circle[sc] == subpixel_order)
break;
- c = (c + rotate) & 0x3;
- if ((crtc->rotation & RR_Reflect_X) && !(c & 1))
- c ^= 2;
- if ((crtc->rotation & RR_Reflect_Y) && (c & 1))
- c ^= 2;
- subpixel_order = circle[c];
+ sc = (sc + rotate) & 0x3;
+ if ((crtc->rotation & RR_Reflect_X) && !(sc & 1))
+ sc ^= 2;
+ if ((crtc->rotation & RR_Reflect_Y) && (sc & 1))
+ sc ^= 2;
+ subpixel_order = circle[sc];
break;
}
}
@@ -1673,6 +1673,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY)
if (edid_monitor) {
struct det_monrec_parameter p;
struct disp_features *features = &edid_monitor->features;
+ struct cea_data_block *hdmi_db;
/* if display is not continuous-frequency, don't add default modes */
if (!GTF_SUPPORTED(features->msc))
@@ -1685,6 +1686,16 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY)
p.sync_source = &sync_source;
xf86ForEachDetailedBlock(edid_monitor, handle_detailed_monrec, &p);
+
+ /* Look at the CEA HDMI vendor block for the max TMDS freq */
+ hdmi_db = xf86MonitorFindHDMIBlock(edid_monitor);
+ if (hdmi_db && hdmi_db->len >= 7) {
+ int tmds_freq = hdmi_db->u.vendor.hdmi.max_tmds_clock * 5000;
+ xf86DrvMsg(scrn->scrnIndex, X_PROBED,
+ "HDMI max TMDS frequency %dKHz\n", tmds_freq);
+ if (tmds_freq > max_clock)
+ max_clock = tmds_freq;
+ }
}
if (xf86GetOptValFreq(output->options, OPTION_MIN_CLOCK,
@@ -2137,10 +2148,10 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
}
else {
for (mode = output->probed_modes; mode; mode = mode->next) {
- Rotation r = output->initial_rotation;
+ Rotation ir = output->initial_rotation;
- if (xf86ModeWidth(mode, r) == pref_width &&
- xf86ModeHeight(mode, r) == pref_height) {
+ if (xf86ModeWidth(mode, ir) == pref_width &&
+ xf86ModeHeight(mode, ir) == pref_height) {
preferred[o] = mode;
match = TRUE;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86EdidModes.c b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
index 4ee862da0..a56f6ba23 100644
--- a/xorg-server/hw/xfree86/modes/xf86EdidModes.c
+++ b/xorg-server/hw/xfree86/modes/xf86EdidModes.c
@@ -973,11 +973,11 @@ handle_cea_svd(struct cea_video_block *video, void *data)
}
static DisplayModePtr
-DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr MonPtr)
+DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr mon_ptr)
{
DisplayModePtr Modes = NULL;
- xf86ForEachVideoBlock(MonPtr, handle_cea_svd, &Modes);
+ xf86ForEachVideoBlock(mon_ptr, handle_cea_svd, &Modes);
return Modes;
}
diff --git a/xorg-server/hw/xfree86/modes/xf86RandR12.c b/xorg-server/hw/xfree86/modes/xf86RandR12.c
index f7a7d44d9..66139dcf0 100644
--- a/xorg-server/hw/xfree86/modes/xf86RandR12.c
+++ b/xorg-server/hw/xfree86/modes/xf86RandR12.c
@@ -1202,7 +1202,6 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
if (randr_mode) {
DisplayModeRec mode;
- RRTransformPtr transform = RRCrtcGetTransform(randr_crtc);
xf86RandRModeConvert(pScrn, randr_mode, &mode);
if (!xf86CrtcSetModeTransform
diff --git a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
index e2e8d0826..46438e655 100644
--- a/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
+++ b/xorg-server/hw/xfree86/os-support/linux/lnx_init.c
@@ -155,6 +155,7 @@ xf86OpenConsole(void)
i = 0;
while (vcs[i] != NULL) {
+#pragma GCC diagnostic ignored "-Wformat-nonliteral"
snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */
if ((xf86Info.consoleFd = open(vtname, O_RDWR | O_NDELAY, 0)) >= 0)
break;
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
diff --git a/xorg-server/hw/xfree86/x86emu/ops.c b/xorg-server/hw/xfree86/x86emu/ops.c
index 8af1df47a..b50badb28 100644
--- a/xorg-server/hw/xfree86/x86emu/ops.c
+++ b/xorg-server/hw/xfree86/x86emu/ops.c
@@ -11705,38 +11705,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
switch (rh) {
case 0: /* inc word ptr ... */
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = inc_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = inc_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = inc_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = inc_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 1: /* dec word ptr ... */
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = dec_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = dec_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = dec_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = dec_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 2: /* call word ptr ... */
@@ -11768,18 +11768,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
break;
case 6: /* push word ptr ... */
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- push_long(destval);
+ push_long(destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- push_word(destval);
+ push_word(destval16);
}
break;
}
@@ -11790,38 +11790,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
switch (rh) {
case 0:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = inc_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = inc_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = inc_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = inc_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 1:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = dec_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = dec_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = dec_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = dec_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 2: /* call word ptr ... */
@@ -11853,18 +11853,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
break;
case 6: /* push word ptr ... */
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- push_long(destval);
+ push_long(destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- push_word(destval);
+ push_word(destval16);
}
break;
}
@@ -11875,38 +11875,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
switch (rh) {
case 0:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = inc_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = inc_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = inc_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = inc_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 1:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- destval = dec_long(destval);
- store_data_long(destoffset, destval);
+ destval32 = dec_long(destval32);
+ store_data_long(destoffset, destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- destval = dec_word(destval);
- store_data_word(destoffset, destval);
+ destval16 = dec_word(destval16);
+ store_data_word(destoffset, destval16);
}
break;
case 2: /* call word ptr ... */
@@ -11938,18 +11938,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
break;
case 6: /* push word ptr ... */
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 destval;
+ u32 destval32;
- destval = fetch_data_long(destoffset);
+ destval32 = fetch_data_long(destoffset);
TRACE_AND_STEP();
- push_long(destval);
+ push_long(destval32);
}
else {
- u16 destval;
+ u16 destval16;
- destval = fetch_data_word(destoffset);
+ destval16 = fetch_data_word(destoffset);
TRACE_AND_STEP();
- push_word(destval);
+ push_word(destval16);
}
break;
}
@@ -11958,38 +11958,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
switch (rh) {
case 0:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 *destreg;
+ u32 *destreg32;
- destreg = DECODE_RM_LONG_REGISTER(rl);
+ destreg32 = DECODE_RM_LONG_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- *destreg = inc_long(*destreg);
+ *destreg32 = inc_long(*destreg32);
}
else {
- u16 *destreg;
+ u16 *destreg16;
- destreg = DECODE_RM_WORD_REGISTER(rl);
+ destreg16 = DECODE_RM_WORD_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- *destreg = inc_word(*destreg);
+ *destreg16 = inc_word(*destreg16);
}
break;
case 1:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 *destreg;
+ u32 *destreg32;
- destreg = DECODE_RM_LONG_REGISTER(rl);
+ destreg32 = DECODE_RM_LONG_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- *destreg = dec_long(*destreg);
+ *destreg32 = dec_long(*destreg32);
}
else {
- u16 *destreg;
+ u16 *destreg16;
- destreg = DECODE_RM_WORD_REGISTER(rl);
+ destreg16 = DECODE_RM_WORD_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- *destreg = dec_word(*destreg);
+ *destreg16 = dec_word(*destreg16);
}
break;
case 2: /* call word ptr ... */
@@ -12018,20 +12018,20 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
break;
case 6:
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
- u32 *destreg;
+ u32 *destreg32;
- destreg = DECODE_RM_LONG_REGISTER(rl);
+ destreg32 = DECODE_RM_LONG_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- push_long(*destreg);
+ push_long(*destreg32);
}
else {
- u16 *destreg;
+ u16 *destreg16;
- destreg = DECODE_RM_WORD_REGISTER(rl);
+ destreg16 = DECODE_RM_WORD_REGISTER(rl);
DECODE_PRINTF("\n");
TRACE_AND_STEP();
- push_word(*destreg);
+ push_word(*destreg16);
}
break;
}