NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
22
28
29
#include "config.h"
30
#include <stdbool.h>
31
#include <stddef.h>
32
#include "
private.h
"
33
#include "
config/lib.h
"
34
#include "
expando/lib.h
"
35
42
static
const
struct
ExpandoDefinition
AutocryptFormatDef
[] = {
43
// clang-format off
44
{
"*"
,
"padding-soft"
,
ED_GLOBAL
,
ED_GLO_PADDING_SOFT
,
node_padding_parse
},
45
{
">"
,
"padding-hard"
,
ED_GLOBAL
,
ED_GLO_PADDING_HARD
,
node_padding_parse
},
46
{
"|"
,
"padding-eol"
,
ED_GLOBAL
,
ED_GLO_PADDING_EOL
,
node_padding_parse
},
47
{
"a"
,
"address"
,
ED_AUTOCRYPT
,
ED_AUT_ADDRESS
, NULL },
48
{
"k"
,
"keyid"
,
ED_AUTOCRYPT
,
ED_AUT_KEYID
, NULL },
49
{
"n"
,
"number"
,
ED_AUTOCRYPT
,
ED_AUT_NUMBER
, NULL },
50
{
"p"
,
"prefer-encrypt"
,
ED_AUTOCRYPT
,
ED_AUT_PREFER_ENCRYPT
, NULL },
51
{
"s"
,
"enabled"
,
ED_AUTOCRYPT
,
ED_AUT_ENABLED
, NULL },
52
{ NULL, NULL, 0, -1, NULL }
53
// clang-format on
54
};
55
59
struct
ConfigDef
AutocryptVars
[] = {
60
// clang-format off
61
{
"autocrypt"
,
DT_BOOL
,
false
, 0, NULL,
62
"Enables the Autocrypt feature"
63
},
64
{
"autocrypt_acct_format"
,
DT_EXPANDO
,
IP
"%4n %-30a %20p %10s"
,
IP
&
AutocryptFormatDef
, NULL,
65
"Format of the autocrypt account menu"
66
},
67
{
"autocrypt_dir"
,
DT_PATH
|
D_PATH_DIR
,
IP
"~/.mutt/autocrypt"
, 0, NULL,
68
"Location of autocrypt files, including the GPG keyring and SQLite database"
69
},
70
{
"autocrypt_reply"
,
DT_BOOL
,
true
, 0, NULL,
71
"Replying to an autocrypt email automatically enables autocrypt in the reply"
72
},
73
{ NULL },
74
// clang-format on
75
};
AutocryptFormatDef
static const struct ExpandoDefinition AutocryptFormatDef[]
Expando definitions.
Definition
config.c:42
AutocryptVars
struct ConfigDef AutocryptVars[]
Config definitions for the autocrypt library.
Definition
config.c:59
private.h
Shared constants/structs that are private to Autocrypt.
ED_AUT_ADDRESS
@ ED_AUT_ADDRESS
AccountEntry.addr.
Definition
private.h:61
ED_AUT_KEYID
@ ED_AUT_KEYID
AutocryptAccount.keyid.
Definition
private.h:60
ED_AUT_NUMBER
@ ED_AUT_NUMBER
AccountEntry.num.
Definition
private.h:62
ED_AUT_ENABLED
@ ED_AUT_ENABLED
AutocryptAccount.enabled.
Definition
private.h:59
ED_AUT_PREFER_ENCRYPT
@ ED_AUT_PREFER_ENCRYPT
AutocryptAccount.prefer_encrypt.
Definition
private.h:63
lib.h
Convenience wrapper for the config headers.
IP
#define IP
Definition
set.h:55
ED_AUTOCRYPT
@ ED_AUTOCRYPT
Autocrypt ED_AUT_ ExpandoDataAutocrypt.
Definition
domain.h:37
ED_GLOBAL
@ ED_GLOBAL
Global ED_GLO_ ExpandoDataGlobal.
Definition
domain.h:44
lib.h
Parse Expando string.
node_padding_parse
struct ExpandoNode * node_padding_parse(const char *str, struct ExpandoFormat *fmt, int did, int uid, ExpandoParserFlags flags, const char **parsed_until, struct ExpandoParseError *err)
Parse a Padding Expando - Implements ExpandoDefinition::parse() -.
Definition
node_padding.c:234
ConfigDef
Definition
set.h:65
ExpandoDefinition
Definition of a format string.
Definition
definition.h:49
D_PATH_DIR
#define D_PATH_DIR
Path is a directory.
Definition
types.h:103
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
DT_PATH
@ DT_PATH
a path to a file/directory
Definition
types.h:39
ED_GLO_PADDING_EOL
@ ED_GLO_PADDING_EOL
Padding to end-of-line.
Definition
uid.h:38
ED_GLO_PADDING_HARD
@ ED_GLO_PADDING_HARD
Hard Padding.
Definition
uid.h:39
ED_GLO_PADDING_SOFT
@ ED_GLO_PADDING_SOFT
Soft Padding.
Definition
uid.h:40