# include "config.h"
#endif
+#include <lib-lib/mem.h>
+
#include "mutt.h"
#include "buffy.h"
#include "buffer.h"
/* func to free buffy for list_del() */
static void buffy_free (BUFFY** p) {
- mem_free(&(*p)->path);
- mem_free(p);
+ p_delete(&(*p)->path);
+ p_delete(p);
}
int buffy_lookup (const char* path) {
}
if (i < 0) {
- tmp = mem_calloc (1, sizeof (BUFFY));
+ tmp = p_new(BUFFY, 1);
tmp->path = str_dup (buf);
tmp->magic = 0;
list_push_back (&Incoming, tmp);
/* one new and undeleted message is enough */
if (tmp->new == 0) {
BuffyCount++;
- tmp->new = 1;
- if (!count)
+ if (!count) {
/* if sidebar invisible -> done */
+ tmp->new = 1;
break;
+ }
}
tmp->msgcount++;
tmp->msg_unread++;