rework includes a bit
[apps/madmutt.git] / hcache.c
index 496fd09..5dc14e5 100644 (file)
--- a/hcache.c
+++ b/hcache.c
 
 #include <lib-mime/mime.h>
 
+#include "charset.h"
 #include "mutt.h"
 #include <imap/message.h>
 #include "mx.h"
 #include "lib.h"
 
-static struct header_cache {
+struct header_cache {
 #if defined(HAVE_QDBM)
   VILLA *db;
   char *folder;
@@ -67,7 +68,7 @@ static struct header_cache {
   int fd;
   char lockfile[_POSIX_PATH_MAX];
 #endif
-} HEADER_CACHE;
+};
 
 typedef union {
   struct timeval timeval;
@@ -857,7 +858,7 @@ void *mutt_hcache_open (const char *path, const char *folder)
   struct stat sb;
   u_int32_t createflags = DB_CREATE;
   int ret;
-  struct header_cache *h = calloc (1, sizeof (HEADER_CACHE));
+  struct header_cache *h = p_new(struct header_cache, 1);
   int pagesize = atoi (HeaderCachePageSize);