Write all the config to a file.
198{
199 if (!cs || !hea || !fp)
200 return false;
201
202 bool result = true;
203
207
210 {
215
217 continue;
218
220 continue;
221
223 {
224
227 {
230 {
231 result = false;
232 break;
233 }
234
238 {
241 }
242
245
246
250 {
254 }
255 }
256
257
259 {
262 {
263 result = false;
264 break;
265 }
266
269
270
274 {
278 }
279 }
280 }
281
283 }
284
288
289 return result;
290}
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t pretty_var(const char *str, struct Buffer *buf)
Escape and stringify a config item value.
void dump_config_neo(struct ConfigSet *cs, struct HashElem *he, struct Buffer *value, struct Buffer *initial, ConfigDumpFlags flags, FILE *fp)
Dump the config in the style of NeoMutt.
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
#define CS_DUMP_SHOW_SYNONYMS
Show synonyms and the config items they're linked to.
#define CS_DUMP_SHOW_DEPRECATED
Show config items that aren't used any more.
#define CS_DUMP_NO_ESCAPING
Do not escape special chars, or quote the string.
#define CS_DUMP_HIDE_SENSITIVE
Obscure sensitive information like passwords.
int cs_he_string_get(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
int cs_he_initial_get(const struct ConfigSet *cs, struct HashElem *he, struct Buffer *result)
Get the initial, or parent, value of a config item.
#define CSR_SUCCESS
Action completed successfully.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
String manipulation buffer.
size_t dsize
Length of data.
uint32_t type
Variable type, e.g. DT_STRING.
The item stored in a Hash Table.
#define IS_MAILBOX(flags)
#define D_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
@ DT_PATH
a path to a file/directory
#define D_SENSITIVE
Contains sensitive value, e.g. password.