NeoMutt  2021-02-05-666-ge300cd
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 
34 static struct ConfigDef HistoryVars[] = {
35  // clang-format off
36  { "history", DT_NUMBER|DT_NOT_NEGATIVE, 10, 0, NULL,
37  "Number of history entries to keep in memory per category"
38  },
39  { "history_file", DT_PATH|DT_PATH_FILE, IP "~/.mutthistory", 0, NULL,
40  "File to save history in"
41  },
42  { "history_remove_dups", DT_BOOL, false, 0, NULL,
43  "Remove duplicate entries from the history"
44  },
45  { "save_history", DT_NUMBER|DT_NOT_NEGATIVE, 0, 0, NULL,
46  "Number of history entries to save per category"
47  },
48  { NULL },
49  // clang-format on
50 };
51 
56 {
57  return cs_register_variables(cs, HistoryVars, 0);
58 }
Container for lots of config items.
Definition: set.h:259
#define IP
Definition: set.h:54
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:47
Definition: set.h:63
Convenience wrapper for the config headers.
bool cs_register_variables(const struct ConfigSet *cs, struct ConfigDef vars[], uint32_t flags)
Register a set of config items.
Definition: set.c:276
bool config_init_history(struct ConfigSet *cs)
Register history config variables - Implements module_init_config_t -.
Definition: config.c:55
#define DT_PATH_FILE
Path is a file.
Definition: types.h:54
#define DT_PATH
a path to a file/directory
Definition: types.h:36
#define DT_NUMBER
a number
Definition: types.h:35
#define DT_BOOL
boolean option
Definition: types.h:30