X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..8699f1cc:/sbr/print_sw.c?ds=inline diff --git a/sbr/print_sw.c b/sbr/print_sw.c index c9c1159c..ad92b882 100644 --- a/sbr/print_sw.c +++ b/sbr/print_sw.c @@ -1,19 +1,19 @@ - -/* - * print_sw.c -- print switches +/* 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 void -print_sw (char *substr, struct swit *swp, char *prefix) +print_sw (const char *substr, const struct swit *swp, char *prefix, FILE *fp) { int len, optno; - register int i; - register char *cp, *cp1, *sp; + int i; + char *cp, *cp1, *sp; char buf[128]; len = strlen(substr); @@ -41,10 +41,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 */