missing include
[apps/madmutt.git] / compose.c
index 6ecac7f..3d5f39c 100644 (file)
--- a/compose.c
+++ b/compose.c
@@ -19,6 +19,9 @@
 #include <lib-lib/str.h>
 #include <lib-lib/macros.h>
 #include <lib-lib/file.h>
+#include <lib-lib/mapping.h>
+
+#include <lib-mime/mime.h>
 
 #include "mutt.h"
 #include "enter.h"
 #include "mutt_idna.h"
 #include "mutt_menu.h"
 #include "rfc1524.h"
-#include "mime.h"
 #include "attach.h"
 #include "recvattach.h"
-#include "mapping.h"
 #include "sort.h"
 #include "charset.h"
 #include "mx.h"
@@ -265,7 +266,7 @@ static int check_attachments (ATTACHPTR ** idx, short idxlen)
   return 0;
 }
 
-static void draw_envelope_addr (int line, ADDRESS * addr)
+static void draw_envelope_addr (int line, address_t * addr)
 {
   char buf[STRING];
 
@@ -319,7 +320,7 @@ static void draw_envelope (HEADER * msg, char *fcc)
   SETCOLOR (MT_COLOR_NORMAL);
 }
 
-static int edit_address_list (int line, ADDRESS ** addr)
+static int edit_address_list (int line, address_t ** addr)
 {
   char buf[HUGE_STRING] = "";   /* needs to be large for alias expansion */
   char *err = NULL;
@@ -327,7 +328,7 @@ static int edit_address_list (int line, ADDRESS ** addr)
   mutt_addrlist_to_local (*addr);
   rfc822_write_address (buf, sizeof (buf), *addr, 0);
   if (mutt_get_field (Prompts[line - 1], buf, sizeof (buf), M_ALIAS) == 0) {
-    rfc822_free_address (addr);
+    address_delete (addr);
     *addr = mutt_parse_adrlist (*addr, buf);
     *addr = mutt_expand_aliases (*addr);
   }
@@ -622,7 +623,7 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
             && buf[0]) {
           p_delete(&msg->env->newsgroups);
           str_skip_trailws (buf);
-          msg->env->newsgroups = m_strdup(str_skip_initws (buf));
+          msg->env->newsgroups = m_strdup(vskipspaces(buf));
           move (HDR_TO, HDR_XOFFSET);
           clrtoeol ();
           if (msg->env->newsgroups)
@@ -640,7 +641,7 @@ int mutt_compose_menu (HEADER * msg,    /* structure for new message */
             && buf[0]) {
           p_delete(&msg->env->followup_to);
           str_skip_trailws (buf);
-          msg->env->followup_to = m_strdup(str_skip_initws (buf));
+          msg->env->followup_to = m_strdup(vskipspaces(buf));
           move (HDR_CC, HDR_XOFFSET);
           clrtoeol ();
           if (msg->env->followup_to)