320{
321 bool need_pause = false;
322 int rc = 1;
325
332#ifdef USE_LUA
334#endif
336
339#ifdef USE_NOTMUCH
341#endif
342
343#ifdef NEOMUTT_DIRECT_COLORS
344
345
346
347
348
349
350
351
352
353
354 if (COLORS == 16777216)
355 {
356
357
359 if (env_colorterm && (
mutt_str_equal(env_colorterm,
"truecolor") ||
361 {
364 }
365 }
366#endif
367
368
370 if (!p)
372 if (!p)
373 {
374#ifdef HOMESPOOL
376#else
378#endif
380 }
383
385 if (p)
386 {
388
393 }
394
396 if (p)
397 {
400 }
401
402
404 if (env_mc)
405 {
408 }
409
410
412 if (env_tmp)
413 {
416 }
417
418
420 if (!env_ed)
422 if (!env_ed)
423 env_ed = "vi";
425
427 if (!c_editor)
429
435
436 char name[256] = { 0 };
438 if (!c_real_name)
439 {
440 struct passwd *pw = getpwuid(getuid());
441 if (pw)
442 {
444 }
445 }
448
449#ifdef HAVE_GETSID
450
451 if (getsid(0) == getpid())
452 {
455 }
456#endif
457
458
459
460
461
462
463
466
467
471
473 {
475
477 {
480 }
481
483 if (config)
484 {
486 }
487 }
488 else
489 {
492 {
497 if (access(np->
data, F_OK))
498 {
500 goto done;
501 }
502 }
503 }
504
506 {
508 }
509
510
511
512 if (!skip_sys_rc)
513 {
514 do
515 {
517 break;
518
521 break;
522
525 break;
526
529 break;
530
532 } while (false);
533
535 {
537 {
539 need_pause = true;
540 }
541 }
542 }
543
544
547 {
549 {
551 {
553 need_pause = true;
554 }
555 }
556 }
557
559 need_pause = true;
560
562 goto done;
563
564
565 if (dlevel)
567 if (dfile)
569
571 {
573 goto done;
574 }
575
577 {
580 goto done;
581 }
582
585 {
586 mutt_error(
_(
"Can't create %s: %s"), c_tmp_dir, strerror(errno));
587 goto done;
588 }
589
592
593#ifdef USE_NOTMUCH
595 if (c_virtual_spool_file)
596 {
597
601 if (mp)
604 }
605#endif
606 rc = 0;
607
608done:
611 return rc;
612}
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_seek(struct Buffer *buf, size_t offset)
Set current read/write position to offset from beginning.
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.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
@ MUTT_NOTMUCH
'Notmuch' (virtual) Mailbox type
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, 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.
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 log_queue_flush(log_dispatcher_t disp)
Replay the log queue.
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.
int mutt_log_start(void)
Enable file logging.
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)
struct Mailbox * mailbox
Mailbox in the list.