X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mbox.c;h=71228d932f94a10056ebbcee3ee6d42d9da30107;hp=dedf7c67ea123c921b5f54d3dbfba6b1c9b329fc;hb=be99cd72fc79e2f10aec2b06d62abb16c16aa34d;hpb=6e0187ce721be4997bef32d724528f8976df89d6 diff --git a/mbox.c b/mbox.c index dedf7c6..71228d9 100644 --- a/mbox.c +++ b/mbox.c @@ -18,6 +18,10 @@ /* This file contains code to parse ``mbox'' and ``mmdf'' style mailboxes */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "mutt.h" #include "mailbox.h" #include "mx.h" @@ -127,7 +131,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) @@ -286,7 +290,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); @@ -791,7 +795,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) { @@ -928,8 +932,8 @@ int mbox_sync_mailbox (CONTEXT *ctx, int *index_hint) char savefile[_POSIX_PATH_MAX]; - snprintf (savefile, sizeof (savefile), "%s/mutt.%s-%s-%d", - NONULL (Tempdir), NONULL(Username), NONULL(Hostname), getpid ()); + snprintf (savefile, sizeof (savefile), "%s/mutt.%s-%s-%u", + NONULL (Tempdir), NONULL(Username), NONULL(Hostname), (unsigned int)getpid ()); rename (tempfile, savefile); mutt_unblock_signals (); mx_fastclose_mailbox (ctx);