Initial work on PS and PDF output. Because these two backends share
[sgt/halibut] / help.c
1 /*
2 * help.c: usage instructions
3 */
4
5 #include <stdio.h>
6 #include "halibut.h"
7
8 static char *helptext[] = {
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 " --info[=filename] generate GNU info output",
15 " --ps[=filename] generate PostScript output",
16 " --pdf[=filename] generate PDF output",
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",
22 NULL
23 };
24
25 static char *usagetext[] = {
26 "usage: halibut [--format[=filename]] [-Cconfig...] file.but [file.but...]",
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 }