xfree86: Fix -Wshadow warnings
Just rename variables to eliminate -Wshadow warnings. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
parent
3c94b89f14
commit
07b03e721e
|
@ -1677,7 +1677,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout,
|
||||||
*/
|
*/
|
||||||
static Bool
|
static Bool
|
||||||
configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
|
configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
|
||||||
XF86ConfigPtr xf86configptr)
|
XF86ConfigPtr conf_ptr)
|
||||||
{
|
{
|
||||||
MessageType from;
|
MessageType from;
|
||||||
XF86ConfScreenPtr s;
|
XF86ConfScreenPtr s;
|
||||||
|
@ -1722,7 +1722,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen,
|
||||||
|
|
||||||
memset(&layout, 0, sizeof(layout));
|
memset(&layout, 0, sizeof(layout));
|
||||||
layout.lay_identifier = servlayoutp->id;
|
layout.lay_identifier = servlayoutp->id;
|
||||||
if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) {
|
if (xf86layoutAddInputDevices(conf_ptr, &layout) > 0) {
|
||||||
if (!configInputDevices(&layout, servlayoutp))
|
if (!configInputDevices(&layout, servlayoutp))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
from = X_DEFAULT;
|
from = X_DEFAULT;
|
||||||
|
|
|
@ -206,17 +206,17 @@ configureScreenSection(int screennum)
|
||||||
ptr->scrn_device_str = tmp;
|
ptr->scrn_device_str = tmp;
|
||||||
|
|
||||||
for (i = 0; i < sizeof(depths) / sizeof(depths[0]); i++) {
|
for (i = 0; i < sizeof(depths) / sizeof(depths[0]); i++) {
|
||||||
XF86ConfDisplayPtr display;
|
XF86ConfDisplayPtr conf_display;
|
||||||
|
|
||||||
display = calloc(1, sizeof(XF86ConfDisplayRec));
|
conf_display = calloc(1, sizeof(XF86ConfDisplayRec));
|
||||||
display->disp_depth = depths[i];
|
conf_display->disp_depth = depths[i];
|
||||||
display->disp_black.red = display->disp_white.red = -1;
|
conf_display->disp_black.red = conf_display->disp_white.red = -1;
|
||||||
display->disp_black.green = display->disp_white.green = -1;
|
conf_display->disp_black.green = conf_display->disp_white.green = -1;
|
||||||
display->disp_black.blue = display->disp_white.blue = -1;
|
conf_display->disp_black.blue = conf_display->disp_white.blue = -1;
|
||||||
ptr->scrn_display_lst = (XF86ConfDisplayPtr) xf86addListItem((glp) ptr->
|
ptr->scrn_display_lst = (XF86ConfDisplayPtr) xf86addListItem((glp) ptr->
|
||||||
scrn_display_lst,
|
scrn_display_lst,
|
||||||
(glp)
|
(glp)
|
||||||
display);
|
conf_display);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ptr;
|
return ptr;
|
||||||
|
@ -375,7 +375,6 @@ configureLayoutSection(void)
|
||||||
aptr->adj_refscreen = NULL;
|
aptr->adj_refscreen = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
char *tmp;
|
|
||||||
aptr->adj_where = CONF_ADJ_RIGHTOF;
|
aptr->adj_where = CONF_ADJ_RIGHTOF;
|
||||||
XNFasprintf(&tmp, "Screen%d", scrnum - 1);
|
XNFasprintf(&tmp, "Screen%d", scrnum - 1);
|
||||||
aptr->adj_refscreen = tmp;
|
aptr->adj_refscreen = tmp;
|
||||||
|
@ -586,24 +585,24 @@ DoConfigure(void)
|
||||||
|
|
||||||
/* Add device, monitor and screen sections for detected devices */
|
/* Add device, monitor and screen sections for detected devices */
|
||||||
for (screennum = 0; screennum < nDevToConfig; screennum++) {
|
for (screennum = 0; screennum < nDevToConfig; screennum++) {
|
||||||
XF86ConfDevicePtr DevicePtr;
|
XF86ConfDevicePtr device_ptr;
|
||||||
XF86ConfMonitorPtr MonitorPtr;
|
XF86ConfMonitorPtr monitor_ptr;
|
||||||
XF86ConfScreenPtr ScreenPtr;
|
XF86ConfScreenPtr screen_ptr;
|
||||||
|
|
||||||
DevicePtr = configureDeviceSection(screennum);
|
device_ptr = configureDeviceSection(screennum);
|
||||||
xf86config->conf_device_lst = (XF86ConfDevicePtr) xf86addListItem((glp)
|
xf86config->conf_device_lst = (XF86ConfDevicePtr) xf86addListItem((glp)
|
||||||
xf86config->
|
xf86config->
|
||||||
conf_device_lst,
|
conf_device_lst,
|
||||||
(glp)
|
(glp)
|
||||||
DevicePtr);
|
device_ptr);
|
||||||
MonitorPtr = configureMonitorSection(screennum);
|
monitor_ptr = configureMonitorSection(screennum);
|
||||||
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);
|
||||||
ScreenPtr = configureScreenSection(screennum);
|
screen_ptr = configureScreenSection(screennum);
|
||||||
xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp)
|
xf86config->conf_screen_lst = (XF86ConfScreenPtr) xf86addListItem((glp)
|
||||||
xf86config->
|
xf86config->
|
||||||
conf_screen_lst,
|
conf_screen_lst,
|
||||||
(glp)
|
(glp)
|
||||||
ScreenPtr);
|
screen_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
xf86config->conf_files = configureFilesSection();
|
xf86config->conf_files = configureFilesSection();
|
||||||
|
@ -714,27 +713,27 @@ DoConfigure(void)
|
||||||
xf86freeScreenList(xf86config->conf_screen_lst);
|
xf86freeScreenList(xf86config->conf_screen_lst);
|
||||||
xf86config->conf_screen_lst = NULL;
|
xf86config->conf_screen_lst = NULL;
|
||||||
for (j = 0; j < xf86NumScreens; j++) {
|
for (j = 0; j < xf86NumScreens; j++) {
|
||||||
XF86ConfMonitorPtr MonitorPtr;
|
XF86ConfMonitorPtr monitor_ptr;
|
||||||
XF86ConfScreenPtr ScreenPtr;
|
XF86ConfScreenPtr screen_ptr;
|
||||||
|
|
||||||
ConfiguredMonitor = NULL;
|
ConfiguredMonitor = NULL;
|
||||||
|
|
||||||
if ((*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]],
|
if ((*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]],
|
||||||
PROBE_DETECT) &&
|
PROBE_DETECT) &&
|
||||||
ConfiguredMonitor) {
|
ConfiguredMonitor) {
|
||||||
MonitorPtr = configureDDCMonitorSection(j);
|
monitor_ptr = configureDDCMonitorSection(j);
|
||||||
}
|
}
|
||||||
else {
|
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 = (XF86ConfScreenPtr) xf86addListItem((glp)
|
||||||
xf86config->
|
xf86config->
|
||||||
conf_screen_lst,
|
conf_screen_lst,
|
||||||
(glp)
|
(glp)
|
||||||
ScreenPtr);
|
screen_ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xf86writeConfigFile(filename, xf86config) == 0) {
|
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
|
* Check for DefaultDepth and DefaultFbBpp options in the
|
||||||
* Device sections.
|
* Device sections.
|
||||||
*/
|
*/
|
||||||
int i;
|
|
||||||
GDevPtr device;
|
GDevPtr device;
|
||||||
Bool found = FALSE;
|
Bool found = FALSE;
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||||
int err = Success;
|
int err = Success;
|
||||||
ScreenPtr pScreen = pWin->drawable.pScreen;
|
ScreenPtr pScreen = pWin->drawable.pScreen;
|
||||||
RootWinPropPtr pProp;
|
RootWinPropPtr pProp;
|
||||||
CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr)
|
CreateWindowProcPtr create_window = (CreateWindowProcPtr)
|
||||||
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
|
dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey);
|
||||||
|
|
||||||
DebugF("xf86CreateRootWindow(%p)\n", pWin);
|
DebugF("xf86CreateRootWindow(%p)\n", pWin);
|
||||||
|
@ -323,7 +323,7 @@ xf86CreateRootWindow(WindowPtr pWin)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Unhook this function ... */
|
/* Unhook this function ... */
|
||||||
pScreen->CreateWindow = CreateWindow;
|
pScreen->CreateWindow = create_window;
|
||||||
dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL);
|
dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL);
|
||||||
|
|
||||||
/* ... and call the previous CreateWindow fuction, if any */
|
/* ... and call the previous CreateWindow fuction, if any */
|
||||||
|
|
|
@ -1122,11 +1122,8 @@ localQueryLargestOffscreenLinear(ScreenPtr pScreen,
|
||||||
|
|
||||||
if (localQueryLargestOffscreenArea(pScreen, &w, &h, gran,
|
if (localQueryLargestOffscreenArea(pScreen, &w, &h, gran,
|
||||||
FAVOR_WIDTH_THEN_AREA, priority)) {
|
FAVOR_WIDTH_THEN_AREA, priority)) {
|
||||||
FBManagerPtr offman;
|
|
||||||
BoxPtr extents;
|
BoxPtr extents;
|
||||||
|
|
||||||
offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates,
|
|
||||||
xf86FBScreenKey);
|
|
||||||
extents = RegionExtents(offman->InitialBoxes);
|
extents = RegionExtents(offman->InitialBoxes);
|
||||||
if ((extents->x2 - extents->x1) == w)
|
if ((extents->x2 - extents->x1) == w)
|
||||||
*size = w * h;
|
*size = w * h;
|
||||||
|
|
|
@ -460,14 +460,14 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
|
||||||
/* Add tags for reserved contexts */
|
/* Add tags for reserved contexts */
|
||||||
if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD,
|
if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD,
|
||||||
&reserved_count))) {
|
&reserved_count))) {
|
||||||
int i;
|
int r;
|
||||||
void *tag;
|
void *tag;
|
||||||
|
|
||||||
for (i = 0; i < reserved_count; i++) {
|
for (r = 0; r < reserved_count; r++) {
|
||||||
tag = DRICreateContextPrivFromHandle(pScreen,
|
tag = DRICreateContextPrivFromHandle(pScreen,
|
||||||
reserved[i],
|
reserved[r],
|
||||||
DRI_CONTEXT_RESERVED);
|
DRI_CONTEXT_RESERVED);
|
||||||
drmAddContextTag(pDRIPriv->drmFD, reserved[i], tag);
|
drmAddContextTag(pDRIPriv->drmFD, reserved[r], tag);
|
||||||
}
|
}
|
||||||
drmFreeReservedContextList(reserved);
|
drmFreeReservedContextList(reserved);
|
||||||
DRIDrvMsg(pScreen->myNum, X_INFO,
|
DRIDrvMsg(pScreen->myNum, X_INFO,
|
||||||
|
@ -684,9 +684,9 @@ DRICloseScreen(ScreenPtr pScreen)
|
||||||
pDRIPriv->wrap.ClipNotify = NULL;
|
pDRIPriv->wrap.ClipNotify = NULL;
|
||||||
}
|
}
|
||||||
if (pDRIInfo->wrap.AdjustFrame) {
|
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;
|
pDRIPriv->wrap.AdjustFrame = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -185,10 +185,10 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen)
|
||||||
Bool has_none = FALSE;
|
Bool has_none = FALSE;
|
||||||
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
|
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
|
||||||
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
|
||||||
int c, o;
|
int icrtc, o;
|
||||||
|
|
||||||
for (c = 0; c < xf86_config->num_crtc; c++) {
|
for (icrtc = 0; icrtc < xf86_config->num_crtc; icrtc++) {
|
||||||
xf86CrtcPtr crtc = xf86_config->crtc[c];
|
xf86CrtcPtr crtc = xf86_config->crtc[icrtc];
|
||||||
|
|
||||||
for (o = 0; o < xf86_config->num_output; o++) {
|
for (o = 0; o < xf86_config->num_output; o++) {
|
||||||
xf86OutputPtr output = xf86_config->output[o];
|
xf86OutputPtr output = xf86_config->output[o];
|
||||||
|
@ -216,20 +216,20 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen)
|
||||||
SubPixelVerticalBGR,
|
SubPixelVerticalBGR,
|
||||||
};
|
};
|
||||||
int rotate;
|
int rotate;
|
||||||
int c;
|
int sc;
|
||||||
|
|
||||||
for (rotate = 0; rotate < 4; rotate++)
|
for (rotate = 0; rotate < 4; rotate++)
|
||||||
if (crtc->rotation & (1 << rotate))
|
if (crtc->rotation & (1 << rotate))
|
||||||
break;
|
break;
|
||||||
for (c = 0; c < 4; c++)
|
for (sc = 0; sc < 4; sc++)
|
||||||
if (circle[c] == subpixel_order)
|
if (circle[sc] == subpixel_order)
|
||||||
break;
|
break;
|
||||||
c = (c + rotate) & 0x3;
|
sc = (sc + rotate) & 0x3;
|
||||||
if ((crtc->rotation & RR_Reflect_X) && !(c & 1))
|
if ((crtc->rotation & RR_Reflect_X) && !(sc & 1))
|
||||||
c ^= 2;
|
sc ^= 2;
|
||||||
if ((crtc->rotation & RR_Reflect_Y) && (c & 1))
|
if ((crtc->rotation & RR_Reflect_Y) && (sc & 1))
|
||||||
c ^= 2;
|
sc ^= 2;
|
||||||
subpixel_order = circle[c];
|
subpixel_order = circle[sc];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2148,10 +2148,10 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (mode = output->probed_modes; mode; mode = mode->next) {
|
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 &&
|
if (xf86ModeWidth(mode, ir) == pref_width &&
|
||||||
xf86ModeHeight(mode, r) == pref_height) {
|
xf86ModeHeight(mode, ir) == pref_height) {
|
||||||
preferred[o] = mode;
|
preferred[o] = mode;
|
||||||
match = TRUE;
|
match = TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -973,11 +973,11 @@ handle_cea_svd(struct cea_video_block *video, void *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
static DisplayModePtr
|
static DisplayModePtr
|
||||||
DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr MonPtr)
|
DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr mon_ptr)
|
||||||
{
|
{
|
||||||
DisplayModePtr Modes = NULL;
|
DisplayModePtr Modes = NULL;
|
||||||
|
|
||||||
xf86ForEachVideoBlock(MonPtr, handle_cea_svd, &Modes);
|
xf86ForEachVideoBlock(mon_ptr, handle_cea_svd, &Modes);
|
||||||
|
|
||||||
return Modes;
|
return Modes;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1202,7 +1202,6 @@ xf86RandR12CrtcSet(ScreenPtr pScreen,
|
||||||
|
|
||||||
if (randr_mode) {
|
if (randr_mode) {
|
||||||
DisplayModeRec mode;
|
DisplayModeRec mode;
|
||||||
RRTransformPtr transform = RRCrtcGetTransform(randr_crtc);
|
|
||||||
|
|
||||||
xf86RandRModeConvert(pScrn, randr_mode, &mode);
|
xf86RandRModeConvert(pScrn, randr_mode, &mode);
|
||||||
if (!xf86CrtcSetModeTransform
|
if (!xf86CrtcSetModeTransform
|
||||||
|
|
|
@ -79,6 +79,8 @@ typedef struct {
|
||||||
ParserNumType numType; /* used to enforce correct number formatting */
|
ParserNumType numType; /* used to enforce correct number formatting */
|
||||||
} LexRec, *LexPtr;
|
} LexRec, *LexPtr;
|
||||||
|
|
||||||
|
extern LexRec xf86_lex_val;
|
||||||
|
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
#define TRUE 1
|
#define TRUE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec DRITab[] = {
|
static xf86ConfigSymTabRec DRITab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -59,24 +58,24 @@ xf86parseDRISection(void)
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case GROUP:
|
case GROUP:
|
||||||
if ((token = xf86getSubToken(&(ptr->dri_comment))) == STRING)
|
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)
|
else if (token == NUMBER)
|
||||||
ptr->dri_group = val.num;
|
ptr->dri_group = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error(GROUP_MSG);
|
Error(GROUP_MSG);
|
||||||
break;
|
break;
|
||||||
case MODE:
|
case MODE:
|
||||||
if (xf86getSubToken(&(ptr->dri_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dri_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Mode");
|
Error(NUMBER_MSG, "Mode");
|
||||||
if (val.numType != PARSE_OCTAL)
|
if (xf86_lex_val.numType != PARSE_OCTAL)
|
||||||
Error(MUST_BE_OCTAL_MSG, val.num);
|
Error(MUST_BE_OCTAL_MSG, xf86_lex_val.num);
|
||||||
ptr->dri_mode = val.num;
|
ptr->dri_mode = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error(UNEXPECTED_EOF_MSG);
|
Error(UNEXPECTED_EOF_MSG);
|
||||||
break;
|
break;
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->dri_comment = xf86addComment(ptr->dri_comment, val.str);
|
ptr->dri_comment = xf86addComment(ptr->dri_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static
|
static
|
||||||
xf86ConfigSymTabRec DeviceTab[] = {
|
xf86ConfigSymTabRec DeviceTab[] = {
|
||||||
|
@ -107,45 +106,45 @@ xf86parseDeviceSection(void)
|
||||||
while ((token = xf86getToken(DeviceTab)) != ENDSECTION) {
|
while ((token = xf86getToken(DeviceTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->dev_comment = xf86addComment(ptr->dev_comment, val.str);
|
ptr->dev_comment = xf86addComment(ptr->dev_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->dev_identifier = val.str;
|
ptr->dev_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case VENDOR:
|
case VENDOR:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Vendor");
|
Error(QUOTE_MSG, "Vendor");
|
||||||
ptr->dev_vendor = val.str;
|
ptr->dev_vendor = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case BOARD:
|
case BOARD:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Board");
|
Error(QUOTE_MSG, "Board");
|
||||||
ptr->dev_board = val.str;
|
ptr->dev_board = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case CHIPSET:
|
case CHIPSET:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Chipset");
|
Error(QUOTE_MSG, "Chipset");
|
||||||
ptr->dev_chipset = val.str;
|
ptr->dev_chipset = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case CARD:
|
case CARD:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Card");
|
Error(QUOTE_MSG, "Card");
|
||||||
ptr->dev_card = val.str;
|
ptr->dev_card = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case DRIVER:
|
case DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Driver");
|
Error(QUOTE_MSG, "Driver");
|
||||||
ptr->dev_driver = val.str;
|
ptr->dev_driver = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case RAMDAC:
|
case RAMDAC:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Ramdac");
|
Error(QUOTE_MSG, "Ramdac");
|
||||||
ptr->dev_ramdac = val.str;
|
ptr->dev_ramdac = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case DACSPEED:
|
case DACSPEED:
|
||||||
for (i = 0; i < CONF_MAXDACSPEEDS; i++)
|
for (i = 0; i < CONF_MAXDACSPEEDS; i++)
|
||||||
|
@ -154,11 +153,11 @@ xf86parseDeviceSection(void)
|
||||||
Error(DACSPEED_MSG, CONF_MAXDACSPEEDS);
|
Error(DACSPEED_MSG, CONF_MAXDACSPEEDS);
|
||||||
}
|
}
|
||||||
else {
|
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++) {
|
for (i = 1; i < CONF_MAXDACSPEEDS; i++) {
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) == NUMBER)
|
||||||
ptr->dev_dacSpeeds[i] = (int)
|
ptr->dev_dacSpeeds[i] = (int)
|
||||||
(val.realnum * 1000.0 + 0.5);
|
(xf86_lex_val.realnum * 1000.0 + 0.5);
|
||||||
else {
|
else {
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
break;
|
break;
|
||||||
|
@ -169,44 +168,44 @@ xf86parseDeviceSection(void)
|
||||||
case VIDEORAM:
|
case VIDEORAM:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "VideoRam");
|
Error(NUMBER_MSG, "VideoRam");
|
||||||
ptr->dev_videoram = val.num;
|
ptr->dev_videoram = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case BIOSBASE:
|
case BIOSBASE:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "BIOSBase");
|
Error(NUMBER_MSG, "BIOSBase");
|
||||||
ptr->dev_bios_base = val.num;
|
ptr->dev_bios_base = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case MEMBASE:
|
case MEMBASE:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "MemBase");
|
Error(NUMBER_MSG, "MemBase");
|
||||||
ptr->dev_mem_base = val.num;
|
ptr->dev_mem_base = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case IOBASE:
|
case IOBASE:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "IOBase");
|
Error(NUMBER_MSG, "IOBase");
|
||||||
ptr->dev_io_base = val.num;
|
ptr->dev_io_base = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case CLOCKCHIP:
|
case CLOCKCHIP:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "ClockChip");
|
Error(QUOTE_MSG, "ClockChip");
|
||||||
ptr->dev_clockchip = val.str;
|
ptr->dev_clockchip = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case CHIPID:
|
case CHIPID:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "ChipID");
|
Error(NUMBER_MSG, "ChipID");
|
||||||
ptr->dev_chipid = val.num;
|
ptr->dev_chipid = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case CHIPREV:
|
case CHIPREV:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "ChipRev");
|
Error(NUMBER_MSG, "ChipRev");
|
||||||
ptr->dev_chiprev = val.num;
|
ptr->dev_chiprev = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CLOCKS:
|
case CLOCKS:
|
||||||
token = xf86getSubToken(&(ptr->dev_comment));
|
token = xf86getSubToken(&(ptr->dev_comment));
|
||||||
for (i = ptr->dev_clocks;
|
for (i = ptr->dev_clocks;
|
||||||
token == NUMBER && i < CONF_MAXCLOCKS; i++) {
|
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));
|
token = xf86getSubToken(&(ptr->dev_comment));
|
||||||
}
|
}
|
||||||
ptr->dev_clocks = i;
|
ptr->dev_clocks = i;
|
||||||
|
@ -215,7 +214,7 @@ xf86parseDeviceSection(void)
|
||||||
case TEXTCLOCKFRQ:
|
case TEXTCLOCKFRQ:
|
||||||
if ((token = xf86getSubToken(&(ptr->dev_comment))) != NUMBER)
|
if ((token = xf86getSubToken(&(ptr->dev_comment))) != NUMBER)
|
||||||
Error(NUMBER_MSG, "TextClockFreq");
|
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;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst);
|
ptr->dev_option_lst = xf86parseOption(ptr->dev_option_lst);
|
||||||
|
@ -223,17 +222,17 @@ xf86parseDeviceSection(void)
|
||||||
case BUSID:
|
case BUSID:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->dev_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "BusID");
|
Error(QUOTE_MSG, "BusID");
|
||||||
ptr->dev_busid = val.str;
|
ptr->dev_busid = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case IRQ:
|
case IRQ:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(QUOTE_MSG, "IRQ");
|
Error(QUOTE_MSG, "IRQ");
|
||||||
ptr->dev_irq = val.num;
|
ptr->dev_irq = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case SCREEN:
|
case SCREEN:
|
||||||
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Screen");
|
Error(NUMBER_MSG, "Screen");
|
||||||
ptr->dev_screen = val.num;
|
ptr->dev_screen = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error(UNEXPECTED_EOF_MSG);
|
Error(UNEXPECTED_EOF_MSG);
|
||||||
|
|
|
@ -39,7 +39,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec ExtensionsTab[] = {
|
static xf86ConfigSymTabRec ExtensionsTab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -66,7 +65,7 @@ xf86parseExtensionsSection(void)
|
||||||
break;
|
break;
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->extensions_comment =
|
ptr->extensions_comment =
|
||||||
xf86addComment(ptr->extensions_comment, val.str);
|
xf86addComment(ptr->extensions_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec FilesTab[] = {
|
static xf86ConfigSymTabRec FilesTab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -89,13 +88,13 @@ xf86parseFilesSection(void)
|
||||||
while ((token = xf86getToken(FilesTab)) != ENDSECTION) {
|
while ((token = xf86getToken(FilesTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->file_comment = xf86addComment(ptr->file_comment, val.str);
|
ptr->file_comment = xf86addComment(ptr->file_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case FONTPATH:
|
case FONTPATH:
|
||||||
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "FontPath");
|
Error(QUOTE_MSG, "FontPath");
|
||||||
j = FALSE;
|
j = FALSE;
|
||||||
str = val.str;
|
str = xf86_lex_val.str;
|
||||||
if (ptr->file_fontpath == NULL) {
|
if (ptr->file_fontpath == NULL) {
|
||||||
ptr->file_fontpath = calloc(1, 1);
|
ptr->file_fontpath = calloc(1, 1);
|
||||||
i = strlen(str) + 1;
|
i = strlen(str) + 1;
|
||||||
|
@ -112,13 +111,13 @@ xf86parseFilesSection(void)
|
||||||
strcat(ptr->file_fontpath, ",");
|
strcat(ptr->file_fontpath, ",");
|
||||||
|
|
||||||
strcat(ptr->file_fontpath, str);
|
strcat(ptr->file_fontpath, str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MODULEPATH:
|
case MODULEPATH:
|
||||||
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "ModulePath");
|
Error(QUOTE_MSG, "ModulePath");
|
||||||
l = FALSE;
|
l = FALSE;
|
||||||
str = val.str;
|
str = xf86_lex_val.str;
|
||||||
if (ptr->file_modulepath == NULL) {
|
if (ptr->file_modulepath == NULL) {
|
||||||
ptr->file_modulepath = malloc(1);
|
ptr->file_modulepath = malloc(1);
|
||||||
ptr->file_modulepath[0] = '\0';
|
ptr->file_modulepath[0] = '\0';
|
||||||
|
@ -137,17 +136,17 @@ xf86parseFilesSection(void)
|
||||||
strcat(ptr->file_modulepath, ",");
|
strcat(ptr->file_modulepath, ",");
|
||||||
|
|
||||||
strcat(ptr->file_modulepath, str);
|
strcat(ptr->file_modulepath, str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case LOGFILEPATH:
|
case LOGFILEPATH:
|
||||||
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->file_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "LogFile");
|
Error(QUOTE_MSG, "LogFile");
|
||||||
ptr->file_logfile = val.str;
|
ptr->file_logfile = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case XKBDIR:
|
case XKBDIR:
|
||||||
if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING)
|
if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING)
|
||||||
Error(QUOTE_MSG, "XkbDir");
|
Error(QUOTE_MSG, "XkbDir");
|
||||||
ptr->file_xkbdir = val.str;
|
ptr->file_xkbdir = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error(UNEXPECTED_EOF_MSG);
|
Error(UNEXPECTED_EOF_MSG);
|
||||||
|
|
|
@ -62,7 +62,6 @@
|
||||||
#include "Xprintf.h"
|
#include "Xprintf.h"
|
||||||
#include "optionstr.h"
|
#include "optionstr.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec ServerFlagsTab[] = {
|
static xf86ConfigSymTabRec ServerFlagsTab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -99,7 +98,7 @@ xf86parseFlagsSection(void)
|
||||||
|
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->flg_comment = xf86addComment(ptr->flg_comment, val.str);
|
ptr->flg_comment = xf86addComment(ptr->flg_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
/*
|
/*
|
||||||
* these old keywords are turned into standard generic options.
|
* these old keywords are turned into standard generic options.
|
||||||
|
@ -135,12 +134,12 @@ xf86parseFlagsSection(void)
|
||||||
if (strvalue) {
|
if (strvalue) {
|
||||||
if (tokentype != STRING)
|
if (tokentype != STRING)
|
||||||
Error(QUOTE_MSG, tmp);
|
Error(QUOTE_MSG, tmp);
|
||||||
valstr = val.str;
|
valstr = xf86_lex_val.str;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (tokentype != NUMBER)
|
if (tokentype != NUMBER)
|
||||||
Error(NUMBER_MSG, tmp);
|
Error(NUMBER_MSG, tmp);
|
||||||
if (asprintf(&valstr, "%d", val.num) == -1)
|
if (asprintf(&valstr, "%d", xf86_lex_val.num) == -1)
|
||||||
valstr = NULL;
|
valstr = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -435,12 +434,12 @@ xf86parseOption(XF86OptionPtr head)
|
||||||
return head;
|
return head;
|
||||||
}
|
}
|
||||||
|
|
||||||
name = val.str;
|
name = xf86_lex_val.str;
|
||||||
if ((token = xf86getSubToken(&comment)) == STRING) {
|
if ((token = xf86getSubToken(&comment)) == STRING) {
|
||||||
option = xf86newOption(name, val.str);
|
option = xf86newOption(name, xf86_lex_val.str);
|
||||||
option->opt_comment = comment;
|
option->opt_comment = comment;
|
||||||
if ((token = xf86getToken(NULL)) == 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
|
else
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
}
|
}
|
||||||
|
@ -448,7 +447,7 @@ xf86parseOption(XF86OptionPtr head)
|
||||||
option = xf86newOption(name, NULL);
|
option = xf86newOption(name, NULL);
|
||||||
option->opt_comment = comment;
|
option->opt_comment = comment;
|
||||||
if (token == 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
|
else
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
}
|
}
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static
|
static
|
||||||
xf86ConfigSymTabRec InputTab[] = {
|
xf86ConfigSymTabRec InputTab[] = {
|
||||||
|
@ -85,25 +84,25 @@ xf86parseInputSection(void)
|
||||||
while ((token = xf86getToken(InputTab)) != ENDSECTION) {
|
while ((token = xf86getToken(InputTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str);
|
ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->inp_identifier = val.str;
|
ptr->inp_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case DRIVER:
|
case DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Driver");
|
Error(QUOTE_MSG, "Driver");
|
||||||
if (strcmp(val.str, "keyboard") == 0) {
|
if (strcmp(xf86_lex_val.str, "keyboard") == 0) {
|
||||||
ptr->inp_driver = strdup("kbd");
|
ptr->inp_driver = strdup("kbd");
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ptr->inp_driver = val.str;
|
ptr->inp_driver = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst);
|
ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst);
|
||||||
|
|
|
@ -33,7 +33,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static
|
static
|
||||||
xf86ConfigSymTabRec InputClassTab[] = {
|
xf86ConfigSymTabRec InputClassTab[] = {
|
||||||
|
@ -97,25 +96,25 @@ xf86parseInputClassSection(void)
|
||||||
while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
|
while ((token = xf86getToken(InputClassTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->comment = xf86addComment(ptr->comment, val.str);
|
ptr->comment = xf86addComment(ptr->comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->identifier = val.str;
|
ptr->identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case DRIVER:
|
case DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Driver");
|
Error(QUOTE_MSG, "Driver");
|
||||||
if (strcmp(val.str, "keyboard") == 0) {
|
if (strcmp(xf86_lex_val.str, "keyboard") == 0) {
|
||||||
ptr->driver = strdup("kbd");
|
ptr->driver = strdup("kbd");
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ptr->driver = val.str;
|
ptr->driver = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->option_lst = xf86parseOption(ptr->option_lst);
|
ptr->option_lst = xf86parseOption(ptr->option_lst);
|
||||||
|
@ -124,69 +123,69 @@ xf86parseInputClassSection(void)
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchProduct");
|
Error(QUOTE_MSG, "MatchProduct");
|
||||||
add_group_entry(&ptr->match_product,
|
add_group_entry(&ptr->match_product,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_VENDOR:
|
case MATCH_VENDOR:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchVendor");
|
Error(QUOTE_MSG, "MatchVendor");
|
||||||
add_group_entry(&ptr->match_vendor,
|
add_group_entry(&ptr->match_vendor,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_DEVICE_PATH:
|
case MATCH_DEVICE_PATH:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchDevicePath");
|
Error(QUOTE_MSG, "MatchDevicePath");
|
||||||
add_group_entry(&ptr->match_device,
|
add_group_entry(&ptr->match_device,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_OS:
|
case MATCH_OS:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchOS");
|
Error(QUOTE_MSG, "MatchOS");
|
||||||
add_group_entry(&ptr->match_os, xstrtokenize(val.str, TOKEN_SEP));
|
add_group_entry(&ptr->match_os, xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_PNPID:
|
case MATCH_PNPID:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchPnPID");
|
Error(QUOTE_MSG, "MatchPnPID");
|
||||||
add_group_entry(&ptr->match_pnpid,
|
add_group_entry(&ptr->match_pnpid,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_USBID:
|
case MATCH_USBID:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchUSBID");
|
Error(QUOTE_MSG, "MatchUSBID");
|
||||||
add_group_entry(&ptr->match_usbid,
|
add_group_entry(&ptr->match_usbid,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_DRIVER:
|
case MATCH_DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchDriver");
|
Error(QUOTE_MSG, "MatchDriver");
|
||||||
add_group_entry(&ptr->match_driver,
|
add_group_entry(&ptr->match_driver,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_TAG:
|
case MATCH_TAG:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchTag");
|
Error(QUOTE_MSG, "MatchTag");
|
||||||
add_group_entry(&ptr->match_tag, xstrtokenize(val.str, TOKEN_SEP));
|
add_group_entry(&ptr->match_tag, xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_LAYOUT:
|
case MATCH_LAYOUT:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchLayout");
|
Error(QUOTE_MSG, "MatchLayout");
|
||||||
add_group_entry(&ptr->match_layout,
|
add_group_entry(&ptr->match_layout,
|
||||||
xstrtokenize(val.str, TOKEN_SEP));
|
xstrtokenize(xf86_lex_val.str, TOKEN_SEP));
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case MATCH_IS_KEYBOARD:
|
case MATCH_IS_KEYBOARD:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsKeyboard");
|
Error(QUOTE_MSG, "MatchIsKeyboard");
|
||||||
ptr->is_keyboard.set = xf86getBoolValue(&ptr->is_keyboard.val,
|
ptr->is_keyboard.set = xf86getBoolValue(&ptr->is_keyboard.val,
|
||||||
val.str);
|
xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_keyboard.set)
|
if (!ptr->is_keyboard.set)
|
||||||
Error(BOOL_MSG, "MatchIsKeyboard");
|
Error(BOOL_MSG, "MatchIsKeyboard");
|
||||||
break;
|
break;
|
||||||
|
@ -194,8 +193,8 @@ xf86parseInputClassSection(void)
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsPointer");
|
Error(QUOTE_MSG, "MatchIsPointer");
|
||||||
ptr->is_pointer.set = xf86getBoolValue(&ptr->is_pointer.val,
|
ptr->is_pointer.set = xf86getBoolValue(&ptr->is_pointer.val,
|
||||||
val.str);
|
xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_pointer.set)
|
if (!ptr->is_pointer.set)
|
||||||
Error(BOOL_MSG, "MatchIsPointer");
|
Error(BOOL_MSG, "MatchIsPointer");
|
||||||
break;
|
break;
|
||||||
|
@ -203,16 +202,16 @@ xf86parseInputClassSection(void)
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsJoystick");
|
Error(QUOTE_MSG, "MatchIsJoystick");
|
||||||
ptr->is_joystick.set = xf86getBoolValue(&ptr->is_joystick.val,
|
ptr->is_joystick.set = xf86getBoolValue(&ptr->is_joystick.val,
|
||||||
val.str);
|
xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_joystick.set)
|
if (!ptr->is_joystick.set)
|
||||||
Error(BOOL_MSG, "MatchIsJoystick");
|
Error(BOOL_MSG, "MatchIsJoystick");
|
||||||
break;
|
break;
|
||||||
case MATCH_IS_TABLET:
|
case MATCH_IS_TABLET:
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsTablet");
|
Error(QUOTE_MSG, "MatchIsTablet");
|
||||||
ptr->is_tablet.set = xf86getBoolValue(&ptr->is_tablet.val, val.str);
|
ptr->is_tablet.set = xf86getBoolValue(&ptr->is_tablet.val, xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_tablet.set)
|
if (!ptr->is_tablet.set)
|
||||||
Error(BOOL_MSG, "MatchIsTablet");
|
Error(BOOL_MSG, "MatchIsTablet");
|
||||||
break;
|
break;
|
||||||
|
@ -220,8 +219,8 @@ xf86parseInputClassSection(void)
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsTouchpad");
|
Error(QUOTE_MSG, "MatchIsTouchpad");
|
||||||
ptr->is_touchpad.set = xf86getBoolValue(&ptr->is_touchpad.val,
|
ptr->is_touchpad.set = xf86getBoolValue(&ptr->is_touchpad.val,
|
||||||
val.str);
|
xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_touchpad.set)
|
if (!ptr->is_touchpad.set)
|
||||||
Error(BOOL_MSG, "MatchIsTouchpad");
|
Error(BOOL_MSG, "MatchIsTouchpad");
|
||||||
break;
|
break;
|
||||||
|
@ -229,8 +228,8 @@ xf86parseInputClassSection(void)
|
||||||
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
if (xf86getSubToken(&(ptr->comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "MatchIsTouchscreen");
|
Error(QUOTE_MSG, "MatchIsTouchscreen");
|
||||||
ptr->is_touchscreen.set = xf86getBoolValue(&ptr->is_touchscreen.val,
|
ptr->is_touchscreen.set = xf86getBoolValue(&ptr->is_touchscreen.val,
|
||||||
val.str);
|
xf86_lex_val.str);
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
if (!ptr->is_touchscreen.set)
|
if (!ptr->is_touchscreen.set)
|
||||||
Error(BOOL_MSG, "MatchIsTouchscreen");
|
Error(BOOL_MSG, "MatchIsTouchscreen");
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -65,7 +65,6 @@
|
||||||
/* Needed for auto server layout */
|
/* Needed for auto server layout */
|
||||||
extern int xf86CheckBoolOption(void *optlist, const char *name, int deflt);
|
extern int xf86CheckBoolOption(void *optlist, const char *name, int deflt);
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec LayoutTab[] = {
|
static xf86ConfigSymTabRec LayoutTab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -100,14 +99,14 @@ xf86parseLayoutSection(void)
|
||||||
while ((token = xf86getToken(LayoutTab)) != ENDSECTION) {
|
while ((token = xf86getToken(LayoutTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->lay_comment = xf86addComment(ptr->lay_comment, val.str);
|
ptr->lay_comment = xf86addComment(ptr->lay_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->lay_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->lay_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->lay_identifier = val.str;
|
ptr->lay_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case INACTIVE:
|
case INACTIVE:
|
||||||
|
@ -120,7 +119,7 @@ xf86parseLayoutSection(void)
|
||||||
free(iptr);
|
free(iptr);
|
||||||
Error(INACTIVE_MSG);
|
Error(INACTIVE_MSG);
|
||||||
}
|
}
|
||||||
iptr->inactive_device_str = val.str;
|
iptr->inactive_device_str = xf86_lex_val.str;
|
||||||
ptr->lay_inactive_lst = (XF86ConfInactivePtr)
|
ptr->lay_inactive_lst = (XF86ConfInactivePtr)
|
||||||
xf86addListItem((glp) ptr->lay_inactive_lst, (glp) iptr);
|
xf86addListItem((glp) ptr->lay_inactive_lst, (glp) iptr);
|
||||||
}
|
}
|
||||||
|
@ -138,7 +137,7 @@ xf86parseLayoutSection(void)
|
||||||
aptr->adj_y = 0;
|
aptr->adj_y = 0;
|
||||||
aptr->adj_refscreen = NULL;
|
aptr->adj_refscreen = NULL;
|
||||||
if ((token = xf86getSubToken(&(ptr->lay_comment))) == NUMBER)
|
if ((token = xf86getSubToken(&(ptr->lay_comment))) == NUMBER)
|
||||||
aptr->adj_scrnum = val.num;
|
aptr->adj_scrnum = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
token = xf86getSubToken(&(ptr->lay_comment));
|
token = xf86getSubToken(&(ptr->lay_comment));
|
||||||
|
@ -146,7 +145,7 @@ xf86parseLayoutSection(void)
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(SCREEN_MSG);
|
Error(SCREEN_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_screen_str = val.str;
|
aptr->adj_screen_str = xf86_lex_val.str;
|
||||||
|
|
||||||
token = xf86getSubTokenWithTab(&(ptr->lay_comment), AdjTab);
|
token = xf86getSubTokenWithTab(&(ptr->lay_comment), AdjTab);
|
||||||
switch (token) {
|
switch (token) {
|
||||||
|
@ -186,13 +185,13 @@ xf86parseLayoutSection(void)
|
||||||
if (absKeyword)
|
if (absKeyword)
|
||||||
token = xf86getSubToken(&(ptr->lay_comment));
|
token = xf86getSubToken(&(ptr->lay_comment));
|
||||||
if (token == NUMBER) {
|
if (token == NUMBER) {
|
||||||
aptr->adj_x = val.num;
|
aptr->adj_x = xf86_lex_val.num;
|
||||||
token = xf86getSubToken(&(ptr->lay_comment));
|
token = xf86getSubToken(&(ptr->lay_comment));
|
||||||
if (token != NUMBER) {
|
if (token != NUMBER) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(INVALID_SCR_MSG);
|
Error(INVALID_SCR_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_y = val.num;
|
aptr->adj_y = xf86_lex_val.num;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (absKeyword) {
|
if (absKeyword) {
|
||||||
|
@ -213,46 +212,46 @@ xf86parseLayoutSection(void)
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(INVALID_SCR_MSG);
|
Error(INVALID_SCR_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_refscreen = val.str;
|
aptr->adj_refscreen = xf86_lex_val.str;
|
||||||
if (aptr->adj_where == CONF_ADJ_RELATIVE) {
|
if (aptr->adj_where == CONF_ADJ_RELATIVE) {
|
||||||
token = xf86getSubToken(&(ptr->lay_comment));
|
token = xf86getSubToken(&(ptr->lay_comment));
|
||||||
if (token != NUMBER) {
|
if (token != NUMBER) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(INVALID_SCR_MSG);
|
Error(INVALID_SCR_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_x = val.num;
|
aptr->adj_x = xf86_lex_val.num;
|
||||||
token = xf86getSubToken(&(ptr->lay_comment));
|
token = xf86getSubToken(&(ptr->lay_comment));
|
||||||
if (token != NUMBER) {
|
if (token != NUMBER) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(INVALID_SCR_MSG);
|
Error(INVALID_SCR_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_y = val.num;
|
aptr->adj_y = xf86_lex_val.num;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONF_ADJ_OBSOLETE:
|
case CONF_ADJ_OBSOLETE:
|
||||||
/* top */
|
/* top */
|
||||||
aptr->adj_top_str = val.str;
|
aptr->adj_top_str = xf86_lex_val.str;
|
||||||
|
|
||||||
/* bottom */
|
/* bottom */
|
||||||
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(SCREEN_MSG);
|
Error(SCREEN_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_bottom_str = val.str;
|
aptr->adj_bottom_str = xf86_lex_val.str;
|
||||||
|
|
||||||
/* left */
|
/* left */
|
||||||
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(SCREEN_MSG);
|
Error(SCREEN_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_left_str = val.str;
|
aptr->adj_left_str = xf86_lex_val.str;
|
||||||
|
|
||||||
/* right */
|
/* right */
|
||||||
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
if (xf86getSubToken(&(ptr->lay_comment)) != STRING) {
|
||||||
free(aptr);
|
free(aptr);
|
||||||
Error(SCREEN_MSG);
|
Error(SCREEN_MSG);
|
||||||
}
|
}
|
||||||
aptr->adj_right_str = val.str;
|
aptr->adj_right_str = xf86_lex_val.str;
|
||||||
|
|
||||||
}
|
}
|
||||||
ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr)
|
ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr)
|
||||||
|
@ -270,10 +269,10 @@ xf86parseLayoutSection(void)
|
||||||
free(iptr);
|
free(iptr);
|
||||||
Error(INPUTDEV_MSG);
|
Error(INPUTDEV_MSG);
|
||||||
}
|
}
|
||||||
iptr->iref_inputdev_str = val.str;
|
iptr->iref_inputdev_str = xf86_lex_val.str;
|
||||||
while ((token = xf86getSubToken(&(ptr->lay_comment))) == STRING) {
|
while ((token = xf86getSubToken(&(ptr->lay_comment))) == STRING) {
|
||||||
iptr->iref_option_lst =
|
iptr->iref_option_lst =
|
||||||
xf86addNewOption(iptr->iref_option_lst, val.str, NULL);
|
xf86addNewOption(iptr->iref_option_lst, xf86_lex_val.str, NULL);
|
||||||
}
|
}
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
ptr->lay_input_lst = (XF86ConfInputrefPtr)
|
ptr->lay_input_lst = (XF86ConfInputrefPtr)
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec SubModuleTab[] = {
|
static xf86ConfigSymTabRec SubModuleTab[] = {
|
||||||
{ENDSUBSECTION, "endsubsection"},
|
{ENDSUBSECTION, "endsubsection"},
|
||||||
|
@ -95,7 +94,7 @@ xf86parseModuleSubSection(XF86LoadPtr head, char *name)
|
||||||
while ((token = xf86getToken(SubModuleTab)) != ENDSUBSECTION) {
|
while ((token = xf86getToken(SubModuleTab)) != ENDSUBSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->load_comment = xf86addComment(ptr->load_comment, val.str);
|
ptr->load_comment = xf86addComment(ptr->load_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->load_opt = xf86parseOption(ptr->load_opt);
|
ptr->load_opt = xf86parseOption(ptr->load_opt);
|
||||||
|
@ -126,34 +125,34 @@ xf86parseModuleSection(void)
|
||||||
while ((token = xf86getToken(ModuleTab)) != ENDSECTION) {
|
while ((token = xf86getToken(ModuleTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->mod_comment = xf86addComment(ptr->mod_comment, val.str);
|
ptr->mod_comment = xf86addComment(ptr->mod_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case LOAD:
|
case LOAD:
|
||||||
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Load");
|
Error(QUOTE_MSG, "Load");
|
||||||
ptr->mod_load_lst =
|
ptr->mod_load_lst =
|
||||||
xf86addNewLoadDirective(ptr->mod_load_lst, val.str,
|
xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str,
|
||||||
XF86_LOAD_MODULE, NULL);
|
XF86_LOAD_MODULE, NULL);
|
||||||
break;
|
break;
|
||||||
case DISABLE:
|
case DISABLE:
|
||||||
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Disable");
|
Error(QUOTE_MSG, "Disable");
|
||||||
ptr->mod_disable_lst =
|
ptr->mod_disable_lst =
|
||||||
xf86addNewLoadDirective(ptr->mod_disable_lst, val.str,
|
xf86addNewLoadDirective(ptr->mod_disable_lst, xf86_lex_val.str,
|
||||||
XF86_DISABLE_MODULE, NULL);
|
XF86_DISABLE_MODULE, NULL);
|
||||||
break;
|
break;
|
||||||
case LOAD_DRIVER:
|
case LOAD_DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "LoadDriver");
|
Error(QUOTE_MSG, "LoadDriver");
|
||||||
ptr->mod_load_lst =
|
ptr->mod_load_lst =
|
||||||
xf86addNewLoadDirective(ptr->mod_load_lst, val.str,
|
xf86addNewLoadDirective(ptr->mod_load_lst, xf86_lex_val.str,
|
||||||
XF86_LOAD_DRIVER, NULL);
|
XF86_LOAD_DRIVER, NULL);
|
||||||
break;
|
break;
|
||||||
case SUBSECTION:
|
case SUBSECTION:
|
||||||
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mod_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "SubSection");
|
Error(QUOTE_MSG, "SubSection");
|
||||||
ptr->mod_load_lst =
|
ptr->mod_load_lst =
|
||||||
xf86parseModuleSubSection(ptr->mod_load_lst, val.str);
|
xf86parseModuleSubSection(ptr->mod_load_lst, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error(UNEXPECTED_EOF_MSG);
|
Error(UNEXPECTED_EOF_MSG);
|
||||||
|
@ -232,7 +231,7 @@ xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type,
|
||||||
new->list.next = NULL;
|
new->list.next = NULL;
|
||||||
|
|
||||||
if ((token = xf86getToken(NULL)) == COMMENT)
|
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
|
else
|
||||||
xf86unGetToken(token);
|
xf86unGetToken(token);
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec MonitorTab[] = {
|
static xf86ConfigSymTabRec MonitorTab[] = {
|
||||||
{ENDSECTION, "endsection"},
|
{ENDSECTION, "endsection"},
|
||||||
|
@ -140,52 +139,52 @@ xf86parseModeLine(void)
|
||||||
/* Identifier */
|
/* Identifier */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
|
||||||
Error("ModeLine identifier expected");
|
Error("ModeLine identifier expected");
|
||||||
ptr->ml_identifier = val.str;
|
ptr->ml_identifier = xf86_lex_val.str;
|
||||||
|
|
||||||
/* DotClock */
|
/* DotClock */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine dotclock expected");
|
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 */
|
/* HDisplay */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine Hdisplay expected");
|
Error("ModeLine Hdisplay expected");
|
||||||
ptr->ml_hdisplay = val.num;
|
ptr->ml_hdisplay = xf86_lex_val.num;
|
||||||
|
|
||||||
/* HSyncStart */
|
/* HSyncStart */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine HSyncStart expected");
|
Error("ModeLine HSyncStart expected");
|
||||||
ptr->ml_hsyncstart = val.num;
|
ptr->ml_hsyncstart = xf86_lex_val.num;
|
||||||
|
|
||||||
/* HSyncEnd */
|
/* HSyncEnd */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine HSyncEnd expected");
|
Error("ModeLine HSyncEnd expected");
|
||||||
ptr->ml_hsyncend = val.num;
|
ptr->ml_hsyncend = xf86_lex_val.num;
|
||||||
|
|
||||||
/* HTotal */
|
/* HTotal */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine HTotal expected");
|
Error("ModeLine HTotal expected");
|
||||||
ptr->ml_htotal = val.num;
|
ptr->ml_htotal = xf86_lex_val.num;
|
||||||
|
|
||||||
/* VDisplay */
|
/* VDisplay */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine Vdisplay expected");
|
Error("ModeLine Vdisplay expected");
|
||||||
ptr->ml_vdisplay = val.num;
|
ptr->ml_vdisplay = xf86_lex_val.num;
|
||||||
|
|
||||||
/* VSyncStart */
|
/* VSyncStart */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine VSyncStart expected");
|
Error("ModeLine VSyncStart expected");
|
||||||
ptr->ml_vsyncstart = val.num;
|
ptr->ml_vsyncstart = xf86_lex_val.num;
|
||||||
|
|
||||||
/* VSyncEnd */
|
/* VSyncEnd */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine VSyncEnd expected");
|
Error("ModeLine VSyncEnd expected");
|
||||||
ptr->ml_vsyncend = val.num;
|
ptr->ml_vsyncend = xf86_lex_val.num;
|
||||||
|
|
||||||
/* VTotal */
|
/* VTotal */
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("ModeLine VTotal expected");
|
Error("ModeLine VTotal expected");
|
||||||
ptr->ml_vtotal = val.num;
|
ptr->ml_vtotal = xf86_lex_val.num;
|
||||||
|
|
||||||
token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab);
|
token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab);
|
||||||
while ((token == TT_INTERLACE) || (token == TT_PHSYNC) ||
|
while ((token == TT_INTERLACE) || (token == TT_PHSYNC) ||
|
||||||
|
@ -226,7 +225,7 @@ xf86parseModeLine(void)
|
||||||
case TT_HSKEW:
|
case TT_HSKEW:
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Hskew");
|
Error(NUMBER_MSG, "Hskew");
|
||||||
ptr->ml_hskew = val.num;
|
ptr->ml_hskew = xf86_lex_val.num;
|
||||||
ptr->ml_flags |= XF86CONF_HSKEW;
|
ptr->ml_flags |= XF86CONF_HSKEW;
|
||||||
break;
|
break;
|
||||||
case TT_BCAST:
|
case TT_BCAST:
|
||||||
|
@ -235,7 +234,7 @@ xf86parseModeLine(void)
|
||||||
case TT_VSCAN:
|
case TT_VSCAN:
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Vscan");
|
Error(NUMBER_MSG, "Vscan");
|
||||||
ptr->ml_vscan = val.num;
|
ptr->ml_vscan = xf86_lex_val.num;
|
||||||
ptr->ml_flags |= XF86CONF_VSCAN;
|
ptr->ml_flags |= XF86CONF_VSCAN;
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
|
@ -265,58 +264,58 @@ xf86parseVerboseMode(void)
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->ml_comment)) != STRING)
|
||||||
Error("Mode name expected");
|
Error("Mode name expected");
|
||||||
ptr->ml_identifier = val.str;
|
ptr->ml_identifier = xf86_lex_val.str;
|
||||||
while ((token = xf86getToken(ModeTab)) != ENDMODE) {
|
while ((token = xf86getToken(ModeTab)) != ENDMODE) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->ml_comment = xf86addComment(ptr->ml_comment, val.str);
|
ptr->ml_comment = xf86addComment(ptr->ml_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case DOTCLOCK:
|
case DOTCLOCK:
|
||||||
if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER)
|
if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER)
|
||||||
Error(NUMBER_MSG, "DotClock");
|
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;
|
had_dotclock = 1;
|
||||||
break;
|
break;
|
||||||
case HTIMINGS:
|
case HTIMINGS:
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_hdisplay = val.num;
|
ptr->ml_hdisplay = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Horizontal display expected");
|
Error("Horizontal display expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_hsyncstart = val.num;
|
ptr->ml_hsyncstart = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Horizontal sync start expected");
|
Error("Horizontal sync start expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_hsyncend = val.num;
|
ptr->ml_hsyncend = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Horizontal sync end expected");
|
Error("Horizontal sync end expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_htotal = val.num;
|
ptr->ml_htotal = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Horizontal total expected");
|
Error("Horizontal total expected");
|
||||||
had_htimings = 1;
|
had_htimings = 1;
|
||||||
break;
|
break;
|
||||||
case VTIMINGS:
|
case VTIMINGS:
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_vdisplay = val.num;
|
ptr->ml_vdisplay = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Vertical display expected");
|
Error("Vertical display expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_vsyncstart = val.num;
|
ptr->ml_vsyncstart = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Vertical sync start expected");
|
Error("Vertical sync start expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_vsyncend = val.num;
|
ptr->ml_vsyncend = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Vertical sync end expected");
|
Error("Vertical sync end expected");
|
||||||
|
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER)
|
||||||
ptr->ml_vtotal = val.num;
|
ptr->ml_vtotal = xf86_lex_val.num;
|
||||||
else
|
else
|
||||||
Error("Vertical total expected");
|
Error("Vertical total expected");
|
||||||
had_vtimings = 1;
|
had_vtimings = 1;
|
||||||
|
@ -370,13 +369,13 @@ xf86parseVerboseMode(void)
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("Horizontal skew expected");
|
Error("Horizontal skew expected");
|
||||||
ptr->ml_flags |= XF86CONF_HSKEW;
|
ptr->ml_flags |= XF86CONF_HSKEW;
|
||||||
ptr->ml_hskew = val.num;
|
ptr->ml_hskew = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case VSCAN:
|
case VSCAN:
|
||||||
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER)
|
||||||
Error("Vertical scan count expected");
|
Error("Vertical scan count expected");
|
||||||
ptr->ml_flags |= XF86CONF_VSCAN;
|
ptr->ml_flags |= XF86CONF_VSCAN;
|
||||||
ptr->ml_vscan = val.num;
|
ptr->ml_vscan = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case EOF_TOKEN:
|
case EOF_TOKEN:
|
||||||
Error(UNEXPECTED_EOF_MSG);
|
Error(UNEXPECTED_EOF_MSG);
|
||||||
|
@ -413,25 +412,25 @@ xf86parseMonitorSection(void)
|
||||||
while ((token = xf86getToken(MonitorTab)) != ENDSECTION) {
|
while ((token = xf86getToken(MonitorTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->mon_comment = xf86addComment(ptr->mon_comment, val.str);
|
ptr->mon_comment = xf86addComment(ptr->mon_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->mon_identifier = val.str;
|
ptr->mon_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case VENDOR:
|
case VENDOR:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Vendor");
|
Error(QUOTE_MSG, "Vendor");
|
||||||
ptr->mon_vendor = val.str;
|
ptr->mon_vendor = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case MODEL:
|
case MODEL:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->mon_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "ModelName");
|
Error(QUOTE_MSG, "ModelName");
|
||||||
ptr->mon_modelname = val.str;
|
ptr->mon_modelname = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case MODE:
|
case MODE:
|
||||||
HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode,
|
HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode,
|
||||||
|
@ -444,10 +443,10 @@ xf86parseMonitorSection(void)
|
||||||
case DISPLAYSIZE:
|
case DISPLAYSIZE:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
||||||
Error(DISPLAYSIZE_MSG);
|
Error(DISPLAYSIZE_MSG);
|
||||||
ptr->mon_width = val.realnum;
|
ptr->mon_width = xf86_lex_val.realnum;
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
||||||
Error(DISPLAYSIZE_MSG);
|
Error(DISPLAYSIZE_MSG);
|
||||||
ptr->mon_height = val.realnum;
|
ptr->mon_height = xf86_lex_val.realnum;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HORIZSYNC:
|
case HORIZSYNC:
|
||||||
|
@ -456,7 +455,7 @@ xf86parseMonitorSection(void)
|
||||||
do {
|
do {
|
||||||
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
|
if (ptr->mon_n_hsync >= CONF_MAX_HSYNC)
|
||||||
Error("Sorry. Too many horizontal sync intervals.");
|
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))) {
|
switch (token = xf86getSubToken(&(ptr->mon_comment))) {
|
||||||
case COMMA:
|
case COMMA:
|
||||||
ptr->mon_hsync[ptr->mon_n_hsync].hi =
|
ptr->mon_hsync[ptr->mon_n_hsync].hi =
|
||||||
|
@ -464,10 +463,10 @@ xf86parseMonitorSection(void)
|
||||||
break;
|
break;
|
||||||
case DASH:
|
case DASH:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
|
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
|
||||||
(float) val.realnum <
|
(float) xf86_lex_val.realnum <
|
||||||
ptr->mon_hsync[ptr->mon_n_hsync].lo)
|
ptr->mon_hsync[ptr->mon_n_hsync].lo)
|
||||||
Error(HORIZSYNC_MSG);
|
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)
|
if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA)
|
||||||
break;
|
break;
|
||||||
ptr->mon_n_hsync++;
|
ptr->mon_n_hsync++;
|
||||||
|
@ -491,7 +490,7 @@ xf86parseMonitorSection(void)
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER)
|
||||||
Error(VERTREFRESH_MSG);
|
Error(VERTREFRESH_MSG);
|
||||||
do {
|
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))) {
|
switch (token = xf86getSubToken(&(ptr->mon_comment))) {
|
||||||
case COMMA:
|
case COMMA:
|
||||||
ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi =
|
ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi =
|
||||||
|
@ -499,10 +498,10 @@ xf86parseMonitorSection(void)
|
||||||
break;
|
break;
|
||||||
case DASH:
|
case DASH:
|
||||||
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
|
if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER ||
|
||||||
(float) val.realnum <
|
(float) xf86_lex_val.realnum <
|
||||||
ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
|
ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo)
|
||||||
Error(VERTREFRESH_MSG);
|
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)
|
if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA)
|
||||||
break;
|
break;
|
||||||
ptr->mon_n_vrefresh++;
|
ptr->mon_n_vrefresh++;
|
||||||
|
@ -530,11 +529,11 @@ xf86parseMonitorSection(void)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ptr->mon_gamma_red = ptr->mon_gamma_green =
|
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) {
|
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) {
|
if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) {
|
||||||
ptr->mon_gamma_blue = val.realnum;
|
ptr->mon_gamma_blue = xf86_lex_val.realnum;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Error(INVALID_GAMMA_MSG);
|
Error(INVALID_GAMMA_MSG);
|
||||||
|
@ -558,7 +557,7 @@ xf86parseMonitorSection(void)
|
||||||
referenced here */
|
referenced here */
|
||||||
mptr = calloc(1, sizeof(XF86ConfModesLinkRec));
|
mptr = calloc(1, sizeof(XF86ConfModesLinkRec));
|
||||||
mptr->list.next = NULL;
|
mptr->list.next = NULL;
|
||||||
mptr->ml_modes_str = val.str;
|
mptr->ml_modes_str = xf86_lex_val.str;
|
||||||
mptr->ml_modes = NULL;
|
mptr->ml_modes = NULL;
|
||||||
ptr->mon_modes_sect_lst = (XF86ConfModesLinkPtr)
|
ptr->mon_modes_sect_lst = (XF86ConfModesLinkPtr)
|
||||||
xf86addListItem((GenericListPtr) ptr->mon_modes_sect_lst,
|
xf86addListItem((GenericListPtr) ptr->mon_modes_sect_lst,
|
||||||
|
@ -599,14 +598,14 @@ xf86parseModesSection(void)
|
||||||
while ((token = xf86getToken(ModesTab)) != ENDSECTION) {
|
while ((token = xf86getToken(ModesTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->modes_comment = xf86addComment(ptr->modes_comment, val.str);
|
ptr->modes_comment = xf86addComment(ptr->modes_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->modes_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->modes_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->modes_identifier = val.str;
|
ptr->modes_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case MODE:
|
case MODE:
|
||||||
|
|
|
@ -61,7 +61,6 @@
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
#include "Xprintf.h"
|
#include "Xprintf.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec PointerTab[] = {
|
static xf86ConfigSymTabRec PointerTab[] = {
|
||||||
{PROTOCOL, "protocol"},
|
{PROTOCOL, "protocol"},
|
||||||
|
@ -104,19 +103,19 @@ xf86parsePointerSection(void)
|
||||||
while ((token = xf86getToken(PointerTab)) != ENDSECTION) {
|
while ((token = xf86getToken(PointerTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str);
|
ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case PROTOCOL:
|
case PROTOCOL:
|
||||||
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Protocol");
|
Error(QUOTE_MSG, "Protocol");
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("Protocol"), val.str);
|
strdup("Protocol"), xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case PDEVICE:
|
case PDEVICE:
|
||||||
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->inp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Device");
|
Error(QUOTE_MSG, "Device");
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("Device"), val.str);
|
strdup("Device"), xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case EMULATE3:
|
case EMULATE3:
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
|
@ -124,9 +123,9 @@ xf86parsePointerSection(void)
|
||||||
NULL);
|
NULL);
|
||||||
break;
|
break;
|
||||||
case EM3TIMEOUT:
|
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");
|
Error(POSITIVE_INT_MSG, "Emulate3Timeout");
|
||||||
s = xf86uLongToString(val.num);
|
s = xf86uLongToString(xf86_lex_val.num);
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("Emulate3Timeout"),
|
strdup("Emulate3Timeout"),
|
||||||
s);
|
s);
|
||||||
|
@ -136,30 +135,30 @@ xf86parsePointerSection(void)
|
||||||
strdup("ChordMiddle"), NULL);
|
strdup("ChordMiddle"), NULL);
|
||||||
break;
|
break;
|
||||||
case PBUTTONS:
|
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");
|
Error(POSITIVE_INT_MSG, "Buttons");
|
||||||
s = xf86uLongToString(val.num);
|
s = xf86uLongToString(xf86_lex_val.num);
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("Buttons"), s);
|
strdup("Buttons"), s);
|
||||||
break;
|
break;
|
||||||
case BAUDRATE:
|
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");
|
Error(POSITIVE_INT_MSG, "BaudRate");
|
||||||
s = xf86uLongToString(val.num);
|
s = xf86uLongToString(xf86_lex_val.num);
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("BaudRate"), s);
|
strdup("BaudRate"), s);
|
||||||
break;
|
break;
|
||||||
case SAMPLERATE:
|
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");
|
Error(POSITIVE_INT_MSG, "SampleRate");
|
||||||
s = xf86uLongToString(val.num);
|
s = xf86uLongToString(xf86_lex_val.num);
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("SampleRate"), s);
|
strdup("SampleRate"), s);
|
||||||
break;
|
break;
|
||||||
case PRESOLUTION:
|
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");
|
Error(POSITIVE_INT_MSG, "Resolution");
|
||||||
s = xf86uLongToString(val.num);
|
s = xf86uLongToString(xf86_lex_val.num);
|
||||||
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst,
|
||||||
strdup("Resolution"), s);
|
strdup("Resolution"), s);
|
||||||
break;
|
break;
|
||||||
|
@ -174,14 +173,14 @@ xf86parsePointerSection(void)
|
||||||
case ZAXISMAPPING:
|
case ZAXISMAPPING:
|
||||||
switch (xf86getToken(ZMapTab)) {
|
switch (xf86getToken(ZMapTab)) {
|
||||||
case NUMBER:
|
case NUMBER:
|
||||||
if (val.num < 0)
|
if (xf86_lex_val.num < 0)
|
||||||
Error(ZAXISMAPPING_MSG);
|
Error(ZAXISMAPPING_MSG);
|
||||||
val1 = val.num;
|
val1 = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER ||
|
if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER ||
|
||||||
val.num < 0) {
|
xf86_lex_val.num < 0) {
|
||||||
Error(ZAXISMAPPING_MSG);
|
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;
|
s = NULL;
|
||||||
break;
|
break;
|
||||||
case XAXIS:
|
case XAXIS:
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec DisplayTab[] = {
|
static xf86ConfigSymTabRec DisplayTab[] = {
|
||||||
{ENDSUBSECTION, "endsubsection"},
|
{ENDSUBSECTION, "endsubsection"},
|
||||||
|
@ -92,71 +91,71 @@ xf86parseDisplaySubSection(void)
|
||||||
while ((token = xf86getToken(DisplayTab)) != ENDSUBSECTION) {
|
while ((token = xf86getToken(DisplayTab)) != ENDSUBSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->disp_comment = xf86addComment(ptr->disp_comment, val.str);
|
ptr->disp_comment = xf86addComment(ptr->disp_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case VIEWPORT:
|
case VIEWPORT:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(VIEWPORT_MSG);
|
Error(VIEWPORT_MSG);
|
||||||
ptr->disp_frameX0 = val.num;
|
ptr->disp_frameX0 = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(VIEWPORT_MSG);
|
Error(VIEWPORT_MSG);
|
||||||
ptr->disp_frameY0 = val.num;
|
ptr->disp_frameY0 = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case VIRTUAL:
|
case VIRTUAL:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(VIRTUAL_MSG);
|
Error(VIRTUAL_MSG);
|
||||||
ptr->disp_virtualX = val.num;
|
ptr->disp_virtualX = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(VIRTUAL_MSG);
|
Error(VIRTUAL_MSG);
|
||||||
ptr->disp_virtualY = val.num;
|
ptr->disp_virtualY = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case DEPTH:
|
case DEPTH:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Display");
|
Error(NUMBER_MSG, "Display");
|
||||||
ptr->disp_depth = val.num;
|
ptr->disp_depth = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case BPP:
|
case BPP:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "Display");
|
Error(NUMBER_MSG, "Display");
|
||||||
ptr->disp_bpp = val.num;
|
ptr->disp_bpp = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case VISUAL:
|
case VISUAL:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->disp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Display");
|
Error(QUOTE_MSG, "Display");
|
||||||
ptr->disp_visual = val.str;
|
ptr->disp_visual = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case WEIGHT:
|
case WEIGHT:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WEIGHT_MSG);
|
Error(WEIGHT_MSG);
|
||||||
ptr->disp_weight.red = val.num;
|
ptr->disp_weight.red = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WEIGHT_MSG);
|
Error(WEIGHT_MSG);
|
||||||
ptr->disp_weight.green = val.num;
|
ptr->disp_weight.green = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WEIGHT_MSG);
|
Error(WEIGHT_MSG);
|
||||||
ptr->disp_weight.blue = val.num;
|
ptr->disp_weight.blue = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case BLACK_TOK:
|
case BLACK_TOK:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(BLACK_MSG);
|
Error(BLACK_MSG);
|
||||||
ptr->disp_black.red = val.num;
|
ptr->disp_black.red = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(BLACK_MSG);
|
Error(BLACK_MSG);
|
||||||
ptr->disp_black.green = val.num;
|
ptr->disp_black.green = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(BLACK_MSG);
|
Error(BLACK_MSG);
|
||||||
ptr->disp_black.blue = val.num;
|
ptr->disp_black.blue = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case WHITE_TOK:
|
case WHITE_TOK:
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WHITE_MSG);
|
Error(WHITE_MSG);
|
||||||
ptr->disp_white.red = val.num;
|
ptr->disp_white.red = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WHITE_MSG);
|
Error(WHITE_MSG);
|
||||||
ptr->disp_white.green = val.num;
|
ptr->disp_white.green = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER)
|
||||||
Error(WHITE_MSG);
|
Error(WHITE_MSG);
|
||||||
ptr->disp_white.blue = val.num;
|
ptr->disp_white.blue = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case MODES:
|
case MODES:
|
||||||
{
|
{
|
||||||
|
@ -166,7 +165,7 @@ xf86parseDisplaySubSection(void)
|
||||||
xf86getSubTokenWithTab(&(ptr->disp_comment),
|
xf86getSubTokenWithTab(&(ptr->disp_comment),
|
||||||
DisplayTab)) == STRING) {
|
DisplayTab)) == STRING) {
|
||||||
mptr = calloc(1, sizeof(XF86ModeRec));
|
mptr = calloc(1, sizeof(XF86ModeRec));
|
||||||
mptr->mode_name = val.str;
|
mptr->mode_name = xf86_lex_val.str;
|
||||||
mptr->list.next = NULL;
|
mptr->list.next = NULL;
|
||||||
ptr->disp_mode_lst = (XF86ModePtr)
|
ptr->disp_mode_lst = (XF86ModePtr)
|
||||||
xf86addListItem((glp) ptr->disp_mode_lst, (glp) mptr);
|
xf86addListItem((glp) ptr->disp_mode_lst, (glp) mptr);
|
||||||
|
@ -227,12 +226,12 @@ xf86parseScreenSection(void)
|
||||||
while ((token = xf86getToken(ScreenTab)) != ENDSECTION) {
|
while ((token = xf86getToken(ScreenTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->scrn_comment = xf86addComment(ptr->scrn_comment, val.str);
|
ptr->scrn_comment = xf86addComment(ptr->scrn_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
ptr->scrn_identifier = val.str;
|
ptr->scrn_identifier = xf86_lex_val.str;
|
||||||
if (has_ident || has_driver)
|
if (has_ident || has_driver)
|
||||||
Error(ONLY_ONE_MSG, "Identifier or Driver");
|
Error(ONLY_ONE_MSG, "Identifier or Driver");
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
|
@ -240,7 +239,7 @@ xf86parseScreenSection(void)
|
||||||
case OBSDRIVER:
|
case OBSDRIVER:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Driver");
|
Error(QUOTE_MSG, "Driver");
|
||||||
ptr->scrn_obso_driver = val.str;
|
ptr->scrn_obso_driver = xf86_lex_val.str;
|
||||||
if (has_ident || has_driver)
|
if (has_ident || has_driver)
|
||||||
Error(ONLY_ONE_MSG, "Identifier or Driver");
|
Error(ONLY_ONE_MSG, "Identifier or Driver");
|
||||||
has_driver = TRUE;
|
has_driver = TRUE;
|
||||||
|
@ -248,27 +247,27 @@ xf86parseScreenSection(void)
|
||||||
case DEFAULTDEPTH:
|
case DEFAULTDEPTH:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "DefaultDepth");
|
Error(NUMBER_MSG, "DefaultDepth");
|
||||||
ptr->scrn_defaultdepth = val.num;
|
ptr->scrn_defaultdepth = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case DEFAULTBPP:
|
case DEFAULTBPP:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "DefaultBPP");
|
Error(NUMBER_MSG, "DefaultBPP");
|
||||||
ptr->scrn_defaultbpp = val.num;
|
ptr->scrn_defaultbpp = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case DEFAULTFBBPP:
|
case DEFAULTFBBPP:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
||||||
Error(NUMBER_MSG, "DefaultFbBPP");
|
Error(NUMBER_MSG, "DefaultFbBPP");
|
||||||
ptr->scrn_defaultfbbpp = val.num;
|
ptr->scrn_defaultfbbpp = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case MDEVICE:
|
case MDEVICE:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Device");
|
Error(QUOTE_MSG, "Device");
|
||||||
ptr->scrn_device_str = val.str;
|
ptr->scrn_device_str = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case MONITOR:
|
case MONITOR:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Monitor");
|
Error(QUOTE_MSG, "Monitor");
|
||||||
ptr->scrn_monitor_str = val.str;
|
ptr->scrn_monitor_str = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case VIDEOADAPTOR:
|
case VIDEOADAPTOR:
|
||||||
{
|
{
|
||||||
|
@ -280,13 +279,13 @@ xf86parseScreenSection(void)
|
||||||
/* Don't allow duplicates */
|
/* Don't allow duplicates */
|
||||||
for (aptr = ptr->scrn_adaptor_lst; aptr;
|
for (aptr = ptr->scrn_adaptor_lst; aptr;
|
||||||
aptr = (XF86ConfAdaptorLinkPtr) aptr->list.next)
|
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;
|
break;
|
||||||
|
|
||||||
if (aptr == NULL) {
|
if (aptr == NULL) {
|
||||||
aptr = calloc(1, sizeof(XF86ConfAdaptorLinkRec));
|
aptr = calloc(1, sizeof(XF86ConfAdaptorLinkRec));
|
||||||
aptr->list.next = NULL;
|
aptr->list.next = NULL;
|
||||||
aptr->al_adaptor_str = val.str;
|
aptr->al_adaptor_str = xf86_lex_val.str;
|
||||||
ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr)
|
ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr)
|
||||||
xf86addListItem((glp) ptr->scrn_adaptor_lst, (glp) aptr);
|
xf86addListItem((glp) ptr->scrn_adaptor_lst, (glp) aptr);
|
||||||
}
|
}
|
||||||
|
@ -295,10 +294,10 @@ xf86parseScreenSection(void)
|
||||||
case VIRTUAL:
|
case VIRTUAL:
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
||||||
Error(VIRTUAL_MSG);
|
Error(VIRTUAL_MSG);
|
||||||
ptr->scrn_virtualX = val.num;
|
ptr->scrn_virtualX = xf86_lex_val.num;
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER)
|
||||||
Error(VIRTUAL_MSG);
|
Error(VIRTUAL_MSG);
|
||||||
ptr->scrn_virtualY = val.num;
|
ptr->scrn_virtualY = xf86_lex_val.num;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst);
|
ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst);
|
||||||
|
@ -307,7 +306,7 @@ xf86parseScreenSection(void)
|
||||||
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->scrn_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "SubSection");
|
Error(QUOTE_MSG, "SubSection");
|
||||||
{
|
{
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
HANDLE_LIST(scrn_display_lst, xf86parseDisplaySubSection,
|
HANDLE_LIST(scrn_display_lst, xf86parseDisplaySubSection,
|
||||||
XF86ConfDisplayPtr);
|
XF86ConfDisplayPtr);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec VendorSubTab[] = {
|
static xf86ConfigSymTabRec VendorSubTab[] = {
|
||||||
{ENDSUBSECTION, "endsubsection"},
|
{ENDSUBSECTION, "endsubsection"},
|
||||||
|
@ -82,14 +81,14 @@ xf86parseVendorSubSection(void)
|
||||||
while ((token = xf86getToken(VendorSubTab)) != ENDSUBSECTION) {
|
while ((token = xf86getToken(VendorSubTab)) != ENDSUBSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->vs_comment = xf86addComment(ptr->vs_comment, val.str);
|
ptr->vs_comment = xf86addComment(ptr->vs_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->vs_comment)))
|
if (xf86getSubToken(&(ptr->vs_comment)))
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->vs_identifier = val.str;
|
ptr->vs_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
|
@ -135,14 +134,14 @@ xf86parseVendorSection(void)
|
||||||
while ((token = xf86getToken(VendorTab)) != ENDSECTION) {
|
while ((token = xf86getToken(VendorTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->vnd_comment = xf86addComment(ptr->vnd_comment, val.str);
|
ptr->vnd_comment = xf86addComment(ptr->vnd_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->vnd_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->vnd_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->vnd_identifier = val.str;
|
ptr->vnd_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec VideoPortTab[] = {
|
static xf86ConfigSymTabRec VideoPortTab[] = {
|
||||||
{ENDSUBSECTION, "endsubsection"},
|
{ENDSUBSECTION, "endsubsection"},
|
||||||
|
@ -97,14 +96,14 @@ xf86parseVideoPortSubSection(void)
|
||||||
while ((token = xf86getToken(VideoPortTab)) != ENDSUBSECTION) {
|
while ((token = xf86getToken(VideoPortTab)) != ENDSUBSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->vp_comment = xf86addComment(ptr->vp_comment, val.str);
|
ptr->vp_comment = xf86addComment(ptr->vp_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->vp_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->vp_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
ptr->vp_identifier = val.str;
|
ptr->vp_identifier = xf86_lex_val.str;
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
|
@ -154,12 +153,12 @@ xf86parseVideoAdaptorSection(void)
|
||||||
while ((token = xf86getToken(VideoAdaptorTab)) != ENDSECTION) {
|
while ((token = xf86getToken(VideoAdaptorTab)) != ENDSECTION) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->va_comment = xf86addComment(ptr->va_comment, val.str);
|
ptr->va_comment = xf86addComment(ptr->va_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case IDENTIFIER:
|
case IDENTIFIER:
|
||||||
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Identifier");
|
Error(QUOTE_MSG, "Identifier");
|
||||||
ptr->va_identifier = val.str;
|
ptr->va_identifier = xf86_lex_val.str;
|
||||||
if (has_ident == TRUE)
|
if (has_ident == TRUE)
|
||||||
Error(MULTIPLE_MSG, "Identifier");
|
Error(MULTIPLE_MSG, "Identifier");
|
||||||
has_ident = TRUE;
|
has_ident = TRUE;
|
||||||
|
@ -167,22 +166,22 @@ xf86parseVideoAdaptorSection(void)
|
||||||
case VENDOR:
|
case VENDOR:
|
||||||
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Vendor");
|
Error(QUOTE_MSG, "Vendor");
|
||||||
ptr->va_vendor = val.str;
|
ptr->va_vendor = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case BOARD:
|
case BOARD:
|
||||||
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Board");
|
Error(QUOTE_MSG, "Board");
|
||||||
ptr->va_board = val.str;
|
ptr->va_board = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case BUSID:
|
case BUSID:
|
||||||
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "BusID");
|
Error(QUOTE_MSG, "BusID");
|
||||||
ptr->va_busid = val.str;
|
ptr->va_busid = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case DRIVER:
|
case DRIVER:
|
||||||
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
if (xf86getSubToken(&(ptr->va_comment)) != STRING)
|
||||||
Error(QUOTE_MSG, "Driver");
|
Error(QUOTE_MSG, "Driver");
|
||||||
ptr->va_driver = val.str;
|
ptr->va_driver = xf86_lex_val.str;
|
||||||
break;
|
break;
|
||||||
case OPTION:
|
case OPTION:
|
||||||
ptr->va_option_lst = xf86parseOption(ptr->va_option_lst);
|
ptr->va_option_lst = xf86parseOption(ptr->va_option_lst);
|
||||||
|
|
|
@ -60,7 +60,6 @@
|
||||||
#include "xf86tokens.h"
|
#include "xf86tokens.h"
|
||||||
#include "Configint.h"
|
#include "Configint.h"
|
||||||
|
|
||||||
extern LexRec val;
|
|
||||||
|
|
||||||
static xf86ConfigSymTabRec TopLevelTab[] = {
|
static xf86ConfigSymTabRec TopLevelTab[] = {
|
||||||
{SECTION, "section"},
|
{SECTION, "section"},
|
||||||
|
@ -99,7 +98,7 @@ xf86readConfigFile(void)
|
||||||
while ((token = xf86getToken(TopLevelTab)) != EOF_TOKEN) {
|
while ((token = xf86getToken(TopLevelTab)) != EOF_TOKEN) {
|
||||||
switch (token) {
|
switch (token) {
|
||||||
case COMMENT:
|
case COMMENT:
|
||||||
ptr->conf_comment = xf86addComment(ptr->conf_comment, val.str);
|
ptr->conf_comment = xf86addComment(ptr->conf_comment, xf86_lex_val.str);
|
||||||
break;
|
break;
|
||||||
case SECTION:
|
case SECTION:
|
||||||
if (xf86getSubToken(&(ptr->conf_comment)) != STRING) {
|
if (xf86getSubToken(&(ptr->conf_comment)) != STRING) {
|
||||||
|
@ -107,101 +106,101 @@ xf86readConfigFile(void)
|
||||||
CLEANUP(ptr);
|
CLEANUP(ptr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
xf86setSection(val.str);
|
xf86setSection(xf86_lex_val.str);
|
||||||
if (xf86nameCompare(val.str, "files") == 0) {
|
if (xf86nameCompare(xf86_lex_val.str, "files") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_RETURN(conf_files, xf86parseFilesSection());
|
HANDLE_RETURN(conf_files, xf86parseFilesSection());
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "serverflags") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "serverflags") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_RETURN(conf_flags, xf86parseFlagsSection());
|
HANDLE_RETURN(conf_flags, xf86parseFlagsSection());
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "pointer") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "pointer") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_input_lst, xf86parsePointerSection,
|
HANDLE_LIST(conf_input_lst, xf86parsePointerSection,
|
||||||
XF86ConfInputPtr);
|
XF86ConfInputPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "videoadaptor") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "videoadaptor") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_videoadaptor_lst, xf86parseVideoAdaptorSection,
|
HANDLE_LIST(conf_videoadaptor_lst, xf86parseVideoAdaptorSection,
|
||||||
XF86ConfVideoAdaptorPtr);
|
XF86ConfVideoAdaptorPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "device") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "device") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_device_lst, xf86parseDeviceSection,
|
HANDLE_LIST(conf_device_lst, xf86parseDeviceSection,
|
||||||
XF86ConfDevicePtr);
|
XF86ConfDevicePtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "monitor") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "monitor") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_monitor_lst, xf86parseMonitorSection,
|
HANDLE_LIST(conf_monitor_lst, xf86parseMonitorSection,
|
||||||
XF86ConfMonitorPtr);
|
XF86ConfMonitorPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "modes") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "modes") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_modes_lst, xf86parseModesSection,
|
HANDLE_LIST(conf_modes_lst, xf86parseModesSection,
|
||||||
XF86ConfModesPtr);
|
XF86ConfModesPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "screen") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "screen") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_screen_lst, xf86parseScreenSection,
|
HANDLE_LIST(conf_screen_lst, xf86parseScreenSection,
|
||||||
XF86ConfScreenPtr);
|
XF86ConfScreenPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "inputdevice") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "inputdevice") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_input_lst, xf86parseInputSection,
|
HANDLE_LIST(conf_input_lst, xf86parseInputSection,
|
||||||
XF86ConfInputPtr);
|
XF86ConfInputPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "inputclass") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "inputclass") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_inputclass_lst,
|
HANDLE_LIST(conf_inputclass_lst,
|
||||||
xf86parseInputClassSection, XF86ConfInputClassPtr);
|
xf86parseInputClassSection, XF86ConfInputClassPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "module") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "module") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_RETURN(conf_modules, xf86parseModuleSection());
|
HANDLE_RETURN(conf_modules, xf86parseModuleSection());
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "serverlayout") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "serverlayout") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_layout_lst, xf86parseLayoutSection,
|
HANDLE_LIST(conf_layout_lst, xf86parseLayoutSection,
|
||||||
XF86ConfLayoutPtr);
|
XF86ConfLayoutPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "vendor") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "vendor") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_LIST(conf_vendor_lst, xf86parseVendorSection,
|
HANDLE_LIST(conf_vendor_lst, xf86parseVendorSection,
|
||||||
XF86ConfVendorPtr);
|
XF86ConfVendorPtr);
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "dri") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "dri") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_RETURN(conf_dri, xf86parseDRISection());
|
HANDLE_RETURN(conf_dri, xf86parseDRISection());
|
||||||
}
|
}
|
||||||
else if (xf86nameCompare(val.str, "extensions") == 0) {
|
else if (xf86nameCompare(xf86_lex_val.str, "extensions") == 0) {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
HANDLE_RETURN(conf_extensions, xf86parseExtensionsSection());
|
HANDLE_RETURN(conf_extensions, xf86parseExtensionsSection());
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
Error(INVALID_SECTION_MSG, xf86tokenString());
|
Error(INVALID_SECTION_MSG, xf86tokenString());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
free(val.str);
|
free(xf86_lex_val.str);
|
||||||
val.str = NULL;
|
xf86_lex_val.str = NULL;
|
||||||
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
Error(INVALID_KEYWORD_MSG, xf86tokenString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ static int numFiles = 0; /* number of config files */
|
||||||
static int curFileIndex = 0; /* index of current config file */
|
static int curFileIndex = 0; /* index of current config file */
|
||||||
static int pushToken = LOCK_TOKEN;
|
static int pushToken = LOCK_TOKEN;
|
||||||
static int eol_seen = 0; /* private state to handle comments */
|
static int eol_seen = 0; /* private state to handle comments */
|
||||||
LexRec val;
|
LexRec xf86_lex_val;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xf86getNextLine --
|
* xf86getNextLine --
|
||||||
|
@ -332,7 +332,7 @@ xf86getToken(xf86ConfigSymTabRec * tab)
|
||||||
/* XXX no private copy.
|
/* XXX no private copy.
|
||||||
* Use xf86addComment when setting a comment.
|
* Use xf86addComment when setting a comment.
|
||||||
*/
|
*/
|
||||||
val.str = configRBuf;
|
xf86_lex_val.str = configRBuf;
|
||||||
return COMMENT;
|
return COMMENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -354,15 +354,15 @@ xf86getToken(xf86ConfigSymTabRec * tab)
|
||||||
if ((configBuf[configPos] == 'x') ||
|
if ((configBuf[configPos] == 'x') ||
|
||||||
(configBuf[configPos] == 'X')) {
|
(configBuf[configPos] == 'X')) {
|
||||||
base = 16;
|
base = 16;
|
||||||
val.numType = PARSE_HEX;
|
xf86_lex_val.numType = PARSE_HEX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
base = 8;
|
base = 8;
|
||||||
val.numType = PARSE_OCTAL;
|
xf86_lex_val.numType = PARSE_OCTAL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
base = 10;
|
base = 10;
|
||||||
val.numType = PARSE_DECIMAL;
|
xf86_lex_val.numType = PARSE_DECIMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
configRBuf[0] = c;
|
configRBuf[0] = c;
|
||||||
|
@ -374,8 +374,8 @@ xf86getToken(xf86ConfigSymTabRec * tab)
|
||||||
configRBuf[i++] = c;
|
configRBuf[i++] = c;
|
||||||
configPos--; /* GJA -- one too far */
|
configPos--; /* GJA -- one too far */
|
||||||
configRBuf[i] = '\0';
|
configRBuf[i] = '\0';
|
||||||
val.num = strtoul(configRBuf, NULL, 0);
|
xf86_lex_val.num = strtoul(configRBuf, NULL, 0);
|
||||||
val.realnum = atof(configRBuf);
|
xf86_lex_val.realnum = atof(configRBuf);
|
||||||
return NUMBER;
|
return NUMBER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -389,8 +389,8 @@ xf86getToken(xf86ConfigSymTabRec * tab)
|
||||||
}
|
}
|
||||||
while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0'));
|
while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0'));
|
||||||
configRBuf[i] = '\0';
|
configRBuf[i] = '\0';
|
||||||
val.str = malloc(strlen(configRBuf) + 1);
|
xf86_lex_val.str = malloc(strlen(configRBuf) + 1);
|
||||||
strcpy(val.str, configRBuf); /* private copy ! */
|
strcpy(xf86_lex_val.str, configRBuf); /* private copy ! */
|
||||||
return STRING;
|
return STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -452,7 +452,7 @@ xf86getSubToken(char **comment)
|
||||||
token = xf86getToken(NULL);
|
token = xf86getToken(NULL);
|
||||||
if (token == COMMENT) {
|
if (token == COMMENT) {
|
||||||
if (comment)
|
if (comment)
|
||||||
*comment = xf86addComment(*comment, val.str);
|
*comment = xf86addComment(*comment, xf86_lex_val.str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return token;
|
return token;
|
||||||
|
@ -468,7 +468,7 @@ xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec * tab)
|
||||||
token = xf86getToken(tab);
|
token = xf86getToken(tab);
|
||||||
if (token == COMMENT) {
|
if (token == COMMENT) {
|
||||||
if (comment)
|
if (comment)
|
||||||
*comment = xf86addComment(*comment, val.str);
|
*comment = xf86addComment(*comment, xf86_lex_val.str);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return token;
|
return token;
|
||||||
|
@ -1025,7 +1025,7 @@ xf86setSection(const char *section)
|
||||||
int
|
int
|
||||||
xf86getStringToken(xf86ConfigSymTabRec * tab)
|
xf86getStringToken(xf86ConfigSymTabRec * tab)
|
||||||
{
|
{
|
||||||
return StringToToken(val.str, tab);
|
return StringToToken(xf86_lex_val.str, tab);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
|
|
@ -11705,38 +11705,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
switch (rh) {
|
switch (rh) {
|
||||||
case 0: /* inc word ptr ... */
|
case 0: /* inc word ptr ... */
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_long(destval);
|
destval32 = inc_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_word(destval);
|
destval16 = inc_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: /* dec word ptr ... */
|
case 1: /* dec word ptr ... */
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_long(destval);
|
destval32 = dec_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_word(destval);
|
destval16 = dec_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: /* call word ptr ... */
|
case 2: /* call word ptr ... */
|
||||||
|
@ -11768,18 +11768,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
break;
|
break;
|
||||||
case 6: /* push word ptr ... */
|
case 6: /* push word ptr ... */
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_long(destval);
|
push_long(destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_word(destval);
|
push_word(destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -11790,38 +11790,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
switch (rh) {
|
switch (rh) {
|
||||||
case 0:
|
case 0:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_long(destval);
|
destval32 = inc_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_word(destval);
|
destval16 = inc_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_long(destval);
|
destval32 = dec_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_word(destval);
|
destval16 = dec_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: /* call word ptr ... */
|
case 2: /* call word ptr ... */
|
||||||
|
@ -11853,18 +11853,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
break;
|
break;
|
||||||
case 6: /* push word ptr ... */
|
case 6: /* push word ptr ... */
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_long(destval);
|
push_long(destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_word(destval);
|
push_word(destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -11875,38 +11875,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
switch (rh) {
|
switch (rh) {
|
||||||
case 0:
|
case 0:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_long(destval);
|
destval32 = inc_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = inc_word(destval);
|
destval16 = inc_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_long(destval);
|
destval32 = dec_long(destval32);
|
||||||
store_data_long(destoffset, destval);
|
store_data_long(destoffset, destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
destval = dec_word(destval);
|
destval16 = dec_word(destval16);
|
||||||
store_data_word(destoffset, destval);
|
store_data_word(destoffset, destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: /* call word ptr ... */
|
case 2: /* call word ptr ... */
|
||||||
|
@ -11938,18 +11938,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
break;
|
break;
|
||||||
case 6: /* push word ptr ... */
|
case 6: /* push word ptr ... */
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
||||||
u32 destval;
|
u32 destval32;
|
||||||
|
|
||||||
destval = fetch_data_long(destoffset);
|
destval32 = fetch_data_long(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_long(destval);
|
push_long(destval32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 destval;
|
u16 destval16;
|
||||||
|
|
||||||
destval = fetch_data_word(destoffset);
|
destval16 = fetch_data_word(destoffset);
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_word(destval);
|
push_word(destval16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -11958,38 +11958,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
switch (rh) {
|
switch (rh) {
|
||||||
case 0:
|
case 0:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
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");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
*destreg = inc_long(*destreg);
|
*destreg32 = inc_long(*destreg32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 *destreg;
|
u16 *destreg16;
|
||||||
|
|
||||||
destreg = DECODE_RM_WORD_REGISTER(rl);
|
destreg16 = DECODE_RM_WORD_REGISTER(rl);
|
||||||
DECODE_PRINTF("\n");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
*destreg = inc_word(*destreg);
|
*destreg16 = inc_word(*destreg16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
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");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
*destreg = dec_long(*destreg);
|
*destreg32 = dec_long(*destreg32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 *destreg;
|
u16 *destreg16;
|
||||||
|
|
||||||
destreg = DECODE_RM_WORD_REGISTER(rl);
|
destreg16 = DECODE_RM_WORD_REGISTER(rl);
|
||||||
DECODE_PRINTF("\n");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
*destreg = dec_word(*destreg);
|
*destreg16 = dec_word(*destreg16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: /* call word ptr ... */
|
case 2: /* call word ptr ... */
|
||||||
|
@ -12018,20 +12018,20 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1))
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
if (M.x86.mode & SYSMODE_PREFIX_DATA) {
|
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");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_long(*destreg);
|
push_long(*destreg32);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
u16 *destreg;
|
u16 *destreg16;
|
||||||
|
|
||||||
destreg = DECODE_RM_WORD_REGISTER(rl);
|
destreg16 = DECODE_RM_WORD_REGISTER(rl);
|
||||||
DECODE_PRINTF("\n");
|
DECODE_PRINTF("\n");
|
||||||
TRACE_AND_STEP();
|
TRACE_AND_STEP();
|
||||||
push_word(*destreg);
|
push_word(*destreg16);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user