Commit 07b03e72 authored by Keith Packard's avatar Keith Packard

xfree86: Fix -Wshadow warnings

Just rename variables to eliminate -Wshadow warnings.
Signed-off-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt's avatarEric Anholt <eric@anholt.net>
parent 3c94b89f
......@@ -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;
......
......@@ -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) {
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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;
}
......
......@@ -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;
}
}
......@@ -2148,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;
}
......
......@@ -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;
}
......
......@@ -1202,7 +1202,6 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
if (randr_mode) {
DisplayModeRec mode;
RRTransformPtr transform = RRCrtcGetTransform(randr_crtc);
xf86RandRModeConvert(pScrn, randr_mode, &mode);
if (!xf86CrtcSetModeTransform
......
......@@ -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
......
......@@ -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());
......
......@@ -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);
......
......@@ -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());
......
......@@ -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);
......
......@@ -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);
}
......
......@@ -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 (