X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=send.c;h=4039463ba3cbdd3c9f62a2ab4f6bd8cbc9aa2b0f;hp=fd0341be96906d3a7ae4c07025615bdc158c6c3f;hb=230399f9632c37b66c1c117a17e8327eae6b3235;hpb=c8c9a616c8c369da6aa06e656eacfb82af8707a8 diff --git a/send.c b/send.c index fd0341b..4039463 100644 --- a/send.c +++ b/send.c @@ -23,12 +23,7 @@ #include #include -#include -#include -#include -#include -#include -#include +#include #include #include @@ -585,25 +580,6 @@ int mutt_fetch_recips (ENVELOPE * out, ENVELOPE * in, int flags) return 0; } -string_list_t *mutt_make_references (ENVELOPE * e) -{ - string_list_t *t = NULL, *l = NULL; - - if (e->references) - l = string_list_dup(e->references); - else - l = string_list_dup(e->in_reply_to); - - if (e->message_id) { - t = string_item_new(); - t->data = m_strdup(e->message_id); - t->next = l; - l = t; - } - - return l; -} - void mutt_fix_reply_recipients (ENVELOPE * env) { mutt_expand_aliases_env (env); @@ -617,8 +593,8 @@ void mutt_fix_reply_recipients (ENVELOPE * env) } /* the CC field can get cluttered, especially with lists */ - env->to = mutt_remove_duplicates (env->to); - env->cc = mutt_remove_duplicates (env->cc); + address_list_uniq(&env->to); + address_list_uniq(&env->cc); env->cc = mutt_remove_xrefs (env->to, env->cc); if (env->cc && !env->to) { @@ -656,6 +632,25 @@ void mutt_make_misc_reply_headers (ENVELOPE * env, CONTEXT * ctx, #endif } +static string_list_t *mutt_make_references (ENVELOPE * e) +{ + string_list_t *t = NULL, *l = NULL; + + if (e->references) + l = string_list_dup(e->references); + else + l = string_list_dup(e->in_reply_to); + + if (e->message_id) { + t = string_item_new(); + t->data = m_strdup(e->message_id); + t->next = l; + l = t; + } + + return l; +} + void mutt_add_to_reference_headers (ENVELOPE * env, ENVELOPE * curenv, string_list_t *** pp, string_list_t *** qq) { @@ -925,7 +920,7 @@ void mutt_set_followup_to (ENVELOPE * e) } } - e->mail_followup_to = mutt_remove_duplicates(e->mail_followup_to); + address_list_uniq(&e->mail_followup_to); } }