NeoMutt  2024-03-23-147-g885fbc
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
types.h File Reference

Constants for all the config types. More...

#include <stdint.h>
+ Include dependency graph for types.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define DTYPE(t)   ((enum ConfigType)((t) & 0x1F))
 
#define D_ON_STARTUP   (1 << D_B_ON_STARTUP)
 May only be set at startup.
 
#define D_NOT_EMPTY   (1 << D_B_NOT_EMPTY)
 Empty strings are not allowed.
 
#define D_SENSITIVE   (1 << D_B_SENSITIVE)
 Contains sensitive value, e.g. password.
 
#define D_L10N_STRING   (1 << D_B_L10N_STRING)
 String can be localised.
 
#define D_CHARSET_SINGLE   (1 << D_B_CHARSET_SINGLE)
 Flag for charset_validator to allow only one charset.
 
#define D_CHARSET_STRICT   (1 << D_B_CHARSET_STRICT)
 Flag for charset_validator to use strict char check.
 
#define D_INTERNAL_FREE_CONFIGDEF   (1 << D_B_INTERNAL_FREE_CONFIGDEF)
 Config item must have its ConfigDef freed.
 
#define D_INTERNAL_DEPRECATED   (1 << D_B_INTERNAL_DEPRECATED)
 Config item shouldn't be used any more.
 
#define D_INTERNAL_INHERITED   (1 << D_B_INTERNAL_INHERITED)
 Config item is inherited.
 
#define D_INTERNAL_INITIAL_SET   (1 << D_B_INTERNAL_INITIAL_SET)
 Config item must have its initial value freed.
 
#define D_CUSTOM_BIT_0   (1 << D_B_CUSTOM_BIT_0)
 
#define D_CUSTOM_BIT_1   (1 << D_B_CUSTOM_BIT_1)
 
#define D_CUSTOM_BIT_2   (1 << D_B_CUSTOM_BIT_2)
 
#define D_CUSTOM_BIT_3   (1 << D_B_CUSTOM_BIT_3)
 
#define D_CUSTOM_BIT_4   (1 << D_B_CUSTOM_BIT_4)
 
#define D_STRING_MAILBOX   D_CUSTOM_BIT_0
 Don't perform path expansions.
 
#define D_STRING_COMMAND   D_CUSTOM_BIT_1
 A command.
 
#define D_INTEGER_NOT_NEGATIVE   D_CUSTOM_BIT_0
 Negative numbers are not allowed.
 
#define D_PATH_DIR   D_CUSTOM_BIT_0
 Path is a directory.
 
#define D_PATH_FILE   D_CUSTOM_BIT_1
 Path is a file.
 
#define D_REGEX_MATCH_CASE   D_CUSTOM_BIT_0
 Case-sensitive matching.
 
#define D_REGEX_ALLOW_NOT   D_CUSTOM_BIT_1
 Regex can begin with '!'.
 
#define D_REGEX_NOSUB   D_CUSTOM_BIT_2
 Do not report what was matched (REG_NOSUB)
 
#define D_SLIST_SEP_SPACE   (0 << D_B_CUSTOM_BIT_0)
 Slist items are space-separated.
 
#define D_SLIST_SEP_COMMA   (1 << D_B_CUSTOM_BIT_0)
 Slist items are comma-separated.
 
#define D_SLIST_SEP_COLON   (2 << D_B_CUSTOM_BIT_0)
 Slist items are colon-separated.
 
#define D_SLIST_SEP_MASK   (D_CUSTOM_BIT_0 | D_CUSTOM_BIT_1)
 
#define D_SLIST_ALLOW_DUPES   D_CUSTOM_BIT_2
 Slist may contain duplicates.
 
#define D_SLIST_ALLOW_EMPTY   D_CUSTOM_BIT_3
 Slist may be empty.
 
#define D_SLIST_CASE_SENSITIVE   D_CUSTOM_BIT_4
 Slist is case-sensitive.
 
#define D_SORT_LAST   D_CUSTOM_BIT_0
 Sort flag for -last prefix.
 
#define D_SORT_REVERSE   D_CUSTOM_BIT_1
 Sort flag for -reverse prefix.
 
#define IS_MAILBOX(flags)   ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_MAILBOX))
 
#define IS_COMMAND(flags)   ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_COMMAND))
 

Enumerations

enum  ConfigType {
  DT_ADDRESS , DT_BOOL , DT_ENUM , DT_EXPANDO ,
  DT_HCACHE , DT_LONG , DT_MBTABLE , DT_MYVAR ,
  DT_NUMBER , DT_PATH , DT_QUAD , DT_REGEX ,
  DT_SLIST , DT_SORT , DT_STRING , DT_SYNONYM ,
  DT_END
}
 
