X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mh.c;h=ae978e999404a48b87ffa199b71a224df6ba408d;hp=ab75d5296b9b57d4d88ed1f27265aa212d826d55;hb=23ccf6ef725820684b8ab9724e09bfc75d40b941;hpb=68a299bc56c990b4833db762e43ce0021d323d25 diff --git a/mh.c b/mh.c index ab75d52..ae978e9 100644 --- a/mh.c +++ b/mh.c @@ -22,6 +22,10 @@ * mailboxes. */ +#if HAVE_CONFIG_H +# include "config.h" +#endif + #include "mutt.h" #include "mailbox.h" #include "mx.h" @@ -893,7 +897,6 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) #if USE_HCACHE void *hc = NULL; void *data; - unsigned int size; struct timeval *when = NULL; struct stat lastchanged; int ret; @@ -911,6 +914,8 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) when = (struct timeval *) data; #endif + if (!ctx->quiet && ReadInc && ((count % ReadInc) == 0 || count == 1)) + mutt_message (_("Reading %s... %d"), ctx->path, count); snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path); #if USE_HCACHE @@ -1074,9 +1079,9 @@ int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) FOREVER { - snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%d_%d.%s%s", - dest->path, subdir, time (NULL), getpid (), Counter++, - NONULL (Hostname), suffix); + snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s", + dest->path, subdir, (long) time (NULL), (unsigned int)getpid (), + Counter++, NONULL (Hostname), suffix); dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n", path)); @@ -1156,8 +1161,9 @@ int maildir_commit_message (CONTEXT * ctx, MESSAGE * msg, HEADER * hdr) /* construct a new file name. */ FOREVER { - snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%d_%d.%s%s", subdir, - time (NULL), getpid (), Counter++, NONULL (Hostname), suffix); + snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir, + (long) time (NULL), (unsigned int)getpid (), Counter++, + NONULL (Hostname), suffix); snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path); dprint (2, (debugfile, "maildir_commit_message (): renaming %s to %s.\n",