@@ -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;
@@ -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 {
@@ -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)
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@m5p.com> --- 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(-)