103 {
N_(
"Exit"), OP_EXIT },
104 {
N_(
"Mail"), OP_MAIL },
105 {
N_(
"New Query"), OP_QUERY },
106 {
N_(
"Make Alias"), OP_CREATE_ALIAS },
107 {
N_(
"Sort"), OP_SORT },
108 {
N_(
"Rev-Sort"), OP_SORT_REVERSE },
109 {
N_(
"Search"), OP_SEARCH },
110 {
N_(
"Help"), OP_HELP },
177 const char *s = alias->
comment;
190 const char *s = alias->
name;
212 const char *s = av->
is_tagged ?
"*" :
" ";
235 const struct AliasViewArray *ava = &mdata->
ava;
257 const struct AliasViewArray *ava = &mdata->
ava;
283 char *next_tok = NULL;
307 next_tok = strchr(tok,
'\t');
321 next_tok = strchr(tok,
'\t');
364 if (ev_w->
win != win_menu)
401 char title[256] = { 0 };
402 snprintf(title,
sizeof(title),
"%s: %s", mdata->title, query);
436 avp->
num = ARRAY_FOREACH_IDX;
487 if (!c_query_command)
514 struct Alias *np = NULL;
559 if (!c_query_command)
581 struct Alias *np = NULL;
632 { -1, -1, NULL, NULL },
void mutt_addrlist_copy(struct AddressList *dst, const struct AddressList *src, bool prune)
Copy a list of addresses into another list.
void mutt_addrlist_clear(struct AddressList *al)
Unlink and free all Address in an AddressList.
int mutt_addrlist_to_local(struct AddressList *al)
Convert an Address list from Punycode.
size_t mutt_addrlist_write(const struct AddressList *al, struct Buffer *buf, bool display)
Write an Address to a buffer.
int mutt_addrlist_parse(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.
void parse_alias_comments(struct Alias *alias, const char *com)
Parse the alias/query comment field.
void alias_tags_to_buffer(struct TagList *tl, struct Buffer *buf)
Write a comma-separated list of tags to a Buffer.
void alias_array_sort(struct AliasViewArray *ava, const struct ConfigSubset *sub)
Sort and reindex an AliasViewArray.
struct Alias * alias_new(void)
Create a new Alias.
void aliaslist_clear(struct AliasList *al)
Empty a List of Aliases.
Representation of a single alias to an email address.
int alias_array_alias_add(struct AliasViewArray *ava, struct Alias *alias)
Add an Alias to the AliasViewArray.
#define ARRAY_FOREACH(elem, head)
Iterate over all elements of the array.
#define ARRAY_SIZE(head)
The number of elements stored.
#define ARRAY_FREE(head)
Release all memory.
#define ARRAY_GET(head, idx)
Return the element at index.
#define ARRAY_HEAD_INITIALIZER
Static initializer for arrays.
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?
struct Buffer * buf_new(const char *str)
Allocate a new Buffer.
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.
void buf_alloc(struct Buffer *buf, size_t new_size)
Make sure a buffer can store at least new_size bytes.
static const char * buf_string(const struct Buffer *buf)
Convert a buffer to a const char * "string".
const char * cs_subset_string(const struct ConfigSubset *sub, const char *name)
Get a string config item by name.
bool cs_subset_bool(const struct ConfigSubset *sub, const char *name)
Get a boolean config item by name.
const struct Expando * cs_subset_expando(const struct ConfigSubset *sub, const char *name)
Get an Expando config item by name.
Convenience wrapper for the config headers.
Convenience wrapper for the core headers.
size_t mutt_strwidth(const char *s)
Measure a string's width in screen cells.
@ FR_DONE
Exit the Dialog.
@ FR_UNKNOWN
Unknown function.
@ FR_CONTINUE
Remain in the Dialog.
static const struct Mapping QueryHelp[]
Help Bar for the Address Query dialog.
int query_run(const char *s, bool verbose, struct AliasList *al, const struct ConfigSubset *sub)
Run an external program to find Addresses.
static struct SimpleDialogWindows query_dialog_new(struct AliasMenuData *mdata, const char *query)
Create an Query Selection Dialog.
bool alias_to_addrlist(struct AddressList *al, struct Alias *alias)
Turn an Alias into an AddressList.
int query_complete(struct Buffer *buf, struct ConfigSubset *sub)
Perform auto-complete using an Address Query.
const struct ExpandoRenderData QueryRenderData[]
Callbacks for Query Expandos.
void query_index(struct Mailbox *m, struct ConfigSubset *sub)
Perform an Alias Query and display the results.
@ ED_ALIAS
Alias ED_ALI_ ExpandoDataAlias.
struct Email * email_new(void)
Create a new Email.
Structs that make up an email.
struct Envelope * mutt_env_new(void)
Create a new Envelope.
int expando_filter(const struct Expando *exp, const struct ExpandoRenderData *rdata, void *data, MuttFormatFlags flags, int max_cols, struct Buffer *buf)
Render an Expando and run the result through a filter.
char * mutt_file_read_line(char *line, size_t *size, FILE *fp, int *line_num, ReadLineFlags flags)
Read a line from a file.
void buf_file_expand_fmt_quote(struct Buffer *dest, const char *fmt, const char *src)
Replace s in a string with a filename.
#define mutt_file_fclose(FP)
#define MUTT_RL_NO_FLAGS
No flags are set.
int km_dokey(enum MenuType mtype, GetChFlags flags)
Determine what a keypress should do.
void km_error_key(enum MenuType mtype)
Handle an unbound key sequence.
char ** EnvList
Private copy of the environment variables.
int menu_tagging_dispatcher(struct MuttWindow *win, int op)
Perform tagging operations on the Menu - Implements function_dispatcher_t -.
int global_function_dispatcher(struct MuttWindow *win, int op)
Perform a Global function - Implements function_dispatcher_t -.
int menu_function_dispatcher(struct MuttWindow *win, int op)
Perform a Menu function - Implements function_dispatcher_t -.
int alias_function_dispatcher(struct MuttWindow *win, int op)
Perform a Alias function - Implements function_dispatcher_t -.
long query_t_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Query: Tagged char - Implements ExpandoRenderData::get_number() -.
long query_c_num(const struct ExpandoNode *node, void *data, MuttFormatFlags flags)
Query: Index number - Implements ExpandoRenderData::get_number() -.
void query_n(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Query: Name - Implements ExpandoRenderData::get_string() -.
void query_e(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Query: Extra information - Implements ExpandoRenderData::get_string() -.
void query_t(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Query: Tagged char - Implements ExpandoRenderData::get_string() -.
void query_Y(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Query: Tags - Implements ExpandoRenderData::get_string() -.
void query_a(const struct ExpandoNode *node, void *data, MuttFormatFlags flags, struct Buffer *buf)
Query: Address - Implements ExpandoRenderData::get_string() -.
static bool dlg_query(struct Buffer *buf, struct AliasMenuData *mdata)
Get the user to enter an Address Query -.
int mw_get_field(const char *prompt, struct Buffer *buf, CompletionFlags complete, enum HistoryClass hclass, const struct CompleteOps *comp_api, void *cdata)
Ask the user for a string -.
#define mutt_warning(...)
#define mutt_message(...)
#define mutt_debug(LEVEL,...)
static int query_window_observer(struct NotifyCallback *nc)
Notification that a Window has changed - Implements observer_t -.
int alias_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
int alias_recalc(struct MuttWindow *win)
Recalculate the display of the Alias Window - Implements MuttWindow::recalc() -.
Convenience wrapper for the gui headers.
void simple_dialog_free(struct MuttWindow **ptr)
Destroy a simple index Dialog.
struct SimpleDialogWindows simple_dialog_new(enum MenuType mtype, enum WindowType wtype, const struct Mapping *help_data)
Create a simple index Dialog.
Shared code for the Alias and Query Dialogs.
@ ED_ALI_NUMBER
AliasView.num.
@ ED_ALI_ADDRESS
Alias.addr.
@ ED_ALI_COMMENT
Alias.comment.
@ ED_ALI_TAGGED
AliasView.tagged.
Read/write command history from/to a file.
@ HC_OTHER
Miscellaneous strings.
#define GETCH_NO_FLAGS
No flags are set.
@ LL_DEBUG5
Log at debug level 5.
@ LL_DEBUG1
Log at debug level 1.
int filter_wait(pid_t pid)
Wait for the exit of a process and return its status.
pid_t filter_create(const char *cmd, FILE **fp_in, FILE **fp_out, FILE **fp_err, char **envlist)
Set up filter program.
Convenience wrapper for the library headers.
bool notify_observer_remove(struct Notify *notify, const observer_t callback, const void *global_data)
Remove an observer from an object.
bool notify_observer_add(struct Notify *notify, enum NotifyType type, observer_t callback, void *global_data)
Add an observer to an object.
char * mutt_str_dup(const char *str)
Copy a string, safely.
Many unsorted constants and some structs.
#define MUTT_COMP_NO_FLAGS
No flags are set.
void mutt_clear_error(void)
Clear the message line (bottom line of screen)
void window_redraw(struct MuttWindow *win)
Reflow, recalc and repaint a tree of Windows.
struct MuttWindow * window_set_focus(struct MuttWindow *win)
Set the Window focus.
@ WT_DLG_QUERY
Query Dialog, dlg_query()
@ NT_WINDOW_DELETE
Window is about to be deleted.
@ NT_WINDOW
MuttWindow has changed, NotifyWindow, EventWindow.
@ NT_CONFIG
Config has changed, NotifyConfig, EventConfig.
const char * opcodes_get_name(int op)
Get the name of an opcode.
Match patterns to emails.
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.
#define TAILQ_FOREACH(var, head, field)
#define TAILQ_INSERT_TAIL(head, elm, field)
#define TAILQ_FIRST(head)
#define TAILQ_NEXT(elm, field)
#define TAILQ_HEAD_INITIALIZER(head)
#define TAILQ_EMPTY(head)
#define MUTT_FORMAT_ARROWCURSOR
Reserve space for arrow_cursor.
uint8_t MuttFormatFlags
Flags for expando_render(), e.g. MUTT_FORMAT_FORCESUBJ.
void sbar_set_title(struct MuttWindow *win, const char *title)
Set the title for the Simple Bar.
void search_state_free(struct SearchState **ptr)
Free a SearchState.
struct SearchState * search_state_new(void)
Create a new SearchState.
Convenience wrapper for the send headers.
int mutt_send_message(SendFlags flags, struct Email *e_templ, const char *tempfile, struct Mailbox *m, struct EmailArray *ea, struct ConfigSubset *sub)
Send an email.
#define SEND_REVIEW_TO
Allow the user to edit the To field.
struct Buffer * personal
Real name of address.
GUI data wrapping an Alias.
struct Alias * alias
Alias.
bool is_tagged
Is it tagged?
int num
Index number in list.
A shortcut for an email address or addresses.
char * comment
Free-form comment string.
struct AddressList addr
List of Addresses the Alias expands to.
String manipulation buffer.
char * data
Pointer to data.
A set of inherited config items.
struct Notify * notify
Notifications: NotifyConfig, EventConfig.
The envelope/body of an email.
struct Envelope * env
Envelope information.
struct AddressList to
Email's 'To' list.
An Event that happened to a Window.
struct MuttWindow * win
Window that changed.
Mapping between user-readable string and a constant.
void * wdata
Private data.
struct Notify * notify
Notifications: NotifyWindow, EventWindow.
int(* recalc)(struct MuttWindow *win)
Container for Accounts, Notifications.
struct ConfigSubset * sub
Inherited config items.
Data passed to a notification function.
void * event_data
Data from notify_send()
enum NotifyType event_type
Send: Event type, e.g. NT_ACCOUNT.
int event_subtype
Send: Event subtype, e.g. NT_ACCOUNT_ADD.
void * global_data
Data from notify_observer_add()
Tuple for the results of simple_dialog_new()
struct MuttWindow * sbar
Simple Bar.
struct MuttWindow * dlg
Main Dialog Window.
@ MENU_QUERY
Select from results of external query.