NeoMutt  2021-02-05-666-ge300cd
Teaching an old dog new tricks
DOXYGEN
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 "menu/lib.h"
#include "init.h"
#include "mutt_logging.h"
#include "mutt_thread.h"
#include "mx.h"
#include "options.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)
 

Functions

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() -. More...
 
int reply_validator (const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
 Validate the "reply_regex" config variable - Implements ConfigDef::validator() -. More...
 
static bool config_init_main (struct ConfigSet *cs)
 Register main config variables - Implements module_init_config_t -. More...
 
static void init_types (struct ConfigSet *cs)
 Create the config types. More...
 
static void init_variables (struct ConfigSet *cs)
 Define the config variables. More...
 
void init_config (struct ConfigSet *cs)
 Initialise the config system. More...
 

Variables

static const struct Mapping SortAuxMethods []
 Sort methods for '$sort_aux' for the index. More...
 
const struct Mapping SortMethods []
 Sort methods for '$sort' for the index. More...
 
const struct Mapping SortBrowserMethods []
 Sort methods for the folder/dir browser. More...
 
static struct ConfigDef MainVars []
 

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 44 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:259

Definition at line 48 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 706 of file mutt_config.c.

707 {
708  CONFIG_INIT_TYPE(cs, address);
709  CONFIG_INIT_TYPE(cs, bool);
710  CONFIG_INIT_TYPE(cs, enum);
711  CONFIG_INIT_TYPE(cs, long);
712  CONFIG_INIT_TYPE(cs, mbtable);
713  CONFIG_INIT_TYPE(cs, number);
714  CONFIG_INIT_TYPE(cs, path);
715  CONFIG_INIT_TYPE(cs, quad);
716  CONFIG_INIT_TYPE(cs, regex);
717  CONFIG_INIT_TYPE(cs, slist);
718  CONFIG_INIT_TYPE(cs, sort);
719  CONFIG_INIT_TYPE(cs, string);
720 }
#define CONFIG_INIT_TYPE(CS, NAME)
Definition: mutt_config.c:44
+ 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 726 of file mutt_config.c.

727 {
728  // Define the config variables
729  config_init_main(cs);
730  CONFIG_INIT_VARS(cs, alias);
731 #ifdef USE_AUTOCRYPT
732  CONFIG_INIT_VARS(cs, autocrypt);
733 #endif
734  CONFIG_INIT_VARS(cs, compose);
735  CONFIG_INIT_VARS(cs, conn);
736 #ifdef USE_HCACHE
737  CONFIG_INIT_VARS(cs, hcache);
738 #endif
739  CONFIG_INIT_VARS(cs, helpbar);
740  CONFIG_INIT_VARS(cs, history);
741  CONFIG_INIT_VARS(cs, index);
742 #ifdef USE_IMAP
743  CONFIG_INIT_VARS(cs, imap);
744 #endif
745  CONFIG_INIT_VARS(cs, maildir);
746  CONFIG_INIT_VARS(cs, mbox);
747  CONFIG_INIT_VARS(cs, menu);
748  CONFIG_INIT_VARS(cs, ncrypt);
749 #ifdef USE_NNTP
750  CONFIG_INIT_VARS(cs, nntp);
751 #endif
752 #ifdef USE_NOTMUCH
753  CONFIG_INIT_VARS(cs, notmuch);
754 #endif
755  CONFIG_INIT_VARS(cs, pager);
756  CONFIG_INIT_VARS(cs, pattern);
757 #ifdef USE_POP
758  CONFIG_INIT_VARS(cs, pop);
759 #endif
760  CONFIG_INIT_VARS(cs, send);
761 #ifdef USE_SIDEBAR
762  CONFIG_INIT_VARS(cs, sidebar);
763 #endif
764 }
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:118
#define CONFIG_INIT_VARS(CS, NAME)
Definition: mutt_config.c:48
static bool config_init_main(struct ConfigSet *cs)
Register main config variables - Implements module_init_config_t -.
Definition: mutt_config.c:695
+ 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 770 of file mutt_config.c.

771 {
772  init_types(cs);
773  init_variables(cs);
774 }
static void init_variables(struct ConfigSet *cs)
Define the config variables.
Definition: mutt_config.c:726
static void init_types(struct ConfigSet *cs)
Create the config types.
Definition: mutt_config.c:706
+ 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 by the email&#39;s From field.
Definition: sort2.h:47
Sort by the email&#39;s score.
Definition: sort2.h:52
Sort by the emails label.
Definition: sort2.h:62
Sort by the size of the email.
Definition: sort2.h:44
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:48
Sort by the email&#39;s spam score.
Definition: sort2.h:57
Sort by the email&#39;s To field.
Definition: sort2.h:51
Sort by when the message were delivered locally.
Definition: sort2.h:50
Sort by the date the email was sent.
Definition: sort2.h:43
Sort by the email&#39;s subject.
Definition: sort2.h:46

Sort methods for '$sort_aux' for the index.

Definition at line 55 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 by the email&#39;s From field.
Definition: sort2.h:47
Sort by the email&#39;s score.
Definition: sort2.h:52
Sort by the emails label.
Definition: sort2.h:62
Sort by the size of the email.
Definition: sort2.h:44
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:48
Sort by email threads.
Definition: sort2.h:49
Sort by the email&#39;s spam score.
Definition: sort2.h:57
Sort by the email&#39;s To field.
Definition: sort2.h:51
Sort by when the message were delivered locally.
Definition: sort2.h:50
Sort by the date the email was sent.
Definition: sort2.h:43
Sort by the email&#39;s subject.
Definition: sort2.h:46

Sort methods for '$sort' for the index.

Definition at line 77 of file mutt_config.c.

◆ SortBrowserMethods

const struct Mapping SortBrowserMethods[]
Initial value:
= {
{ "alpha", SORT_SUBJECT },
{ "count", SORT_COUNT },
{ "date", SORT_DATE },
{ "desc", SORT_DESC },
{ "new", SORT_UNREAD },
{ "unread", SORT_UNREAD },
{ "size", SORT_SIZE },
{ "unsorted", SORT_ORDER },
{ NULL, 0 },
}
Sort by the size of the email.
Definition: sort2.h:44
Sort by the order the messages appear in the mailbox.
Definition: sort2.h:48
Sort by the number of unread emails.
Definition: sort2.h:59
Sort by the folder&#39;s description.
Definition: sort2.h:63
Sort by number of emails in a folder.
Definition: sort2.h:58
Sort by the date the email was sent.
Definition: sort2.h:43
Sort by the email&#39;s subject.
Definition: sort2.h:46

Sort methods for the folder/dir browser.

Definition at line 99 of file mutt_config.c.

◆ MainVars

struct ConfigDef MainVars[]
static

Definition at line 145 of file mutt_config.c.