summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c32
1 files changed, 24 insertions, 8 deletions
diff --git a/main.c b/main.c
index e27e2bf1..19c47a25 100644
--- a/main.c
+++ b/main.c
@@ -65,7 +65,8 @@ enum outt {
OUTT_TREE,
OUTT_HTML,
OUTT_XHTML,
- OUTT_LINT
+ OUTT_LINT,
+ OUTT_PS
};
struct curparse {
@@ -584,12 +585,24 @@ fdesc(struct curparse *curp)
switch (curp->outtype) {
case (OUTT_XHTML):
curp->outdata = xhtml_alloc(curp->outopts);
- curp->outman = html_man;
- curp->outmdoc = html_mdoc;
- curp->outfree = html_free;
break;
case (OUTT_HTML):
curp->outdata = html_alloc(curp->outopts);
+ break;
+ case (OUTT_ASCII):
+ curp->outdata = ascii_alloc(curp->outopts);
+ break;
+ case (OUTT_PS):
+ curp->outdata = ps_alloc();
+ break;
+ default:
+ break;
+ }
+
+ switch (curp->outtype) {
+ case (OUTT_HTML):
+ /* FALLTHROUGH */
+ case (OUTT_XHTML):
curp->outman = html_man;
curp->outmdoc = html_mdoc;
curp->outfree = html_free;
@@ -598,14 +611,15 @@ fdesc(struct curparse *curp)
curp->outman = tree_man;
curp->outmdoc = tree_mdoc;
break;
- case (OUTT_LINT):
- break;
- default:
- curp->outdata = ascii_alloc(curp->outopts);
+ case (OUTT_ASCII):
+ /* FALLTHROUGH */
+ case (OUTT_PS):
curp->outman = terminal_man;
curp->outmdoc = terminal_mdoc;
curp->outfree = terminal_free;
break;
+ default:
+ break;
}
}
@@ -729,6 +743,8 @@ toptions(struct curparse *curp, char *arg)
curp->outtype = OUTT_HTML;
else if (0 == strcmp(arg, "xhtml"))
curp->outtype = OUTT_XHTML;
+ else if (0 == strcmp(arg, "ps"))
+ curp->outtype = OUTT_PS;
else {
fprintf(stderr, "%s: Bad argument\n", arg);
return(0);