add m_strchrnul that does what GNU strchrnul does: search for 'c' or
[apps/madmutt.git] / send.c
diff --git a/send.c b/send.c
index 82fd71a..2cf6550 100644 (file)
--- a/send.c
+++ b/send.c
 # include "config.h"
 #endif
 
+#include <ctype.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <dirent.h>
+#include <time.h>
+#include <sys/types.h>
+#include <utime.h>
+
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
 #include <lib-lib/ascii.h>
 #include <lib-lib/macros.h>
 #include <lib-lib/file.h>
+#include <lib-lib/debug.h>
 
 #include <lib-mime/mime.h>
 
+#include <lib-ui/curses.h>
+#include <lib-ui/enter.h>
+
 #include "mutt.h"
-#include "enter.h"
-#include "mutt_curses.h"
 #include "rfc3676.h"
 #include "keymap.h"
 #include "copy.h"
 #include "url.h"
 #include "attach.h"
 
-#include "lib/debug.h"
-
-#include <ctype.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <dirent.h>
-#include <time.h>
-#include <sys/types.h>
-#include <utime.h>
-
 #ifdef USE_NNTP
 #include "nntp.h"
 #endif
@@ -1072,7 +1072,7 @@ static void fix_end_of_file (const char *data)
 
 int mutt_resend_message (FILE * fp, CONTEXT * ctx, HEADER * cur)
 {
-  HEADER *msg = mutt_new_header ();
+  HEADER *msg = header_new();
 
   if (mutt_prepare_template (fp, ctx, msg, cur, 1) < 0)
     return -1;
@@ -1135,7 +1135,7 @@ int ci_send_message (int flags, /* send mode */
    */
 
   if (!msg) {
-    msg = mutt_new_header ();
+    msg = header_new();
 
     if (flags == SENDPOSTPONED) {
       if ((flags =
@@ -1165,7 +1165,7 @@ int ci_send_message (int flags, /* send mode */
     }
 
     if (!msg->env)
-      msg->env = mutt_new_envelope ();
+      msg->env = envelope_new();
   }
 
   /* Parse and use an eventual list-post header */
@@ -1811,7 +1811,7 @@ cleanup:
   }
 
   safe_fclose (&tempfp);
-  mutt_free_header (&msg);
+  header_delete(&msg);
 
   return rv;
 }