}
#endif /* USE_INODESORT */
-#if USE_HCACHE
+#ifdef USE_HCACHE
static size_t maildir_hcache_keylen (const char *fn)
{
const char *p = strchr (fn, ':');
char fn[_POSIX_PATH_MAX];
int count;
-#if USE_HCACHE
+#ifdef USE_HCACHE
void *hc = NULL;
void *data;
struct timeval *when = NULL;
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
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);
}
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
}
char path[_POSIX_PATH_MAX], tmp[_POSIX_PATH_MAX];
int i, j;
-#if USE_HCACHE
+#ifdef USE_HCACHE
void *hc = NULL;
#endif /* USE_HCACHE */
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 */
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);
}
}
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == M_MAILDIR)
mutt_hcache_close (hc);
#endif /* USE_HCACHE */
return 0;
err:
-#if USE_HCACHE
+#ifdef USE_HCACHE
if (ctx->magic == M_MAILDIR)
mutt_hcache_close (hc);
#endif /* USE_HCACHE */