|
version 1.2, 1998/07/25 16:57:11
|
version 1.19, 2001/08/06 20:51:12
|
|
|
|
| /* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Configint.h,v 1.1.2.8 1998/05/30 15:19:04 dawes Exp $ */ |
/* $XFree86: xc/programs/Xserver/hw/xfree86/parser/Configint.h,v 1.18 2001/07/25 15:05:07 dawes Exp $ */ |
| /* | /* |
| * | * |
| * Copyright (c) 1997 Metro Link Incorporated | * Copyright (c) 1997 Metro Link Incorporated |
|
|
|
| | |
| #include <stdio.h> | #include <stdio.h> |
| #include <string.h> | #include <string.h> |
| |
#include <stdarg.h> |
| |
#include <stddef.h> |
| #include "xf86Parser.h" | #include "xf86Parser.h" |
| | |
| typedef struct | typedef struct |
|
|
|
| } | } |
| LexRec, *LexPtr; | LexRec, *LexPtr; |
| | |
| #ifndef NULL |
|
| #define NULL 0 |
|
| #endif |
|
| |
|
| #ifndef TRUE | #ifndef TRUE |
| #define TRUE 1 | #define TRUE 1 |
| #endif | #endif |
|
|
|
| | |
| #define TestFree(a) if (a) { xf86conffree (a); a = NULL; } | #define TestFree(a) if (a) { xf86conffree (a); a = NULL; } |
| | |
| #define parsePrologue(typeptr,typerec) int token; typeptr ptr; \ |
#define parsePrologue(typeptr,typerec) typeptr ptr; \ |
| if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } \ | if( (ptr=(typeptr)xf86confcalloc(1,sizeof(typerec))) == NULL ) { return NULL; } \ |
| memset(ptr,0,sizeof(typerec)); | memset(ptr,0,sizeof(typerec)); |
| | |
|
|
|
| }\ | }\ |
| else\ | else\ |
| {\ | {\ |
| ptr->field = (type) addListItem ((glp) ptr->field, (glp) p);\ |
ptr->field = (type) xf86addListItem ((glp) ptr->field, (glp) p);\ |
| }\ | }\ |
| } | } |
| | |
| #define Error(a,b) { xf86ParseError (a, b); CLEANUP (ptr); return NULL; } |
#define Error(a,b) { xf86parseError (a, b); CLEANUP (ptr); return NULL; } |
| | |
| /* | /* |
| * These are defines for error messages to promote consistency. | * These are defines for error messages to promote consistency. |
|
|
|
| "The %s keyword requires a quoted string to follow it." | "The %s keyword requires a quoted string to follow it." |
| #define NUMBER_MSG \ | #define NUMBER_MSG \ |
| "The %s keyword requires a number to follow it." | "The %s keyword requires a number to follow it." |
| |
#define POSITIVE_INT_MSG \ |
| |
"The %s keyword requires a positive integer to follow it." |
| |
#define ZAXISMAPPING_MSG \ |
| |
"The ZAxisMapping keyword requires 2 positive numbers or X or Y to follow it." |
| #define AUTOREPEAT_MSG \ | #define AUTOREPEAT_MSG \ |
| "The AutoRepeat keyword requires 2 numbers (delay and rate) to follow it." | "The AutoRepeat keyword requires 2 numbers (delay and rate) to follow it." |
| |
#define XLEDS_MSG \ |
| |
"The XLeds keyword requries one or more numbers to follow it." |
| #define DACSPEED_MSG \ | #define DACSPEED_MSG \ |
| "The DacSpeed keyword must be followed by a list of up to %d numbers." | "The DacSpeed keyword must be followed by a list of up to %d numbers." |
| #define DISPLAYSIZE_MSG \ | #define DISPLAYSIZE_MSG \ |
|
|
|
| "The Virtual keyword must be followed by a width and height value." | "The Virtual keyword must be followed by a width and height value." |
| #define WEIGHT_MSG \ | #define WEIGHT_MSG \ |
| "The Weight keyword must be followed by red, green and blue values." | "The Weight keyword must be followed by red, green and blue values." |
| |
#define BLACK_MSG \ |
| |
"The Black keyword must be followed by red, green and blue values." |
| |
#define WHITE_MSG \ |
| |
"The White keyword must be followed by red, green and blue values." |
| #define SCREEN_MSG \ | #define SCREEN_MSG \ |
| "The Screen Keyword must be followed by 1 or 5 screen names in quotes." |
"The Screen keyword must be followed by an optional number, a screen name\n" \ |
| |
"\tin quotes, and optional position/layout information." |
| |
#define INVALID_SCR_MSG \ |
| |
"Invalid Screen line." |
| |
#define INPUTDEV_MSG \ |
| |
"The InputDevice keyword must be followed by an input device name in quotes." |
| |
#define INACTIVE_MSG \ |
| |
"The Inactive keyword must be followed by a Device name in quotes." |
| #define UNDEFINED_SCREEN_MSG \ | #define UNDEFINED_SCREEN_MSG \ |
| "Undefined Screen \"%s\" referenced by ServerLayout \"%s\"." | "Undefined Screen \"%s\" referenced by ServerLayout \"%s\"." |
| #define UNDEFINED_MONITOR_MSG \ | #define UNDEFINED_MONITOR_MSG \ |
| "Undefined Monitor \"%s\" referenced by Screen \"%s\"." | "Undefined Monitor \"%s\" referenced by Screen \"%s\"." |
| |
#define UNDEFINED_MODES_MSG \ |
| |
"Undefined Modes Section \"%s\" referenced by Monitor \"%s\"." |
| #define UNDEFINED_DEVICE_MSG \ | #define UNDEFINED_DEVICE_MSG \ |
| "Undefined Device \"%s\" referenced by Screen \"%s\"." | "Undefined Device \"%s\" referenced by Screen \"%s\"." |
| |
#define UNDEFINED_ADAPTOR_MSG \ |
| |
"Undefined VideoAdaptor \"%s\" referenced by Screen \"%s\"." |
| |
#define ADAPTOR_REF_TWICE_MSG \ |
| |
"VideoAdaptor \"%s\" already referenced by Screen \"%s\"." |
| |
#define UNDEFINED_DEVICE_LAY_MSG \ |
| |
"Undefined Device \"%s\" referenced by ServerLayout \"%s\"." |
| |
#define UNDEFINED_INPUT_MSG \ |
| |
"Undefined InputDevice \"%s\" referenced by ServerLayout \"%s\"." |
| #define NO_IDENT_MSG \ | #define NO_IDENT_MSG \ |
| "This section must have an Identifier line." | "This section must have an Identifier line." |
| #define ONLY_ONE_MSG \ | #define ONLY_ONE_MSG \ |
| "This section must have only one of either %s line." | "This section must have only one of either %s line." |
| #define UNDEFINED_DRIVER_MSG \ | #define UNDEFINED_DRIVER_MSG \ |
| "Device section \"%s\" must have a Driver line." | "Device section \"%s\" must have a Driver line." |
| |
#define UNDEFINED_INPUTDRIVER_MSG \ |
| |
"InputDevice section \"%s\" must have a Driver line." |
| #define INVALID_GAMMA_MSG \ | #define INVALID_GAMMA_MSG \ |
| "gamma correction value(s) expected\n either one value or three r/g/b values with 0.1 <= gamma <= 10." |
"gamma correction value(s) expected\n either one value or three r/g/b values." |
| |
#define GROUP_MSG \ |
| |
"The Group keyword must be followed by either a group name in quotes or\n" \ |
| |
"\ta numerical group id." |
| |
#define MULTIPLE_MSG \ |
| |
"Multiple \"%s\" lines." |
| |
|
| |
/* Warning messages */ |
| |
#define OBSOLETE_MSG \ |
| |
"Ignoring obsolete keyword \"%s\"." |
| |
#define MOVED_TO_FLAGS_MSG \ |
| |
"Keyword \"%s\" is now an Option flag in the ServerFlags section." |
| | |
| #endif /* _Configint_h_ */ | #endif /* _Configint_h_ */ |