X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=mh.c;h=cfe7c36f928178cc62e9ca6f755dd6be4eccca0e;hp=47231ed2e1e9c5d966b0e72f0658617a738d0d05;hb=5e53f9e5f65aa5b3af6f5af9d868403536534afb;hpb=59926571aaec3e38cec09d0d9fa34f4a4b887309 diff --git a/mh.c b/mh.c index 47231ed..cfe7c36 100644 --- a/mh.c +++ b/mh.c @@ -837,7 +837,7 @@ static struct maildir *maildir_sort_inode (struct maildir *list) } #endif /* USE_INODESORT */ -#if USE_HCACHE +#ifdef USE_HCACHE static size_t maildir_hcache_keylen (const char *fn) { const char *p = strchr (fn, ':'); @@ -856,7 +856,7 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) char fn[_POSIX_PATH_MAX]; int count; -#if USE_HCACHE +#ifdef USE_HCACHE void *hc = NULL; void *data; struct timeval *when = NULL; @@ -870,7 +870,7 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) if (!(p && p->h && !p->header_parsed)) continue; -#if USE_HCACHE +#ifdef USE_HCACHE data = mutt_hcache_fetch (hc, p->h->path + 3, &maildir_hcache_keylen); when = (struct timeval *) data; #endif @@ -879,7 +879,7 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) mutt_message (_("Reading %s... %d"), ctx->path, count); snprintf (fn, sizeof (fn), "%s/%s", ctx->path, p->h->path); -#if USE_HCACHE +#ifdef USE_HCACHE if (option (OPTHCACHEVERIFY)) { ret = stat (fn, &lastchanged); } @@ -897,17 +897,17 @@ void maildir_delayed_parsing (CONTEXT * ctx, struct maildir *md) if (maildir_parse_message (ctx->magic, fn, p->h->old, p->h)) { p->header_parsed = 1; maildir_parse_flags (p->h, fn); -#if USE_HCACHE +#ifdef USE_HCACHE mutt_hcache_store (hc, p->h->path + 3, p->h, 0, &maildir_hcache_keylen); #endif } else mutt_free_header (&p->h); -#if USE_HCACHE +#ifdef USE_HCACHE mem_free (&data); #endif } -#if USE_HCACHE +#ifdef USE_HCACHE mutt_hcache_close (hc); #endif } @@ -1385,7 +1385,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX]; int i, j; -#if USE_HCACHE +#ifdef USE_HCACHE void *hc = NULL; #endif /* USE_HCACHE */ @@ -1397,7 +1397,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) if (i != 0) return i; -#if USE_HCACHE +#ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) hc = mutt_hcache_open (HeaderCache, ctx->path); #endif /* USE_HCACHE */ @@ -1408,7 +1408,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) snprintf (path, sizeof (path), "%s/%s", ctx->path, ctx->hdrs[i]->path); if (ctx->magic == M_MAILDIR || (option (OPTMHPURGE) && ctx->magic == M_MH)) { -#if USE_HCACHE +#ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) mutt_hcache_delete (hc, ctx->hdrs[i]->path + 3, &maildir_hcache_keylen); @@ -1441,7 +1441,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) } } -#if USE_HCACHE +#ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) mutt_hcache_close (hc); #endif /* USE_HCACHE */ @@ -1466,7 +1466,7 @@ static int mh_sync_mailbox (CONTEXT * ctx, int unused, int *index_hint) return 0; err: -#if USE_HCACHE +#ifdef USE_HCACHE if (ctx->magic == M_MAILDIR) mutt_hcache_close (hc); #endif /* USE_HCACHE */