int mutt_display_message (HEADER *h);
int mutt_dump_variables (void);
int mutt_edit_attachment(BODY *);
+int mutt_edit_address (ADDRESS **, const char *, int);
int mutt_edit_message (CONTEXT *, HEADER *);
int mutt_fetch_recips (ENVELOPE *out, ENVELOPE *in, int flags);
int mutt_chscmp (const char *s, const char *chs);
return top;
}
-static int edit_address (ADDRESS **a, /* const */ char *field)
+int mutt_edit_address (ADDRESS **a, const char *field, int expand_aliases)
{
char buf[HUGE_STRING];
char *err = NULL;
if (mutt_get_field (field, buf, sizeof (buf), MUTT_ALIAS) != 0)
return (-1);
rfc822_free_address (a);
- *a = mutt_expand_aliases (mutt_parse_adrlist (NULL, buf));
+ *a = mutt_parse_adrlist (NULL, buf);
+ if (expand_aliases)
+ *a = mutt_expand_aliases (*a);
if ((idna_ok = mutt_addrlist_to_intl (*a, &err)) != 0)
{
mutt_error (_("Error: '%s' is a bad IDN."), err);
char buf[HUGE_STRING];
LIST *uh = UserHeader;
- if (edit_address (&en->to, _("To: ")) == -1 || en->to == NULL)
+ if (mutt_edit_address (&en->to, _("To: "), 1) == -1 || en->to == NULL)
return (-1);
- if (option (OPTASKCC) && edit_address (&en->cc, _("Cc: ")) == -1)
+ if (option (OPTASKCC) && mutt_edit_address (&en->cc, _("Cc: "), 1) == -1)
return (-1);
- if (option (OPTASKBCC) && edit_address (&en->bcc, _("Bcc: ")) == -1)
+ if (option (OPTASKBCC) && mutt_edit_address (&en->bcc, _("Bcc: "), 1) == -1)
return (-1);
if (en->subject)