mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 02:30:03 +01:00
Now that common-macros.h has STR() available, which is even slightly more flexible, use that and drop the custom macros. No difference in generated code (except for line numbers, of course, where embedded in code/data). Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
83 lines
1.8 KiB
C
83 lines
1.8 KiB
C
/*
|
|
* Copyright (C) 2010 Citrix Ltd.
|
|
* Author Ian Jackson <ian.jackson@eu.citrix.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
* by the Free Software Foundation; version 2.1 only. with the special
|
|
* exception on linking described in file LICENSE.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*/
|
|
|
|
#ifndef LIBXLU_INTERNAL_H
|
|
#define LIBXLU_INTERNAL_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <errno.h>
|
|
#include <string.h>
|
|
#include <assert.h>
|
|
#include <regex.h>
|
|
|
|
#include "libxlutil.h"
|
|
|
|
#include <xen-tools/common-macros.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_ConfigSetting { /* transparent */
|
|
struct XLU_ConfigSetting *next;
|
|
char *name;
|
|
XLU_ConfigValue *value;
|
|
enum XLU_Operation op;
|
|
int lineno;
|
|
} XLU_ConfigSetting;
|
|
|
|
struct XLU_Config {
|
|
XLU_ConfigSetting *settings;
|
|
FILE *report;
|
|
char *config_source;
|
|
};
|
|
|
|
typedef struct {
|
|
XLU_Config *cfg;
|
|
int err, lexerrlineno, likely_python;
|
|
void *scanner;
|
|
} CfgParseContext;
|
|
|
|
#endif /*LIBXLU_INTERNAL_H*/
|
|
|
|
/*
|
|
* Local variables:
|
|
* mode: C
|
|
* c-basic-offset: 4
|
|
* indent-tabs-mode: nil
|
|
* End:
|
|
*/
|