-#if defined(HAVE_QDBM)
-void *
-mutt_hcache_fetch(hcache_t *db, const char *filename,
- ssize_t(*keylen) (const char *fn))
-{
- hcache_t *h = db;
- char path[_POSIX_PATH_MAX];
- int ksize;
- char *data = NULL;
-
- if (!h)
- return NULL;
-
- m_strcpy(path, sizeof(path), h->folder);
- m_strcat(path, sizeof(path), filename);
-
- ksize = strlen(h->folder) + keylen(path + strlen(h->folder));
-
- data = vlget(h->db, path, ksize, NULL);
-
- if (!crc32_matches(data, h->crc))
- {
- p_delete(&data);
- return NULL;
- }
-
- return data;
-}
-
-int
-mutt_hcache_store(hcache_t *db, const char *filename, HEADER * header,
- unsigned long uid_validity,
- ssize_t(*keylen) (const char *fn))
-{
- hcache_t *h = db;
- char path[_POSIX_PATH_MAX];
- int ret;
- int ksize, dsize;
- char *data = NULL;
-
- if (!h)
- return -1;
-
- m_strcpy(path, sizeof(path), h->folder);
- m_strcat(path, sizeof(path), filename);
-
- ksize = strlen(h->folder) + keylen(path + strlen(h->folder));
-
- data = mutt_hcache_dump(db, header, &dsize, uid_validity);
-
- ret = vlput(h->db, path, ksize, data, dsize, VL_DOVER);
-
- p_delete(&data);
-
- return ret;
-}
-
-int
-mutt_hcache_delete(hcache_t *db, const char *filename,
- ssize_t(*keylen) (const char *fn))