NeoMutt
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
init.h File Reference

Config/command parsing. More...

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

Go to the source code of this file.

Functions

void init_config (struct ConfigSet *cs)
 Initialise the config system.
 
int mutt_init (struct ConfigSet *cs, bool skip_sys_rc, struct ListHead *commands)
 Initialise NeoMutt.
 
void mutt_opts_cleanup (void)
 Clean up before quitting.
 
int mutt_query_variables (struct ListHead *queries, bool show_docs)
 Implement the -Q command line flag.
 

Detailed Description

Config/command parsing.

Authors
  • Michael R. Elkins
  • g10 Code GmbH

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

Function Documentation

◆ init_config()

void init_config ( struct ConfigSet cs)

Initialise the config system.

Parameters
csConfig items

Definition at line 728 of file mutt_config.c.

729{
730 init_types(cs);
731 init_variables(cs);
732}
static void init_types(struct ConfigSet *cs)
Create the config types.
Definition: mutt_config.c:662
static void init_variables(struct ConfigSet *cs)
Define the config variables.
Definition: mutt_config.c:683
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_init()

int mutt_init ( struct ConfigSet cs,
bool  skip_sys_rc,
struct ListHead *  commands 
)

Initialise NeoMutt.

Parameters
csConfig Set
skip_sys_rcIf true, don't read the system config file
commandsList of config commands to execute
Return values
0Success
1Error

Definition at line 321 of file init.c.