enum  ConfigTypeField {
  D_B_ON_STARTUP = 5 , D_B_NOT_EMPTY , D_B_SENSITIVE , D_B_L10N_STRING ,
  D_B_CHARSET_SINGLE , D_B_CHARSET_STRICT , D_B_INTERNAL_FREE_CONFIGDEF , D_B_INTERNAL_DEPRECATED ,
  D_B_INTERNAL_INHERITED , D_B_INTERNAL_INITIAL_SET , D_B_CUSTOM_BIT_0 , D_B_CUSTOM_BIT_1 ,
  D_B_CUSTOM_BIT_2 , D_B_CUSTOM_BIT_3 , D_B_CUSTOM_BIT_4 , D_B_CUSTOM_BIT_5 ,
  D_B_CUSTOM_BIT_6 , D_B_CUSTOM_BIT_7 , D_B_END
}
 

Detailed Description

Constants for all the config types.

Authors
  • наб
  • Richard Russon

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 types.h.

Macro Definition Documentation

◆ DTYPE

#define DTYPE (   t)    ((enum ConfigType)((t) & 0x1F))

Definition at line 50 of file types.h.

◆ D_ON_STARTUP

#define D_ON_STARTUP   (1 << D_B_ON_STARTUP)

May only be set at startup.

Definition at line 79 of file types.h.

◆ D_NOT_EMPTY

#define D_NOT_EMPTY   (1 << D_B_NOT_EMPTY)

Empty strings are not allowed.

Definition at line 80 of file types.h.

◆ D_SENSITIVE

#define D_SENSITIVE   (1 << D_B_SENSITIVE)

Contains sensitive value, e.g. password.

Definition at line 81 of file types.h.

◆ D_L10N_STRING

#define D_L10N_STRING   (1 << D_B_L10N_STRING)

String can be localised.

Definition at line 82 of file types.h.

◆ D_CHARSET_SINGLE

#define D_CHARSET_SINGLE   (1 << D_B_CHARSET_SINGLE)

Flag for charset_validator to allow only one charset.

Definition at line 84 of file types.h.

◆ D_CHARSET_STRICT

#define D_CHARSET_STRICT   (1 << D_B_CHARSET_STRICT)

Flag for charset_validator to use strict char check.

Definition at line 85 of file types.h.

◆ D_INTERNAL_FREE_CONFIGDEF

#define D_INTERNAL_FREE_CONFIGDEF   (1 << D_B_INTERNAL_FREE_CONFIGDEF)

Config item must have its ConfigDef freed.

Definition at line 87 of file types.h.

◆ D_INTERNAL_DEPRECATED

#define D_INTERNAL_DEPRECATED   (1 << D_B_INTERNAL_DEPRECATED)

Config item shouldn't be used any more.

Definition at line 88 of file types.h.

◆ D_INTERNAL_INHERITED

#define D_INTERNAL_INHERITED   (1 << D_B_INTERNAL_INHERITED)

Config item is inherited.

Definition at line 89 of file types.h.

◆ D_INTERNAL_INITIAL_SET

#define D_INTERNAL_INITIAL_SET   (1 << D_B_INTERNAL_INITIAL_SET)

Config item must have its initial value freed.

Definition at line 90 of file types.h.

◆ D_CUSTOM_BIT_0

#define D_CUSTOM_BIT_0   (1 << D_B_CUSTOM_BIT_0)

Definition at line 92 of file types.h.

◆ D_CUSTOM_BIT_1

#define D_CUSTOM_BIT_1   (1 << D_B_CUSTOM_BIT_1)

Definition at line 93 of file types.h.

◆ D_CUSTOM_BIT_2

#define D_CUSTOM_BIT_2   (1 << D_B_CUSTOM_BIT_2)

Definition at line 94 of file types.h.

◆ D_CUSTOM_BIT_3

#define D_CUSTOM_BIT_3   (1 << D_B_CUSTOM_BIT_3)

Definition at line 95 of file types.h.

◆ D_CUSTOM_BIT_4

#define D_CUSTOM_BIT_4   (1 << D_B_CUSTOM_BIT_4)

Definition at line 96 of file types.h.

◆ D_STRING_MAILBOX

#define D_STRING_MAILBOX   D_CUSTOM_BIT_0

Don't perform path expansions.

Definition at line 98 of file types.h.

◆ D_STRING_COMMAND

#define D_STRING_COMMAND   D_CUSTOM_BIT_1

A command.

Definition at line 99 of file types.h.

◆ D_INTEGER_NOT_NEGATIVE

#define D_INTEGER_NOT_NEGATIVE   D_CUSTOM_BIT_0

Negative numbers are not allowed.

Definition at line 101 of file types.h.

◆ D_PATH_DIR

#define D_PATH_DIR   D_CUSTOM_BIT_0

Path is a directory.

Definition at line 103 of file types.h.

◆ D_PATH_FILE

#define D_PATH_FILE   D_CUSTOM_BIT_1

Path is a file.

Definition at line 104 of file types.h.

◆ D_REGEX_MATCH_CASE

#define D_REGEX_MATCH_CASE   D_CUSTOM_BIT_0

Case-sensitive matching.

Definition at line 106 of file types.h.

◆ D_REGEX_ALLOW_NOT

#define D_REGEX_ALLOW_NOT   D_CUSTOM_BIT_1

Regex can begin with '!'.

Definition at line 107 of file types.h.

◆ D_REGEX_NOSUB

