25 lines
727 B
Raw Normal View History

#include "array.h"
#include "buffer.h"
#include "server.h"
typedef struct {
server *srv;
int ok;
array *all_configs;
array *configs_stack; /* to parse nested block */
data_config *current; /* current started with { */
buffer *basedir;
} config_t;
void *configparserAlloc(void *(*mallocProc)(size_t));
void configparserFree(void *p, void (*freeProc)(void*));
void configparser(void *yyp, int yymajor, buffer *yyminor, config_t *ctx);
int config_parse_file(server *srv, config_t *context, const char *fn);
int config_parse_cmd(server *srv, config_t *context, const char *cmd);
data_unset *configparser_merge_data(data_unset *op1, const data_unset *op2);