# include "config.h"
#endif
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "sort.h"
#include "thread.h"
tree->subtree_visible = 0;
if (tree->message) {
- mem_free (&tree->message->tree);
+ p_delete(&tree->message->tree);
if (VISIBLE (tree->message, ctx)) {
tree->deep = 1;
tree->visible = 1;
* From now on we can simply ignore invisible subtrees
*/
calculate_visibility (ctx, &max_depth);
- pfx = mem_malloc (width * max_depth + 2);
- arrow = mem_malloc (width * max_depth + 2);
+ pfx = p_new(char, width * max_depth + 2);
+ arrow = p_new(char, width * max_depth + 2);
while (tree) {
if (depth) {
myarrow = arrow + (depth - start_depth - (start_depth ? 0 : 1)) * width;
if (tree->visible) {
myarrow[width] = M_TREE_RARROW;
myarrow[width + 1] = 0;
- new_tree = mem_malloc ((2 + depth * width));
+ new_tree = p_new(char, (2 + depth * width));
if (start_depth > 1) {
strncpy (new_tree, pfx, (start_depth - 1) * width);
strfcpy (new_tree + (start_depth - 1) * width,
while (!tree->deep);
}
- mem_free (&pfx);
- mem_free (&arrow);
+ p_delete(&pfx);
+ p_delete(&arrow);
}
/* since we may be trying to attach as a pseudo-thread a THREAD that
oldlist = subjects;
subjects = subjects->next;
- mem_free (&oldlist);
+ p_delete(&oldlist);
}
return (last);
}
}
else {
Sort ^= SORT_REVERSE;
- mem_free (&array);
+ p_delete(&array);
return (top);
}
}