[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 7/7] tools/utils: move remaining lower-layer data from libxlu_internal.h



Correcting the order of #includes and data type declarations allows the
remaining lower-layer structures to move to libxlu_cfg_i.h.  Now
libxlu_internal.h is purely generalized routines meant to be shared
between all layers.

Signed-off-by: Elliott Mitchell <ehem+xen@xxxxxxx>
---
 tools/libs/util/libxlu_cfg.c      |  2 +-
 tools/libs/util/libxlu_cfg_i.h    | 31 +++++++++++++++++++++++++++++++
 tools/libs/util/libxlu_internal.h | 30 ------------------------------
 3 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/tools/libs/util/libxlu_cfg.c b/tools/libs/util/libxlu_cfg.c
index 2979d775a6..2913c99478 100644
--- a/tools/libs/util/libxlu_cfg.c
+++ b/tools/libs/util/libxlu_cfg.c
@@ -21,9 +21,9 @@
 #include <stdarg.h>
 
 #include "libxlu_internal.h"
+#include "libxlu_cfg_i.h"
 #include "libxlu_cfg_y.h"
 #include "libxlu_cfg_l.h"
-#include "libxlu_cfg_i.h"
 
 typedef struct XLU_ConfigSetting { /* transparent */
     struct XLU_ConfigSetting *next;
diff --git a/tools/libs/util/libxlu_cfg_i.h b/tools/libs/util/libxlu_cfg_i.h
index 7193867422..1c6a44b60f 100644
--- a/tools/libs/util/libxlu_cfg_i.h
+++ b/tools/libs/util/libxlu_cfg_i.h
@@ -19,6 +19,37 @@
 #define LIBXLU_CFG_I_H
 
 #include "libxlu_internal.h"
+
+struct XLU_ConfigList {
+    int avalues; /* available slots */
+    int nvalues; /* actual occupied slots */
+    XLU_ConfigValue **values;
+};
+
+typedef struct YYLTYPE
+{
+  int first_line;
+  int first_column;
+  int last_line;
+  int last_column;
+} YYLTYPE;
+#define YYLTYPE_IS_DECLARED
+
+struct XLU_ConfigValue {
+    enum XLU_ConfigValueType type;
+    union {
+        char *string;
+        XLU_ConfigList list;
+    } u;
+    YYLTYPE loc;
+};
+
+typedef struct {
+    XLU_Config *cfg;
+    int err, lexerrlineno, likely_python;
+    void *scanner;
+} CfgParseContext;
+
 #include "libxlu_cfg_y.h"
 
 enum XLU_Operation {
diff --git a/tools/libs/util/libxlu_internal.h 
b/tools/libs/util/libxlu_internal.h
index 97303391c6..7cbb2e632d 100644
--- a/tools/libs/util/libxlu_internal.h
+++ b/tools/libs/util/libxlu_internal.h
@@ -25,36 +25,6 @@
 
 #include "libxlutil.h"
 
-struct XLU_ConfigList {
-    int avalues; /* available slots */
-    int nvalues; /* actual occupied slots */
-    XLU_ConfigValue **values;
-};
-
-typedef struct YYLTYPE
-{
-  int first_line;
-  int first_column;
-  int last_line;
-  int last_column;
-} YYLTYPE;
-#define YYLTYPE_IS_DECLARED
-
-struct XLU_ConfigValue {
-    enum XLU_ConfigValueType type;
-    union {
-        char *string;
-        XLU_ConfigList list;
-    } u;
-    YYLTYPE loc;
-};
-
-typedef struct {
-    XLU_Config *cfg;
-    int err, lexerrlineno, likely_python;
-    void *scanner;
-} CfgParseContext;
-
 
 #define STRINGIFY(x) #x
 #define TOSTRING(x) STRINGIFY(x)
-- 
2.30.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.