if (t && t[0] == '0' && t[1] == '\0')
t = "<random>";
- if (c + safe_strlen (t) + 2 >= COLS - SidebarWidth)
+ if (c + mutt_strlen (t) + 2 >= COLS - SidebarWidth)
break;
addstr (NONULL (t));
if (chain->next)
addstr (", ");
- c += safe_strlen (t) + 2;
+ c += mutt_strlen (t) + 2;
}
}
#endif /* MIXMASTER */
mutt_message_hook (NULL, msg, M_SEND2HOOK);
break;
case OP_COMPOSE_EDIT_MESSAGE:
- if (Editor && (safe_strcmp ("builtin", Editor) != 0)
+ if (Editor && (mutt_strcmp ("builtin", Editor) != 0)
&& !option (OPTEDITHDRS)) {
mutt_edit_file (Editor, msg->content->filename);
mutt_update_encoding (msg->content);
}
/* fall through */
case OP_COMPOSE_EDIT_HEADERS:
- if (safe_strcmp ("builtin", Editor) != 0 &&
+ if (mutt_strcmp ("builtin", Editor) != 0 &&
(op == OP_COMPOSE_EDIT_HEADERS ||
(op == OP_COMPOSE_EDIT_MESSAGE && option (OPTEDITHDRS)))) {
char *tag = NULL, *err = NULL;
char *att = files[i];
idx[idxlen] = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR));
+ idx[idxlen]->unowned = 1;
idx[idxlen]->content = mutt_make_file_attach (att);
if (idx[idxlen]->content != NULL)
update_idx (menu, idx, idxlen++);
case OP_DELETE:
CHECK_COUNT;
+ if (idx[menu->current]->unowned)
+ idx[menu->current]->content->unlink = 0;
if (delete_attachment (menu, &idxlen, menu->current) == -1)
break;
mutt_update_tree (idx, idxlen);
/* avoid freeing other attachments */
idx[idxlen]->content->next = NULL;
idx[idxlen]->content->parts = NULL;
+ if (idx[idxlen]->unowned)
+ idx[idxlen]->content->unlink = 0;
mutt_free_body (&idx[idxlen]->content);
FREE (&idx[idxlen]->tree);
FREE (&idx[idxlen]);