static char *note = NULL;
static char err[BUFSIZ];
static char adr[BUFSIZ];
+static int eai = 0;
+
+void
+enable_eai() {
+ eai = 1;
+}
char *
getname (const char *addrs)
{
struct adrx *ap;
- const char *const eai = context_find ("eai");
pers = mbox = host = route = grp = note = NULL;
err[0] = '\0';
- if ((ap = getadrx (addrs ? addrs : "", eai && strncasecmp (eai, "8bit", 4) == 0)) == NULL) {
+ if ((ap = getadrx (addrs ? addrs : "", eai)) == NULL) {
return NULL;
}
dftype = LOCALHOST;
}
- mp = (struct mailname *) mh_xcalloc ((size_t) 1, sizeof(*mp));
- if (mp == NULL) {
- if (eresult) {
- strncpy (eresult, "insufficient memory to represent address",
- eresultsize);
- eresult[eresultsize - 1] = '\0';
- }
- return NULL;
- }
-
+ NEW0(mp);
mp->m_next = NULL;
mp->m_text = getcpy (str);
if (pers)