int mutt_extract_path (char *filename, char *path)
{
- char *tmp = safe_malloc (sizeof (char) * _POSIX_PATH_MAX);
+ char *tmp = mem_malloc (sizeof (char) * _POSIX_PATH_MAX);
char *help_ptr;
help_ptr = tmp;
}
*help_ptr++ = *filename++;
}
- FREE (&tmp);
+ mem_free (&tmp);
return 0;
}
}
if (idx[x]->tree) {
- if (safe_strcmp (idx[x]->tree, buf) != 0)
+ if (str_cmp (idx[x]->tree, buf) != 0)
str_replace (&idx[x]->tree, buf);
}
else
- idx[x]->tree = safe_strdup (buf);
+ idx[x]->tree = str_dup (buf);
if (2 * (idx[x]->level + 2) < sizeof (buf) && idx[x]->level) {
s = buf + 2 * (idx[x]->level - 1);
for (; m; m = m->next) {
if (*idxlen == *idxmax) {
- safe_realloc (&idx, sizeof (ATTACHPTR *) * ((*idxmax) += 5));
+ mem_realloc (&idx, sizeof (ATTACHPTR *) * ((*idxmax) += 5));
for (i = *idxlen; i < *idxmax; i++)
idx[i] = NULL;
}
}
else {
if (!idx[*idxlen])
- idx[*idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
+ idx[*idxlen] = (ATTACHPTR *) mem_calloc (1, sizeof (ATTACHPTR));
new = idx[(*idxlen)++];
new->content = m;
break;
}
- FREE (&directory);
+ mem_free (&directory);
if (tag && menu) {
menu->oldcurrent = menu->current;
char helpstr[SHORT_STRING];
MUTTMENU *menu;
- BODY *cur;
+ BODY *cur = NULL;
MESSAGE *msg;
FILE *fp;
ATTACHPTR **idx = NULL;
}
#endif
- if (WithCrypto && hdr->security) {
+ if (WithCrypto && (hdr->security & (~PGP_TRADITIONAL_CHECKED))) {
mutt_message
_
("Deletion of attachments from encrypted messages is unsupported.");
CHECK_ATTACH;
if (!idx[menu->current]->content->hdr->env->followup_to ||
- safe_strcasecmp (idx[menu->current]->content->hdr->env->followup_to,
+ str_casecmp (idx[menu->current]->content->hdr->env->followup_to,
"poster")
|| query_quadoption (OPT_FOLLOWUPTOPOSTER,
_("Reply by mail as poster prefers?")) !=
hdr->attach_del = 1;
if (idx[idxmax]->content)
idx[idxmax]->content->aptr = NULL;
- FREE (&idx[idxmax]->tree);
- FREE (&idx[idxmax]);
+ mem_free (&idx[idxmax]->tree);
+ mem_free (&idx[idxmax]);
}
if (hdr->attach_del)
hdr->changed = 1;
- FREE (&idx);
+ mem_free (&idx);
idxmax = 0;
if (WithCrypto && need_secured && secured) {