summaryrefslogtreecommitdiff
path: root/hw/xfree86/parser
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2011-08-03 16:01:28 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2011-09-27 11:43:36 +1000
commit24823f1ab0f16e0815ef44340894537dc4babf6a (patch)
treed085a5265bb1a2ddfa08c7053caab474ca876717 /hw/xfree86/parser
parent05284a03f9002b03a66ae355b34790ec02b726f0 (diff)
xfree86: switch options from pointer to XF86OptionPtr
In all cases, the pointer was simply type-cast anyway. Let's get some compile-time type safety going, how about that. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Dan Nicholson <dbn.lists@gmail.com> Squashed in: xfree86: Move definition of xf86OptionPtr into separate header file The pile of spaghettis that is the xfree86 include dependencies make it rather hard to have a single typedef somewhere that's not interfering with everything else or drags in a whole bunch of other includes. Move the xf86OptionRec and GenericListRec declarations into a separate header. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'hw/xfree86/parser')
-rw-r--r--hw/xfree86/parser/Makefile.am2
-rw-r--r--hw/xfree86/parser/xf86Optrec.h25
2 files changed, 3 insertions, 24 deletions
diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
index 1cd70e7a5..002cfbf5c 100644
--- a/hw/xfree86/parser/Makefile.am
+++ b/hw/xfree86/parser/Makefile.am
@@ -50,3 +50,5 @@ EXTRA_DIST = \
sdk_HEADERS = \
xf86Parser.h \
xf86Optrec.h
+
+INCLUDES = -I$(srcdir)/../common
diff --git a/hw/xfree86/parser/xf86Optrec.h b/hw/xfree86/parser/xf86Optrec.h
index 5ccf7285b..61a8c5ff5 100644
--- a/hw/xfree86/parser/xf86Optrec.h
+++ b/hw/xfree86/parser/xf86Optrec.h
@@ -65,33 +65,10 @@
#define _xf86Optrec_h_
#include <stdio.h>
#include <string.h>
+#include "xf86Optionstr.h"
#include <X11/Xfuncproto.h>
-/*
- * all records that need to be linked lists should contain a GenericList as
- * their first field.
- */
-typedef struct generic_list_rec
-{
- void *next;
-}
-GenericListRec, *GenericListPtr, *glp;
-
-/*
- * All options are stored using this data type.
- */
-typedef struct
-{
- GenericListRec list;
- char *opt_name;
- char *opt_val;
- int opt_used;
- char *opt_comment;
-}
-XF86OptionRec, *XF86OptionPtr;
-
-
extern _X_EXPORT XF86OptionPtr xf86addNewOption(XF86OptionPtr head, char *name, char *val);
extern _X_EXPORT XF86OptionPtr xf86optionListDup(XF86OptionPtr opt);
extern _X_EXPORT void xf86optionListFree(XF86OptionPtr opt);