322{
323 int need_pause = 0;
324 int rc = 1;
325 struct Buffer err = buf_make(256);
326 struct Buffer buf = buf_make(256);
327
329 alias_init();
331 hooks_init();
332#ifdef USE_COMP_MBOX
334#endif
335#ifdef USE_IMAP
336 imap_init();
337#endif
338#ifdef USE_LUA
340#endif
342
343 menu_init();
344#ifdef USE_SIDEBAR
345 sb_init();
346#endif
347#ifdef USE_NOTMUCH
348 nm_init();
349#endif
350
351#ifdef NEOMUTT_DIRECT_COLORS
352 /* Test if we run in a terminal which supports direct colours.
353 *
354 * The user/terminal can indicate their capability independent of the
355 * terminfo file by setting the COLORTERM environment variable to "truecolor"
356 * or "24bit" (case sensitive).
357 *
358 * Note: This is to test is less about whether the terminal understands
359 * direct color commands but more about whether ncurses believes it can send
360 * them to the terminal, e.g. ncurses ignores COLORTERM.
361 */
362 if (COLORS == 16777216) // 2^24
363 {
364 /* Ncurses believes the Terminal supports it check the environment variable
365 * to respect the user's choice */
366 const char *env_colorterm = mutt_str_getenv("COLORTERM");
367 if (env_colorterm && (mutt_str_equal(env_colorterm, "truecolor") ||
368 mutt_str_equal(env_colorterm, "24bit")))
369 {
370 cs_str_initial_set(cs, "color_directcolor", "yes", NULL);
371 cs_str_reset(cs, "color_directcolor", NULL);
372 }
373 }
374#endif
375
376 /* "$spool_file" precedence: config file, environment */
377 const char *p = mutt_str_getenv("MAIL");
378 if (!p)
379 p = mutt_str_getenv("MAILDIR");
380 if (!p)
381 {
382#ifdef HOMESPOOL
383 buf_concat_path(&buf, NONULL(HomeDir), MAILPATH);
384#else
385 buf_concat_path(&buf, MAILPATH, NONULL(Username));
386#endif
387 p = buf_string(&buf);
388 }
389 cs_str_initial_set(cs, "spool_file", p, NULL);
390 cs_str_reset(cs, "spool_file", NULL);
391
392 p = mutt_str_getenv("REPLYTO");
393 if (p)
394 {
395 struct Buffer token;
396
397 buf_printf(&buf, "Reply-To: %s", p);
398 buf_init(&token);
399 parse_my_hdr(&token, &buf, 0, &err); /* adds to UserHeader */
400 FREE(&token.data);
401 }
402
403 p = mutt_str_getenv("EMAIL");
404 if (p)
405 {
406 cs_str_initial_set(cs, "from", p, NULL);
407 cs_str_reset(cs, "from", NULL);
408 }
409
410 /* "$mailcap_path" precedence: config file, environment, code */
411 const char *env_mc = mutt_str_getenv("MAILCAPS");
412 if (env_mc)
413 {
414 cs_str_initial_set(cs, "mailcap_path", env_mc, NULL);
415 cs_str_reset(cs, "mailcap_path", NULL);
416 }
417
418 /* "$tmp_dir" precedence: config file, environment, code */
419 const char *env_tmp = mutt_str_getenv("TMPDIR");
420 if (env_tmp)
421 {
422 cs_str_initial_set(cs, "tmp_dir", env_tmp, NULL);
423 cs_str_reset(cs, "tmp_dir", NULL);
424 }
425
426 /* "$visual", "$editor" precedence: config file, environment, code */
427 const char *env_ed = mutt_str_getenv("VISUAL");
428 if (!env_ed)
429 env_ed = mutt_str_getenv("EDITOR");
430 if (!env_ed)
431 env_ed = "vi";
432 cs_str_initial_set(cs, "editor", env_ed, NULL);
433
434 const char *const c_editor = cs_subset_string(NeoMutt->sub, "editor");
435 if (!c_editor)
436 cs_str_reset(cs, "editor", NULL);
437
438 const char *charset = mutt_ch_get_langinfo_charset();
439 cs_str_initial_set(cs, "charset", charset, NULL);
440 cs_str_reset(cs, "charset", NULL);
441 mutt_ch_set_charset(charset);
442 FREE(&charset);
443
444#ifdef HAVE_GETSID
445 /* Unset suspend by default if we're the session leader */
446 if (getsid(0) == getpid())
447 {
448 cs_str_initial_set(cs, "suspend", "no", NULL);
449 cs_str_reset(cs, "suspend", NULL);
450 }
451#endif
452
453 /* RFC2368, "4. Unsafe headers"
454 * The creator of a mailto URL can't expect the resolver of a URL to
455 * understand more than the "subject" and "body" headers. Clients that
456 * resolve mailto URLs into mail messages should be able to correctly
457 * create RFC822-compliant mail messages using the "subject" and "body"
458 * headers. */
459 add_to_stailq(&MailToAllow, "body");
460 add_to_stailq(&MailToAllow, "subject");
461 /* Cc, In-Reply-To, and References help with not breaking threading on
462 * mailing lists, see https://github.com/neomutt/neomutt/issues/115 */
464 add_to_stailq(&MailToAllow, "in-reply-to");
465 add_to_stailq(&MailToAllow, "references");
466
467 if (STAILQ_EMPTY(&Muttrc))
468 {
469 const char *xdg_cfg_home = mutt_str_getenv("XDG_CONFIG_HOME");
470
471 if (!xdg_cfg_home && HomeDir)
472 {
473 buf_printf(&buf, "%s/.config", HomeDir);
474 xdg_cfg_home = buf_string(&buf);
475 }
476
477 char *config = find_cfg(HomeDir, xdg_cfg_home);
478 if (config)
479 {
481 }
482 }
483 else
484 {
485 struct ListNode *np = NULL;
486 STAILQ_FOREACH(np, &Muttrc, entries)
487 {
488 buf_strcpy(&buf, np->data);
489 FREE(&np->data);
490 buf_expand_path(&buf);
491 np->data = buf_strdup(&buf);
492 if (access(np->data, F_OK))
493 {
494 mutt_perror("%s", np->data);
495 goto done; // TEST10: neomutt -F missing
496 }
497 }
498 }
499
500 if (!STAILQ_EMPTY(&Muttrc))
501 {
502 cs_str_string_set(cs, "alias_file", STAILQ_FIRST(&Muttrc)->data, NULL);
503 }
504
505 /* Process the global rc file if it exists and the user hasn't explicitly
506 * requested not to via "-n". */
507 if (!skip_sys_rc)
508 {
509 do
510 {
512 break;
513
514 buf_printf(&buf, "%s/neomuttrc", SYSCONFDIR);
515 if (access(buf_string(&buf), F_OK) == 0)
516 break;
517
518 buf_printf(&buf, "%s/Muttrc", SYSCONFDIR);
519 if (access(buf_string(&buf), F_OK) == 0)
520 break;
521
522 buf_printf(&buf, "%s/neomuttrc", PKGDATADIR);
523 if (access(buf_string(&buf), F_OK) == 0)
524 break;
525
526 buf_printf(&buf, "%s/Muttrc", PKGDATADIR);
527 } while (false);
528
529 if (access(buf_string(&buf), F_OK) == 0)
530 {
531 if (source_rc(buf_string(&buf), &err) != 0)
532 {
533 mutt_error("%s", err.data);
534 need_pause = 1; // TEST11: neomutt (error in /etc/neomuttrc)
535 }
536 }
537 }
538
539 /* Read the user's initialization file. */
540 struct ListNode *np = NULL;
541 STAILQ_FOREACH(np, &Muttrc, entries)
542 {
543 if (np->data)
544 {
545 if (source_rc(np->data, &err) != 0)
546 {
547 mutt_error("%s", err.data);
548 need_pause = 1; // TEST12: neomutt (error in ~/.neomuttrc)
549 }
550 }
551 }
552
553 if (execute_commands(commands) != 0)
554 need_pause = 1; // TEST13: neomutt -e broken
555
556 if (!get_hostname(cs))
557 goto done;
558
559 char name[256] = { 0 };
560 const char *c_real_name = cs_subset_string(NeoMutt->sub, "real_name");
561 if (!c_real_name)
562 {
563 struct passwd *pw = getpwuid(getuid());
564 if (pw)
565 {
566 c_real_name = mutt_gecos_name(name, sizeof(name), pw);
567 }
568 }
569 cs_str_initial_set(cs, "real_name", c_real_name, NULL);
570 cs_str_reset(cs, "real_name", NULL);
571
572 if (need_pause && !OptNoCurses)
573 {
575 if (mutt_any_key_to_continue(NULL) == 'q')
576 goto done; // TEST14: neomutt -e broken (press 'q')
577 }
578
579 const char *const c_tmp_dir = cs_subset_path(NeoMutt->sub, "tmp_dir");
580 if (mutt_file_mkdir(c_tmp_dir, S_IRWXU) < 0)
581 {
582 mutt_error(_("Can't create %s: %s"), c_tmp_dir, strerror(errno));
583 goto done;
584 }
585
588
589#ifdef USE_NOTMUCH
590 const bool c_virtual_spool_file = cs_subset_bool(NeoMutt->sub, "virtual_spool_file");
591 if (c_virtual_spool_file)
592 {
593 /* Find the first virtual folder and open it */
594 struct MailboxList ml = STAILQ_HEAD_INITIALIZER(ml);
596 struct MailboxNode *mp = STAILQ_FIRST(&ml);
597 if (mp)
598 cs_str_string_set(cs, "spool_file", mailbox_path(mp->mailbox), NULL);
600 }
601#endif
602 rc = 0;
603
604done:
605 buf_dealloc(&err);
606 buf_dealloc(&buf);
607 return rc;
608}
void alias_init(void)
Set up the Alias globals.
Definition: alias.c:679
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
Definition: buffer.c:173
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
Definition: buffer.c:389
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
Definition: buffer.c:70
struct Buffer * buf_init(struct Buffer *buf)
Initialise a new Buffer.
Definition: buffer.c:55
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
Definition: buffer.c:407
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
Definition: buffer.c:542
size_t buf_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
Definition: buffer.c:484
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Definition: buffer.h:93
void commands_init(void)
Initialize commands array and register default commands.
Definition: commands.c:1702
int source_rc(const char *rcfile_path, struct Buffer *err)
Read an initialization file.
Definition: commands.c:200
void mutt_comp_init(void)
Setup feature commands.
Definition: compress.c:73
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Definition: helpers.c:292
const char * cs_subset_path(const struct ConfigSubset *sub, const char *name)
Get a path config item by name.
Definition: helpers.c:169
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
Definition: helpers.c:48
char * HomeDir
User's home directory.
Definition: globals.c:39
int cs_str_initial_set(const struct ConfigSet *cs, const char *name, const char *value, struct Buffer *err)
Set the initial value of a config item.
Definition: set.c:502
int cs_str_reset(const struct ConfigSet *cs, const char *name, struct Buffer *err)
Reset a config item to its initial value.
Definition: set.c:437
int cs_str_string_set(const struct ConfigSet *cs, const char *name, const char *value, struct Buffer *err)
Set a config item by string.
Definition: set.c:639
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
Definition: curs_lib.c:188
struct ListHead MailToAllow
List of regexes to identify non-spam emails.
Definition: globals.c:41
int mutt_file_mkdir(const char *path, mode_t mode)
Recursively create directories.
Definition: file.c:977
bool OptNoCurses
(pseudo) when sending in batch mode
Definition: globals.c:79
struct ListHead Muttrc
List of config files to read.
Definition: globals.c:53
char * Username
User's login name.
Definition: globals.c:42
void mutt_grouplist_init(void)
Initialize the GroupList singleton.
Definition: group.c:95
enum CommandResult parse_my_hdr(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'my_hdr' command - Implements Command::parse() -.
Definition: commands.c:809
int log_disp_terminal(time_t stamp, const char *file, int line, const char *function, enum LogLevel level, const char *format,...)
Save a log line to the terminal - Implements log_dispatcher_t -.
Definition: logging.c:440
#define mutt_error(...)
Definition: logging2.h:92
#define mutt_perror(...)
Definition: logging2.h:93
void mutt_hist_read_file(void)
Read the History from a file.
Definition: history.c:595
void mutt_hist_init(void)
Create a set of empty History ring buffers.
Definition: history.c:467
void hooks_init(void)
Setup feature commands.
Definition: hook.c:1017
void imap_init(void)
Setup feature commands.
Definition: imap.c:88
static char * find_cfg(const char *home, const char *xdg_cfg_home)
Find a config file.
Definition: init.c:112
static int execute_commands(struct ListHead *p)
Execute a set of NeoMutt commands.
Definition: init.c:80
static bool get_hostname(struct ConfigSet *cs)
Find the Fully-Qualified Domain Name.
Definition: init.c:186
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
Definition: list.c:64
void log_queue_flush(log_dispatcher_t disp)
Replay the log queue.
Definition: logging.c:345
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
Definition: mailbox.h:210
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
Definition: mailbox.h:51
#define FREE(x)
Definition: memory.h:45
void menu_init(void)
Initialise all the Menus.
Definition: menu.c:75
char * mutt_ch_get_langinfo_charset(void)
Get the user's choice of character set.
Definition: charset.c:481
void mutt_ch_set_charset(const char *charset)
Update the records for a new character set.
Definition: charset.c:1073
#define _(a)
Definition: message.h:28
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
Definition: string.c:798
const char * mutt_str_getenv(const char *name)
Get an environment variable.
Definition: string.c:918
void mutt_lua_init(void)
Setup feature commands.
Definition: mutt_lua.c:465
char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw)
Lookup a user's real name in /etc/passwd.
Definition: muttlib.c:374
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
Definition: muttlib.c:1697
int mutt_set_xdg_path(enum XdgType type, struct Buffer *buf)
Find an XDG path or its fallback.
Definition: muttlib.c:1482
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
Definition: muttlib.c:335
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
Definition: neomutt.c:162
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
Definition: neomutt.c:185
void nm_init(void)
Setup feature commands.
Definition: notmuch.c:100
@ XDG_CONFIG_DIRS
XDG system dir: /etc/xdg.
Definition: protos.h:44
#define STAILQ_HEAD_INITIALIZER(head)
Definition: queue.h:324
#define STAILQ_FIRST(head)
Definition: queue.h:350
#define STAILQ_FOREACH(var, head, field)
Definition: queue.h:352
#define STAILQ_EMPTY(head)
Definition: queue.h:348
void sb_init(void)
Set up the Sidebar.
Definition: sidebar.c:201
#define NONULL(x)
Definition: string2.h:37
String manipulation buffer.
Definition: buffer.h:34
char * data
Pointer to data.
Definition: buffer.h:35
A List node for strings.
Definition: list.h:35
char * data
String.
Definition: list.h:36
List of Mailboxes.
Definition: mailbox.h:153
struct Mailbox * mailbox
Mailbox in the list.
Definition: mailbox.h:154
Container for Accounts, Notifications.
Definition: neomutt.h:41
struct ConfigSubset * sub
Inherited config items.
Definition: neomutt.h:45
void driver_tags_init(void)
Initialize structures used for tags.
Definition: tags.c:218
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_opts_cleanup()

