more work in the lib-mime. begin to "rewr^H^Had" the code in rfc2231.c
[apps/madmutt.git] / hcache.c
index e513c76..e6a1b6d 100644 (file)
--- a/hcache.c
+++ b/hcache.c
 #include <lib-lib/mem.h>
 #include <lib-hash/hash.h>
 
+#include <lib-mime/mime.h>
+
 #include "mutt.h"
 #ifdef USE_IMAP
 #include "message.h"
 #endif
-#include "mime.h"
 #include "mx.h"
 #include "lib.h"
 
@@ -657,20 +658,20 @@ mutt_hcache_fetch(void *db, const char *filename,
 {
   struct header_cache *h = db;
   char path[_POSIX_PATH_MAX];
-  int ksize;
+  int ksize, len;
   char *data = NULL;
 
   if (!h)
     return NULL;
 
   m_strcpy(path, sizeof(path), h->folder);
-  str_cat(path, sizeof (path), filename);
+  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))
+  if (!crc32_matches(data, h->crc))
   {
     p_delete(&data);
     return NULL;
@@ -694,7 +695,7 @@ mutt_hcache_store(void *db, const char *filename, HEADER * header,
     return -1;
 
   m_strcpy(path, sizeof(path), h->folder);
-  str_cat(path, sizeof (path), filename);
+  m_strcat(path, sizeof(path), filename);
 
   ksize = strlen(h->folder) + keylen(path + strlen(h->folder));
 
@@ -719,7 +720,7 @@ mutt_hcache_delete(void *db, const char *filename,
     return -1;
 
   m_strcpy(path, sizeof(path), h->folder);
-  str_cat(path, sizeof (path), filename);
+  m_strcat(path, sizeof(path), filename);
 
   ksize = strlen(h->folder) + keylen(path + strlen(h->folder));