|
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 representation 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. | |
| void | free_variables (struct parser_ctx *ctx) |
| Releases the memory of all variables in ctx. | |
| 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. | |
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 91 of file config_parser.h.
| void free_variables | ( | struct parser_ctx * | ctx | ) |
Releases the memory of all variables in ctx.
Definition at line 689 of file config_parser.c.
References FREE, free_variables(), Variable::key, SLIST_EMPTY, SLIST_FIRST, SLIST_REMOVE_HEAD, Variable::value, and parser_ctx::variables.
Referenced by free_variables(), and 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 705 of file config_parser.c.
References check_for_duplicate_bindings(), database, DLOG, ELOG, context::filename, FREE, get_resource(), context::has_errors, parser_ctx::has_errors, context::has_warnings, i3_version, Variable::key, context::line_copy, LOG, Variable::next_match, parse_config(), parse_file(), PARSE_FILE_CONFIG_ERRORS, PARSE_FILE_FAILED, PARSE_FILE_SUCCESS, IncludedFile::raw_contents, scalloc(), SLIST_FOREACH, sstrdup(), start_config_error_nagbar(), upsert_variable(), parser_ctx::use_nagbar, Variable::value, IncludedFile::variable_replaced_contents, and parser_ctx::variables.
Referenced by CFGFUN(), load_configuration(), and parse_file().

| SLIST_HEAD | ( | variables_head | , |
| Variable | ) |
References config_error_nagbar_pid, and SLIST_HEAD.
| 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.
launch nagbar to indicate errors in the configuration file.
Definition at line 597 of file config_parser.c.
References config, config_error_nagbar_pid, errorfilename, Config::font, context::has_errors, Font::pattern, sasprintf(), start_config_error_nagbar(), and start_nagbar().
Referenced by parse_file(), start_config_error_nagbar(), and translate_keysyms().

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