#include <ctype.h>
#include "mutt.h"
+#include "ascii.h"
+#include "buffer.h"
#include "mutt_curses.h"
#include "imap_private.h"
#include "message.h"
#include "mx.h"
+#include "hcache.h"
#ifdef HAVE_PGP
#include "pgp.h"
rewind (fp);
memset (&h, 0, sizeof (h));
- h.data = safe_calloc (1, sizeof (IMAP_HEADER_DATA));
+ h.data = mem_calloc (1, sizeof (IMAP_HEADER_DATA));
do {
mfhrc = 0;
rewind (fp);
- FREE (&uid_validity);
+ mem_free (&uid_validity);
}
while ((rc != IMAP_CMD_OK) && ((mfhrc == -1) ||
/* freshen fp, h */
rewind (fp);
memset (&h, 0, sizeof (h));
- h.data = safe_calloc (1, sizeof (IMAP_HEADER_DATA));
+ h.data = mem_calloc (1, sizeof (IMAP_HEADER_DATA));
/* this DO loop does two things:
* 1. handles untagged messages, so we can try again on the same msg
return 0;
else {
unlink (cache->path);
- FREE (&cache->path);
+ mem_free (&cache->path);
}
}
mutt_mktemp (path);
cache->path = str_dup (path);
if (!(msg->fp = safe_fopen (path, "w+"))) {
- FREE (&cache->path);
+ mem_free (&cache->path);
return -1;
}
safe_fclose (&msg->fp);
if (cache->path) {
unlink (cache->path);
- FREE (&cache->path);
+ mem_free (&cache->path);
}
return -1;
goto fail;
}
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return 0;
fail:
- FREE (&mx.mbox);
+ mem_free (&mx.mbox);
return -1;
}
}
if (cmd.data)
- FREE (&cmd.data);
+ mem_free (&cmd.data);
if (sync_cmd.data)
- FREE (&sync_cmd.data);
- FREE (&mx.mbox);
+ mem_free (&sync_cmd.data);
+ mem_free (&mx.mbox);
return 0;
fail:
if (cmd.data)
- FREE (&cmd.data);
+ mem_free (&cmd.data);
if (sync_cmd.data)
- FREE (&sync_cmd.data);
- FREE (&mx.mbox);
+ mem_free (&sync_cmd.data);
+ mem_free (&mx.mbox);
return -1;
}
/* this should be safe even if the list wasn't used */
mutt_free_list (&(((IMAP_HEADER_DATA *) * data)->keywords));
- FREE (data);
+ mem_free (data);
}
/* imap_set_flags: fill out the message header according to the flags from
unsigned char readonly;
memset (&newh, 0, sizeof (newh));
- newh.data = safe_calloc (1, sizeof (IMAP_HEADER_DATA));
+ newh.data = mem_calloc (1, sizeof (IMAP_HEADER_DATA));
debug_print (2, ("parsing FLAGS\n"));
if ((s = msg_parse_flags (&newh, s)) == NULL) {
- FREE (&newh.data);
+ mem_free (&newh.data);
return NULL;
}
mutt_free_list (&(HEADER_DATA (h)->keywords));
HEADER_DATA (h)->keywords = newh.data->keywords;
- FREE (&newh.data);
+ mem_free (&newh.data);
return s;
}