Double yikes! I meant to check in just biblio.c, but instead I
[sgt/halibut] / help.c
CommitLineData
d7482997 1/*
2 * help.c: usage instructions
3 */
4
5#include <stdio.h>
6#include "halibut.h"
7
8static char *helptext[] = {
bc7e2a4b 9 "usage: halibut [options] files",
10 "options: --text[=filename] generate plain text output",
11 " --html[=filename] generate XHTML output",
12 " --winhelp[=filename] generate Windows Help output",
13 " --man[=filename] generate man page output",
59ddc51d 14 " --info[=filename] generate GNU info output",
bc7e2a4b 15 " -Cfoo:bar:baz append \\cfg{foo}{bar}{baz} to input",
16 " --precise report column numbers in error messages",
17 " --help display this text",
18 " --version display version number",
19 " --licence display licence text",
d7482997 20 NULL
21};
22
23static char *usagetext[] = {
bc7e2a4b 24 "usage: halibut [--format[=filename]] [-Cconfig...] file.but [file.but...]",
d7482997 25 NULL
26};
27
28void help(void) {
29 char **p;
30 for (p = helptext; *p; p++)
31 puts(*p);
32}
33
34void usage(void) {
35 char **p;
36 for (p = usagetext; *p; p++)
37 puts(*p);
38}
39
40void showversion(void) {
41 printf("Halibut, %s\n", version);
42}