X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=rfc822.c;h=f1c86e9d846f5fec9707f4fc32962e5e53a626f0;hp=10758531c4d8927e11c5c9f508af203fdbb1cef9;hb=1fb9b0f4797559d8269d2dd012f005af7f5e560b;hpb=74a2265af51ce89bca845adc1d68f273c9933c13 diff --git a/rfc822.c b/rfc822.c index 1075853..f1c86e9 100644 --- a/rfc822.c +++ b/rfc822.c @@ -15,19 +15,7 @@ #include #include -#ifndef TESTING #include "mutt.h" -#else -#define safe_strdup strdup -#define safe_malloc malloc -#define SKIPWS(x) while(isspace(*x))x++ -#define FREE(x) safe_free(x) -#define ISSPACE isspace -#define strfcpy(a,b,c) {if (c) {strncpy(a,b,c);a[c-1]=0;}} -#define STRING 128 -#include "rfc822.h" -#endif - #include "mutt_idna.h" #include "lib/mem.h" @@ -732,31 +720,3 @@ ADDRESS *rfc822_append (ADDRESS ** a, ADDRESS * b) tmp = tmp->next; return tmp; } - -#ifdef TESTING -int safe_free (void **p) -{ - free (*p); /* __MEM_CHECKED__ */ - *p = 0; -} - -int main (int argc, char **argv) -{ - ADDRESS *list; - char buf[256]; - -# if 0 - char *str = - "michael, Michael Elkins , testing a really complex address: this example <@contains.a.source.route,@with.multiple.hosts:address@example.com>;, lothar@of.the.hillpeople (lothar)"; -# else - char *str = "a b c "; -# endif - - list = rfc822_parse_adrlist (NULL, str); - buf[0] = 0; - rfc822_write_address (buf, sizeof (buf), list); - rfc822_free_address (&list); - puts (buf); - exit (0); -} -#endif