{
static address_t *tmp;
- tmp = rfc822_cpy_adr (r->addr);
+ tmp = address_list_dup (r->addr);
if (!tmp->next && !tmp->personal)
tmp->personal = m_strdup(r->name);
* a menu entry for the requested item number.
*/
#define QUERY_MIN_COLUMN_LENGHT 20 /* Must be < 70/2 */
-static void query_entry (char *s, size_t slen, MUTTMENU * m, int num)
+static void query_entry (char *s, ssize_t slen, MUTTMENU * m, int num)
{
ENTRY *table = (ENTRY *) m->data;
char buf2[SHORT_STRING], buf[SHORT_STRING] = "";
mutt_addrlist_to_local (tmpa);
buf[0] = '\0';
rfc822_write_address (buf, buflen, tmpa, 0);
- rfc822_free_address (&tmpa);
+ address_delete (&tmpa);
mutt_clear_error ();
return (0);
}
if (op == OP_QUERY) {
queryp = results;
while (queryp) {
- rfc822_free_address (&queryp->addr);
+ address_delete (&queryp->addr);
p_delete(&queryp->name);
p_delete(&queryp->other);
results = queryp->next;
for (i = 0; i < menu->max; i++)
if (QueryTable[i].tagged) {
- address_t *a = result_to_addr (QueryTable[i].data);
-
- rfc822_append (&naddr, a);
- rfc822_free_address (&a);
+ address_list_append(&naddr, result_to_addr(QueryTable[i].data));
}
mutt_create_alias (NULL, naddr);
address_t *a = result_to_addr (QueryTable[menu->current].data);
mutt_create_alias (NULL, a);
- rfc822_free_address (&a);
+ address_delete (&a);
}
break;
/* fall through to OP_MAIL */
case OP_MAIL:
- msg = mutt_new_header ();
- msg->env = mutt_new_envelope ();
+ msg = header_new();
+ msg->env = envelope_new();
if (!menu->tagprefix) {
msg->env->to = result_to_addr (QueryTable[menu->current].data);
}
else {
for (i = 0; i < menu->max; i++)
if (QueryTable[i].tagged) {
- address_t *a = result_to_addr (QueryTable[i].data);
-
- rfc822_append (&msg->env->to, a);
- rfc822_free_address (&a);
+ address_list_append(&msg->env->to, result_to_addr(QueryTable[i].data));
}
}
ci_send_message (0, msg, NULL, Context, NULL);
tagged = 1;
rfc822_write_address (buf, buflen, tmpa, 0);
curpos = m_strlen(buf);
- rfc822_free_address (&tmpa);
+ address_delete (&tmpa);
}
else if (curpos + 2 < buflen) {
address_t *tmpa = result_to_addr (QueryTable[i].data);
rfc822_write_address ((char *) buf + curpos + 1,
buflen - curpos - 1, tmpa, 0);
curpos = m_strlen(buf);
- rfc822_free_address (&tmpa);
+ address_delete (&tmpa);
}
}
}
mutt_addrlist_to_local (tmpa);
rfc822_write_address (buf, buflen, tmpa, 0);
- rfc822_free_address (&tmpa);
+ address_delete (&tmpa);
}
}
queryp = results;
while (queryp) {
- rfc822_free_address (&queryp->addr);
+ address_delete (&queryp->addr);
p_delete(&queryp->name);
p_delete(&queryp->other);
results = queryp->next;