* docs/MAIL.FILTERING: added note on removing procmail -f or
[mmh] / sbr / print_sw.c
index c9c1159..bd7b5aa 100644 (file)
@@ -3,13 +3,17 @@
  * print_sw.c -- print switches
  *
  * $Id$
+ *
+ * This code is Copyright (c) 2002, by the authors of nmh.  See the
+ * COPYRIGHT file in the root directory of the nmh distribution for
+ * complete copyright information.
  */
 
 #include <h/mh.h>
 
 
 void
-print_sw (char *substr, struct swit *swp, char *prefix)
+print_sw (char *substr, struct swit *swp, char *prefix, FILE *fp)
 {
     int len, optno;
     register int i;
@@ -41,10 +45,11 @@ print_sw (char *substr, struct swit *swp, char *prefix)
                    *cp++ = *cp1++;
                *cp++ = ')';
                while ((*cp++ = *cp1++));
-               printf ("  %s%s\n", prefix, buf);
+               fprintf (fp, "  %s%s\n", prefix, buf);
            } else {
                if (!swp->minchars)
-                   printf(optno ? "  %s[no]%s\n" : "  %s%s\n", prefix, swp->sw);
+                   fprintf(fp, optno ? "  %s[no]%s\n" : "  %s%s\n",
+                            prefix, swp->sw);
            }
            if (optno)
                swp++;  /* skip -noswitch */