1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright (c) 1997-2001 by The XFree86 Project, Inc. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * Permission is hereby granted, free of charge, to any person obtaining a 5*4882a593Smuzhiyun * copy of this software and associated documentation files (the "Software"), 6*4882a593Smuzhiyun * to deal in the Software without restriction, including without limitation 7*4882a593Smuzhiyun * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8*4882a593Smuzhiyun * and/or sell copies of the Software, and to permit persons to whom the 9*4882a593Smuzhiyun * Software is furnished to do so, subject to the following conditions: 10*4882a593Smuzhiyun * 11*4882a593Smuzhiyun * The above copyright notice and this permission notice shall be included in 12*4882a593Smuzhiyun * all copies or substantial portions of the Software. 13*4882a593Smuzhiyun * 14*4882a593Smuzhiyun * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15*4882a593Smuzhiyun * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16*4882a593Smuzhiyun * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17*4882a593Smuzhiyun * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18*4882a593Smuzhiyun * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19*4882a593Smuzhiyun * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20*4882a593Smuzhiyun * OTHER DEALINGS IN THE SOFTWARE. 21*4882a593Smuzhiyun * 22*4882a593Smuzhiyun * Except as contained in this notice, the name of the copyright holder(s) 23*4882a593Smuzhiyun * and author(s) shall not be used in advertising or otherwise to promote 24*4882a593Smuzhiyun * the sale, use or other dealings in this Software without prior written 25*4882a593Smuzhiyun * authorization from the copyright holder(s) and author(s). 26*4882a593Smuzhiyun */ 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun /* Private procs. Public procs are in xf86Parser.h and xf86Optrec.h */ 29*4882a593Smuzhiyun 30*4882a593Smuzhiyun /* exported functions are/were used by the X Server */ 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun /* Device.c */ 33*4882a593Smuzhiyun XF86ConfDevicePtr xf86parseDeviceSection(void); 34*4882a593Smuzhiyun void xf86printDeviceSection(FILE * cf, XF86ConfDevicePtr ptr); 35*4882a593Smuzhiyun void xf86freeDeviceList(XF86ConfDevicePtr ptr); 36*4882a593Smuzhiyun int xf86validateDevice(XF86ConfigPtr p); 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun /* Files.c */ 39*4882a593Smuzhiyun XF86ConfFilesPtr xf86parseFilesSection(void); 40*4882a593Smuzhiyun void xf86printFileSection(FILE * cf, XF86ConfFilesPtr ptr); 41*4882a593Smuzhiyun void xf86freeFiles(XF86ConfFilesPtr p); 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun /* Flags.c */ 44*4882a593Smuzhiyun XF86ConfFlagsPtr xf86parseFlagsSection(void); 45*4882a593Smuzhiyun void xf86printServerFlagsSection(FILE * f, XF86ConfFlagsPtr flags); 46*4882a593Smuzhiyun void xf86freeFlags(XF86ConfFlagsPtr flags); 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun /* Input.c */ 49*4882a593Smuzhiyun XF86ConfInputPtr xf86parseInputSection(void); 50*4882a593Smuzhiyun void xf86printInputSection(FILE * f, XF86ConfInputPtr ptr); 51*4882a593Smuzhiyun void xf86freeInputList(XF86ConfInputPtr ptr); 52*4882a593Smuzhiyun int xf86validateInput(XF86ConfigPtr p); 53*4882a593Smuzhiyun 54*4882a593Smuzhiyun /* InputClass.c */ 55*4882a593Smuzhiyun XF86ConfInputClassPtr xf86parseInputClassSection(void); 56*4882a593Smuzhiyun void xf86printInputClassSection(FILE * f, XF86ConfInputClassPtr ptr); 57*4882a593Smuzhiyun 58*4882a593Smuzhiyun /* OutputClass.c */ 59*4882a593Smuzhiyun XF86ConfOutputClassPtr xf86parseOutputClassSection(void); 60*4882a593Smuzhiyun void xf86printOutputClassSection(FILE * f, XF86ConfOutputClassPtr ptr); 61*4882a593Smuzhiyun 62*4882a593Smuzhiyun /* Layout.c */ 63*4882a593Smuzhiyun XF86ConfLayoutPtr xf86parseLayoutSection(void); 64*4882a593Smuzhiyun void xf86printLayoutSection(FILE * cf, XF86ConfLayoutPtr ptr); 65*4882a593Smuzhiyun void xf86freeLayoutList(XF86ConfLayoutPtr ptr); 66*4882a593Smuzhiyun int xf86validateLayout(XF86ConfigPtr p); 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun /* Module.c */ 69*4882a593Smuzhiyun XF86ConfModulePtr xf86parseModuleSection(void); 70*4882a593Smuzhiyun void xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr); 71*4882a593Smuzhiyun extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, 72*4882a593Smuzhiyun const char *name, int type, 73*4882a593Smuzhiyun XF86OptionPtr opts); 74*4882a593Smuzhiyun void xf86freeModules(XF86ConfModulePtr ptr); 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun /* Monitor.c */ 77*4882a593Smuzhiyun XF86ConfMonitorPtr xf86parseMonitorSection(void); 78*4882a593Smuzhiyun XF86ConfModesPtr xf86parseModesSection(void); 79*4882a593Smuzhiyun void xf86printMonitorSection(FILE * cf, XF86ConfMonitorPtr ptr); 80*4882a593Smuzhiyun void xf86printModesSection(FILE * cf, XF86ConfModesPtr ptr); 81*4882a593Smuzhiyun extern _X_EXPORT void xf86freeMonitorList(XF86ConfMonitorPtr ptr); 82*4882a593Smuzhiyun void xf86freeModesList(XF86ConfModesPtr ptr); 83*4882a593Smuzhiyun int xf86validateMonitor(XF86ConfigPtr p, XF86ConfScreenPtr screen); 84*4882a593Smuzhiyun 85*4882a593Smuzhiyun /* Pointer.c */ 86*4882a593Smuzhiyun XF86ConfInputPtr xf86parsePointerSection(void); 87*4882a593Smuzhiyun 88*4882a593Smuzhiyun /* Screen.c */ 89*4882a593Smuzhiyun XF86ConfScreenPtr xf86parseScreenSection(void); 90*4882a593Smuzhiyun void xf86printScreenSection(FILE * cf, XF86ConfScreenPtr ptr); 91*4882a593Smuzhiyun extern _X_EXPORT void xf86freeScreenList(XF86ConfScreenPtr ptr); 92*4882a593Smuzhiyun int xf86validateScreen(XF86ConfigPtr p); 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun /* Vendor.c */ 95*4882a593Smuzhiyun XF86ConfVendorPtr xf86parseVendorSection(void); 96*4882a593Smuzhiyun void xf86freeVendorList(XF86ConfVendorPtr p); 97*4882a593Smuzhiyun void xf86printVendorSection(FILE * cf, XF86ConfVendorPtr ptr); 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun /* Video.c */ 100*4882a593Smuzhiyun XF86ConfVideoAdaptorPtr xf86parseVideoAdaptorSection(void); 101*4882a593Smuzhiyun void xf86printVideoAdaptorSection(FILE * cf, XF86ConfVideoAdaptorPtr ptr); 102*4882a593Smuzhiyun void xf86freeVideoAdaptorList(XF86ConfVideoAdaptorPtr ptr); 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun /* scan.c */ 105*4882a593Smuzhiyun int xf86getToken(const xf86ConfigSymTabRec * tab); 106*4882a593Smuzhiyun int xf86getSubToken(char **comment); 107*4882a593Smuzhiyun int xf86getSubTokenWithTab(char **comment, const xf86ConfigSymTabRec * tab); 108*4882a593Smuzhiyun void xf86unGetToken(int token); 109*4882a593Smuzhiyun char *xf86tokenString(void); 110*4882a593Smuzhiyun void 111*4882a593Smuzhiyun xf86parseError(const char *format, ...) 112*4882a593Smuzhiyun _X_ATTRIBUTE_PRINTF(1, 2); 113*4882a593Smuzhiyun void 114*4882a593Smuzhiyun xf86validationError(const char *format, ...) 115*4882a593Smuzhiyun _X_ATTRIBUTE_PRINTF(1, 2); 116*4882a593Smuzhiyun void 117*4882a593Smuzhiyun xf86setSection(const char *section); 118*4882a593Smuzhiyun int 119*4882a593Smuzhiyun xf86getStringToken(const xf86ConfigSymTabRec * tab); 120*4882a593Smuzhiyun 121*4882a593Smuzhiyun /* write.c */ 122*4882a593Smuzhiyun /* DRI.c */ 123*4882a593Smuzhiyun XF86ConfDRIPtr 124*4882a593Smuzhiyun xf86parseDRISection(void); 125*4882a593Smuzhiyun void 126*4882a593Smuzhiyun xf86printDRISection(FILE * cf, XF86ConfDRIPtr ptr); 127*4882a593Smuzhiyun void 128*4882a593Smuzhiyun xf86freeDRI(XF86ConfDRIPtr ptr); 129*4882a593Smuzhiyun 130*4882a593Smuzhiyun /* Extensions.c */ 131*4882a593Smuzhiyun XF86ConfExtensionsPtr 132*4882a593Smuzhiyun xf86parseExtensionsSection(void); 133*4882a593Smuzhiyun void 134*4882a593Smuzhiyun xf86printExtensionsSection(FILE * cf, XF86ConfExtensionsPtr ptr); 135*4882a593Smuzhiyun void 136*4882a593Smuzhiyun xf86freeExtensions(XF86ConfExtensionsPtr ptr); 137*4882a593Smuzhiyun 138*4882a593Smuzhiyun #ifdef HAVE_XORG_CONFIG_H 139*4882a593Smuzhiyun #include <xorg-config.h> 140*4882a593Smuzhiyun #endif 141*4882a593Smuzhiyun 142*4882a593Smuzhiyun #ifndef HAVE_XORG_CONFIG_H 143*4882a593Smuzhiyun /* Externally provided functions */ 144*4882a593Smuzhiyun void 145*4882a593Smuzhiyun ErrorF(const char *f, ...); 146*4882a593Smuzhiyun void 147*4882a593Smuzhiyun VErrorF(const char *f, va_list args); 148*4882a593Smuzhiyun #endif 149