changed code in delname to ignore case when searching for
authorKurt A. Shoens <kurt@ucbvax.Berkeley.EDU>
Thu, 17 Sep 1981 05:34:01 +0000 (21:34 -0800)
committerKurt A. Shoens <kurt@ucbvax.Berkeley.EDU>
Thu, 17 Sep 1981 05:34:01 +0000 (21:34 -0800)
name to delete

SCCS-vsn: usr.bin/mail/names.c 2.4

usr/src/usr.bin/mail/names.c

index 5fb1aa2..7a06dce 100644 (file)
@@ -8,7 +8,7 @@
 
 #include "rcv.h"
 
 
 #include "rcv.h"
 
-static char *SccsId = "@(#)names.c     2.3 %G%";
+static char *SccsId = "@(#)names.c     2.4 %G%";
 
 /*
  * Allocate a single element of a name list,
 
 /*
  * Allocate a single element of a name list,
@@ -609,7 +609,7 @@ mechk(names)
        register struct name *np;
 
        for (np = names; np != NIL; np = np->n_flink)
        register struct name *np;
 
        for (np = names; np != NIL; np = np->n_flink)
-               if ((np->n_type & GDEL) == 0 && equal(myname, np->n_name)) {
+               if ((np->n_type & GDEL) == 0 && equal(np->n_name, myname)) {
                        selfsent++;
                        return;
                }
                        selfsent++;
                        return;
                }
@@ -768,7 +768,6 @@ count(np)
 /*
  * Delete the given name from a namelist.
  */
 /*
  * Delete the given name from a namelist.
  */
-
 struct name *
 delname(np, name)
        register struct name *np;
 struct name *
 delname(np, name)
        register struct name *np;
@@ -777,7 +776,7 @@ delname(np, name)
        register struct name *p;
 
        for (p = np; p != NIL; p = p->n_flink)
        register struct name *p;
 
        for (p = np; p != NIL; p = p->n_flink)
-               if (equal(p->n_name, name)) {
+               if (icequal(p->n_name, name)) {
                        if (p->n_blink == NIL) {
                                if (p->n_flink != NIL)
                                        p->n_flink->n_blink = NIL;
                        if (p->n_blink == NIL) {
                                if (p->n_flink != NIL)
                                        p->n_flink->n_blink = NIL;