void mutt_opts_cleanup ( void  )

Clean up before quitting.

Definition at line 265 of file init.c.

266{
268
270#ifdef USE_SIDEBAR
271 sb_cleanup();
272#endif
273
279
282
283 /* Lists of strings */
293
295
297 FREE(&HomeDir);
300 FREE(&Username);
301
303
305
308
311}
void alias_cleanup(void)
Clean up the Alias globals.
Definition: alias.c:687
void mutt_colors_cleanup(void)
Cleanup all the colours.
Definition: color.c:79
void source_stack_cleanup(void)
Free memory from the stack used for the source command.
Definition: commands.c:1626
void commands_cleanup(void)
Free Commands array.
Definition: command.c:65
struct ReplaceList SpamList
List of regexes to match subscribed mailing lists.
Definition: globals.c:45
struct RegexList SubscribedLists
List of header patterns to unignore (see)
Definition: globals.c:47
struct RegexList UnSubscribedLists
Definition: globals.c:53
struct RegexList UnMailLists
List of regexes to exclude false matches in SubscribedLists.
Definition: globals.c:51
struct RegexList MailLists
List of permitted fields in a mailto: url.
Definition: globals.c:39
struct ListHead Ignore
List of regexes to match mailing lists.
Definition: globals.c:37
struct RegexList NoSpamList
List of regexes and patterns to match spam emails.
Definition: globals.c:43
struct ListHead UnIgnore
List of regexes to exclude false matches in MailLists.
Definition: globals.c:49
char * LastFolder
Previously selected mailbox.
Definition: globals.c:45
char * ShortHostname
Short version of the hostname.
Definition: globals.c:40
struct ListHead MimeLookupList
List of mime types that that shouldn't use the mailcap entry.
Definition: globals.c:52
struct ListHead AlternativeOrderList
List of preferred mime types to display.
Definition: globals.c:49
struct ListHead AutoViewList
List of mime types to auto view.
Definition: globals.c:50
char * CurrentFolder
Currently selected mailbox.
Definition: globals.c:44
struct ListHead UserHeader
List of custom headers to add to outgoing emails.
Definition: globals.c:55
struct ListHead HeaderOrderList
List of header fields in the order they should be displayed.
Definition: globals.c:51
void mutt_grouplist_cleanup(void)
Free GroupList singleton resource.
Definition: group.c:107
void mutt_hist_cleanup(void)
Free all the history lists.
Definition: history.c:440
void mutt_delete_hooks(HookFlags type)
Delete matching hooks.
Definition: hook.c:366
#define MUTT_HOOK_NO_FLAGS
No flags are set.
Definition: hook.h:37
void mutt_keys_cleanup(void)
Free the key maps.
Definition: init.c:230
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
Definition: list.c:122
void mutt_regexlist_free(struct RegexList *rl)
Free a RegexList object.
Definition: regex.c:175
void mutt_replacelist_free(struct ReplaceList *rl)
Free a ReplaceList object.
Definition: regex.c:472
void sb_cleanup(void)
Clean up the Sidebar.
Definition: sidebar.c:213
void driver_tags_cleanup(void)
Deinitialize structures used for tags.
Definition: tags.c:230
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_query_variables()

