summaryrefslogtreecommitdiff
path: root/hw/xfree86/parser
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/parser')
-rw-r--r--hw/xfree86/parser/configProcs.h4
-rw-r--r--hw/xfree86/parser/read.c7
-rw-r--r--hw/xfree86/parser/write.c2
-rw-r--r--hw/xfree86/parser/xf86Parser.h8
4 files changed, 21 insertions, 0 deletions
diff --git a/hw/xfree86/parser/configProcs.h b/hw/xfree86/parser/configProcs.h
index 522cf5c2f..cc694666f 100644
--- a/hw/xfree86/parser/configProcs.h
+++ b/hw/xfree86/parser/configProcs.h
@@ -116,6 +116,10 @@ void xf86freeBuffersList (XF86ConfBuffersPtr ptr);
XF86ConfDRIPtr xf86parseDRISection (void);
void xf86printDRISection (FILE * cf, XF86ConfDRIPtr ptr);
void xf86freeDRI (XF86ConfDRIPtr ptr);
+/* Extensions.c */
+XF86ConfExtensionsPtr xf86parseExtensionsSection (void);
+void xf86printExtensionsSection (FILE * cf, XF86ConfExtensionsPtr ptr);
+void xf86freeExtensions (XF86ConfExtensionsPtr ptr);
#ifndef IN_XSERVER
/* Externally provided functions */
diff --git a/hw/xfree86/parser/read.c b/hw/xfree86/parser/read.c
index 2a5afeb27..2946dc8b1 100644
--- a/hw/xfree86/parser/read.c
+++ b/hw/xfree86/parser/read.c
@@ -191,6 +191,12 @@ xf86readConfigFile (void)
val.str = NULL;
HANDLE_RETURN (conf_dri, xf86parseDRISection ());
}
+ else if (xf86nameCompare (val.str, "extensions") == 0)
+ {
+ xf86conffree(val.str);
+ val.str = NULL;
+ HANDLE_RETURN (conf_extensions, xf86parseExtensionsSection ());
+ }
else
{
Error (INVALID_SECTION_MSG, xf86tokenString ());
@@ -304,6 +310,7 @@ xf86freeConfig (XF86ConfigPtr p)
xf86freeInputList (p->conf_input_lst);
xf86freeVendorList (p->conf_vendor_lst);
xf86freeDRI (p->conf_dri);
+ xf86freeExtensions (p->conf_extensions);
TestFree(p->conf_comment);
xf86conffree (p);
diff --git a/hw/xfree86/parser/write.c b/hw/xfree86/parser/write.c
index e096c6247..499b6a11e 100644
--- a/hw/xfree86/parser/write.c
+++ b/hw/xfree86/parser/write.c
@@ -130,6 +130,8 @@ doWriteConfigFile (const char *filename, XF86ConfigPtr cptr)
xf86printDRISection (cf, cptr->conf_dri);
+ xf86printExtensionsSection (cf, cptr->conf_extensions);
+
fclose(cf);
return 1;
}
diff --git a/hw/xfree86/parser/xf86Parser.h b/hw/xfree86/parser/xf86Parser.h
index 1a30d17a8..b6a974d3c 100644
--- a/hw/xfree86/parser/xf86Parser.h
+++ b/hw/xfree86/parser/xf86Parser.h
@@ -416,6 +416,13 @@ XF86ConfDRIRec, *XF86ConfDRIPtr;
typedef struct
{
+ XF86OptionPtr ext_option_lst;
+ char *extensions_comment;
+}
+XF86ConfExtensionsRec, *XF86ConfExtensionsPtr;
+
+typedef struct
+{
XF86ConfFilesPtr conf_files;
XF86ConfModulePtr conf_modules;
XF86ConfFlagsPtr conf_flags;
@@ -428,6 +435,7 @@ typedef struct
XF86ConfLayoutPtr conf_layout_lst;
XF86ConfVendorPtr conf_vendor_lst;
XF86ConfDRIPtr conf_dri;
+ XF86ConfExtensionsPtr conf_extensions;
char *conf_comment;
}
XF86ConfigRec, *XF86ConfigPtr;