]> diplodocus.org Git - nmh/blobdiff - uip/fmttest.c
Support iCalendar event request files that don't end with a newline.
[nmh] / uip / fmttest.c
index e3bb16bcc9011f6376527f4fa09f3b645a5a6e9b..19df310789a1a7bff56ab738a037e0a0730da0ed 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * fmttest.c -- A program to help test and debug format instructions
+/* fmttest.c -- A program to help test and debug format instructions
  *
  * This code is Copyright (c) 2012, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -511,7 +510,7 @@ process_messages(struct format *fmt, struct msgs_array *comps,
            done(1);
     seq_setprev(mp);                   /* set the Previous-Sequence */
 
-    context_replace(pfolder, folder);  /* update curren folder */
+    context_replace(pfolder, folder);  /* update current folder */
     seq_save(mp);                      /* synchronize message sequences */
     context_save();                    /* save the context file */
 
@@ -572,7 +571,6 @@ process_messages(struct format *fmt, struct msgs_array *comps,
 
     ivector_free (seqnum);
     folder_free(mp);
-    return;
 }
 
 /*
@@ -604,7 +602,7 @@ process_single_file(FILE *in, struct msgs_array *comps, int *dat, int msgsize,
     }
 
     /*
-     * Initialize everyting else
+     * Initialize everything else
      */
 
     if (dat[0] == -1)
@@ -1304,10 +1302,10 @@ insert (struct mailname *np)
        return 0;
 
     for (mp = &mq; mp->m_next; mp = mp->m_next) {
-       if (!strcasecmp (np->m_host ? np->m_host : "",
-                        mp->m_next->m_host ? mp->m_next->m_host : "") &&
-           !strcasecmp (np->m_mbox ? np->m_mbox : "",
-                        mp->m_next->m_mbox ? mp->m_next->m_mbox : ""))
+       if (!strcasecmp (FENDNULL(np->m_host),
+                        FENDNULL(mp->m_next->m_host)) &&
+           !strcasecmp (FENDNULL(np->m_mbox),
+                        FENDNULL(mp->m_next->m_mbox)))
            return 0;
     }
     if (!ccme && ismymbox (np))