oops, makedoc is used in the build process.
[apps/madmutt.git] / mutt_idna.c
index 0918f7c..96d33d2 100644 (file)
@@ -18,7 +18,6 @@
 #include "charset.h"
 #include "mutt_idna.h"
 
-#include "lib/mem.h"
 #include "lib/intl.h"
 #include "lib/str.h"
 #include "lib/debug.h"
@@ -131,7 +130,7 @@ static int mbox_to_udomain (const char *mbx, char **user, char **domain)
   p = strchr (mbx, '@');
   if (!p || !p[1])
     return -1;
-  *user = p_dupstr(mbx[0], p - mbx);
+  *user = p_dupstr(mbx, p - mbx);
   *domain = str_dup (p + 1);
   return 0;
 }
@@ -157,7 +156,7 @@ int mutt_addrlist_to_idna (ADDRESS * a, char **err)
         *err = str_dup (domain);
     }
     else {
-      mem_realloc (&a->mailbox, str_len (user) + str_len (tmp) + 2);
+      p_realloc(&a->mailbox, str_len(user) + str_len(tmp) + 2);
       sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp));       /* __SPRINTF_CHECKED__ */
     }
 
@@ -184,7 +183,7 @@ int mutt_addrlist_to_local (ADDRESS * a)
       continue;
 
     if (mutt_idna_to_local (domain, &tmp, 0) == 0) {
-      mem_realloc (&a->mailbox, str_len (user) + str_len (tmp) + 2);
+      p_realloc(&a->mailbox, str_len(user) + str_len(tmp) + 2);
       sprintf (a->mailbox, "%s@%s", NONULL (user), NONULL (tmp));       /* __SPRINTF_CHECKED__ */
     }
 
@@ -218,7 +217,7 @@ const char *mutt_addr_for_display (ADDRESS * a)
     return a->mailbox;
   }
 
-  mem_realloc (&buff, str_len (tmp) + str_len (user) + 2);
+  p_realloc(&buff, str_len(tmp) + str_len(user) + 2);
   sprintf (buff, "%s@%s", NONULL (user), NONULL (tmp)); /* __SPRINTF_CHECKED__ */
   p_delete(&tmp);
   p_delete(&user);