NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
config.c
Go to the documentation of this file.
1
29
#include "config.h"
30
#include <stddef.h>
31
#include <stdbool.h>
32
#include "
config/lib.h
"
33
37
static
struct
ConfigDef
HistoryVars
[] = {
38
// clang-format off
39
{
"history"
,
DT_NUMBER
|
DT_NOT_NEGATIVE
, 10, 0, NULL,
40
"Number of history entries to keep in memory per category"
41
},
42
{
"history_file"
,
DT_PATH
|
DT_PATH_FILE
,
IP
"~/.mutthistory"
, 0, NULL,
43
"File to save history in"
44
},
45
{
"history_remove_dups"
,
DT_BOOL
,
false
, 0, NULL,
46
"Remove duplicate entries from the history"
47
},
48
{
"save_history"
,
DT_NUMBER
|
DT_NOT_NEGATIVE
, 0, 0, NULL,
49
"Number of history entries to save per category"
50
},
51
{ NULL },
52
// clang-format on
53
};
54
58
bool
config_init_history
(
struct
ConfigSet
*cs)
59
{
60
return
cs_register_variables
(cs,
HistoryVars
,
DT_NO_FLAGS
);
61
}
lib.h
Convenience wrapper for the config headers.
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:279
IP
#define IP
Definition:
set.h:54
config_init_history
bool config_init_history(struct ConfigSet *cs)
Register history config variables - Implements module_init_config_t -.
Definition:
config.c:58
HistoryVars
static struct ConfigDef HistoryVars[]
Config definitions for the command history.
Definition:
config.c:37
ConfigDef
Definition:
set.h:64
ConfigSet
Container for lots of config items.
Definition:
set.h:252
DT_BOOL
#define DT_BOOL
boolean option
Definition:
types.h:30
DT_PATH_FILE
#define DT_PATH_FILE
Path is a file.
Definition:
types.h:57
DT_PATH
#define DT_PATH
a path to a file/directory
Definition:
types.h:36
DT_NO_FLAGS
#define DT_NO_FLAGS
No flags are set.
Definition:
types.h:47
DT_NOT_NEGATIVE
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition:
types.h:50
DT_NUMBER
#define DT_NUMBER
a number
Definition:
types.h:35