backup
This commit is contained in:
+16
-22
@@ -5,30 +5,24 @@
|
||||
#include "parser.h"
|
||||
#include <stdio.h>
|
||||
|
||||
config_t *config_create(void);
|
||||
void free_node(node_t *node);
|
||||
void config_destroy(config_t *config);
|
||||
int handle_map_key(config_t *config, node_t **args, int arg_count);
|
||||
int handle_define(config_t *config, node_t **args, int arg_count);
|
||||
int execute_function_call(config_t *config, node_t *call);
|
||||
int config_parse_string(config_t *config, const char *input);
|
||||
int config_parse_file(config_t *config, const char *filename);
|
||||
void config_create(void);
|
||||
void init_builtin_functions(void);
|
||||
|
||||
const char *config_get_key_mapping(config_t *config, const char *key_combo);
|
||||
node_t *find_variable(config_t *config, const char *name);
|
||||
int handle_map_key(node_t **args, int arg_count);
|
||||
int handle_define(node_t **args, int arg_count);
|
||||
int handle_function(node_t **args, int arg_count);
|
||||
|
||||
const char *config_get_string(config_t *config, const char *path,
|
||||
const char *default_value);
|
||||
int config_get_int(config_t *config, const char *path, int default_value);
|
||||
double config_get_double(config_t *config, const char *path,
|
||||
double default_value);
|
||||
bool config_get_bool(config_t *config, const char *path, bool default_value);
|
||||
void config_print_all(config_t *config);
|
||||
int execute_function_call(node_t *call);
|
||||
int config_parse_string(const char *input);
|
||||
int config_parse_file(const char *filename);
|
||||
|
||||
static struct {
|
||||
const char *name;
|
||||
int (*handler)(config_t *config, node_t **args, int arg_count);
|
||||
} builtin_functions[] = {
|
||||
{"map-key", handle_map_key}, {"define", handle_define}, {NULL, NULL}};
|
||||
const char *config_get_key_mapping(const char *key_combo);
|
||||
node_t *find_variable(const char *name);
|
||||
|
||||
const char *config_get_string(const char *path, const char *default_value);
|
||||
int config_get_int(const char *path, int default_value);
|
||||
double config_get_double(const char *path, double default_value);
|
||||
bool config_get_bool(const char *path, bool default_value);
|
||||
void config_print_all(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user