]> diplodocus.org Git - nmh/blobdiff - sbr/print_sw.c
Add support for batch mode.
[nmh] / sbr / print_sw.c
index 213434a3a2230af6441adf6e0fc91c4a904e972b..cf5cda740dee509683a75a2855aedf9362ea3f1e 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * print_sw.c -- print switches
+/* print_sw.c -- print switches
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -12,7 +11,8 @@
 void
 print_sw (const char *substr, const struct swit *swp, char *prefix, FILE *fp)
 {
-    int len, optno;
+    int len;
+    bool optno;
     int i;
     char *cp, *cp1, *sp;
     char buf[128];
@@ -21,14 +21,14 @@ print_sw (const char *substr, const struct swit *swp, char *prefix, FILE *fp)
     for (; swp->sw; swp++) {
        /* null matches all strings */
        if (!*substr || (ssequal (substr, swp->sw) && len >= swp->minchars)) {
-           optno = 0;
+           optno = false;
            /* next switch */
            if ((sp = (&swp[1])->sw)) {
                if (!*substr && sp[0] == 'n' && sp[1] == 'o' &&
                        strcmp (&sp[2], swp->sw) == 0 && (
                        ((&swp[1])->minchars == 0 && swp->minchars == 0) ||
                        ((&swp[1])->minchars == (swp->minchars) + 2)))
-                   optno++;
+                   optno = true;
            }
 
            if (swp->minchars > 0) {