]> diplodocus.org Git - nmh/blobdiff - sbr/mf.c
Replace getcpy() with mh_xstrdup() where the string isn't NULL.
[nmh] / sbr / mf.c
index c11b0c10e8d87f2029f7567eb0d7a096bb33016e..e2da81d01b1e4802c2050912868c5a26f41e4248 100644 (file)
--- a/sbr/mf.c
+++ b/sbr/mf.c
@@ -174,11 +174,12 @@ static char adr[BUFSIZ];
 static struct adrx  adrxs2;
 
 
+/* eai = Email Address Internationalization */
 struct adrx *
-getadrx (const char *addrs)
+getadrx (const char *addrs, int eai)
 {
-    register char *bp;
-    register struct adrx *adrxp = &adrxs2;
+    char *bp;
+    struct adrx *adrxp = &adrxs2;
 
     if (pers)
        free (pers);
@@ -230,13 +231,15 @@ getadrx (const char *addrs)
            break;
        }
 
-    /*
-     * Reject the address if key fields contain 8bit characters
-     */
+    if (! eai) {
+        /*
+         * Reject the address if key fields contain 8bit characters
+         */
 
-    if (contains8bit(mbox, NULL) || contains8bit(host, NULL) ||
-       contains8bit(path, NULL) || contains8bit(grp, NULL)) {
-       strcpy(err, "Address contains 8-bit characters");
+        if (contains8bit(mbox, NULL) || contains8bit(host, NULL) ||
+            contains8bit(path, NULL) || contains8bit(grp, NULL)) {
+            strcpy(err, "Address contains 8-bit characters");
+        }
     }
 
     if (err[0])
@@ -446,7 +449,7 @@ phrase (char *buffer)
 static int
 route_addr (char *buffer)
 {
-    register char *pp = cp;
+    char *pp = cp;
 
     if (my_lex (buffer) == LX_AT) {
        if (route (buffer) == NOTOK)
@@ -731,7 +734,7 @@ char *
 legal_person (const char *p)
 {
     int i;
-    register const char *cp;
+    const char *cp;
     static char buffer[BUFSIZ];
 
     if (*p == '"')
@@ -751,7 +754,7 @@ int
 mfgets (FILE *in, char **bp)
 {
     int i;
-    register char *cp, *dp, *ep;
+    char *cp, *dp, *ep;
     static int len = 0;
     static char *pp = NULL;