]> diplodocus.org Git - nmh/blobdiff - sbr/addrsbr.c
picksbr.c: Remove some else after break in plist().
[nmh] / sbr / addrsbr.c
index c3f01b61f9b0b8d241f4fd08d77475802b3cc788..68bb6dec60b9e3e5d02271708754457fc3ce5b2e 100644 (file)
@@ -1,6 +1,4 @@
-
-/*
- * addrsbr.c -- parse addresses 822-style
+/* addrsbr.c -- parse addresses 822-style
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
    REALLYDUMB are now the default in the code.
 
    If #ifdef DUMB is in effect, a full 822-style parser is called
-   for syntax recongition.  This breaks each address into its components.
+   for syntax recognition.  This breaks each address into its components.
    Note however that no semantics are assumed about the parts or their
    totality.  This means that implicit hostnames aren't made explicit,
-   and explicit hostnames aren't expanded to their "official" represenations.
+   and explicit hostnames aren't expanded to their "official" representations.
 
    If DUMB is not in effect, then this module does some
    high-level thinking about what the addresses are.
@@ -214,7 +212,7 @@ mnfree (struct mailname *mp)
     mh_xfree(mp->m_gname);
     mh_xfree(mp->m_note);
 
-    free ((char *) mp);
+    free(mp);
 }
 
 
@@ -301,21 +299,18 @@ ismymbox (struct mailname *np)
            localmailbox++;
 
            if ((cp = getname(am)) == NULL) {
-               admonish (NULL, "Unable to find address in local-mailbox");
+               inform("Unable to find address in local-mailbox, continuing...");
                return 0;
            }
 
            if ((mq.m_next = getm (cp, NULL, 0, NULL, 0)) == NULL) {
-               admonish (NULL, "invalid entry in local-mailbox: %s", cp);
+                inform("invalid entry in local-mailbox: %s, continuing...", cp);
                return 0;
            }
 
-           /*
-            * Sigh, it turns out that the address parser gets messed up
-            * if you don't call getname() until it returns NULL.
-            */
-
-           while ((cp = getname(am)) != NULL)
+           /* Sigh, it turns out that the address parser gets messed up
+            * if you don't call getname() until it returns NULL. */
+           while (getname(am) != NULL)
                ;
        }
 
@@ -326,7 +321,7 @@ ismymbox (struct mailname *np)
            oops = 0;
            while ((cp = getname (am))) {
                if ((mp->m_next = getm (cp, NULL, 0, NULL, 0)) == NULL) {
-                   admonish (NULL, "illegal address: %s", cp);
+                   inform("illegal address: %s, continuing...", cp);
                    oops++;
                } else {
                    mp = mp->m_next;
@@ -352,7 +347,7 @@ ismymbox (struct mailname *np)
                }
            }
            if (oops)
-               advise (NULL, "please fix the %s: entry in your %s file",
+               inform("please fix the %s: entry in your %s file",
                        "alternate-mailboxes", mh_profile);
        }
 
@@ -385,7 +380,8 @@ ismymbox (struct mailname *np)
 
            case UUCPHOST:
                if (strcasecmp (np->m_host, SystemName()))
-                   break;              /* fall */
+                   break;
+                   /* FALLTHRU */
            case LOCALHOST:
 local_test: ;
                if (!strcasecmp (np->m_mbox, mq.m_mbox))