X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=hcache.c;h=532a2b8d52343708528d18b49293dde65ab3ed73;hp=9c78a8239b79e4c7648973ea778dafcc4661dd3d;hb=23e6291cb5d5b4cd2008403d8b628007fd75ff23;hpb=40fc05e11b8f95a9661e6e410a9e7b7da7824891 diff --git a/hcache.c b/hcache.c index 9c78a82..532a2b8 100644 --- a/hcache.c +++ b/hcache.c @@ -42,16 +42,16 @@ #include #include -#include #include +#include "charset.h" #include "mutt.h" #include #include "mx.h" #include "lib.h" -static struct header_cache { +struct header_cache { #if defined(HAVE_QDBM) VILLA *db; char *folder; @@ -67,7 +67,7 @@ static struct header_cache { int fd; char lockfile[_POSIX_PATH_MAX]; #endif -} HEADER_CACHE; +}; typedef union { struct timeval timeval; @@ -712,7 +712,7 @@ mutt_hcache_delete(void *db, const char *filename, void *mutt_hcache_open (const char *path, const char *folder) { - struct header_cache *h = p_new(HEADER_CACHE, 1); + struct header_cache *h = p_new(struct header_cache, 1); int pagesize = atoi (HeaderCachePageSize) ? atoi (HeaderCachePageSize) : 16384; h->db = NULL; @@ -857,7 +857,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);