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", |
675958c3 |
18 | " --input-charset=cs change default input file charset", |
bc7e2a4b |
19 | " --precise report column numbers in error messages", |
20 | " --help display this text", |
21 | " --version display version number", |
22 | " --licence display licence text", |
d7482997 |
23 | NULL |
24 | }; |
25 | |
26 | static char *usagetext[] = { |
675958c3 |
27 | "usage: halibut [--format[=filename]] [options] file.but [file.but...]", |
d7482997 |
28 | NULL |
29 | }; |
30 | |
31 | void help(void) { |
32 | char **p; |
33 | for (p = helptext; *p; p++) |
34 | puts(*p); |
35 | } |
36 | |
37 | void usage(void) { |
38 | char **p; |
39 | for (p = usagetext; *p; p++) |
40 | puts(*p); |
41 | } |
42 | |
43 | void showversion(void) { |
44 | printf("Halibut, %s\n", version); |
45 | } |