318{
319 bool need_pause = false;
320 int rc = 1;
323
330#ifdef USE_LUA
332#endif
334
337#ifdef USE_NOTMUCH
339#endif
340
341#ifdef NEOMUTT_DIRECT_COLORS
342
343
344
345
346
347
348
349
350
351
352 if (COLORS == 16777216)
353 {
354
355
357 if (env_colorterm && (
mutt_str_equal(env_colorterm,
"truecolor") ||
359 {
362 }
363 }
364#endif
365
366
368 if (!p)
370 if (!p)
371 {
372#ifdef HOMESPOOL
374#else
376#endif
378 }
381
383 if (p)
384 {
386
390 }
391
393 if (p)
394 {
397 }
398
399
401 if (env_mc)
402 {
405 }
406
407
409 if (env_tmp)
410 {
413 }
414
415
417 if (!env_ed)
419 if (!env_ed)
420 env_ed = "vi";
422
424 if (!c_editor)
426
432
433#ifdef HAVE_GETSID
434
435 if (getsid(0) == getpid())
436 {
439 }
440#endif
441
442
443
444
445
446
447
450
451
455
457 {
459
461 {
464 }
465
467 if (config)
468 {
470 }
471 }
472 else
473 {
476 {
481 if (access(np->
data, F_OK))
482 {
484 goto done;
485 }
486 }
487 }
488
490 {
492 }
493
494
495
496 if (!skip_sys_rc)
497 {
498 do
499 {
501 break;
502
505 break;
506
509 break;
510
513 break;
514
516 } while (false);
517
519 {
521 {
523 need_pause = true;
524 }
525 }
526 }
527
528
531 {
533 {
535 {
537 need_pause = true;
538 }
539 }
540 }
541
543 need_pause = true;
544
546 goto done;
547
548 char name[256] = { 0 };
550 if (!c_real_name)
551 {
552 struct passwd *pw = getpwuid(getuid());
553 if (pw)
554 {
556 }
557 }
560
561
562 if (dlevel)
564 if (dfile)
566
568 {
570 goto done;
571 }
572
574 {
577 goto done;
578 }
579
582 {
583 mutt_error(
_(
"Can't create %s: %s"), c_tmp_dir, strerror(errno));
584 goto done;
585 }
586
589
590#ifdef USE_NOTMUCH
592 if (c_virtual_spool_file)
593 {
594
598 if (mp)
601 }
602#endif
603 rc = 0;
604
605done:
608 return rc;
609}
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.
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, 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.
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 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)
char * data
Pointer to data.
struct Mailbox * mailbox
Mailbox in the list.