|
i3
|
#include <config.h>#include <yajl/yajl_gen.h>

Go to the source code of this file.
Data Structures | |
| struct | stack_entry |
| struct | stack |
| struct | parser_ctx |
| struct | ConfigResultIR |
| An intermediate reprsentation of the result of a parse_config call. More... | |
Enumerations | |
| enum | parse_file_result_t { PARSE_FILE_FAILED = -1 , PARSE_FILE_SUCCESS = 0 , PARSE_FILE_CONFIG_ERRORS = 1 } |
Functions | |
| SLIST_HEAD (variables_head, Variable) | |
| void | start_config_error_nagbar (const char *configpath, bool has_errors) |
| launch nagbar to indicate errors in the configuration file. More... | |
| void | free_variables (struct parser_ctx *ctx) |
| Releases the memory of all variables in ctx. More... | |
| parse_file_result_t | parse_file (struct parser_ctx *ctx, const char *f, IncludedFile *included_file) |
| Parses the given file by first replacing the variables, then calling parse_config and launching i3-nagbar if use_nagbar is true. More... | |
Variables | |
| pid_t | config_error_nagbar_pid |
| enum parse_file_result_t |
| Enumerator | |
|---|---|
| PARSE_FILE_FAILED | |
| PARSE_FILE_SUCCESS | |
| PARSE_FILE_CONFIG_ERRORS | |
Definition at line 92 of file config_parser.h.
| void free_variables | ( | struct parser_ctx * | ctx | ) |
Releases the memory of all variables in ctx.
Definition at line 844 of file config_parser.c.
References ctx, FREE, Variable::key, SLIST_EMPTY, SLIST_FIRST, SLIST_REMOVE_HEAD, and Variable::value.
Referenced by load_configuration().
| parse_file_result_t parse_file | ( | struct parser_ctx * | ctx, |
| const char * | f, | ||
| IncludedFile * | included_file | ||
| ) |
Parses the given file by first replacing the variables, then calling parse_config and launching i3-nagbar if use_nagbar is true.
The return value is a boolean indicating whether there were errors during parsing.
Definition at line 860 of file config_parser.c.
References check_for_duplicate_bindings(), ctx, database, detect_version(), DLOG, ELOG, context::filename, FREE, get_resource(), context::has_errors, context::has_warnings, i3_version, Variable::key, context::line_copy, LOG, migrate_config(), Variable::next_match, parse_config(), PARSE_FILE_CONFIG_ERRORS, PARSE_FILE_FAILED, PARSE_FILE_SUCCESS, IncludedFile::raw_contents, scalloc(), SLIST_FOREACH, sstrdup(), start_config_error_nagbar(), upsert_variable(), Variable::value, and IncludedFile::variable_replaced_contents.
Referenced by CFGFUN(), and load_configuration().

| SLIST_HEAD | ( | variables_head | , |
| Variable | |||
| ) |
| void start_config_error_nagbar | ( | const char * | configpath, |
| bool | has_errors | ||
| ) |
launch nagbar to indicate errors in the configuration file.
launch nagbar to indicate errors in the configuration file.
Definition at line 753 of file config_parser.c.
References config, config_error_nagbar_pid, errorfilename, Config::font, context::has_errors, Font::pattern, sasprintf(), and start_nagbar().
Referenced by parse_file(), and translate_keysyms().

|
extern |
Definition at line 45 of file config_parser.c.
Referenced by cmd_reload(), i3_exit(), i3_restart(), and start_config_error_nagbar().