322{
323 int need_pause = 0;
324 int rc = 1;
327
332#ifdef USE_COMP_MBOX
334#endif
335#ifdef USE_IMAP
337#endif
338#ifdef USE_LUA
340#endif
342
344#ifdef USE_SIDEBAR
346#endif
347#ifdef USE_NOTMUCH
349#endif
350
351#ifdef NEOMUTT_DIRECT_COLORS
352
353
354
355
356
357
358
359
360
361
362 if (COLORS == 16777216)
363 {
364
365
367 if (env_colorterm && (
mutt_str_equal(env_colorterm,
"truecolor") ||
369 {
372 }
373 }
374#endif
375
376
378 if (!p)
380 if (!p)
381 {
382#ifdef HOMESPOOL
384#else
386#endif
388 }
391
393 if (p)
394 {
396
401 }
402
404 if (p)
405 {
408 }
409
410
412 if (env_mc)
413 {
416 }
417
418
420 if (env_tmp)
421 {
424 }
425
426
428 if (!env_ed)
430 if (!env_ed)
431 env_ed = "vi";
433
435 if (!c_editor)
437
443
444#ifdef HAVE_GETSID
445
446 if (getsid(0) == getpid())
447 {
450 }
451#endif
452
453
454
455
456
457
458
461
462
466
468 {
470
472 {
475 }
476
478 if (config)
479 {
481 }
482 }
483 else
484 {
487 {
492 if (access(np->
data, F_OK))
493 {
495 goto done;
496 }
497 }
498 }
499
501 {
503 }
504
505
506
507 if (!skip_sys_rc)
508 {
509 do
510 {
512 break;
513
516 break;
517
520 break;
521
524 break;
525
527 } while (false);
528
530 {
532 {
534 need_pause = 1;
535 }
536 }
537 }
538
539
542 {
544 {
546 {
548 need_pause = 1;
549 }
550 }
551 }
552
554 need_pause = 1;
555
557 goto done;
558
559 char name[256] = { 0 };
561 if (!c_real_name)
562 {
563 struct passwd *pw = getpwuid(getuid());
564 if (pw)
565 {
567 }
568 }
571
573 {
576 goto done;
577 }
578
581 {
582 mutt_error(
_(
"Can't create %s: %s"), c_tmp_dir, strerror(errno));
583 goto done;
584 }
585
588
589#ifdef USE_NOTMUCH
591 if (c_virtual_spool_file)
592 {
593
597 if (mp)
600 }
601#endif
602 rc = 0;
603
604done:
607 return rc;
608}
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.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
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_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
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.
char * HomeDir
User's home directory.
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.
int cs_str_reset(const struct ConfigSet *cs, const char *name, struct Buffer *err)
Reset a config item to its initial value.
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.
struct ListHead MailToAllow
List of regexes to identify non-spam emails.
int mutt_file_mkdir(const char *path, mode_t mode)
Recursively create directories.
bool OptNoCurses
(pseudo) when sending in batch mode
struct ListHead Muttrc
List of config files to read.
char * Username
User's login name.
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, const char *format,...)
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_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
String manipulation buffer.
char * data
Pointer to data.
struct Mailbox * mailbox
Mailbox in the list.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.