X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=copy.c;h=3a010d4f1443e3b25cd94dfc879b82a3b2ea797c;hp=42543d3305f021ffe00b2145117dafa8c1d72583;hb=1ee89902de184a640c171ae3285bff6882a791bd;hpb=fdb93a08e305b8755260144807e4d45106a9cb9f diff --git a/copy.c b/copy.c index 42543d3..3a010d4 100644 --- a/copy.c +++ b/copy.c @@ -7,20 +7,7 @@ * please see the file GPL in the top level source directory. */ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include -#include +#include #include @@ -346,8 +333,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags, fputs ("MIME-Version: 1.0\n", out); fputs ("Content-Transfer-Encoding: 8bit\n", out); fputs ("Content-Type: text/plain; charset=", out); - charset_canonicalize (chsbuf, sizeof (chsbuf), - Charset ? Charset : "us-ascii"); + charset_canonicalize(chsbuf, sizeof (chsbuf), Charset); rfc822_strcpy(buffer, sizeof(buffer), chsbuf, MimeSpecials); fputs (buffer, out); fputc ('\n', out); @@ -571,7 +557,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, Context->vsize -= body->length - new_length; body->length = new_length; - mutt_free_body (&body->parts); + body_list_wipe(&body->parts); } return 0; @@ -630,10 +616,10 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, fseeko (fp, cur->offset, 0); if (mutt_copy_bytes (fp, fpout, cur->length) == -1) { fclose (fp); - mutt_free_body (&cur); + body_list_wipe(&cur); return (-1); } - mutt_free_body (&cur); + body_list_wipe(&cur); fclose (fp); } else { @@ -658,7 +644,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, if ((flags & M_CM_UPDATE) && (flags & M_CM_NOHEADER) == 0 && new_offset != -1) { body->offset = new_offset; - mutt_free_body (&body->parts); + body_list_wipe(&body->parts); } return rc;