beta-0.89.2
[luatex.git] / source / texk / web2c / lib / usage.c
blob4c6bc5bbe0ab9b0d2c8938eb31ed40916f270bd8
1 /* usage.c: Output a help message (from help.h).
3 Modified in 2001 by O. Weber.
4 Written in 1995 by K. Berry. Public domain. */
6 #include <w2c/config.h>
8 /* Call usage if the program exits with an "usage error". STR is supposed
9 to be the program name. */
11 void
12 usage (const_string str)
14 fprintf (stderr, "Try `%s --help' for more information.\n", str);
15 uexit (1);
18 /* Call usage if the program exits by printing the help message.
19 MESSAGE is a NULL-terminated array of strings which make up the
20 help message. Each string is printed on a separate line.
21 We use arrays instead of a single string to work around compiler
22 limitations (sigh).
24 void
25 usagehelp (const_string *message, const_string bug_email)
27 if (!bug_email)
28 bug_email = "tex-k@tug.org";
29 while (*message) {
30 printf("%s\n", *message);
31 ++message;
33 printf("\nEmail bug reports to %s.\n", bug_email);
34 uexit(0);