]> diplodocus.org Git - nmh/blobdiff - uip/aliasbr.c
h/mhparse.h: Move mhfree.c's free_content prototype to new header.
[nmh] / uip / aliasbr.c
index e9724f73d630099f2b647a95bdaca907fbb805cb..ab2130efc18f470fda4f5f9f3cc196f531fb7669 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * aliasbr.c -- new aliasing mechanism
+/* aliasbr.c -- new aliasing mechanism
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -132,6 +130,8 @@ akval (struct aka *ak, char *s)
                if (mp  &&  mp->m_ingrp) {
                    char *gname = add (mp->m_gname, NULL);
 
                if (mp  &&  mp->m_ingrp) {
                    char *gname = add (mp->m_gname, NULL);
 
+                    /* FIXME: gname must be true;  add() never returns NULL.
+                    * Is some other test required? */
                    if (gname  &&  aleq (name, ak->ak_name)) {
                        /* Will leak cp. */
                        cp = concat (gname, akresult (ak), NULL);
                    if (gname  &&  aleq (name, ak->ak_name)) {
                        /* Will leak cp. */
                        cp = concat (gname, akresult (ak), NULL);
@@ -163,7 +163,7 @@ aleq (char *string, char *aliasent)
     while ((c = *string++)) {
        if (*aliasent == '*')
            return 1;
     while ((c = *string++)) {
        if (*aliasent == '*')
            return 1;
-        if ((c | 040) != (*aliasent | 040))
+        if (tolower((unsigned char)c) != tolower((unsigned char)*aliasent))
             return 0;
         aliasent++;
     }
             return 0;
         aliasent++;
     }
@@ -202,7 +202,7 @@ alias (char *file)
                    fclose (fp);
                    return i;
                }
                    fclose (fp);
                    return i;
                }
-
+               /* FALLTHRU */
            case ':':           /* comment */
            case ';': 
            case '#':
            case ':':           /* comment */
            case ';': 
            case '#':