Dump all the config. More...
#include <stdbool.h>#include <stdint.h>#include <stdio.h>
Include dependency graph for dump.h:
This graph shows which files directly or indirectly include this file:Go to the source code of this file.
Macros | |
| #define | CS_DUMP_NO_FLAGS 0 |
| No flags are set. | |
| #define | CS_DUMP_ONLY_CHANGED (1 << 0) |
| Only show config that the user has changed. | |
| #define | CS_DUMP_HIDE_SENSITIVE (1 << 1) |
| Obscure sensitive information like passwords. | |
| #define | CS_DUMP_NO_ESCAPING (1 << 2) |
| Do not escape special chars, or quote the string. | |
| #define | CS_DUMP_HIDE_NAME (1 << 3) |
| Do not print the name of the config item. | |
| #define | CS_DUMP_HIDE_VALUE (1 << 4) |
| Do not print the value of the config item. | |
| #define | CS_DUMP_SHOW_DEFAULTS (1 << 5) |
| Show the default value for the config item. | |
| #define | CS_DUMP_SHOW_DISABLED (1 << 6) |
| Show disabled config items, too. | |
| #define | CS_DUMP_SHOW_SYNONYMS (1 << 7) |
| Show synonyms and the config items they're linked to. | |
| #define | CS_DUMP_SHOW_DEPRECATED (1 << 8) |
| Show config items that aren't used any more. | |
| #define | CS_DUMP_SHOW_DOCS (1 << 9) |
| Show one-liner documentation for the config item. | |
| #define | CS_DUMP_LINK_DOCS (1 << 10) |
| Link to the online docs. | |
Typedefs | |
| typedef uint16_t | ConfigDumpFlags |
| Flags for dump_config(), e.g. CS_DUMP_ONLY_CHANGED. | |
Functions | |
| 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. | |
| bool | dump_config (struct ConfigSet *cs, struct HashElemArray *hea, ConfigDumpFlags flags, FILE *fp) |
| Write all the config to a file. | |
| size_t | escape_string (struct Buffer *buf, const char *src) |
| Write a string to a buffer, escaping special characters. | |
| size_t | pretty_var (const char *str, struct Buffer *buf) |
| Escape and stringify a config item value. | |
Dump all the config.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
Definition in file dump.h.
| #define CS_DUMP_ONLY_CHANGED (1 << 0) |
| #define CS_DUMP_HIDE_SENSITIVE (1 << 1) |
| #define CS_DUMP_NO_ESCAPING (1 << 2) |
| #define CS_DUMP_HIDE_NAME (1 << 3) |
| #define CS_DUMP_HIDE_VALUE (1 << 4) |
| #define CS_DUMP_SHOW_DEFAULTS (1 << 5) |
| #define CS_DUMP_SHOW_DISABLED (1 << 6) |
| #define CS_DUMP_SHOW_SYNONYMS (1 << 7) |
| #define CS_DUMP_SHOW_DEPRECATED (1 << 8) |
| #define CS_DUMP_SHOW_DOCS (1 << 9) |
| typedef uint16_t ConfigDumpFlags |
Flags for dump_config(), e.g. CS_DUMP_ONLY_CHANGED.
| 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.
| cs | Config items |
| he | HashElem representing config item |
| value | Current value of the config item |
| initial | Initial value of the config item |
| flags | Flags, see ConfigDumpFlags |
| fp | File pointer to write to |
Definition at line 108 of file dump.c.
Here is the call graph for this function:
Here is the caller graph for this function:| bool dump_config | ( | struct ConfigSet * | cs, |
| struct HashElemArray * | hea, | ||
| ConfigDumpFlags | flags, | ||
| FILE * | fp ) |
Write all the config to a file.
| cs | ConfigSet to dump |
| hea | Array of Config HashElem to dump |
| flags | Flags, see ConfigDumpFlags |
| fp | File to write config to |
Definition at line 196 of file dump.c.
Here is the call graph for this function:
Here is the caller graph for this function:| size_t escape_string | ( | struct Buffer * | buf, |
| const char * | src ) |
Write a string to a buffer, escaping special characters.
| buf | Buffer to write to |
| src | String to write |
| num | Bytes written to buffer |
Definition at line 48 of file dump.c.
Here is the call graph for this function:
Here is the caller graph for this function:| size_t pretty_var | ( | const char * | str, |
| struct Buffer * | buf ) |
Escape and stringify a config item value.
| str | String to escape |
| buf | Buffer to write to |
| num | Number of bytes written to buffer |
Definition at line 85 of file dump.c.
Here is the call graph for this function:
Here is the caller graph for this function: