Write all the config to a file.
166{
167 if (!cs)
168 return false;
169
171
173 if (!he_list)
174 return false;
175
176 bool result = true;
177
181
182 for (size_t i = 0; he_list[i]; i++)
183 {
186 he = he_list[i];
188
190 continue;
191
193 continue;
194
196 continue;
197
199 {
200
203 {
206 {
207 result = false;
208 break;
209 }
210
214 {
217 }
218
221
224 {
228 }
229 }
230
231
233 {
236 {
237 result = false;
238 break;
239 }
240
243
246 {
250 }
251 }
252 }
253
255 }
256
261
262 return result;
263}
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
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.
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.
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_DISABLED
Show disabled config items, too.
#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.
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.
struct HashElem ** get_elem_list(struct ConfigSet *cs)
Create a sorted list of all config items.
#define IS_SENSITIVE(type)
#define DTYPE(x)
Mask for the Data Type.
#define DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
#define DT_LONG
a number (long)
#define DT_BOOL
boolean option
#define DT_DEPRECATED
Config item shouldn't be used any more.
#define DT_MAILBOX
Don't perform path expansions.
#define DT_PATH
a path to a file/directory
#define DT_STRING
a string
#define DT_DISABLED
Config item is disabled.
#define DT_NUMBER
a number