Back to index

tetex-bin  3.0
usage.c
Go to the documentation of this file.
00001 /* usage.c: Output a help message (from help.h).
00002 
00003    Modified in 2001 by O. Weber.
00004    Written in 1995 by K. Berry.  Public domain.  */
00005 
00006 #include "config.h"
00007 
00008 /* Call usage if the program exits with an "usage error".  STR is supposed
00009    to be the program name. */
00010 
00011 void
00012 usage P1C(const_string, str)
00013 {
00014   fprintf (stderr, "Try `%s --help' for more information.\n", str);
00015   uexit (1);
00016 }
00017 
00018 /* Call usage if the program exits by printing the help message.
00019    MESSAGE is an NULL-terminated array or strings which make up the
00020    help message.  Each string is printed on a separate line.
00021    We use arrays instead of a single string to work around compiler
00022    limitations (sigh).
00023 */
00024 void
00025 usagehelp P2C(const_string*, message, const_string,bug_email)
00026 {
00027     if (!bug_email)
00028         bug_email = "tex-k@mail.tug.org";
00029     while (*message) {
00030         printf("%s\n", *message);
00031         ++message;
00032     }
00033     printf("\nEmail bug reports to %s.\n", bug_email);
00034     uexit(0);
00035 }