a whole lot of size_t -> ssize_t.
[apps/madmutt.git] / copy.c
diff --git a/copy.c b/copy.c
index 97b73c0..46dfd64 100644 (file)
--- a/copy.c
+++ b/copy.c
 # include "config.h"
 #endif
 
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <unistd.h>
+
 #include <lib-lib/macros.h>
 #include <lib-lib/mem.h>
 #include <lib-lib/str.h>
 #include <lib-lib/file.h>
 #include <lib-lib/ascii.h>
+#include <lib-lib/debug.h>
 
 #include <lib-mime/mime.h>
 
 #include <lib-crypt/crypt.h>
 #include "mutt_idna.h"
 
-#include "lib/debug.h"
-
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <unistd.h>             /* needed for SEEK_SET under SunOS 4.1.4 */
-
 static int address_header_decode (char **str);
 static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout,
                                char *date);
@@ -48,7 +47,7 @@ mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end,
   int ignore = 0;
   char buf[STRING];             /* should be long enough to get most fields in one pass */
   char *nl;
-  LIST *t;
+  string_list_t *t;
   char **headers;
   int hdr_count;
   int x;
@@ -367,7 +366,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags,
   if (flags & CH_UPDATE) {
     if ((flags & CH_NOSTATUS) == 0) {
       if (h->env->irt_changed && h->env->in_reply_to) {
-        LIST *listp = h->env->in_reply_to;
+        string_list_t *listp = h->env->in_reply_to;
 
         if (fputs ("In-Reply-To: ", out) == EOF)
           return (-1);
@@ -381,7 +380,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags,
       }
 
       if (h->env->refs_changed && h->env->references) {
-        LIST *listp = h->env->references, *refs = NULL, *t;
+        string_list_t *listp = h->env->references, *refs = NULL, *t;
 
         if (fputs ("References: ", out) == EOF)
           return (-1);
@@ -389,7 +388,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags,
         /* Mutt stores references in reverse order, thus we create
          * a reordered refs list that we can put in the headers */
         for (; listp; listp = listp->next, refs = t) {
-          t = p_new(LIST, 1);
+          t = p_new(string_list_t, 1);
           t->data = listp->data;
           t->next = refs;
         }
@@ -936,7 +935,7 @@ static int address_header_decode (char **h)
 
   format_address_header (h, a);
 
-  address_delete (&a);
+  address_list_wipe(&a);
 
   p_delete(&s);
   return 1;