Dump all the config. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include "mutt/lib.h"
#include "dump.h"
#include "set.h"
#include "subset.h"
#include "types.h"
Go to the source code of this file.
Functions | |
void | mutt_pretty_mailbox (char *buf, size_t buflen) |
Shorten a mailbox path using '~' or '='. | |
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. | |
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, ConfigDumpFlags flags, FILE *fp) |
Write all the config to a file. | |
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.c.
void mutt_pretty_mailbox | ( | char * | buf, |
size_t | buflen | ||
) |
Shorten a mailbox path using '~' or '='.
buf | Buffer containing string to shorten |
buflen | Length of buffer |
Collapse the pathname using ~ or = when possible
Definition at line 440 of file muttlib.c.
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.
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.
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.
bool dump_config | ( | struct ConfigSet * | cs, |
ConfigDumpFlags | flags, | ||
FILE * | fp | ||
) |
Write all the config to a file.
cs | ConfigSet to dump |
flags | Flags, see ConfigDumpFlags |
fp | File to write config to |
Definition at line 167 of file dump.c.