use my usual API's for allocation/deallocation right now.
[apps/madmutt.git] / lib-mime / mime.h
index f2e7b6a..34e1b0f 100644 (file)
@@ -31,6 +31,8 @@
 
 #include <stdlib.h>
 
+#include <lib-lib/mem.h>
+
 /* Content-Type */
 enum {
     TYPEOTHER,
@@ -104,7 +106,12 @@ typedef struct address_t {
     struct address_t *next;
 } address_t;
 
-void rfc822_free_address(address_t **);
+DO_INIT(address_t, address);
+void address_wipe(address_t *);
+
+DO_NEW(address_t, address);
+DO_DELETE(address_t, address);
+
 void rfc822_qualify(address_t *, const char *);
 address_t *rfc822_parse_adrlist(address_t *, const char *s);
 address_t *rfc822_cpy_adr(address_t * addr);
@@ -119,7 +126,6 @@ extern const char *RFC822Errors[];
 extern const char RFC822Specials[];
 
 #define rfc822_error(x) RFC822Errors[x]
-#define rfc822_new_address() calloc(1,sizeof(address_t))
 
 /****************************************************************************/
 /* RFC 2231                                                                 */