]> diplodocus.org Git - nmh/blobdiff - sbr/addrsbr.c
Fix C-T-E of message, as well as multipart, types to be 7bit, 8bit,
[nmh] / sbr / addrsbr.c
index 23a7cb4cbbd4d27adbfbcda813993cf3a36a126f..6bb94211f4f6b04828ce2c4cf994eb7bd005355f 100644 (file)
@@ -49,7 +49,7 @@
 
    If an explicit host is not present, then MH checks for a bang to indicate
    an explicit UUCP-style address.  If so, this is noted.  If not, the host is
 
    If an explicit host is not present, then MH checks for a bang to indicate
    an explicit UUCP-style address.  If so, this is noted.  If not, the host is
-   defaulted, typically to the local host.  The lack of an explict host is
+   defaulted, typically to the local host.  The lack of an explicit host is
    also noted.
 
    If an explicit 822-style host is present, then MH checks to see if it
    also noted.
 
    If an explicit 822-style host is present, then MH checks to see if it
@@ -76,18 +76,24 @@ static char *grp = NULL;
 static char *note = NULL;
 static char err[BUFSIZ];
 static char adr[BUFSIZ];
 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;
 
 
 char *
 getname (const char *addrs)
 {
     struct adrx *ap;
-
     pers = mbox = host = route = grp = note = NULL;
     err[0] = '\0';
 
     pers = mbox = host = route = grp = note = NULL;
     err[0] = '\0';
 
-    if ((ap = getadrx (addrs ? addrs : "")) == NULL)
+    if ((ap = getadrx (addrs ? addrs : "", eai)) == NULL) {
        return NULL;
        return NULL;
+    }
 
     strncpy (adr, ap->text, sizeof(adr));
     pers = ap->pers;
 
     strncpy (adr, ap->text, sizeof(adr));
     pers = ap->pers;
@@ -413,7 +419,8 @@ local_test: ;
     for (mp = &mq; mp->m_next;) {
        mp = mp->m_next;
        if (!np->m_mbox)
     for (mp = &mq; mp->m_next;) {
        mp = mp->m_next;
        if (!np->m_mbox)
-           continue; if ((len = strlen (cp = np->m_mbox))
+           continue;
+        if ((len = strlen (cp = np->m_mbox))
                < (i = strlen (pp = mp->m_mbox)))
            continue;
        switch (mp->m_type & W_MBOX) {
                < (i = strlen (pp = mp->m_mbox)))
            continue;
        switch (mp->m_type & W_MBOX) {