projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
imap
/
message.c
diff --git
a/imap/message.c
b/imap/message.c
index
6e6314d
..
416ca73
100644
(file)
--- a/
imap/message.c
+++ b/
imap/message.c
@@
-128,7
+128,7
@@
int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend)
rewind (fp);
memset (&h, 0, sizeof (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;
do {
mfhrc = 0;
@@
-171,7
+171,7
@@
int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend)
rewind (fp);
rewind (fp);
-
FREE
(&uid_validity);
+
mem_free
(&uid_validity);
}
while ((rc != IMAP_CMD_OK) && ((mfhrc == -1) ||
}
while ((rc != IMAP_CMD_OK) && ((mfhrc == -1) ||
@@
-218,7
+218,7
@@
int imap_read_headers (IMAP_DATA * idata, int msgbegin, int msgend)
/* freshen fp, h */
rewind (fp);
memset (&h, 0, sizeof (h));
/* 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
/* this DO loop does two things:
* 1. handles untagged messages, so we can try again on the same msg
@@
-340,7
+340,7
@@
int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno)
return 0;
else {
unlink (cache->path);
return 0;
else {
unlink (cache->path);
-
FREE
(&cache->path);
+
mem_free
(&cache->path);
}
}
}
}
@@
-349,9
+349,9
@@
int imap_fetch_message (MESSAGE * msg, CONTEXT * ctx, int msgno)
cache->uid = HEADER_DATA (h)->uid;
mutt_mktemp (path);
cache->uid = HEADER_DATA (h)->uid;
mutt_mktemp (path);
- cache->path = s
afe_str
dup (path);
+ cache->path = s
tr_
dup (path);
if (!(msg->fp = safe_fopen (path, "w+"))) {
if (!(msg->fp = safe_fopen (path, "w+"))) {
-
FREE
(&cache->path);
+
mem_free
(&cache->path);
return -1;
}
return -1;
}
@@
-472,7
+472,7
@@
bail:
safe_fclose (&msg->fp);
if (cache->path) {
unlink (cache->path);
safe_fclose (&msg->fp);
if (cache->path) {
unlink (cache->path);
-
FREE
(&cache->path);
+
mem_free
(&cache->path);
}
return -1;
}
return -1;
@@
-579,11
+579,11
@@
int imap_append_message (CONTEXT * ctx, MESSAGE * msg)
goto fail;
}
goto fail;
}
-
FREE
(&mx.mbox);
+
mem_free
(&mx.mbox);
return 0;
fail:
return 0;
fail:
-
FREE
(&mx.mbox);
+
mem_free
(&mx.mbox);
return -1;
}
return -1;
}
@@
-725,18
+725,18
@@
int imap_copy_messages (CONTEXT * ctx, HEADER * h, char *dest, int delete)
}
if (cmd.data)
}
if (cmd.data)
-
FREE
(&cmd.data);
+
mem_free
(&cmd.data);
if (sync_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)
return 0;
fail:
if (cmd.data)
-
FREE
(&cmd.data);
+
mem_free
(&cmd.data);
if (sync_cmd.data)
if (sync_cmd.data)
-
FREE
(&sync_cmd.data);
-
FREE
(&mx.mbox);
+
mem_free
(&sync_cmd.data);
+
mem_free
(&mx.mbox);
return -1;
}
return -1;
}
@@
-754,8
+754,8
@@
void imap_add_keywords (char *s, HEADER * h, LIST * mailbox_flags,
while (keywords) {
if (msg_has_flag (mailbox_flags, keywords->data)) {
while (keywords) {
if (msg_has_flag (mailbox_flags, keywords->data)) {
- s
afe_str
cat (s, slen, keywords->data);
- s
afe_str
cat (s, slen, " ");
+ s
tr_
cat (s, slen, keywords->data);
+ s
tr_
cat (s, slen, " ");
}
keywords = keywords->next;
}
}
keywords = keywords->next;
}
@@
-767,7
+767,7
@@
void imap_free_header_data (void **data)
/* this should be safe even if the list wasn't used */
mutt_free_list (&(((IMAP_HEADER_DATA *) * data)->keywords));
/* 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
}
/* imap_set_flags: fill out the message header according to the flags from
@@
-779,11
+779,11
@@
char *imap_set_flags (IMAP_DATA * idata, HEADER * h, char *s)
unsigned char readonly;
memset (&newh, 0, sizeof (newh));
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) {
debug_print (2, ("parsing FLAGS\n"));
if ((s = msg_parse_flags (&newh, s)) == NULL) {
-
FREE
(&newh.data);
+
mem_free
(&newh.data);
return NULL;
}
return NULL;
}
@@
-809,7
+809,7
@@
char *imap_set_flags (IMAP_DATA * idata, HEADER * h, char *s)
mutt_free_list (&(HEADER_DATA (h)->keywords));
HEADER_DATA (h)->keywords = newh.data->keywords;
mutt_free_list (&(HEADER_DATA (h)->keywords));
HEADER_DATA (h)->keywords = newh.data->keywords;
-
FREE
(&newh.data);
+
mem_free
(&newh.data);
return s;
}
return s;
}
@@
-878,7
+878,7
@@
static int msg_fetch_header (CONTEXT * ctx, IMAP_HEADER * h, char *buf,
#if USE_HCACHE
static size_t imap_hcache_keylen (const char *fn)
{
#if USE_HCACHE
static size_t imap_hcache_keylen (const char *fn)
{
- return
mutt_str
len (fn);
+ return
str_
len (fn);
}
/* msg_fetch_header: import IMAP FETCH response into an IMAP_HEADER.
}
/* msg_fetch_header: import IMAP FETCH response into an IMAP_HEADER.
@@
-934,7
+934,7
@@
static int msg_has_flag (LIST * flag_list, const char *flag)
flag_list = flag_list->next;
while (flag_list) {
flag_list = flag_list->next;
while (flag_list) {
- if (!ascii_strncasecmp (flag_list->data, flag,
mutt_str
len (flag_list->data)))
+ if (!ascii_strncasecmp (flag_list->data, flag,
str_
len (flag_list->data)))
return 1;
flag_list = flag_list->next;
return 1;
flag_list = flag_list->next;