NeoMutt  2025-01-09-117-gace867
Teaching an old dog new tricks
DOXYGEN
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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;
33struct HashElemArray;
34
35typedef uint16_t ConfigDumpFlags;
36#define CS_DUMP_NO_FLAGS 0
37#define CS_DUMP_ONLY_CHANGED (1 << 0)
38#define CS_DUMP_HIDE_SENSITIVE (1 << 1)
39#define CS_DUMP_NO_ESCAPING (1 << 2)
40#define CS_DUMP_HIDE_NAME (1 << 3)
41#define CS_DUMP_HIDE_VALUE (1 << 4)
42#define CS_DUMP_SHOW_DEFAULTS (1 << 5)
43#define CS_DUMP_SHOW_DISABLED (1 << 6)
44#define CS_DUMP_SHOW_SYNONYMS (1 << 7)
45#define CS_DUMP_SHOW_DEPRECATED (1 << 8)
46#define CS_DUMP_SHOW_DOCS (1 << 9)
47#define CS_DUMP_LINK_DOCS (1 << 10)
48
49void dump_config_neo(struct ConfigSet *cs, struct HashElem *he, struct Buffer *value, struct Buffer *initial, ConfigDumpFlags flags, FILE *fp);
50bool dump_config(struct ConfigSet *cs, struct HashElemArray *hea, ConfigDumpFlags flags, FILE *fp);
51size_t escape_string(struct Buffer *buf, const char *src);
52size_t pretty_var(const char *str, struct Buffer *buf);
53
54#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
size_t pretty_var(const char *str, struct Buffer *buf)
Escape and stringify a config item value.
Definition: dump.c:85
bool dump_config(struct ConfigSet *cs, struct HashElemArray *hea, ConfigDumpFlags flags, FILE *fp)
Write all the config to a file.
Definition: dump.c:196
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:35
String manipulation buffer.
Definition: buffer.h:36
Container for lots of config items.
Definition: set.h:248
The item stored in a Hash Table.
Definition: hash.h:44