NeoMutt  2021-02-05-89-gabe350
Teaching an old dog new tricks
DOXYGEN
config.c
Go to the documentation of this file.
1 
29 #include "config.h"
30 #include <stddef.h>
31 #include <config/lib.h>
32 #include <stdbool.h>
33 #include "lib.h"
34 
35 // clang-format off
37 char *C_PatternFormat = NULL;
39 // clang-format on
40 
41 struct ConfigDef PatternVars[] = {
42  // clang-format off
43  { "external_search_command", DT_STRING|DT_COMMAND, &C_ExternalSearchCommand, 0, 0, NULL,
44  "External search command"
45  },
46  { "pattern_format", DT_STRING, &C_PatternFormat, IP "%2n %-15e %d", 0, NULL,
47  "printf-like format string for the pattern completion menu"
48  },
49  { "thorough_search", DT_BOOL, &C_ThoroughSearch, true, 0, NULL,
50  "Decode headers and messages before searching them"
51  },
52  { NULL, 0, NULL, 0, 0, NULL, NULL },
53  // clang-format on
54 };
55 
60 {
61  return cs_register_variables(cs, PatternVars, 0);
62 }
IP
#define IP
Definition: set.h:54
DT_STRING
#define DT_STRING
a string
Definition: types.h:41
PatternVars
struct ConfigDef PatternVars[]
Definition: config.c:41
cs_register_variables
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:286
lib.h
C_ExternalSearchCommand
char * C_ExternalSearchCommand
Config: External search command.
Definition: config.c:36
DT_BOOL
#define DT_BOOL
boolean option
Definition: types.h:30
ConfigDef
Config item definition.
Definition: set.h:61
ConfigSet
Container for lots of config items.
Definition: set.h:228
C_ThoroughSearch
bool C_ThoroughSearch
Config: Decode headers and messages before searching them.
Definition: config.c:38
C_PatternFormat
char * C_PatternFormat
Config: printf-like format string for the pattern completion menu.
Definition: config.c:37
DT_COMMAND
#define DT_COMMAND
A command.
Definition: types.h:50
config_init_pattern
bool config_init_pattern(struct ConfigSet *cs)
Register pattern config variables - Implements module_init_config_t.
Definition: config.c:59