You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.5 KiB

#include <lighttpd/base.h>
typedef struct liConfigParserContext liConfigParserContext;
typedef enum {
} liCastType;
struct liConfigParserContext {
15 years ago
/* ragel vars */
int cs;
int *stack;
int top;
int stacksize; /* not really used by ragel but need to remember it */
15 years ago
char *p, *pe, *eof;
gchar *mark;
gboolean in_setup_block;
gboolean action_call_with_param;
gboolean condition_with_key;
gboolean condition_nonbool;
gboolean condition_negated;
liCompOperator op;
15 years ago
liCastType cast;
GHashTable *uservars; /* foo = ...; */
GQueue *action_list_stack; /* first entry is current action list */
GQueue *value_stack; /* stack of liValue* */
GQueue *value_op_stack; /* stack of gchar* */
GQueue *condition_stack; /* stack of condition* */
/* information about currenty parsed file */
gchar *filename;
gchar *ptr; /* pointer to the data */
gsize len;
gsize line; /* holds current line */
15 years ago
LI_API gboolean li_config_parse(liServer *srv, const gchar *config_path);
/* returns a new config parser stack with the first context in it */
LI_API GList* li_config_parser_init(liServer *srv);
LI_API void li_config_parser_finish(liServer *srv, GList *ctx_stack, gboolean free_all);
/* loads a file into memory and parses it */
LI_API gboolean li_config_parser_file(liServer *srv, GList *ctx_stack, const gchar *path);