* 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;
}
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);
}
}
/* 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;
{
char prefix[SHORT_STRING];
STATE s;
- LOFF_T new_offset = -1;
+ off_t new_offset = -1;
int rc = 0;
if (flags & M_CM_PREFIX) {
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));
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
#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);
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;