# include "config.h"
#endif
+#include <lib-lib/mem.h>
+#include <lib-lib/macros.h>
+#include <lib-lib/buffer.h>
+
#include "mutt.h"
#include "sort.h"
-#include "buffer.h"
-
-#include "lib/mem.h"
-#include "lib/intl.h"
#include <string.h>
#include <stdlib.h>
return (-1);
}
pattern = buf->data;
- memset (buf, 0, sizeof (BUFFER));
+ p_clear(buf, 1);
mutt_extract_token (buf, s, 0);
if (MoreArgs (s)) {
- mem_free (&pattern);
+ p_delete(&pattern);
strfcpy (err->data, _("score: too many arguments"), err->dsize);
return (-1);
}
break;
if (!ptr) {
if ((pat = mutt_pattern_comp (pattern, 0, err)) == NULL) {
- mem_free (&pattern);
+ p_delete(&pattern);
return (-1);
}
- ptr = mem_calloc (1, sizeof (SCORE));
+ ptr = p_new(SCORE, 1);
if (last)
last->next = ptr;
else
last = tmp;
tmp = tmp->next;
mutt_pattern_free (&last->pat);
- mem_free (&last);
+ p_delete(&last);
}
Score = NULL;
}
else
Score = tmp->next;
mutt_pattern_free (&tmp->pat);
- mem_free (&tmp);
+ p_delete(&tmp);
/* there should only be one score per pattern, so we can stop here */
break;
}