#endif
#include <lib-lib/mem.h>
+#include <lib-lib/macros.h>
#include "mutt.h"
#include "sort.h"
#include "thread.h"
-#include "lib/mem.h"
-#include "lib/intl.h"
#include <string.h>
#include <ctype.h>
break;
}
if (!curlist || rc > 0) {
- newlist = mem_calloc (1, sizeof (LIST));
+ newlist = p_new(LIST, 1);
newlist->data = env->real_subj;
if (oldlist) {
newlist->next = oldlist->next;
top = thread;
- array = mem_calloc ((array_size = 256), sizeof (THREAD *));
+ array = p_new(THREAD *, (array_size = 256));
while (1) {
if (init || !thread->sort_key) {
thread->sort_key = NULL;
/* put them into the array */
for (i = 0; thread; i++, thread = thread->prev) {
if (i >= array_size)
- mem_realloc (&array, (array_size *= 2) * sizeof (THREAD *));
+ p_realloc(&array, array_size *= 2);
array[i] = thread;
}
else {
new = (option (OPTDUPTHREADS) ? thread : NULL);
- thread = mem_calloc (1, sizeof (THREAD));
+ thread = p_new(THREAD, 1);
thread->message = cur;
thread->check_subject = 1;
cur->thread = thread;
break;
if ((new = hash_find (ctx->thread_hash, ref->data)) == NULL) {
- new = mem_calloc (1, sizeof (THREAD));
+ new = p_new(THREAD, 1);
hash_insert (ctx->thread_hash, ref->data, new, 1);
}
else {
mutt_break_thread (child);
child->env->in_reply_to = mutt_new_list ();
- child->env->in_reply_to->data = str_dup (parent->env->message_id);
+ child->env->in_reply_to->data = m_strdup(parent->env->message_id);
mutt_set_flag (ctx, child, M_TAG, 0);