X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=copy.c;h=504a1e2f555fde0c5b2aa466456cf470a9acb19f;hp=27cf0739be4f91430770192f797daa723f3a2415;hb=c5ca8b7eaa727392811813926cda758bceef80f1;hpb=238b70e39b78f585c586bd51aef41988b3cc73d1 diff --git a/copy.c b/copy.c index 27cf073..504a1e2 100644 --- a/copy.c +++ b/copy.c @@ -17,12 +17,12 @@ #include #include +#include + #include "mutt.h" #include "handler.h" #include "mx.h" #include "copy.h" -#include "rfc2047.h" -#include "mime.h" #include "mutt_crypt.h" #include "mutt_idna.h" @@ -355,7 +355,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags, fputs ("Content-Type: text/plain; charset=", out); mutt_canonical_charset (chsbuf, sizeof (chsbuf), Charset ? Charset : "us-ascii"); - rfc822_cat (buffer, sizeof (buffer), chsbuf, MimeSpecials); + rfc822_strcpy(buffer, sizeof(buffer), chsbuf, MimeSpecials); fputs (buffer, out); fputc ('\n', out); @@ -444,7 +444,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags, } if (flags & CH_UPDATE_LEN && (flags & CH_NOLEN) == 0) { - fprintf (out, "Content-Length: %zd\n", h->content->length); + fprintf (out, "Content-Length: %lld\n", h->content->length); if (h->lines != 0 || h->content->length == 0) fprintf (out, "Lines: %d\n", h->lines); } @@ -548,7 +548,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, if (mutt_copy_header (fpin, hdr, fpout, chflags | CH_NOLEN | CH_NONEWLINE, NULL)) return -1; - fprintf (fpout, "Content-Length: %zd\n", new_length); + fprintf (fpout, "Content-Length: %lld\n", new_length); if (new_lines <= 0) new_lines = 0; else @@ -718,7 +718,7 @@ mutt_copy_message (FILE * fpout, CONTEXT * src, HEADER * hdr, int flags, */ int -_mutt_append_message (CONTEXT * dest, FILE * fpin, CONTEXT * src, +_mutt_append_message (CONTEXT * dest, FILE * fpin, CONTEXT * src __attribute__ ((unused)), HEADER * hdr, BODY * body, int flags, int chflags) { char buf[STRING]; MESSAGE *msg; @@ -777,7 +777,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, if (part->deleted) { fprintf (fpout, "Content-Type: message/external-body; access-type=x-mutt-deleted;\n" - "\texpiration=%s; length=%zd\n" + "\texpiration=%s; length=%lld\n" "\n", date + 5, part->length); if (ferror (fpout)) return -1; @@ -812,7 +812,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, * XXX - fix that. */ -static void format_address_header (char **h, ADDRESS * a) +static void format_address_header (char **h, address_t * a) { char buf[HUGE_STRING]; char cbuf[STRING]; @@ -826,7 +826,7 @@ static void format_address_header (char **h, ADDRESS * a) p_realloc(h, buflen); for (count = 0; a; a = a->next, count++) { - ADDRESS *tmp = a->next; + address_t *tmp = a->next; a->next = NULL; *buf = *cbuf = *c2buf = '\0'; @@ -867,7 +867,7 @@ static int address_header_decode (char **h) char *s = *h; int l; - ADDRESS *a = NULL; + address_t *a = NULL; switch (tolower ((unsigned char) *s)) { case 'r': @@ -939,7 +939,7 @@ static int address_header_decode (char **h) format_address_header (h, a); - rfc822_free_address (&a); + address_delete (&a); p_delete(&s); return 1;