#define D_REGEX_NOSUB   D_CUSTOM_BIT_2

Do not report what was matched (REG_NOSUB)

Definition at line 108 of file types.h.

◆ D_SLIST_SEP_SPACE

#define D_SLIST_SEP_SPACE   (0 << D_B_CUSTOM_BIT_0)

Slist items are space-separated.

Definition at line 110 of file types.h.

◆ D_SLIST_SEP_COMMA

#define D_SLIST_SEP_COMMA   (1 << D_B_CUSTOM_BIT_0)

Slist items are comma-separated.

Definition at line 111 of file types.h.

◆ D_SLIST_SEP_COLON

#define D_SLIST_SEP_COLON   (2 << D_B_CUSTOM_BIT_0)

Slist items are colon-separated.

Definition at line 112 of file types.h.

◆ D_SLIST_SEP_MASK

#define D_SLIST_SEP_MASK   (D_CUSTOM_BIT_0 | D_CUSTOM_BIT_1)

Definition at line 113 of file types.h.

◆ D_SLIST_ALLOW_DUPES

#define D_SLIST_ALLOW_DUPES   D_CUSTOM_BIT_2

Slist may contain duplicates.

Definition at line 115 of file types.h.

◆ D_SLIST_ALLOW_EMPTY

#define D_SLIST_ALLOW_EMPTY   D_CUSTOM_BIT_3

Slist may be empty.

Definition at line 116 of file types.h.

◆ D_SLIST_CASE_SENSITIVE

#define D_SLIST_CASE_SENSITIVE   D_CUSTOM_BIT_4

Slist is case-sensitive.

Definition at line 117 of file types.h.

◆ D_SORT_LAST

#define D_SORT_LAST   D_CUSTOM_BIT_0

Sort flag for -last prefix.

Definition at line 119 of file types.h.

◆ D_SORT_REVERSE

#define D_SORT_REVERSE   D_CUSTOM_BIT_1

Sort flag for -reverse prefix.

Definition at line 120 of file types.h.

◆ IS_MAILBOX

#define IS_MAILBOX (   flags)    ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_MAILBOX))

Definition at line 122 of file types.h.

◆ IS_COMMAND

#define IS_COMMAND (   flags)    ((DTYPE(flags) == DT_STRING) && (flags & D_STRING_COMMAND))

Definition at line 123 of file types.h.

Enumeration Type Documentation

◆ ConfigType

enum ConfigType
Enumerator
DT_ADDRESS 

e-mail address

DT_BOOL 

boolean option

DT_ENUM 

an enumeration

DT_EXPANDO 

an expando

DT_HCACHE 

header cache backend

DT_LONG 

a number (long)

DT_MBTABLE 

multibyte char table

DT_MYVAR 

a user-defined variable (my_foo)

DT_NUMBER 

a number

DT_PATH 

a path to a file/directory

DT_QUAD 

quad-option (no/yes/ask-no/ask-yes)

DT_REGEX 

regular expressions

DT_SLIST 

a list of strings

DT_SORT 

sorting methods

DT_STRING 

a string

DT_SYNONYM 

synonym for another variable

DT_END 

Definition at line 29 of file types.h.

30{
32 DT_BOOL,
33 DT_ENUM,
35 DT_HCACHE,
36 DT_LONG,
38 DT_MYVAR,
39 DT_NUMBER,
40 DT_PATH,
41 DT_QUAD,
42 DT_REGEX,
43 DT_SLIST,
44 DT_SORT,
45 DT_STRING,
47 DT_END,
48};
@ 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

Enumerator
D_B_ON_STARTUP 

May only be set at startup.

D_B_NOT_EMPTY 

Empty strings are not allowed.

D_B_SENSITIVE 

Contains sensitive value, e.g. password.

D_B_L10N_STRING 

String can be localised.

D_B_CHARSET_SINGLE 

Flag for charset_validator to allow only one charset.

D_B_CHARSET_STRICT 

Flag for charset_validator to use strict char check.

D_B_INTERNAL_FREE_CONFIGDEF 

Config item must have its ConfigDef freed.

D_B_INTERNAL_DEPRECATED 

Config item shouldn't be used any more.

D_B_INTERNAL_INHERITED 

Config item is inherited.

D_B_INTERNAL_INITIAL_SET 

Config item must have its initial value freed.

D_B_CUSTOM_BIT_0 

1st flag available for customising config types

D_B_CUSTOM_BIT_1 

2nd flag available for customising config types

D_B_CUSTOM_BIT_2 

3rd flag available for customising config types

D_B_CUSTOM_BIT_3 

4th flag available for customising config types

D_B_CUSTOM_BIT_4 

5th flag available for customising config types

D_B_CUSTOM_BIT_5 

6th flag available for customising config types

D_B_CUSTOM_BIT_6 

7th flag available for customising config types

D_B_CUSTOM_BIT_7 

8th flag available for customising config types

D_B_END 

Definition at line 52 of file types.h.

53{
54 D_B_ON_STARTUP = 5,
58
61
66
75
76 D_B_END,
77};
@ 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