2005-09-15 09:58:31 -04:00
|
|
|
#ifndef EL__CONFIG_CONF_H
|
|
|
|
#define EL__CONFIG_CONF_H
|
|
|
|
|
|
|
|
#include "terminal/terminal.h"
|
|
|
|
#include "util/string.h"
|
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
enum parse_error {
|
|
|
|
ERROR_NONE,
|
|
|
|
ERROR_COMMAND,
|
|
|
|
ERROR_PARSE,
|
|
|
|
ERROR_OPTION,
|
|
|
|
ERROR_VALUE,
|
|
|
|
ERROR_NOMEM,
|
|
|
|
};
|
|
|
|
|
|
|
|
void load_config(void);
|
2008-02-02 17:20:07 -05:00
|
|
|
#ifdef CONFIG_EXMODE
|
2021-01-02 10:20:27 -05:00
|
|
|
enum parse_error parse_config_exmode_command(char *cmd);
|
2008-02-02 17:20:07 -05:00
|
|
|
#endif
|
2022-01-30 08:32:48 -05:00
|
|
|
void parse_config_file(struct option *options, const char *name,
|
2021-01-02 10:20:27 -05:00
|
|
|
char *file, struct string *mirror,
|
2005-09-15 09:58:31 -04:00
|
|
|
int is_system_conf);
|
|
|
|
int write_config(struct terminal *);
|
|
|
|
|
2022-01-30 08:32:48 -05:00
|
|
|
char *create_config_string(const char *prefix, const char *name);
|
2021-12-29 12:14:25 -05:00
|
|
|
|
|
|
|
char *create_about_config_string(void);
|
2021-12-29 16:11:47 -05:00
|
|
|
void set_option_or_save(const char *str);
|
2005-09-15 09:58:31 -04:00
|
|
|
|
2021-01-02 10:20:27 -05:00
|
|
|
struct string *wrap_option_desc(struct string *out, const char *src,
|
2019-04-21 06:27:40 -04:00
|
|
|
const struct string *indent, int maxwidth);
|
2009-03-08 07:28:13 -04:00
|
|
|
|
2020-10-05 14:14:55 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 09:58:31 -04:00
|
|
|
#endif
|