d7482997 |
1 | /* |
2 | * help.c: usage instructions |
3 | */ |
4 | |
5 | #include <stdio.h> |
6 | #include "halibut.h" |
7 | |
8 | static 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", |
14 | " -Cfoo:bar:baz append \\cfg{foo}{bar}{baz} to input", |
15 | " --precise report column numbers in error messages", |
16 | " --help display this text", |
17 | " --version display version number", |
18 | " --licence display licence text", |
d7482997 |
19 | NULL |
20 | }; |
21 | |
22 | static char *usagetext[] = { |
bc7e2a4b |
23 | "usage: halibut [--format[=filename]] [-Cconfig...] file.but [file.but...]", |
d7482997 |
24 | NULL |
25 | }; |
26 | |
27 | void help(void) { |
28 | char **p; |
29 | for (p = helptext; *p; p++) |
30 | puts(*p); |
31 | } |
32 | |
33 | void usage(void) { |
34 | char **p; |
35 | for (p = usagetext; *p; p++) |
36 | puts(*p); |
37 | } |
38 | |
39 | void showversion(void) { |
40 | printf("Halibut, %s\n", version); |
41 | } |