NeoMutt  2024-03-23-147-g885fbc
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
types.h
Go to the documentation of this file.
1
24#ifndef MUTT_CONFIG_TYPES_H
25#define MUTT_CONFIG_TYPES_H
26
27#include <stdint.h>
28
30{
48};
49
50#define DTYPE(t) ((enum ConfigType)((t) & 0x1F))
51
53{
58
61
66
75
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) ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_MAILBOX))
123#define IS_COMMAND(flags) ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_COMMAND))
124
125#endif /* MUTT_CONFIG_TYPES_H */
ConfigType
Definition: types.h:30
@ DT_NUMBER
a number
Definition: types.h:39
@ DT_SLIST
a list of strings
Definition: types.h:43
@ DT_BOOL
boolean option
Definition: types.h:32
@ DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition: types.h:41
@ DT_SYNONYM
synonym for another variable
Definition: types.h:46
@ DT_STRING
a string
Definition: types.h:45
@ DT_END
Definition: types.h:47
@ DT_SORT
sorting methods
Definition: types.h:44
@ DT_MYVAR
a user-defined variable (my_foo)
Definition: types.h:38
@ DT_MBTABLE
multibyte char table
Definition: types.h:37
@ DT_ADDRESS
e-mail address
Definition: types.h:31
@ DT_LONG
a number (long)
Definition: types.h:36
@ DT_EXPANDO
an expando
Definition: types.h:34
@ DT_ENUM
an enumeration
Definition: types.h:33
@ DT_REGEX
regular expressions
Definition: types.h:42
@ DT_PATH
a path to a file/directory
Definition: types.h:40
@ DT_HCACHE
header cache backend
Definition: types.h:35
ConfigTypeField
Definition: types.h:53
@ D_B_END
Definition: types.h:76
@ D_B_SENSITIVE
Contains sensitive value, e.g. password.
Definition: types.h:56
@ D_B_INTERNAL_FREE_CONFIGDEF
Config item must have its ConfigDef freed.
Definition: types.h:62
@ D_B_L10N_STRING
String can be localised.
Definition: types.h:57
@ D_B_INTERNAL_DEPRECATED
Config item shouldn't be used any more.
Definition: types.h:63
@ D_B_CUSTOM_BIT_5
6th flag available for customising config types
Definition: types.h:72
@ D_B_CUSTOM_BIT_2
3rd flag available for customising config types
Definition: types.h:69
@ D_B_CUSTOM_BIT_6
7th flag available for customising config types
Definition: types.h:73
@ D_B_CUSTOM_BIT_3
4th flag available for customising config types
Definition: types.h:70
@ D_B_INTERNAL_INHERITED
Config item is inherited.
Definition: types.h:64
@ D_B_CHARSET_STRICT
Flag for charset_validator to use strict char check.
Definition: types.h:60
@ D_B_ON_STARTUP
May only be set at startup.
Definition: types.h:54
@ D_B_CUSTOM_BIT_0
1st flag available for customising config types
Definition: types.h:67
@ D_B_CUSTOM_BIT_4
5th flag available for customising config types
Definition: types.h:71
@ D_B_CHARSET_SINGLE
Flag for charset_validator to allow only one charset.
Definition: types.h:59
@ D_B_CUSTOM_BIT_7
8th flag available for customising config types
Definition: types.h:74
@ D_B_CUSTOM_BIT_1
2nd flag available for customising config types
Definition: types.h:68
@ D_B_INTERNAL_INITIAL_SET
Config item must have its initial value freed.
Definition: types.h:65
@ D_B_NOT_EMPTY
Empty strings are not allowed.
Definition: types.h:55