575{
576 int need_pause = 0;
577 int rc = 1;
580
584#ifdef USE_COMP_MBOX
586#endif
587#ifdef USE_IMAP
589#endif
590#ifdef USE_LUA
592#endif
594
596#ifdef USE_SIDEBAR
598#endif
599#ifdef USE_NOTMUCH
601#endif
602
603
605 if (!p)
607 if (!p)
608 {
609#ifdef HOMESPOOL
611#else
613#endif
615 }
618
620 if (p)
621 {
623
628 }
629
631 if (p)
632 {
635 }
636
637
639 if (env_mc)
641
642
644 if (env_tmp)
646
647
649 if (!env_ed)
651 if (!env_ed)
652 env_ed = "vi";
654
656 if (!c_editor)
658
664
665#ifdef HAVE_GETSID
666
667 if (getsid(0) == getpid())
669#endif
670
671
672
673
674
675
676
679
680
684
686 {
688
690 {
693 }
694
696 if (config)
697 {
699 }
700 }
701 else
702 {
705 {
710 if (access(np->
data, F_OK))
711 {
713 goto done;
714 }
715 }
716 }
717
719 {
721 }
722
723
724
725 if (!skip_sys_rc)
726 {
727 do
728 {
730 break;
731
734 break;
735
738 break;
739
742 break;
743
745 } while (false);
746
748 {
750 {
752 need_pause = 1;
753 }
754 }
755 }
756
757
760 {
762 {
764 {
766 need_pause = 1;
767 }
768 }
769 }
770
772 need_pause = 1;
773
775 goto done;
776
777 {
778 char name[256] = { 0 };
780 if (!c_real_name)
781 {
782 struct passwd *pw = getpwuid(getuid());
783 if (pw)
785 }
788 }
789
791 {
794 goto done;
795 }
796
799
802
803#ifdef USE_NOTMUCH
805 if (c_virtual_spool_file)
806 {
807
811 if (mp)
814 }
815#endif
816 rc = 0;
817
818done:
821 return rc;
822}
void alias_init(void)
Set up the Alias globals.
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
char * mutt_buffer_strdup(const struct Buffer *buf)
Copy a Buffer's string.
size_t mutt_buffer_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
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 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.
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 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.
void mutt_commands_init(void)
Initialize commands array and register default commands.
struct CommandArray commands
void mutt_lua_init(void)
Setup feature commands.
void mutt_buffer_expand_path(struct Buffer *buf)
Create the canonical path.
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 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.
bool OptNoCurses
(pseudo) when sending in batch mode
@ XDG_CONFIG_DIRS
XDG system dir: /etc/xdg.
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_EMPTY(head)
int cs_str_string_set(const struct ConfigSet *cs, const char *name, const char *value, struct Buffer *err)
Set a config item by string.
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.