824 if (getsid(0) == getpid())
867 if (access(np->
data, F_OK))
936 struct passwd *pw = getpwuid(getuid());
time_t mutt_date_epoch(void)
Return the number of seconds since the Unix epoch.
int source_rc(const char *rcfile_path, struct Buffer *err)
Read an initialization file.
static const char * mailbox_path(const struct Mailbox *m)
Get the Mailbox's path string.
void mutt_comp_init(void)
Setup feature commands.
void * mutt_mem_calloc(size_t nmemb, size_t size)
Allocate zeroed memory on the heap.
void mutt_ch_set_charset(const char *charset)
Update the records for a new character set.
void mutt_lua_init(void)
Setup feature commands.
char * mutt_buffer_strdup(const struct Buffer *buf)
Copy a Buffer's string.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
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.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
struct Buffer mutt_buffer_make(size_t size)
Make a new buffer on the stack.
String manipulation buffer.
static int execute_commands(struct ListHead *p)
Execute a set of NeoMutt commands.
WHERE char * C_Realname
Config: Real name of the user.
char * mutt_str_dup(const char *str)
Copy a string, safely.
void alias_init(void)
Set up the Alias globals.
void mutt_commands_init(void)
WHERE bool OptNoCurses
(pseudo) when sending in batch mode
int cs_str_string_set(const struct ConfigSet *cs, const char *name, const char *value, struct Buffer *err)
Set a config item by string.
Index panel (list of emails)
void imap_init(void)
Setup feature commands.
int mutt_buffer_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void log_queue_flush(log_dispatcher_t disp)
Replay the log queue.
static char * find_cfg(const char *home, const char *xdg_cfg_home)
Find a config file.
Container for Accounts, Notifications.
char * HomeDir
User's home directory.
const char * mutt_str_getenv(const char *name)
Get an environment variable.
static const char * mutt_buffer_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
WHERE char ProtectedHeaderMarker[256]
Unique ANSI string to mark protected headers in an email.
WHERE char * Username
User's login name.
#define MUTT_HASH_STRCASECMP
use strcasecmp() to compare keys
void mutt_hist_read_file(void)
Read the History from a file.
WHERE enum MenuType CurrentMenu
Current Menu, e.g. MENU_PAGER.
int mutt_file_mkdir(const char *path, mode_t mode)
Recursively create directories.
void mutt_buffer_dealloc(struct Buffer *buf)
Release the memory allocated by a buffer.
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.
struct ListNode * mutt_list_insert_tail(struct ListHead *h, char *s)
Append a string to the end of a List.
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
WHERE bool C_Suspend
Config: Allow the user to suspend NeoMutt using '^Z'.
void nm_init(void)
Setup feature commands.
static int MatchesListsize
void mutt_grouplist_init(void)
Initialize the GroupList singleton.
uint64_t mutt_rand64(void)
Create a 64-bit random number.
WHERE char AttachmentMarker[256]
Unique ANSI string to mark PGP messages in an email.
struct ListHead MailToAllow
List of permitted fields in a mailto: url.
char * data
Pointer to data.
static bool get_hostname(struct ConfigSet *cs)
Find the Fully-Qualified Domain Name.
#define STAILQ_FOREACH(var, head, field)
void mutt_hist_init(void)
Create a set of empty History ring buffers.
size_t mutt_buffer_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
'Notmuch' (virtual) Mailbox type
int mutt_set_xdg_path(enum XdgType type, struct Buffer *buf)
Find an XDG path or its fallback.
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
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.
char * C_Tmpdir
Config: Directory for temporary files.
static const char ** Matches
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()
size_t mutt_buffer_concat_path(struct Buffer *buf, const char *dir, const char *fname)
Join a directory name and a filename.
#define STAILQ_EMPTY(head)
#define STAILQ_HEAD_INITIALIZER(head)
int cs_str_reset(const struct ConfigSet *cs, const char *name, struct Buffer *err)
Reset a config item to its initial value.
struct Buffer * mutt_buffer_init(struct Buffer *buf)
Initialise a new Buffer.
WHERE struct HashTable * TagFormats
Hash Table of tag-formats (tag -> format string)
XDG system dir: /etc/xdg.
struct HashTable * mutt_hash_new(size_t num_elems, HashFlags flags)
Create a new Hash Table (with string keys)
char * C_Charset
Config: Default character set for displaying text on screen.
char * mutt_ch_get_langinfo_charset(void)
Get the user's choice of character set.
#define STAILQ_FIRST(head)
#define MUTT_HASH_NO_FLAGS
No flags are set.
bool C_VirtualSpoolfile
Config: (notmuch) Use the first virtual mailbox as a spool file.
struct Mailbox * mailbox
Mailbox in the list.