int mutt_query_variables ( struct ListHead *  queries,
bool  show_docs 
)

Implement the -Q command line flag.

Parameters
queriesList of query strings
show_docsIf true, show one-liner docs for the config item
Return values
0Success, all queries exist
1Error

Definition at line 617 of file init.c.

618{
619 struct Buffer value = buf_make(256);
620 struct Buffer tmp = buf_make(256);
621 int rc = 0;
622
623 struct ListNode *np = NULL;
624 STAILQ_FOREACH(np, queries, entries)
625 {
626 buf_reset(&value);
627
628 struct HashElem *he = cs_subset_lookup(NeoMutt->sub, np->data);
629 if (he)
630 {
631 if (he->type & DT_DEPRECATED)
632 {
633 mutt_warning(_("Config variable '%s' is deprecated"), np->data);
634 rc = 1;
635 continue;
636 }
637
638 int rv = cs_subset_he_string_get(NeoMutt->sub, he, &value);
639 if (CSR_RESULT(rv) != CSR_SUCCESS)
640 {
641 rc = 1;
642 continue;
643 }
644
645 int type = DTYPE(he->type);
646 if (type == DT_PATH)
647 mutt_pretty_mailbox(value.data, value.dsize);
648
649 if ((type != DT_BOOL) && (type != DT_NUMBER) && (type != DT_LONG) && (type != DT_QUAD))
650 {
651 buf_reset(&tmp);
652 pretty_var(value.data, &tmp);
653 buf_strcpy(&value, tmp.data);
654 }
655
656 dump_config_neo(NeoMutt->sub->cs, he, &value, NULL,
657 show_docs ? CS_DUMP_SHOW_DOCS : CS_DUMP_NO_FLAGS, stdout);
658 continue;
659 }
660
661 mutt_warning(_("No such variable: %s"), np->data);
662 rc = 1;
663 }
664
665 buf_dealloc(&value);
666 buf_dealloc(&tmp);
667
668 return rc; // TEST16: neomutt -Q charset
669}
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
Definition: buffer.c:88
size_t pretty_var(const char *str, struct Buffer *buf)
Escape and stringify a config item value.
Definition: dump.c:83
void dump_config_neo(struct ConfigSet *cs, struct HashElem *he, struct Buffer *value, struct Buffer *initial, ConfigDumpFlags flags, FILE *fp)
Dump the config in the style of NeoMutt.
Definition: dump.c:106
void mutt_pretty_mailbox(char *buf, size_t buflen)
Shorten a mailbox path using '~' or '='.
Definition: muttlib.c:483
#define CSR_RESULT(x)
Definition: set.h:52
#define CSR_SUCCESS
Action completed successfully.
Definition: set.h:35
#define CS_DUMP_NO_FLAGS
No flags are set.
Definition: dump.h:35
#define CS_DUMP_SHOW_DOCS
Show one-liner documentation for the config item.
Definition: dump.h:45
#define mutt_warning(...)
Definition: logging2.h:90
size_t dsize
Length of data.
Definition: buffer.h:37
struct ConfigSet * cs
Parent ConfigSet.
Definition: subset.h:51
The item stored in a Hash Table.
Definition: hash.h:44
int type
Type of data stored in Hash Table, e.g. DT_STRING.
Definition: hash.h:45
int cs_subset_he_string_get(const struct ConfigSubset *sub, struct HashElem *he, struct Buffer *result)
Get a config item as a string.
Definition: subset.c:353
struct HashElem * cs_subset_lookup(const struct ConfigSubset *sub, const char *name)
Find an inherited config item.
Definition: subset.c:178
#define DTYPE(x)
Mask for the Data Type.
Definition: types.h:45
#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_DEPRECATED
Config item shouldn't be used any more.
Definition: types.h:77
#define DT_PATH
a path to a file/directory
Definition: types.h:36
#define DT_NUMBER
a number
Definition: types.h:35
+ Here is the call graph for this function:
+ Here is the caller graph for this function: