BSD 4_3_Tahoe release
[unix-history] / usr / src / usr.lib / sendmail / src / parseaddr.c
index 82e78bf..d491f19 100644 (file)
@@ -1,16 +1,24 @@
 /*
 /*
-**  Sendmail
-**  Copyright (c) 1983  Eric P. Allman
-**  Berkeley, California
-**
-**  Copyright (c) 1983 Regents of the University of California.
-**  All rights reserved.  The Berkeley software License Agreement
-**  specifies the terms and conditions for redistribution.
-*/
+ * Copyright (c) 1983 Eric P. Allman
+ * Copyright (c) 1988 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
 
 #ifndef lint
 
 #ifndef lint
-static char    SccsId[] = "@(#)parseaddr.c     5.6 (Berkeley) 4/2/86";
-#endif not lint
+static char sccsid[] = "@(#)parseaddr.c        5.9 (Berkeley) 6/30/88";
+#endif /* not lint */
 
 # include "sendmail.h"
 
 
 # include "sendmail.h"
 
@@ -507,7 +515,6 @@ rewrite(pvp, ruleset)
        register struct rewrite *rwr;   /* pointer to current rewrite rule */
        struct match mlist[MAXMATCH];   /* stores match on LHS */
        char *npvp[MAXATOM+1];          /* temporary space for rebuild */
        register struct rewrite *rwr;   /* pointer to current rewrite rule */
        struct match mlist[MAXMATCH];   /* stores match on LHS */
        char *npvp[MAXATOM+1];          /* temporary space for rebuild */
-       extern bool sameword();
 
        if (OpMode == MD_TEST || tTd(21, 2))
        {
 
        if (OpMode == MD_TEST || tTd(21, 2))
        {
@@ -595,7 +602,7 @@ rewrite(pvp, ruleset)
 
                          default:
                                /* must have exact match */
 
                          default:
                                /* must have exact match */
-                               if (!sameword(rp, ap))
+                               if (strcasecmp(rp, ap))
                                        goto backup;
                                avp++;
                                break;
                                        goto backup;
                                avp++;
                                break;
@@ -850,7 +857,6 @@ buildaddr(tv, a)
        static char buf[MAXNAME];
        struct mailer **mp;
        register struct mailer *m;
        static char buf[MAXNAME];
        struct mailer **mp;
        register struct mailer *m;
-       extern bool sameword();
 
        if (a == NULL)
                a = (ADDRESS *) xalloc(sizeof *a);
 
        if (a == NULL)
                a = (ADDRESS *) xalloc(sizeof *a);
@@ -863,7 +869,7 @@ buildaddr(tv, a)
                return (NULL);
        }
        tv++;
                return (NULL);
        }
        tv++;
-       if (sameword(*tv, "error"))
+       if (!strcasecmp(*tv, "error"))
        {
                if (**++tv == CANONHOST)
                {
        {
                if (**++tv == CANONHOST)
                {
@@ -884,7 +890,7 @@ buildaddr(tv, a)
        }
        for (mp = Mailer; (m = *mp++) != NULL; )
        {
        }
        for (mp = Mailer; (m = *mp++) != NULL; )
        {
-               if (sameword(m->m_name, *tv))
+               if (!strcasecmp(m->m_name, *tv))
                        break;
        }
        if (m == NULL)
                        break;
        }
        if (m == NULL)