321{
322 int need_pause = 0;
323 int rc = 1;
326
331#ifdef USE_COMP_MBOX
333#endif
334#ifdef USE_IMAP
336#endif
337#ifdef USE_LUA
339#endif
341
343#ifdef USE_SIDEBAR
345#endif
346#ifdef USE_NOTMUCH
348#endif
349
350#ifdef NEOMUTT_DIRECT_COLORS
351
352
353
354
355
356
357
358
359
360
361 if (COLORS == 16777216)
362 {
363
364
366 if (env_colorterm && (
mutt_str_equal(env_colorterm,
"truecolor") ||
368 {
370 }
371 }
372#endif
373
374
376 if (!p)
378 if (!p)
379 {
380#ifdef HOMESPOOL
382#else
384#endif
386 }
389
391 if (p)
392 {
394
399 }
400
402 if (p)
403 {
406 }
407
408
410 if (env_mc)
411 {
414 }
415
416
418 if (env_tmp)
419 {
422 }
423
424
426 if (!env_ed)
428 if (!env_ed)
429 env_ed = "vi";
431
433 if (!c_editor)
435
441
442#ifdef HAVE_GETSID
443
444 if (getsid(0) == getpid())
445 {
448 }
449#endif
450
451
452
453
454
455
456
459
460
464
466 {
468
470 {
473 }
474
476 if (config)
477 {
479 }
480 }
481 else
482 {
485 {
490 if (access(np->
data, F_OK))
491 {
493 goto done;
494 }
495 }
496 }
497
499 {
501 }
502
503
504
505 if (!skip_sys_rc)
506 {
507 do
508 {
510 break;
511
514 break;
515
518 break;
519
522 break;
523
525 } while (false);
526
528 {
530 {
532 need_pause = 1;
533 }
534 }
535 }
536
537
540 {
542 {
544 {
546 need_pause = 1;
547 }
548 }
549 }
550
552 need_pause = 1;
553
555 goto done;
556
557 {
558 char name[256] = { 0 };
560 if (!c_real_name)
561 {
562 struct passwd *pw = getpwuid(getuid());
563 if (pw)
564 {
566 }
567 }
570 }
571
573 {
576 goto done;
577 }
578
581
584
585#ifdef USE_NOTMUCH
587 if (c_virtual_spool_file)
588 {
589
593 if (mp)
596 }
597#endif
598 rc = 0;
599
600done:
603 return rc;
604}
void alias_init(void)
Set up the Alias globals.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void buf_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
struct Buffer buf_make(size_t size)
Make a new buffer on the stack.
struct Buffer * buf_init(struct Buffer *buf)
Initialise a new Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
size_t buf_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
void commands_init(void)
Initialize commands array and register default commands.
int source_rc(const char *rcfile_path, struct Buffer *err)
Read an initialization file.
void mutt_comp_init(void)
Setup feature commands.
const char * cs_subset_path(const struct ConfigSubset *sub, const char *name)
Get a path config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
int cs_str_string_set(const struct ConfigSet *cs, const char *name, const char *value, struct Buffer *err)
Set a config item by string.
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
int mutt_file_mkdir(const char *path, mode_t mode)
Recursively create directories.
bool OptNoCurses
(pseudo) when sending in batch mode
void mutt_grouplist_init(void)
Initialize the GroupList singleton.
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() -.
int log_disp_terminal(time_t stamp, const char *file, int line, const char *function, enum LogLevel level,...)
Save a log line to the terminal - Implements log_dispatcher_t -.
void mutt_hist_read_file(void)
Read the History from a file.
void mutt_hist_init(void)
Create a set of empty History ring buffers.
void hooks_init(void)
Setup feature commands.
void imap_init(void)
Setup feature commands.
static char * find_cfg(const char *home, const char *xdg_cfg_home)
Find a config file.
static int execute_commands(struct ListHead *p)
Execute a set of NeoMutt commands.
static bool get_hostname(struct ConfigSet *cs)
Find the Fully-Qualified Domain Name.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
void log_queue_flush(log_dispatcher_t disp)
Replay the log queue.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
char * mutt_ch_get_langinfo_charset(void)
Get the user's choice of character set.
void mutt_ch_set_charset(const char *charset)
Update the records for a new character set.
bool mutt_str_equal(const char *a, const char *b)
Compare two strings.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
void mutt_lua_init(void)
Setup feature commands.
char * mutt_gecos_name(char *dest, size_t destlen, struct passwd *pw)
Lookup a user's real name in /etc/passwd.
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
int mutt_set_xdg_path(enum XdgType type, struct Buffer *buf)
Find an XDG path or its fallback.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
void nm_init(void)
Setup feature commands.
@ XDG_CONFIG_DIRS
XDG system dir: /etc/xdg.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_EMPTY(head)
char * data
Pointer to data.
struct Mailbox * mailbox
Mailbox in the list.
int cs_subset_str_native_set(const struct ConfigSubset *sub, const char *name, intptr_t value, struct Buffer *err)
Natively set the value of a string config item.