remove all references to the old cfgparse

next
Michael Stapelberg 2012-12-24 15:57:02 +01:00
parent b304e6ad34
commit c127ac3855
5 changed files with 18 additions and 12 deletions

View File

@ -6,8 +6,8 @@
* *
* include/config.h: Contains all structs/variables for the configurable * include/config.h: Contains all structs/variables for the configurable
* part of i3 as well as functions handling the configuration file (calling * part of i3 as well as functions handling the configuration file (calling
* the parser (src/cfgparse.y) with the correct path, switching key bindings * the parser (src/config_parse.c) with the correct path, switching key
* mode). * bindings mode).
* *
*/ */
#ifndef I3_CONFIG_H #ifndef I3_CONFIG_H
@ -24,8 +24,6 @@ extern char *current_configpath;
extern Config config; extern Config config;
extern SLIST_HEAD(modes_head, Mode) modes; extern SLIST_HEAD(modes_head, Mode) modes;
extern TAILQ_HEAD(barconfig_head, Barconfig) barconfigs; 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 * 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); void kill_configerror_nagbar(bool wait_for_it);
/* prototype for src/cfgparse.y */
void parse_file(const char *f);
#endif #endif

View File

@ -29,4 +29,11 @@ struct ConfigResult {
struct ConfigResult *parse_config(const char *input, struct context *context); 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 #endif

View File

@ -196,7 +196,8 @@ struct regex {
/** /**
* Holds a keybinding, consisting of a keycode combined with modifiers and the * 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 { struct Binding {

View File

@ -6,8 +6,8 @@
* i3 - an improved dynamic tiling window manager * i3 - an improved dynamic tiling window manager
* © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE) * © 2009-2012 Michael Stapelberg and contributors (see also: LICENSE)
* *
* config.c: Configuration file (calling the parser (src/cfgparse.y) with the * config.c: Configuration file (calling the parser (src/config_parser.c) with
* correct path, switching key bindings mode). * the correct path, switching key bindings mode).
* *
*/ */
#include "all.h" #include "all.h"

View File

@ -1052,8 +1052,11 @@ static void start_configerror_nagbar(const char *config_path) {
#endif #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) { void parse_file(const char *f) {
SLIST_HEAD(variables_head, Variable) variables = SLIST_HEAD_INITIALIZER(&variables); SLIST_HEAD(variables_head, Variable) variables = SLIST_HEAD_INITIALIZER(&variables);
int fd, ret, read_bytes = 0; int fd, ret, read_bytes = 0;