]> diplodocus.org Git - nmh/blob - sbr/print_help.c
Fix stupid accidental dependence on a bash quirk in previous
[nmh] / sbr / print_help.c
1
2 /*
3 * print_help.c -- print a help message, and possibly the
4 * -- profile/context entries for this command
5 *
6 * $Id$
7 *
8 * This code is Copyright (c) 2002, by the authors of nmh. See the
9 * COPYRIGHT file in the root directory of the nmh distribution for
10 * complete copyright information.
11 */
12
13 #include <h/mh.h>
14
15
16 void
17 print_help (char *str, struct swit *swp, int print_context)
18 {
19 char *s;
20
21 /* print Usage string */
22 printf ("Usage: %s\n", str);
23
24 /* print all the switches */
25 printf (" switches are:\n");
26 print_sw (ALL, swp, "-");
27
28 /*
29 * check if we should print any profile entries
30 */
31 if (print_context && (s = context_find (invo_name)))
32 printf ("\nProfile: %s\n", s);
33 }