NeoMutt
2025-12-11-1039-g550ac6
Teaching an old dog new tricks
DOXYGEN
Toggle main menu visibility
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
23
24
#ifndef MUTT_CONFIG_TYPES_H
25
#define MUTT_CONFIG_TYPES_H
26
27
#include <stdint.h>
28
29
enum
ConfigType
30
{
31
DT_ADDRESS
,
32
DT_BOOL
,
33
DT_ENUM
,
34
DT_EXPANDO
,
35
DT_LONG
,
36
DT_MBTABLE
,
37
DT_MYVAR
,
38
DT_NUMBER
,
39
DT_PATH
,
40
DT_QUAD
,
41
DT_REGEX
,
42
DT_SLIST
,
43
DT_SORT
,
44
DT_STRING
,
45
DT_SYNONYM
,
46
DT_END
,
47
};
48
50
#define CONFIG_TYPE(t) ((enum ConfigType)((t) & 0x1F))
51
52
enum
ConfigTypeField
53
{
54
D_B_ON_STARTUP
= 5,
55
D_B_NOT_EMPTY
,
56
D_B_SENSITIVE
,
57
D_B_L10N_STRING
,
58
59
D_B_CHARSET_SINGLE
,
60
D_B_CHARSET_STRICT
,
61
62
D_B_INTERNAL_FREE_CONFIGDEF
,
63
D_B_INTERNAL_DEPRECATED
,
64
D_B_INTERNAL_INHERITED
,
65
D_B_INTERNAL_INITIAL_SET
,
66
67
D_B_CUSTOM_BIT_0
,
68
D_B_CUSTOM_BIT_1
,
69
D_B_CUSTOM_BIT_2
,
70
D_B_CUSTOM_BIT_3
,
71
D_B_CUSTOM_BIT_4
,
72
D_B_CUSTOM_BIT_5
,
73
D_B_CUSTOM_BIT_6
,
74
D_B_CUSTOM_BIT_7
,
75
76
D_B_END
,
77
};
78
79
#define D_ON_STARTUP (1 << D_B_ON_STARTUP)
80
#define D_NOT_EMPTY (1 << D_B_NOT_EMPTY)
81
#define D_SENSITIVE (1 << D_B_SENSITIVE)
82
#define D_L10N_STRING (1 << D_B_L10N_STRING)
83
84
#define D_CHARSET_SINGLE (1 << D_B_CHARSET_SINGLE)
85
#define D_CHARSET_STRICT (1 << D_B_CHARSET_STRICT)
86
87
#define D_INTERNAL_FREE_CONFIGDEF (1 << D_B_INTERNAL_FREE_CONFIGDEF)
88
#define D_INTERNAL_DEPRECATED (1 << D_B_INTERNAL_DEPRECATED)
89
#define D_INTERNAL_INHERITED (1 << D_B_INTERNAL_INHERITED)
90
#define D_INTERNAL_INITIAL_SET (1 << D_B_INTERNAL_INITIAL_SET)
91
92
#define D_CUSTOM_BIT_0 (1 << D_B_CUSTOM_BIT_0)
93
#define D_CUSTOM_BIT_1 (1 << D_B_CUSTOM_BIT_1)
94
#define D_CUSTOM_BIT_2 (1 << D_B_CUSTOM_BIT_2)
95
#define D_CUSTOM_BIT_3 (1 << D_B_CUSTOM_BIT_3)
96
#define D_CUSTOM_BIT_4 (1 << D_B_CUSTOM_BIT_4)
97
98
#define D_STRING_MAILBOX D_CUSTOM_BIT_0
99
#define D_STRING_COMMAND D_CUSTOM_BIT_1
100
101
#define D_INTEGER_NOT_NEGATIVE D_CUSTOM_BIT_0
102
103
#define D_PATH_DIR D_CUSTOM_BIT_0
104
#define D_PATH_FILE D_CUSTOM_BIT_1
105
106
#define D_REGEX_MATCH_CASE D_CUSTOM_BIT_0
107
#define D_REGEX_ALLOW_NOT D_CUSTOM_BIT_1
108
#define D_REGEX_NOSUB D_CUSTOM_BIT_2
109
110
#define D_SLIST_SEP_SPACE (0 << D_B_CUSTOM_BIT_0)
111
#define D_SLIST_SEP_COMMA (1 << D_B_CUSTOM_BIT_0)
112
#define D_SLIST_SEP_COLON (2 << D_B_CUSTOM_BIT_0)
113
#define D_SLIST_SEP_MASK (D_CUSTOM_BIT_0 | D_CUSTOM_BIT_1)
114
115
#define D_SLIST_ALLOW_DUPES D_CUSTOM_BIT_2
116
#define D_SLIST_ALLOW_EMPTY D_CUSTOM_BIT_3
117
#define D_SLIST_CASE_SENSITIVE D_CUSTOM_BIT_4
118
119
#define D_SORT_LAST D_CUSTOM_BIT_0
120
#define D_SORT_REVERSE D_CUSTOM_BIT_1
121
122
#define IS_MAILBOX(flags) ((CONFIG_TYPE(flags) == DT_STRING) && ((flags) & D_STRING_MAILBOX))
123
#define IS_COMMAND(flags) ((CONFIG_TYPE(flags) == DT_STRING) && ((flags) & D_STRING_COMMAND))
124
125
#endif
/* MUTT_CONFIG_TYPES_H */
ConfigType
ConfigType
Definition
types.h:30
DT_NUMBER
@ DT_NUMBER
a number
Definition
types.h:38
DT_SLIST
@ DT_SLIST
a list of strings
Definition
types.h:42
DT_BOOL
@ DT_BOOL
boolean option
Definition
types.h:32
DT_QUAD
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition
types.h:40
DT_SYNONYM
@ DT_SYNONYM
synonym for another variable
Definition
types.h:45
DT_STRING
@ DT_STRING
a string
Definition
types.h:44
DT_END
@ DT_END
Definition
types.h:46
DT_SORT
@ DT_SORT
sorting methods
Definition
types.h:43
DT_MYVAR
@ DT_MYVAR
a user-defined variable (my_foo)
Definition
types.h:37
DT_MBTABLE
@ DT_MBTABLE
multibyte char table
Definition
types.h:36
DT_ADDRESS
@ DT_ADDRESS
e-mail address
Definition
types.h:31
DT_LONG
@ DT_LONG
a number (long)
Definition
types.h:35
DT_EXPANDO
@ DT_EXPANDO
an expando
Definition
types.h:34
DT_ENUM
@ DT_ENUM
an enumeration
Definition
types.h:33
DT_REGEX
@ DT_REGEX
regular expressions
Definition
types.h:41
DT_PATH
@ DT_PATH
a path to a file/directory
Definition
types.h:39
ConfigTypeField
ConfigTypeField
Definition
types.h:53
D_B_END
@ D_B_END
Definition
types.h:76
D_B_SENSITIVE
@ D_B_SENSITIVE
Contains sensitive value, e.g. password.
Definition
types.h:56
D_B_INTERNAL_FREE_CONFIGDEF
@ D_B_INTERNAL_FREE_CONFIGDEF
Config item must have its ConfigDef freed.
Definition
types.h:62
D_B_L10N_STRING
@ D_B_L10N_STRING
String can be localised.
Definition
types.h:57
D_B_INTERNAL_DEPRECATED
@ D_B_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
Definition
types.h:63
D_B_CUSTOM_BIT_5
@ D_B_CUSTOM_BIT_5
6th flag available for customising config types
Definition
types.h:72
D_B_CUSTOM_BIT_2
@ D_B_CUSTOM_BIT_2
3rd flag available for customising config types
Definition
types.h:69
D_B_CUSTOM_BIT_6
@ D_B_CUSTOM_BIT_6
7th flag available for customising config types
Definition
types.h:73
D_B_CUSTOM_BIT_3
@ D_B_CUSTOM_BIT_3
4th flag available for customising config types
Definition
types.h:70
D_B_INTERNAL_INHERITED
@ D_B_INTERNAL_INHERITED
Config item is inherited.
Definition
types.h:64
D_B_CHARSET_STRICT
@ D_B_CHARSET_STRICT
Flag for charset_validator to use strict char check.
Definition
types.h:60
D_B_ON_STARTUP
@ D_B_ON_STARTUP
May only be set at startup.
Definition
types.h:54
D_B_CUSTOM_BIT_0
@ D_B_CUSTOM_BIT_0
1st flag available for customising config types
Definition
types.h:67
D_B_CUSTOM_BIT_4
@ D_B_CUSTOM_BIT_4
5th flag available for customising config types
Definition
types.h:71
D_B_CHARSET_SINGLE
@ D_B_CHARSET_SINGLE
Flag for charset_validator to allow only one charset.
Definition
types.h:59
D_B_CUSTOM_BIT_7
@ D_B_CUSTOM_BIT_7
8th flag available for customising config types
Definition
types.h:74
D_B_CUSTOM_BIT_1
@ D_B_CUSTOM_BIT_1
2nd flag available for customising config types
Definition
types.h:68
D_B_INTERNAL_INITIAL_SET
@ D_B_INTERNAL_INITIAL_SET
Config item must have its initial value freed.
Definition
types.h:65
D_B_NOT_EMPTY
@ D_B_NOT_EMPTY
Empty strings are not allowed.
Definition
types.h:55