NeoMutt  2020-06-26-30-g76c339
Teaching an old dog new tricks
DOXYGEN
init.h
Go to the documentation of this file.
1 
24 #ifndef MUTT_INIT_H
25 #define MUTT_INIT_H
26 
27 #include "config.h"
28 #include <stddef.h>
29 #include <stdbool.h>
30 #include <stdint.h>
31 #include "config/lib.h"
32 #include "mutt.h"
33 #include "hook.h"
34 #include "mutt_commands.h"
35 
36 struct Buffer;
37 struct ListHead;
38 
39 int charset_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
40 #ifdef USE_HCACHE_COMPRESSION
41 int compress_method_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
42 int compress_level_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
43 #endif
44 #ifdef USE_HCACHE
45 int hcache_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
46 #endif
47 int multipart_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
48 int pager_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
49 int reply_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
50 int wrapheaders_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err);
51 
52 struct ConfigSet * init_config (size_t size);
53 int mutt_command_complete (char *buf, size_t buflen, int pos, int numtabs);
54 const struct Command *mutt_command_get (const char *s);
55 void mutt_commands_apply (void *data, void (*application)(void *, const struct Command *));
56 int mutt_extract_token (struct Buffer *dest, struct Buffer *tok, TokenFlags flags);
57 HookFlags mutt_get_hook_type (const char *name);
58 int mutt_init (struct ConfigSet *cs, bool skip_sys_rc, struct ListHead *commands);
59 int mutt_label_complete (char *buf, size_t buflen, int numtabs);
60 bool mutt_nm_query_complete (char *buf, size_t buflen, int pos, int numtabs);
61 bool mutt_nm_tag_complete (char *buf, size_t buflen, int numtabs);
62 void mutt_opts_free (void);
63 enum CommandResult mutt_parse_rc_buffer (struct Buffer *line, struct Buffer *token, struct Buffer *err);
64 enum CommandResult mutt_parse_rc_line (const char *line, struct Buffer *err);
65 int mutt_query_variables (struct ListHead *queries);
66 int mutt_var_value_complete(char *buf, size_t buflen, int pos);
67 enum QuadOption query_quadoption (enum QuadOption opt, const char *prompt);
68 
69 #endif /* MUTT_INIT_H */
int hcache_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_backend" config variable - Implements ConfigDef::validator() ...
Definition: init.c:1619
Container for lots of config items.
Definition: set.h:227
CommandResult
Error codes for command_t parse functions.
Definition: mutt_commands.h:33
int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "charset" config variable - Implements ConfigDef::validator()
Definition: init.c:1579
int mutt_command_complete(char *buf, size_t buflen, int pos, int numtabs)
Complete a command name.
Definition: init.c:1138
int multipart_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "show_multipart_alternative" config variable - Implements ConfigDef::validator() ...
Definition: init.c:1706
int compress_level_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_level" config variable - Implements ConfigDef::validator() ...
Definition: init.c:1655
HookFlags mutt_get_hook_type(const char *name)
Find a hook by name.
Definition: init.c:714
int mutt_extract_token(struct Buffer *dest, struct Buffer *tok, TokenFlags flags)
Extract one token from a string.
Definition: init.c:414
enum QuadOption query_quadoption(enum QuadOption opt, const char *prompt)
Ask the user a quad-question.
Definition: init.c:1112
int compress_method_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "header_cache_compress_method" config variable - Implements ConfigDef::validator() ...
Definition: init.c:1638
String manipulation buffer.
Definition: buffer.h:33
int mutt_query_variables(struct ListHead *queries)
Implement the -Q command line flag.
Definition: init.c:1061
int mutt_var_value_complete(char *buf, size_t buflen, int pos)
Complete a variable/value.
Definition: init.c:1480
A user-callable command.
Definition: mutt_commands.h:44
const char * name
Name of the command.
Definition: mutt_commands.h:46
uint32_t HookFlags
Flags for mutt_parse_hook(), e.g. MUTT_FOLDER_HOOK.
Definition: hook.h:43
Config item definition.
Definition: set.h:63
Convenience wrapper for the config headers.
Parse and execute user-defined hooks.
Many unsorted constants and some structs.
int mutt_init(struct ConfigSet *cs, bool skip_sys_rc, struct ListHead *commands)
Initialise NeoMutt.
Definition: init.c:735
bool mutt_nm_tag_complete(char *buf, size_t buflen, int numtabs)
Complete to the nearest notmuch tag.
Definition: init.c:1427
void mutt_opts_free(void)
clean up before quitting
Definition: init.c:651
int reply_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "reply_regex" config variable - Implements ConfigDef::validator()
Definition: init.c:1724
int wrapheaders_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "wrap_headers" config variable - Implements ConfigDef::validator()
Definition: init.c:1741
struct ConfigSet * init_config(size_t size)
Initialise the config system.
Definition: init.c:1549
Definitions of NeoMutt commands.
int mutt_label_complete(char *buf, size_t buflen, int numtabs)
Complete a label name.
Definition: init.c:1306
void mutt_commands_apply(void *data, void(*application)(void *, const struct Command *))
Run a callback function on every Command.
Definition: init.c:399
enum CommandResult mutt_parse_rc_buffer(struct Buffer *line, struct Buffer *token, struct Buffer *err)
Parse a line of user config.
Definition: init.c:983
bool mutt_nm_query_complete(char *buf, size_t buflen, int pos, int numtabs)
Complete to the nearest notmuch tag.
Definition: init.c:1370
uint16_t TokenFlags
Flags for mutt_extract_token(), e.g. MUTT_TOKEN_EQUAL.
Definition: mutt.h:69
int const char int line
Definition: acutest.h:617
const struct Command * mutt_command_get(const char *s)
Get a Command by its name.
Definition: init.c:383
QuadOption
Possible values for a quad-option.
Definition: quad.h:36
int pager_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Check for config variables that can&#39;t be set from the pager - Implements ConfigDef::validator() ...
Definition: init.c:1690
enum CommandResult mutt_parse_rc_line(const char *line, struct Buffer *err)
Parse a line of user config.
Definition: init.c:1038