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", |
59ddc51d |
14 | " --info[=filename] generate GNU info output", |
43341922 |
15 | " --ps[=filename] generate PostScript output", |
16 | " --pdf[=filename] generate PDF output", |
bc7e2a4b |
17 | " -Cfoo:bar:baz append \\cfg{foo}{bar}{baz} to input", |
18 | " --precise report column numbers in error messages", |
19 | " --help display this text", |
20 | " --version display version number", |
21 | " --licence display licence text", |
d7482997 |
22 | NULL |
23 | }; |
24 | |
25 | static char *usagetext[] = { |
bc7e2a4b |
26 | "usage: halibut [--format[=filename]] [-Cconfig...] file.but [file.but...]", |
d7482997 |
27 | NULL |
28 | }; |
29 | |
30 | void help(void) { |
31 | char **p; |
32 | for (p = helptext; *p; p++) |
33 | puts(*p); |
34 | } |
35 | |
36 | void usage(void) { |
37 | char **p; |
38 | for (p = usagetext; *p; p++) |
39 | puts(*p); |
40 | } |
41 | |
42 | void showversion(void) { |
43 | printf("Halibut, %s\n", version); |
44 | } |