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#ifdef HAVE_GETSID
437
438 if (getsid(0) == getpid())
439 {
442 }
443#endif
444
445
446
447
448
449
450
453
454
458
460 {
462
464 {
467 }
468
470 if (config)
471 {
473 }
474 }
475 else
476 {
479 {
484 if (access(np->
data, F_OK))
485 {
487 goto done;
488 }
489 }
490 }
491
493 {
495 }
496
497
498
499 if (!skip_sys_rc)
500 {
501 do
502 {
504 break;
505
508 break;
509
512 break;
513
516 break;
517
519 } while (false);
520
522 {
524 {
526 need_pause = true;
527 }
528 }
529 }
530
531
534 {
536 {
538 {
540 need_pause = true;
541 }
542 }
543 }
544
546 need_pause = true;
547
549 goto done;
550
551 char name[256] = { 0 };
553 if (!c_real_name)
554 {
555 struct passwd *pw = getpwuid(getuid());
556 if (pw)
557 {
559 }
560 }
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.
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.
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.
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.
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.
struct Buffer * buf_pool_get(void)
Get a Buffer from the pool.
void buf_pool_release(struct Buffer **ptr)
Return a Buffer to the pool.
@ 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.
struct Mailbox * mailbox
Mailbox in the list.
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.