NeoMutt  2024-10-02-34-g9dd811
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
dump.h
Go to the documentation of this file.
1
23#ifndef MUTT_CONFIG_DUMP_H
24#define MUTT_CONFIG_DUMP_H
25
26#include <stdbool.h>
27#include <stdint.h>
28#include <stdio.h>
29
30struct Buffer;
31struct ConfigSet;
32struct HashElem;
33
34typedef uint16_t ConfigDumpFlags;
35#define CS_DUMP_NO_FLAGS 0
36#define CS_DUMP_ONLY_CHANGED (1 << 0)
37#define CS_DUMP_HIDE_SENSITIVE (1 << 1)
38#define CS_DUMP_NO_ESCAPING (1 << 2)
39#define CS_DUMP_HIDE_NAME (1 << 3)
40#define CS_DUMP_HIDE_VALUE (1 << 4)
41#define CS_DUMP_SHOW_DEFAULTS (1 << 5)
42#define CS_DUMP_SHOW_DISABLED (1 << 6)
43#define CS_DUMP_SHOW_SYNONYMS (1 << 7)
44#define CS_DUMP_SHOW_DEPRECATED (1 << 8)
45#define CS_DUMP_SHOW_DOCS (1 << 9)
46
47void dump_config_neo(struct ConfigSet *cs, struct HashElem *he, struct Buffer *value, struct Buffer *initial, ConfigDumpFlags flags, FILE *fp);
48bool dump_config(struct ConfigSet *cs, ConfigDumpFlags flags, FILE *fp);
49size_t escape_string(struct Buffer *buf, const char *src);
50size_t pretty_var(const char *str, struct Buffer *buf);
51
52#endif /* MUTT_CONFIG_DUMP_H */
size_t escape_string(struct Buffer *buf, const char *src)
Write a string to a buffer, escaping special characters.
Definition: dump.c:48
bool dump_config(struct ConfigSet *cs, ConfigDumpFlags flags, FILE *fp)
Write all the config to a file.
Definition: dump.c:167
size_t pretty_var(const char *str, struct Buffer *buf)
Escape and stringify a config item value.
Definition: dump.c:85
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.
Definition: dump.c:108
uint16_t ConfigDumpFlags
Flags for dump_config(), e.g. CS_DUMP_ONLY_CHANGED.
Definition: dump.h:34
String manipulation buffer.
Definition: buffer.h:36
Container for lots of config items.
Definition: set.h:252
The item stored in a Hash Table.
Definition: hash.h:43