summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRocco Rutte <pdmef@gmx.net>2008-05-21 19:23:43 +0200
committerRocco Rutte <pdmef@gmx.net>2008-05-21 19:23:43 +0200
commit64f7f723f43c09c167985a75fa4d89a44b443c03 (patch)
tree4f87f07681cc09a1b63f28b6d086a52af558662c
parent2ae549db5a0c709dfbaaa02a15c1604b89b7731a (diff)
Use ftello() instead of ftell() in more places that need it (fixes
progress updates for >2 GB mbox files)
-rw-r--r--mbox.c6
-rw-r--r--sendlib.c2
2 files changed, 4 insertions, 4 deletions
diff --git a/mbox.c b/mbox.c
index c4501722..8111c237 100644
--- a/mbox.c
+++ b/mbox.c
@@ -136,7 +136,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx)
count++;
if (!ctx->quiet)
mutt_progress_update (&progress, count,
- (int)loc / (ctx->size / 100 + 1));
+ (int) (loc / (ctx->size / 100 + 1)));
if (ctx->msgcount == ctx->hdrmax)
mx_alloc_memory (ctx);
@@ -302,7 +302,7 @@ int mbox_parse_mailbox (CONTEXT *ctx)
if (!ctx->quiet)
mutt_progress_update (&progress, count,
- (int)(ftell (ctx->fp) / (ctx->size / 100 + 1)));
+ (int)(ftello (ctx->fp) / (ctx->size / 100 + 1)));
if (ctx->msgcount == ctx->hdrmax)
mx_alloc_memory (ctx);
@@ -799,7 +799,7 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
for (i = first, j = 0; i < ctx->msgcount; i++)
{
if (!ctx->quiet)
- mutt_progress_update (&progress, i, (int)(ftell (ctx->fp) / (ctx->size / 100 + 1)));
+ mutt_progress_update (&progress, i, (int)(ftello (ctx->fp) / (ctx->size / 100 + 1)));
/*
* back up some information which is needed to restore offsets when
* something fails.
diff --git a/sendlib.c b/sendlib.c
index ab4ace2f..9073bd4f 100644
--- a/sendlib.c
+++ b/sendlib.c
@@ -2668,7 +2668,7 @@ int mutt_write_fcc (const char *path, HEADER *hdr, const char *msgid, int post,
rewind (tempfp);
while (fgets (sasha, sizeof (sasha), tempfp) != NULL)
lines++;
- fprintf (msg->fp, "Content-Length: " OFF_T_FMT "\n", (LOFF_T) ftell (tempfp));
+ fprintf (msg->fp, "Content-Length: " OFF_T_FMT "\n", (LOFF_T) ftello (tempfp));
fprintf (msg->fp, "Lines: %d\n\n", lines);
/* copy the body and clean up */