From: Juan Altmayer Pizzorno Date: Sat, 7 Feb 2004 21:38:32 +0000 (+0000) Subject: Hi, off_t is a 64-bit number (like on Mac OS X/darwin), the X-Git-Tag: mutt-1-5-15-rel~221 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c5fdda3db086a4b15fd72c81ab74ef720c263ff0;p=mutt Hi, off_t is a 64-bit number (like on Mac OS X/darwin), the percentages don't show right while mutt is reading/parsing a mailbox. Here's a patch (against 1.5.6i) to fix that. --- diff --git a/mbox.c b/mbox.c index dc900e41..e3f40af2 100644 --- 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) {