NeoMutt  2023-05-17-16-g61469c
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
37static struct ConfigDef NntpVars[] = {
38 // clang-format off
39 { "catchup_newsgroup", DT_QUAD, MUTT_ASKYES, 0, NULL,
40 "(nntp) Mark all articles as read when leaving a newsgroup"
41 },
42 { "followup_to_poster", DT_QUAD, MUTT_ASKYES, 0, NULL,
43 "(nntp) Reply to the poster if 'poster' is in the 'Followup-To' header"
44 },
45 { "newsgroups_charset", DT_STRING, IP "utf-8", 0, charset_validator,
46 "(nntp) Character set of newsgroups' descriptions"
47 },
48 { "newsrc", DT_PATH|DT_PATH_FILE, IP "~/.newsrc", 0, NULL,
49 "(nntp) File containing list of subscribed newsgroups"
50 },
51 { "news_cache_dir", DT_PATH|DT_PATH_DIR, IP "~/.neomutt", 0, NULL,
52 "(nntp) Directory for cached news articles"
53 },
54 { "news_server", DT_STRING, 0, 0, NULL,
55 "(nntp) Url of the news server"
56 },
57 { "nntp_authenticators", DT_STRING, 0, 0, NULL,
58 "(nntp) Allowed authentication methods"
59 },
60 { "nntp_context", DT_LONG|DT_NOT_NEGATIVE, 1000, 0, NULL,
61 "(nntp) Maximum number of articles to list (0 for all articles)"
62 },
63 { "nntp_listgroup", DT_BOOL, true, 0, NULL,
64 "(nntp) Check all articles when opening a newsgroup"
65 },
66 { "nntp_load_description", DT_BOOL, true, 0, NULL,
67 "(nntp) Load descriptions for newsgroups when adding to the list"
68 },
69 { "nntp_pass", DT_STRING|DT_SENSITIVE, 0, 0, NULL,
70 "(nntp) Password for the news server"
71 },
72 { "nntp_poll", DT_NUMBER|DT_NOT_NEGATIVE, 60, 0, NULL,
73 "(nntp) Interval between checks for new posts"
74 },
75 { "nntp_user", DT_STRING|DT_SENSITIVE, 0, 0, NULL,
76 "(nntp) Username for the news server"
77 },
78 { "post_moderated", DT_QUAD, MUTT_ASKYES, 0, NULL,
79 "(nntp) Allow posting to moderated newsgroups"
80 },
81 { "save_unsubscribed", DT_BOOL, false, 0, NULL,
82 "(nntp) Save a list of unsubscribed newsgroups to the 'newsrc'"
83 },
84 { "show_new_news", DT_BOOL, true, 0, NULL,
85 "(nntp) Check for new newsgroups when entering the browser"
86 },
87 { "x_comment_to", DT_BOOL, false, 0, NULL,
88 "(nntp) Add 'X-Comment-To' header that contains article author"
89 },
90 { NULL },
91 // clang-format on
92};
93
98{
100}
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:279
#define IP
Definition: set.h:54
int charset_validator(const struct ConfigSet *cs, const struct ConfigDef *cdef, intptr_t value, struct Buffer *err)
Validate the "charset" config variable - Implements ConfigDef::validator() -.
Definition: charset.c:40
bool config_init_nntp(struct ConfigSet *cs)
Register nntp config variables - Implements module_init_config_t -.
Definition: config.c:97
static struct ConfigDef NntpVars[]
Config definitions for the NNTP library.
Definition: config.c:37
@ MUTT_ASKYES
Ask the user, defaulting to 'Yes'.
Definition: quad.h:41
Definition: set.h:64
Container for lots of config items.
Definition: set.h:252
#define DT_QUAD
quad-option (no/yes/ask-no/ask-yes)
Definition: types.h:37
#define DT_LONG
a number (long)
Definition: types.h:33
#define DT_BOOL
boolean option
Definition: types.h:30
#define DT_PATH_DIR
Path is a directory.
Definition: types.h:56
#define DT_PATH_FILE
Path is a file.
Definition: types.h:57
#define DT_PATH
a path to a file/directory
Definition: types.h:36
#define DT_STRING
a string
Definition: types.h:41
#define DT_NO_FLAGS
No flags are set.
Definition: types.h:47
#define DT_NOT_NEGATIVE
Negative numbers are not allowed.
Definition: types.h:50
#define DT_SENSITIVE
Contains sensitive value, e.g. password.
Definition: types.h:52
#define DT_NUMBER
a number
Definition: types.h:35