X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=copy.c;h=48dcabb300c21bb2f2825b2da4003235b635394d;hp=7dbbb97762ed8b206b0dbbb3c5ad26ae9e76a0b0;hb=ef7b80006ebb47372d69c64e8b2b2f0764333d55;hpb=c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372 diff --git a/copy.c b/copy.c index 7dbbb97..48dcabb 100644 --- a/copy.c +++ b/copy.c @@ -38,7 +38,7 @@ static int copy_delete_attach (BODY * b, FILE * fpin, FILE * fpout, * below is to avoid creating a HEADER structure in message_handler(). */ int -mutt_copy_hdr (FILE* in, FILE* out, LOFF_T off_start, LOFF_T off_end, +mutt_copy_hdr (FILE* in, FILE* out, off_t off_start, off_t off_end, int flags, const char *prefix) { int from = 0; int this_is_from; @@ -445,7 +445,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: " OFF_T_FMT "\n", h->content->length); + fprintf (out, "Content-Length: %zd\n", h->content->length); if (h->lines != 0 || h->content->length == 0) fprintf (out, "Lines: %d\n", h->lines); } @@ -464,7 +464,7 @@ mutt_copy_header (FILE * in, HEADER * h, FILE * out, int flags, } /* Count the number of lines and bytes to be deleted in this body*/ -static int count_delete_lines (FILE * fp, BODY * b, LOFF_T *length, +static int count_delete_lines (FILE * fp, BODY * b, off_t *length, size_t datelen) { int dellines = 0; @@ -517,7 +517,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, { char prefix[SHORT_STRING]; STATE s; - LOFF_T new_offset = -1; + off_t new_offset = -1; int rc = 0; if (flags & M_CM_PREFIX) { @@ -534,7 +534,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, else if (hdr->attach_del && (chflags & CH_UPDATE_LEN)) { int new_lines; - LOFF_T new_length = body->length; + off_t new_length = body->length; char date[SHORT_STRING]; mutt_make_date (date, sizeof (date)); @@ -549,7 +549,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: " OFF_T_FMT "\n", new_length); + fprintf (fpout, "Content-Length: %zd\n", new_length); if (new_lines <= 0) new_lines = 0; else @@ -565,7 +565,7 @@ _mutt_copy_message (FILE * fpout, FILE * fpin, HEADER * hdr, BODY * body, #ifdef DEBUG { - LOFF_T fail = ((ftello (fpout) - new_offset) - new_length); + off_t fail = ((ftello (fpout) - new_offset) - new_length); if (fail) { mutt_error ("The length calculation was wrong by %ld bytes", fail); @@ -778,7 +778,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=" OFF_T_FMT "\n" + "\texpiration=%s; length=%zd\n" "\n", date + 5, part->length); if (ferror (fpout)) return -1;