]> granicus.if.org Git - neomutt/commitdiff
Hi, off_t is a 64-bit number (like on Mac OS X/darwin), the
authorJuan Altmayer Pizzorno <juan@altmayer.com>
Sat, 7 Feb 2004 21:38:32 +0000 (21:38 +0000)
committerJuan Altmayer Pizzorno <juan@altmayer.com>
Sat, 7 Feb 2004 21:38:32 +0000 (21:38 +0000)
percentages don't show right while mutt is reading/parsing a
mailbox.  Here's a patch (against 1.5.6i) to fix that.

mbox.c

diff --git a/mbox.c b/mbox.c
index dc900e4139b742969df91e59e8f7a5d3bc8b2469..e3f40af2498176d144c8a6697883729c64e3490d 100644 (file)
--- a/mbox.c
+++ b/mbox.c
@@ -123,7 +123,7 @@ int mmdf_parse_mailbox (CONTEXT *ctx)
       count++;
       if (!ctx->quiet && ReadInc && ((count % ReadInc == 0) || count == 1))
        mutt_message (_("Reading %s... %d (%d%%)"), ctx->path, count,
-                     loc / (ctx->size / 100 + 1));
+                     (int)(loc / (ctx->size / 100 + 1)));
 
 
       if (ctx->msgcount == ctx->hdrmax)
@@ -282,7 +282,7 @@ int mbox_parse_mailbox (CONTEXT *ctx)
 
       if (!ctx->quiet && ReadInc && ((count % ReadInc == 0) || count == 1))
        mutt_message (_("Reading %s... %d (%d%%)"), ctx->path, count,
-                     ftell (ctx->fp) / (ctx->size / 100 + 1));
+                     (int)(ftell (ctx->fp) / (ctx->size / 100 + 1)));
 
       if (ctx->msgcount == ctx->hdrmax)
        mx_alloc_memory (ctx);
@@ -787,7 +787,7 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint)
       j++;
       if (!ctx->quiet && WriteInc && ((i % WriteInc) == 0 || j == 1))
        mutt_message (_("Writing messages... %d (%d%%)"), i,
-                     ftell (ctx->fp) / (ctx->size / 100 + 1));
+                     (int)(ftell (ctx->fp) / (ctx->size / 100 + 1)));
 
       if (ctx->magic == M_MMDF)
       {