X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=lib-mx%2Fmh.c;h=dacef77ae227164c4f143a6cbc6e62230b45025c;hp=89ae790ae812076b3de3ed7033ee283ccf8b3271;hb=981e10e224fde4de5d40adcee1deda89df2715ca;hpb=c819524d3e0eb3c982c43d4ee88c148b1141397a diff --git a/lib-mx/mh.c b/lib-mx/mh.c index 89ae790..dacef77 100644 --- a/lib-mx/mh.c +++ b/lib-mx/mh.c @@ -16,7 +16,7 @@ #include #include -#include +#include #include "mutt.h" #include "mx.h" @@ -163,7 +163,7 @@ static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt) for (;;) { snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d", - dest->path, NONULL(MCore.shorthost), (int) getpid (), Counter++); + dest->path, NONULL(mod_core.shorthost), (int) getpid (), Counter++); umask (Umask); if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) { if (errno != EEXIST) { @@ -656,7 +656,7 @@ static int maildir_parse_dir (CONTEXT * ctx, struct maildir ***last, /* FOO - really ignore the return value? */ maildir_parse_entry (ctx, last, subdir, de->d_name, count, is_old, -#if HAVE_DIRENT_D_INO +#ifdef HAVE_DIRENT_D_INO de->d_ino #else 0 @@ -730,7 +730,7 @@ static void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) struct stat lastchanged; int ret; - hc = mutt_hcache_open (HeaderCache, ctx->path); + hc = mutt_hcache_open(ctx->path); #endif for (p = md, count = 0; p; p = p->next, count++) { @@ -898,7 +898,7 @@ static int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr for (;;) { snprintf (path, _POSIX_PATH_MAX, "%s/tmp/%s.%ld.%u_%d.%s%s", dest->path, subdir, (long) time (NULL), - (unsigned int) getpid (), Counter++, NONULL (MCore.shorthost), suffix); + (unsigned int) getpid (), Counter++, NONULL (mod_core.shorthost), suffix); umask (Umask); if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1) { @@ -971,7 +971,7 @@ static int maildir_commit_message (MESSAGE * msg, CONTEXT * ctx, HEADER * hdr) for (;;) { snprintf (path, _POSIX_PATH_MAX, "%s/%ld.%u_%d.%s%s", subdir, (long) time (NULL), (unsigned int) getpid (), Counter++, - NONULL (MCore.shorthost), suffix); + NONULL (mod_core.shorthost), suffix); snprintf (full, _POSIX_PATH_MAX, "%s/%s", ctx->path, path); if (safe_rename (msg->path, full) == 0) { @@ -1229,7 +1229,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), int i, j; #ifdef USE_HCACHE - void *hc = NULL; + hcache_t *hc = NULL; #endif /* USE_HCACHE */ if (ctx->magic == M_MH) @@ -1242,7 +1242,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), #ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) - hc = mutt_hcache_open (HeaderCache, ctx->path); + hc = mutt_hcache_open(ctx->path); #endif /* USE_HCACHE */ for (i = 0; i < ctx->msgcount; i++) { @@ -1286,7 +1286,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), #ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) - mutt_hcache_close (hc); + mutt_hcache_close (&hc); #endif /* USE_HCACHE */ if (ctx->magic == M_MH) @@ -1311,7 +1311,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused __attribute__ ((unused)), err: #ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) - mutt_hcache_close (hc); + mutt_hcache_close (&hc); #endif /* USE_HCACHE */ return -1; }