NeoMutt  2023-11-03-85-g512e01
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
mutt_config.c File Reference

Definitions of config variables. More...

#include "config.h"
#include <stddef.h>
#include <stdbool.h>
#include <stdint.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "init.h"
#include "mutt_logging.h"
#include "mutt_thread.h"
#include "mx.h"
+ Include dependency graph for mutt_config.c:

Go to the source code of this file.

Macros

#define CONFIG_INIT_TYPE(CS, NAME)
 
#define CONFIG_INIT_VARS(CS, NAME)
 
#define MIXMASTER_DEFAULT   MIXMASTER
 

Functions

static int multipart_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "show_multipart_alternative" config variable - Implements ConfigDef::validator() -.
 
static bool config_init_main (struct ConfigSet *cs)
 Register main config variables - Implements module_init_config_t -.
 
static void init_types (struct ConfigSet *cs)
 Create the config types.
 
static void init_variables (struct ConfigSet *cs)
 Define the config variables.
 
void init_config (struct ConfigSet *cs)
 Initialise the config system.
 

Variables

static const struct Mapping SortAuxMethods []
 Sort methods for '$sort_aux' for the index.
 
const struct Mapping SortMethods []
 Sort methods for '$sort' for the index.
 
static struct ConfigDef MainVars []
 General Config definitions for NeoMutt.
 
static struct ConfigDef MainVarsMixmaster []
 Config definitions for the Mixmaster library.
 
static struct ConfigDef MainVarsIdn []
 IDN Config definitions for the Mixmaster library.
 

Detailed Description

Definitions of config variables.

Authors
  • Michael R. Elkins
  • g10 Code GmbH

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 mutt_config.c.

Macro Definition Documentation

◆ CONFIG_INIT_TYPE

#define CONFIG_INIT_TYPE (   CS,
  NAME 
)
Value:
extern const struct ConfigSetType Cst##NAME; \
cs_register_type(CS, &Cst##NAME)

Definition at line 42 of file mutt_config.c.

◆ CONFIG_INIT_VARS

#define CONFIG_INIT_VARS (   CS,
  NAME 
)
Value:
bool config_init_##NAME(struct ConfigSet *cs); \
config_init_##NAME(CS)
Container for lots of config items.
Definition: set.h:252

Definition at line 46 of file mutt_config.c.

◆ MIXMASTER_DEFAULT

#define MIXMASTER_DEFAULT   MIXMASTER

Definition at line 601 of file mutt_config.c.

Function Documentation

◆ init_types()

static void init_types ( struct ConfigSet cs)
static

Create the config types.

Parameters
csConfig items

Define the config types, e.g. DT_STRING.

Definition at line 662 of file mutt_config.c.

663{
665 CONFIG_INIT_TYPE(cs, Bool);
666 CONFIG_INIT_TYPE(cs, Enum);
667 CONFIG_INIT_TYPE(cs, Long);
668 CONFIG_INIT_TYPE(cs, Mbtable);
669 CONFIG_INIT_TYPE(cs, MyVar);
670 CONFIG_INIT_TYPE(cs, Number);
671 CONFIG_INIT_TYPE(cs, Path);
672 CONFIG_INIT_TYPE(cs, Quad);
675 CONFIG_INIT_TYPE(cs, Sort);
676 CONFIG_INIT_TYPE(cs, String);
677}
#define CONFIG_INIT_TYPE(CS, NAME)
Definition: mutt_config.c:42
An email address.
Definition: address.h:36
Cached regular expression.
Definition: regex3.h:89
String list.
Definition: slist.h:47
+ Here is the caller graph for this function:

◆ init_variables()

static void init_variables ( struct ConfigSet cs)
static

Define the config variables.

Parameters
csConfig items

Definition at line 683 of file mutt_config.c.

