From: Michael Stapelberg Date: Mon, 24 Dec 2012 14:57:02 +0000 (+0100) Subject: remove all references to the old cfgparse X-Git-Tag: 4.5~87 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c127ac3855ac3fef150d0583cb7ae8a764d7e955;p=i3%2Fi3 remove all references to the old cfgparse --- diff --git a/include/config.h b/include/config.h index 04f1c85f..4a95d43f 100644 --- a/include/config.h +++ b/include/config.h @@ -6,8 +6,8 @@ * * include/config.h: Contains all structs/variables for the configurable * part of i3 as well as functions handling the configuration file (calling - * the parser (src/cfgparse.y) with the correct path, switching key bindings - * mode). + * the parser (src/config_parse.c) with the correct path, switching key + * bindings mode). * */ #ifndef I3_CONFIG_H @@ -24,8 +24,6 @@ extern char *current_configpath; extern Config config; extern SLIST_HEAD(modes_head, Mode) modes; extern TAILQ_HEAD(barconfig_head, Barconfig) barconfigs; -/* defined in src/cfgparse.y */ -extern bool force_old_config_parser; /** * Used during the config file lexing/parsing to keep the state of the lexer @@ -342,7 +340,4 @@ Binding *get_binding(uint16_t modifiers, bool key_release, xcb_keycode_t keycode */ void kill_configerror_nagbar(bool wait_for_it); -/* prototype for src/cfgparse.y */ -void parse_file(const char *f); - #endif diff --git a/include/config_parser.h b/include/config_parser.h index 0daf8118..27e12a59 100644 --- a/include/config_parser.h +++ b/include/config_parser.h @@ -29,4 +29,11 @@ struct ConfigResult { struct ConfigResult *parse_config(const char *input, struct context *context); +/** + * Parses the given file by first replacing the variables, then calling + * parse_config and possibly launching i3-nagbar. + * + */ +void parse_file(const char *f); + #endif diff --git a/include/data.h b/include/data.h index 70b65011..9a814f45 100644 --- a/include/data.h +++ b/include/data.h @@ -196,7 +196,8 @@ struct regex { /** * Holds a keybinding, consisting of a keycode combined with modifiers and the - * command which is executed as soon as the key is pressed (see src/cfgparse.y) + * command which is executed as soon as the key is pressed (see + * src/config_parser.c) * */ struct Binding { diff --git a/src/config.c b/src/config.c index ce9adca5..086156e7 100644 --- a/src/config.c +++ b/src/config.c @@ -6,8 +6,8 @@ * i3 - an improved dynamic tiling window manager * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE) * - * config.c: Configuration file (calling the parser (src/cfgparse.y) with the - * correct path, switching key bindings mode). + * config.c: Configuration file (calling the parser (src/config_parser.c) with + * the correct path, switching key bindings mode). * */ #include "all.h" diff --git a/src/config_parser.c b/src/config_parser.c index 0e04bf1c..b81aa3c3 100644 --- a/src/config_parser.c +++ b/src/config_parser.c @@ -1052,8 +1052,11 @@ static void start_configerror_nagbar(const char *config_path) { #endif } - - +/* + * Parses the given file by first replacing the variables, then calling + * parse_config and possibly launching i3-nagbar. + * + */ void parse_file(const char *f) { SLIST_HEAD(variables_head, Variable) variables = SLIST_HEAD_INITIALIZER(&variables); int fd, ret, read_bytes = 0;