]> diplodocus.org Git - nmh/blobdiff - uip/fmttest.c
Match `NORETURN' function prototypes by adding it to definition.
[nmh] / uip / fmttest.c
index 7d08438bf1f62f3704fae6139d0b42611f9227a1..19df310789a1a7bff56ab738a037e0a0730da0ed 100644 (file)
@@ -1,6 +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
@@ -512,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 */
 
@@ -573,7 +571,6 @@ process_messages(struct format *fmt, struct msgs_array *comps,
 
     ivector_free (seqnum);
     folder_free(mp);
-    return;
 }
 
 /*
@@ -605,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)
@@ -649,7 +646,7 @@ process_single_file(FILE *in, struct msgs_array *comps, int *dat, int msgsize,
 
                fmt_addcomptext("body", rbuf);
            }
-           /* fall through */
+           /* FALLTHRU */
 
        default:
            goto finished;
@@ -894,6 +891,7 @@ dumpone(struct format *fmt)
        case FT_IF_MATCH:
        case FT_IF_AMATCH:
                printf(" continue else goto");
+               /* FALLTHRU */
        case FT_GOTO:
                i = findlabel(fmt + fmt->f_skip);
                printf(" L%d", i);
@@ -1084,13 +1082,8 @@ f_typestr(int t)
        case FT_MYMBOX: return("MYMBOX");
        case FT_GETMYMBOX: return("GETMYMBOX");
        case FT_GETMYADDR: return("GETMYADDR");
-#ifdef FT_ADDTOSEQ
-       case FT_ADDTOSEQ: return("ADDTOSEQ");
-#endif
        case FT_SAVESTR: return("SAVESTR");
-#ifdef FT_PAUSE
        case FT_PAUSE: return ("PAUSE");
-#endif
        case FT_DONE: return("DONE");
        case FT_NOP: return("NOP");
        case FT_GOTO: return("GOTO");
@@ -1136,10 +1129,10 @@ static void
 litputs(const char *s)
 {
        if (s) {
-               putc('"', stdout);
+               putchar('"');
                while (*s)
                        litputc(*s++);
-               putc('"', stdout);
+               putchar('"');
        } else
                fputs("<nil>", stdout);
 }
@@ -1151,26 +1144,26 @@ litputc(char c)
                printf("\\x%02x", (unsigned char) c);
        } else if (c < 0x20 || c == 0177) {
                if (c == '\b') {
-                       putc('\\', stdout);
-                       putc('b', stdout);
+                       putchar('\\');
+                       putchar('b');
                } else if (c == '\f') {
-                       putc('\\', stdout);
-                       putc('f', stdout);
+                       putchar('\\');
+                       putchar('f');
                } else if (c == '\n') {
-                       putc('\\', stdout);
-                       putc('n', stdout);
+                       putchar('\\');
+                       putchar('n');
                } else if (c == '\r') {
-                       putc('\\', stdout);
-                       putc('r', stdout);
+                       putchar('\\');
+                       putchar('r');
                } else if (c == '\t') {
-                       putc('\\', stdout);
-                       putc('t', stdout);
+                       putchar('\\');
+                       putchar('t');
                } else {
-                       putc('^', stdout);
-                       putc(c ^ 0x40, stdout); /* DEL to ?, others to alpha */
+                       putchar('^');
+                       putchar(c ^ 0x40);      /* DEL to ?, others to alpha */
                }
        } else
-               putc(c, stdout);
+               putchar(c);
 }
 
 /*
@@ -1309,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))