684{
685 // Define the config variables
687 CONFIG_INIT_VARS(cs, alias);
688#if defined(USE_AUTOCRYPT)
689 CONFIG_INIT_VARS(cs, autocrypt);
690#endif
691 CONFIG_INIT_VARS(cs, browser);
692 CONFIG_INIT_VARS(cs, compose);
693 CONFIG_INIT_VARS(cs, conn);
694#if defined(USE_HCACHE)
695 CONFIG_INIT_VARS(cs, hcache);
696#endif
697 CONFIG_INIT_VARS(cs, helpbar);
698 CONFIG_INIT_VARS(cs, history);
699 CONFIG_INIT_VARS(cs, imap);
700 CONFIG_INIT_VARS(cs, index);
701 CONFIG_INIT_VARS(cs, maildir);
702 CONFIG_INIT_VARS(cs, mh);
703 CONFIG_INIT_VARS(cs, mbox);
704 CONFIG_INIT_VARS(cs, menu);
705 CONFIG_INIT_VARS(cs, ncrypt);
706 CONFIG_INIT_VARS(cs, nntp);
707#if defined(USE_NOTMUCH)
708 CONFIG_INIT_VARS(cs, notmuch);
709#endif
710 CONFIG_INIT_VARS(cs, pager);
711 CONFIG_INIT_VARS(cs, pattern);
712 CONFIG_INIT_VARS(cs, pop);
714 CONFIG_INIT_VARS(cs, sidebar);
715}
static bool config_init_main(struct ConfigSet *cs)
Register main config variables - Implements module_init_config_t -.
Definition: mutt_config.c:641
static bool send(struct Notify *source, struct Notify *current, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
Definition: notify.c:120
#define CONFIG_INIT_VARS(CS, NAME)
Definition: mutt_config.c:46
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init_config()

void init_config ( struct ConfigSet cs)

Initialise the config system.

Parameters
csConfig items

Definition at line 721 of file mutt_config.c.

722{
723 init_types(cs);
724 init_variables(cs);
725}
static void init_types(struct ConfigSet *cs)
Create the config types.
Definition: mutt_config.c:662
static void init_variables(struct ConfigSet *cs)
Define the config variables.
Definition: mutt_config.c:683
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ SortAuxMethods

const struct Mapping SortAuxMethods[]
static
Initial value:
= {
{ "date", SORT_DATE },
{ "date-sent", SORT_DATE },
{ "threads", SORT_DATE },
{ "date-received", SORT_RECEIVED },
{ "from", SORT_FROM },
{ "label", SORT_LABEL },
{ "unsorted", SORT_ORDER },
{ "mailbox-order", SORT_ORDER },
{ "score", SORT_SCORE },
{ "size", SORT_SIZE },
{ "spam", SORT_SPAM },
{ "subject", SORT_SUBJECT },
{ "to", SORT_TO },
{ NULL, 0 },
}
@ SORT_SUBJECT
Sort by the email's subject.
Definition: sort2.h:42
@ SORT_ORDER
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:44
@ SORT_SPAM
Sort by the email's spam score.
Definition: sort2.h:53
@ SORT_LABEL
Sort by the emails label.
Definition: sort2.h:58
@ SORT_FROM
Sort by the email's From field.
Definition: sort2.h:43
@ SORT_SIZE
Sort by the size of the email.
Definition: sort2.h:40
@ SORT_RECEIVED
Sort by when the message were delivered locally.
Definition: sort2.h:46
@ SORT_TO
Sort by the email's To field.
Definition: sort2.h:47
@ SORT_DATE
Sort by the date the email was sent.
Definition: sort2.h:39
@ SORT_SCORE
Sort by the email's score.
Definition: sort2.h:48

Sort methods for '$sort_aux' for the index.

Definition at line 53 of file mutt_config.c.

◆ SortMethods

const struct Mapping SortMethods[]
Initial value:
= {
{ "date", SORT_DATE },
{ "date-sent", SORT_DATE },
{ "date-received", SORT_RECEIVED },
{ "from", SORT_FROM },
{ "label", SORT_LABEL },
{ "unsorted", SORT_ORDER },
{ "mailbox-order", SORT_ORDER },
{ "score", SORT_SCORE },
{ "size", SORT_SIZE },
{ "spam", SORT_SPAM },
{ "subject", SORT_SUBJECT },
{ "threads", SORT_THREADS },
{ "to", SORT_TO },
{ NULL, 0 },
}
@ SORT_THREADS
Sort by email threads.
Definition: sort2.h:45

Sort methods for '$sort' for the index.

Definition at line 75 of file mutt_config.c.

◆ MainVars

struct ConfigDef MainVars[]
static

General Config definitions for NeoMutt.

Definition at line 115 of file mutt_config.c.

◆ MainVarsMixmaster

struct ConfigDef MainVarsMixmaster[]
static
Initial value:
= {
{ "mix_entry_format", DT_STRING|DT_NOT_EMPTY, IP "%4n %c %-16s %a", 0, NULL,
"(mixmaster) printf-like format string for the mixmaster chain"
},
{ "mixmaster", DT_STRING|DT_COMMAND, IP MIXMASTER_DEFAULT, 0, NULL,
"(mixmaster) External command to route a mixmaster message"
},
{ NULL },
}
#define IP
Definition: set.h:54
#define MIXMASTER_DEFAULT
Definition: mutt_config.c:601
#define DT_NOT_EMPTY
Empty strings are not allowed.
Definition: types.h:50
#define DT_STRING
a string
Definition: types.h:41
#define DT_COMMAND
A command.
Definition: types.h:54

Config definitions for the Mixmaster library.

Definition at line 608 of file mutt_config.c.

◆ MainVarsIdn

struct ConfigDef MainVarsIdn[]
static
Initial value:
= {
{ "idn_decode", DT_BOOL, true, 0, NULL,
"(idn) Decode international domain names"
},
{ "idn_encode", DT_BOOL, true, 0, NULL,
"(idn) Encode international domain names"
},
{ NULL },
}
#define DT_BOOL
boolean option
Definition: types.h:30

IDN Config definitions for the Mixmaster library.

Definition at line 625 of file mutt_config.c.