115 for (
int j = 0; fns[j].
name; j++)
221 int lineno = 0, rc = 0, warnings = 0;
223 struct Buffer *token = NULL, *linebuf = NULL;
225 char *currentline = NULL;
236 bool ispipe = rcfile[rcfilelen - 1] ==
'|';
243 mutt_error(
_(
"Error: Can't build path of '%s'"), rcfile_path);
256 mutt_error(
_(
"Error: Cyclic sourcing of configuration file '%s'"), rcfile);
268 buf_printf(err,
"%s: %s", rcfile, strerror(errno));
279 const bool conv = c_config_charset && c_charset;
336 buf_printf(err, (rc >= -
MAX_ERRS) ?
_(
"source: errors in %s") :
_(
"source: reading aborted due to too many errors in %s"),
345 buf_printf(err, ngettext(
"source: %d warning in %s",
"source: %d warnings in %s", warnings),
402 buf_printf(err,
_(
"%s: too few arguments"),
"echo");
426 buf_printf(err,
_(
"%s: too many arguments"),
"finish");
467 buf_printf(err,
_(
"%sgroup: missing -rx or -addr"),
493 buf_printf(err,
_(
"%sgroup: warning: bad IDN '%s'"),
494 (data == 1) ?
"un" :
"", estr);
537 intptr_t data,
struct Buffer *err)
543 buf_printf(err,
_(
"%s: too few arguments"), (data ?
"ifndef" :
"ifdef"));
560 buf_printf(err,
_(
"%s: too few arguments"), (data ?
"ifndef" :
"ifdef"));
566 if ((res && (data == 0)) || (!res && (data == 1)))
583 intptr_t data,
struct Buffer *err)
599 intptr_t data,
struct Buffer *err)
638 const char *label,
enum TriBool poll,
642 mailbox, label ? label :
"[NONE]",
643 (poll ==
TB_UNSET) ?
"[UNSPECIFIED]" :
646 (notify ==
TB_UNSET) ?
"[UNSPECIFIED]" :
661 bool new_account =
false;
754 intptr_t data,
struct Buffer *err)
764 bool label_set =
false;
777 buf_printf(err,
_(
"%s: too few arguments"),
"mailboxes -label");
809 buf_printf(err,
_(
"%s: too few arguments"),
"named-mailboxes");
825 buf_printf(err,
_(
"%s: too few arguments"),
"mailboxes");
830 label_set ?
buf_string(label) : NULL, poll, notify, err);
853 char *p = strpbrk(buf->
data,
": \t");
854 if (!p || (*p !=
':'))
929 return strcmp(*(
const char **) a, *(
const char **) b);
936 intptr_t data,
struct Buffer *err)
948 buf_printf(err,
_(
"%s: too few arguments"),
"setenv");
965 for (
char **env =
EnvList; *env; env++)
970 for (
char **env =
EnvList; *env; env++)
971 fprintf(fp_out,
"%s\n", *env);
997 buf_printf(err,
_(
"Can't query option with the '%s' command"),
"unsetenv");
1007 if (*s->
dptr ==
'?')
1011 buf_printf(err,
_(
"Can't query option with the '%s' command"),
"unsetenv");
1017 buf_printf(err,
_(
"Can't use a prefix when querying a variable"));
1028 while (envp && *envp)
1065 if (*s->
dptr ==
'=')
1073 buf_printf(err,
_(
"%s: too few arguments"),
"setenv");
1089 intptr_t data,
struct Buffer *err)
1126 buf_printf(err,
_(
"%s: too few arguments"),
"nospam");
1135 buf_printf(err,
_(
"%s: too many arguments"),
"finish");
1166 buf_printf(err,
_(
"%s: too few arguments"),
"spam");
1253 intptr_t data,
struct Buffer *err)
1255 if (!buf || !s || !err)
1266 buf_printf(err,
_(
"%s: too many arguments"),
"subscribe-to");
1300 intptr_t data,
struct Buffer *err)
1322 mutt_warning(
_(
"tag format '%s' already registered as '%s'"), fmt, tmp);
1364 mutt_warning(
_(
"tag transform '%s' already registered as '%s'"), tag, tmp);
1466 intptr_t data,
struct Buffer *err)
1498 intptr_t data,
struct Buffer *err)
1500 struct ListNode *np = NULL, *tmp = NULL;
1520 if (buf->
data[l - 1] ==
':')
1544 intptr_t data,
struct Buffer *err)
1565 intptr_t data,
struct Buffer *err)
1591 intptr_t data,
struct Buffer *err)
1593 if (!buf || !s || !err)
1602 buf_printf(err,
_(
"%s: too many arguments"),
"unsubscribe-from");
1606 if (buf->
data && (*buf->
data !=
'\0'))
1632 intptr_t data,
struct Buffer *err)
1658 pview.
banner =
"version";
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
int mutt_addrlist_parse2(struct AddressList *al, const char *s)
Parse a list of email addresses.
int mutt_addrlist_to_intl(struct AddressList *al, char **err)
Convert an Address list to Punycode.
Alternate address handling.
#define ARRAY_FREE(head)
Release all memory.
GUI display the mailboxes in a side panel.
int buf_printf(struct Buffer *buf, const char *fmt,...)
Format a string overwriting a Buffer.
void buf_reset(struct Buffer *buf)
Reset an existing Buffer.
bool buf_is_empty(const struct Buffer *buf)
Is the Buffer empty?
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
size_t buf_strcpy(struct Buffer *buf, const char *s)
Copy a string into a Buffer.
size_t buf_copy(struct Buffer *dst, const struct Buffer *src)
Copy a Buffer's contents to another Buffer.
char * buf_strdup(const struct Buffer *buf)
Copy a Buffer's string.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
Color and attribute parsing.
const struct Mapping ColorFields[]
Mapping of colour names to their IDs.
CommandResult
Error codes for command_t parse functions.
@ MUTT_CMD_SUCCESS
Success: Command worked.
@ MUTT_CMD_ERROR
Error: Can't help the user.
@ MUTT_CMD_WARNING
Warning: Help given to the user.
@ MUTT_CMD_FINISH
Finish: Stop processing this file.
static const struct Command MuttCommands[]
General NeoMutt Commands.
static enum CommandResult mailbox_add(const char *folder, const char *mailbox, const char *label, enum TriBool poll, enum TriBool notify, struct Buffer *err)
Add a new Mailbox.
static bool is_color_object(const char *name)
Is the argument a neomutt colour?
GroupState
Type of email address group.
@ GS_RX
Entry is a regular expression.
@ GS_NONE
Group is missing an argument.
@ GS_ADDR
Entry is an address.
enum CommandResult parse_rc_line_cwd(const char *line, char *cwd, struct Buffer *err)
Parse and run a muttrc line in a relative directory.
void commands_init(void)
Initialize commands array and register default commands.
int parse_grouplist(struct GroupList *gl, struct Buffer *buf, struct Buffer *s, struct Buffer *err)
Parse a group context.
void source_stack_cleanup(void)
Free memory from the stack used for the source command.
static void do_unmailboxes_star(void)
Remove all Mailboxes from the Sidebar/notifications.
static struct ListHead MuttrcStack
LIFO designed to contain the list of config files that have been sourced and avoid cyclic sourcing.
enum CommandResult set_dump(enum GetElemListFlags flags, struct Buffer *err)
Dump list of config variables into a file/pager.
TriBool
Tri-state boolean.
@ TB_FALSE
Value is false.
@ TB_UNSET
Value hasn't been set.
bool mailbox_add_simple(const char *mailbox, struct Buffer *err)
Add a new Mailbox.
static void do_unmailboxes(struct Mailbox *m)
Remove a Mailbox from the Sidebar/notifications.
int source_rc(const char *rcfile_path, struct Buffer *err)
Read an initialization file.
char * mutt_get_sourced_cwd(void)
Get the current file path that is being parsed.
static bool is_function(const char *name)
Is the argument a neomutt function?
Functions to parse commands in a config file.
bool dump_config(struct ConfigSet *cs, struct HashElemArray *hea, ConfigDumpFlags flags, FILE *fp)
Write all the config to a file.
#define CS_DUMP_NO_FLAGS
No flags are set.
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
Convenience wrapper for the config headers.
char * HomeDir
User's home directory.
bool StartupComplete
When the config has been read.
const char * cc_charset(void)
Get the cached value of $charset.
bool account_mailbox_remove(struct Account *a, struct Mailbox *m)
Remove a Mailbox from an Account.
struct Account * account_new(const char *name, struct ConfigSubset *sub)
Create a new Account.
void commands_register(const struct Command *cmds, const size_t num_cmds)
Add commands to Commands array.
struct Command * command_get(const char *s)
Get a Command by its name.
Convenience wrapper for the core headers.
int mailbox_gen(void)
Get the next generation number.
struct Mailbox * mailbox_new(void)
Create a new Mailbox.
void mailbox_free(struct Mailbox **ptr)
Free a Mailbox.
@ NT_MAILBOX_CHANGE
Mailbox has been changed.
@ MUTT_MAILBOX_ANY
Match any Mailbox type.
@ MUTT_UNKNOWN
Mailbox wasn't recognised.
int mutt_any_key_to_continue(const char *s)
Prompt the user to 'press any key' and wait.
void mutt_endwin(void)
Shutdown curses.
void header_free(struct ListHead *hdrlist, struct ListNode *target)
Free and remove a header from a header list.
struct ListNode * header_add(struct ListHead *hdrlist, const char *header)
Add a header to a list.
struct ListNode * header_update(struct ListNode *hdr, const char *header)
Update an existing header.
struct ListNode * header_find(const struct ListHead *hdrlist, const char *header)
Find a header, matching on its field, in a list of headers.
struct ReplaceList SpamList
List of regexes to match subscribed mailing lists.
struct RegexList SubscribedLists
List of header patterns to unignore (see)
struct HashTable * AutoSubscribeCache
< Hash Table: "mailto:" -> AutoSubscribeCache
struct RegexList UnSubscribedLists
struct RegexList UnMailLists
List of regexes to exclude false matches in SubscribedLists.
struct RegexList MailLists
List of permitted fields in a mailto: url.
struct ListHead MailToAllow
List of regexes to identify non-spam emails.
struct ListHead Ignore
List of regexes to match mailing lists.
struct RegexList NoSpamList
List of regexes and patterns to match spam emails.
struct ListHead UnIgnore
List of regexes to exclude false matches in MailLists.
Structs that make up an email.
@ NT_HEADER_CHANGE
An existing header has been changed.
@ NT_HEADER_ADD
Header has been added.
@ NT_HEADER_DELETE
Header has been removed.
bool envlist_set(char ***envp, const char *name, const char *value, bool overwrite)
Set an environment variable.
bool envlist_unset(char ***envp, const char *name)
Unset an environment variable.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
#define MUTT_RL_CONT
-continuation
#define mutt_file_fclose(FP)
#define mutt_file_fopen(PATH, MODE)
struct ListHead MimeLookupList
List of mime types that that shouldn't use the mailcap entry.
struct ListHead AlternativeOrderList
List of preferred mime types to display.
struct ListHead AutoViewList
List of mime types to auto view.
bool OptForceRefresh
(pseudo) refresh even during macros
struct ListHead UserHeader
List of custom headers to add to outgoing emails.
struct ListHead HeaderOrderList
List of header fields in the order they should be displayed.
char ** EnvList
Private copy of the environment variables.
int mutt_grouplist_remove_addrlist(struct GroupList *gl, struct AddressList *al)
Remove an AddressList from a GroupList.
void mutt_grouplist_add(struct GroupList *gl, struct Group *group)
Add a Group to a GroupList.
int mutt_grouplist_add_regex(struct GroupList *gl, const char *s, uint16_t flags, struct Buffer *err)
Add matching Addresses to a GroupList.
struct Group * mutt_pattern_group(const char *pat)
Match a pattern to a Group.
int mutt_grouplist_remove_regex(struct GroupList *gl, const char *s)
Remove matching addresses from a GroupList.
void mutt_grouplist_destroy(struct GroupList *gl)
Free a GroupList.
void mutt_grouplist_clear(struct GroupList *gl)
Clear a GroupList.
void mutt_grouplist_add_addrlist(struct GroupList *gl, struct AddressList *al)
Add Address list to a GroupList.
#define MUTT_GROUP
'group' config command
#define MUTT_UNGROUP
'ungroup' config command
static enum CommandResult parse_finish(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'finish' command - Implements Command::parse() -.
static enum CommandResult parse_stailq(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse a list command - Implements Command::parse() -.
static enum CommandResult parse_version(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'version' command - Implements Command::parse() -.
static enum CommandResult parse_unlists(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unlists' command - Implements Command::parse() -.
static enum CommandResult parse_group(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'group' and 'ungroup' commands - Implements Command::parse() -.
enum CommandResult parse_unsubjectrx_list(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unsubjectrx' command - Implements Command::parse() -.
enum CommandResult parse_set(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'set' family of commands - Implements Command::parse() -.
static enum CommandResult parse_spam(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'spam' command - Implements Command::parse() -.
enum CommandResult parse_alternates(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'alternates' command - Implements Command::parse() -.
enum CommandResult mutt_parse_unscore(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unscore' command - Implements Command::parse() -.
enum CommandResult mutt_parse_unmono(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unmono' command - Implements Command::parse() -.
static enum CommandResult parse_unstailq(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse an unlist command - Implements Command::parse() -.
enum CommandResult mutt_parse_bind(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'bind' command - Implements Command::parse() -.
enum CommandResult parse_subjectrx_list(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'subjectrx' command - Implements Command::parse() -.
enum CommandResult parse_unsubscribe_from(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unsubscribe-from' command - Implements Command::parse() -.
static enum CommandResult parse_unignore(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unignore' command - Implements Command::parse() -.
static enum CommandResult parse_ifdef(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'ifdef' and 'ifndef' commands - Implements Command::parse() -.
static enum CommandResult parse_source(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'source' command - Implements Command::parse() -.
enum CommandResult parse_unalternates(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unalternates' command - Implements Command::parse() -.
enum CommandResult mutt_parse_score(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'score' command - Implements Command::parse() -.
enum CommandResult parse_unmailboxes(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unmailboxes' command - Implements Command::parse() -.
static enum CommandResult parse_unmy_hdr(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unmy_hdr' command - Implements Command::parse() -.
enum CommandResult mutt_parse_mono(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'mono' command - Implements Command::parse() -.
enum CommandResult mutt_parse_color(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'color' command - Implements Command::parse() -.
static enum CommandResult parse_subscribe(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'subscribe' command - Implements Command::parse() -.
static enum CommandResult parse_tag_transforms(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'tag-transforms' command - Implements Command::parse() -.
enum CommandResult mutt_parse_uncolor(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'uncolor' command - Implements Command::parse() -.
static enum CommandResult parse_cd(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'cd' command - Implements Command::parse() -.
static enum CommandResult parse_ignore(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'ignore' command - Implements Command::parse() -.
enum CommandResult parse_subscribe_to(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'subscribe-to' command - Implements Command::parse() -.
enum CommandResult mutt_parse_unbind(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unbind' command - Implements Command::parse() -.
enum CommandResult parse_alias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'alias' command - Implements Command::parse() -.
enum CommandResult parse_unalias(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unalias' command - Implements Command::parse() -.
enum CommandResult parse_mailboxes(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'mailboxes' command - Implements Command::parse() -.
static enum CommandResult parse_tag_formats(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'tag-formats' command - Implements Command::parse() -.
enum CommandResult mutt_parse_macro(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'macro' command - Implements Command::parse() -.
enum CommandResult parse_unattachments(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unattachments' command - Implements Command::parse() -.
static enum CommandResult parse_lists(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'lists' command - Implements Command::parse() -.
static enum CommandResult parse_echo(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'echo' command - Implements Command::parse() -.
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() -.
static enum CommandResult parse_unsubscribe(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unsubscribe' command - Implements Command::parse() -.
static enum CommandResult parse_setenv(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'setenv' and 'unsetenv' commands - Implements Command::parse() -.
enum CommandResult mutt_parse_push(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'push' command - Implements Command::parse() -.
enum CommandResult parse_attachments(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'attachments' command - Implements Command::parse() -.
enum CommandResult mutt_parse_exec(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'exec' command - Implements Command::parse() -.
static enum CommandResult parse_nospam(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'nospam' command - Implements Command::parse() -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
static int envlist_sort(const void *a, const void *b, void *sdata)
Compare two environment strings - Implements sort_t -.
Convenience wrapper for the gui headers.
struct HashElem * mutt_hash_insert(struct HashTable *table, const char *strkey, void *data)
Add a new element to the Hash Table (with string keys)
void * mutt_hash_find(const struct HashTable *table, const char *strkey)
Find the HashElem data in a Hash Table element using a key.
void mutt_hash_free(struct HashTable **ptr)
Free a hash table.
int imap_subscribe(const char *path, bool subscribe)
Subscribe to a mailbox.
const struct MenuFuncOp * km_get_table(enum MenuType mtype)
Lookup a Menu's functions.
#define MUTT_UNBIND
Parse 'unbind' command.
#define MUTT_UNMACRO
Parse 'unmacro' command.
struct ListNode * mutt_list_insert_head(struct ListHead *h, char *s)
Insert a string at the beginning of a List.
void mutt_list_free(struct ListHead *h)
Free a List AND its strings.
@ LL_DEBUG2
Log at debug level 2.
@ LL_DEBUG1
Log at debug level 1.
@ LL_NOTIFY
Log of notifications.
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
#define mutt_array_size(x)
int mutt_monitor_add(struct Mailbox *m)
Add a watch for a mailbox.
int mutt_monitor_remove(struct Mailbox *m)
Remove a watch for a mailbox.
Monitor files for changes.
int mutt_ch_convert_string(char **ps, const char *from, const char *to, uint8_t flags)
Convert a string between encodings.
#define MUTT_ICONV_NO_FLAGS
No flags are set.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
Convenience wrapper for the library headers.
bool notify_send(struct Notify *notify, enum NotifyType event_type, int event_subtype, void *event_data)
Send out a notification message.
void notify_free(struct Notify **ptr)
Free a notification handler.
bool mutt_path_to_absolute(char *path, const char *reference)
Convert a relative path to its absolute form.
const char * mutt_path_getcwd(struct Buffer *cwd)
Get the current working directory.
int mutt_replacelist_remove(struct ReplaceList *rl, const char *pat)
Remove a pattern from a list.
void mutt_regexlist_free(struct RegexList *rl)
Free a RegexList object.
int mutt_regexlist_add(struct RegexList *rl, const char *str, uint16_t flags, struct Buffer *err)
Compile a regex string and add it to a list.
void mutt_replacelist_free(struct ReplaceList *rl)
Free a ReplaceList object.
int mutt_regexlist_remove(struct RegexList *rl, const char *str)
Remove a Regex from a list.
int mutt_replacelist_add(struct ReplaceList *rl, const char *pat, const char *templ, struct Buffer *err)
Add a pattern and a template to a list.
bool mutt_istr_equal(const char *a, const char *b)
Compare two strings, ignoring case.
char * mutt_str_dup(const char *str)
Copy a string, safely.
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.
size_t mutt_str_startswith(const char *str, const char *prefix)
Check whether a string starts with a prefix.
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
bool mutt_istrn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings ignoring case (to a maximum), safely.
char * mutt_str_replace(char **p, const char *s)
Replace one string with another.
Many unsorted constants and some structs.
void remove_from_stailq(struct ListHead *head, const char *str)
Remove an item, matching a string, from a List.
void add_to_stailq(struct ListHead *head, const char *str)
Add a string to a list.
void mutt_sleep(short s)
Sleep for a while.
void buf_expand_path(struct Buffer *buf)
Create the canonical path.
FILE * mutt_open_read(const char *path, pid_t *thepid)
Run a command to read from.
Some miscellaneous functions.
struct Mailbox * mx_mbox_find(struct Account *a, const char *path)
Find a Mailbox on an Account.
bool mx_ac_add(struct Account *a, struct Mailbox *m)
Add a Mailbox to an Account - Wrapper for MxOps::ac_add()
struct Account * mx_ac_find(struct Mailbox *m)
Find the Account owning a Mailbox.
int mx_path_canon2(struct Mailbox *m, const char *folder)
Canonicalise the path to realpath.
void neomutt_mailboxlist_clear(struct MailboxList *ml)
Free a Mailbox List.
bool neomutt_account_add(struct NeoMutt *n, struct Account *a)
Add an Account to the global list.
size_t neomutt_mailboxlist_get_all(struct MailboxList *head, struct NeoMutt *n, enum MailboxType type)
Get a List of all Mailboxes.
@ NT_MAILBOX
Mailbox has changed, NotifyMailbox, EventMailbox.
@ NT_HEADER
A header has changed, NotifyHeader EventHeader.
@ MUTT_SET_INV
default is to invert all vars
@ MUTT_SET_SET
default is to set all vars
@ MUTT_SET_RESET
default is to reset all vars to default
@ MUTT_SET_UNSET
default is to unset all vars
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.
void mutt_qsort_r(void *base, size_t nmemb, size_t size, sort_t compar, void *sdata)
Sort an array, where the comparator has access to opaque data rather than requiring global variables.
#define TAILQ_FOREACH(var, head, field)
#define STAILQ_REMOVE_HEAD(head, field)
#define STAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FIRST(head)
#define STAILQ_FOREACH(var, head, field)
#define STAILQ_EMPTY(head)
#define TAILQ_HEAD_INITIALIZER(head)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
#define TAILQ_EMPTY(head)
enum CommandResult parse_rc_line(const char *line, struct Buffer *err)
Parse a line of user config.
enum CommandResult parse_rc_buffer(struct Buffer *line, struct Buffer *token, struct Buffer *err)
Parse a line of user config.
Routines for adding user scores to emails.
bool store_is_valid_backend(const char *str)
Is the string a valid Store backend.
A group of associated Mailboxes.
enum MailboxType type
Type of Mailboxes this Account contains.
char * name
Name of Account.
struct Notify * notify
Notifications: NotifyAccount, EventAccount.
struct ConfigSubset * sub
Inherited config items.
String manipulation buffer.
char * dptr
Current read/write position.
char * data
Pointer to data.
Container for lots of config items.
struct ConfigSet * cs
Parent ConfigSet.
An Event that happened to a Mailbox.
struct Mailbox * mailbox
The Mailbox this Event relates to.
struct Mailbox * mailbox
Mailbox in the list.
char * realpath
Used for duplicate detection, context comparison, and the sidebar.
enum MailboxType type
Mailbox type.
bool poll_new_mail
Check for new mail.
char * name
A short name for the Mailbox.
struct Notify * notify
Notifications: NotifyMailbox, EventMailbox.
bool notify_user
Notify the user of new mail.
struct Buffer pathbuf
Path of the Mailbox.
struct Account * account
Account that owns this Mailbox.
bool visible
True if a result of "mailboxes".
int opened
Number of times mailbox is opened.
int gen
Generation number, for sorting.
const char * name
String value.
Container for Accounts, Notifications.
struct AccountList accounts
List of all Accounts.
struct Notify * notify
Notifications handler.
struct ConfigSubset * sub
Inherited config items.
struct HashElemArray get_elem_list(struct ConfigSet *cs, enum GetElemListFlags flags)
Create a sorted list of all config items.
void cs_subset_free(struct ConfigSubset **ptr)
Free a Config Subset.
struct HashElem * cs_subset_lookup(const struct ConfigSubset *sub, const char *name)
Find an inherited config item.
GetElemListFlags
Flags for get_elem_list()
const struct Mapping MenuNames[]
Menu name lookup table.
bool print_version(FILE *fp)
Print system and compile info to a file.
bool feature_enabled(const char *name)
Test if a compile-time feature is enabled.
Display version and copyright about NeoMutt.