summaryrefslogtreecommitdiffstatshomepage
path: root/main.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 22:17:27 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-09-16 22:17:27 +0000
commit6f8fe1982a3b763cad6bc6f48f3dc1c2f19281d9 (patch)
tree2dbc13f1b26756d1354d380a65b851961a24b08c /main.c
parentea750887d0d1dfad81d0f7e066c720defe06e08a (diff)
downloadmandoc-6f8fe1982a3b763cad6bc6f48f3dc1c2f19281d9.tar.gz
mandoc-6f8fe1982a3b763cad6bc6f48f3dc1c2f19281d9.tar.zst
mandoc-6f8fe1982a3b763cad6bc6f48f3dc1c2f19281d9.zip
More updates to html.c.
Secretly enabled -Thtml in main.c (obviously not yet documented).
Diffstat (limited to 'main.c')
-rw-r--r--main.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/main.c b/main.c
index f0700bcb..9a8c7f60 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.42 2009/09/16 09:41:24 kristaps Exp $ */
+/* $Id: main.c,v 1.43 2009/09/16 22:17:27 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -58,6 +58,9 @@ enum intt {
enum outt {
OUTT_ASCII = 0,
OUTT_TREE,
+#if 1
+ OUTT_HTML,
+#endif
OUTT_LINT
};
@@ -85,6 +88,12 @@ struct curparse {
void *outdata;
};
+#if 1
+extern void *html_alloc(void);
+extern void html_mdoc(void *, const struct mdoc *);
+extern void html_man(void *, const struct man *);
+extern void html_free(void *);
+#endif
extern void *ascii_alloc(void);
extern void tree_mdoc(void *, const struct mdoc *);
extern void tree_man(void *, const struct man *);
@@ -432,6 +441,14 @@ fdesc(struct buf *blk, struct buf *ln, struct curparse *curp)
if ( ! (curp->outman && curp->outmdoc)) {
switch (curp->outtype) {
+#if 1
+ case (OUTT_HTML):
+ curp->outdata = html_alloc();
+ curp->outman = html_man;
+ curp->outmdoc = html_mdoc;
+ curp->outfree = html_free;
+ break;
+#endif
case (OUTT_TREE):
curp->outman = tree_man;
curp->outmdoc = tree_mdoc;
@@ -546,6 +563,10 @@ toptions(enum outt *tflags, char *arg)
*tflags = OUTT_LINT;
else if (0 == strcmp(arg, "tree"))
*tflags = OUTT_TREE;
+#if 1
+ else if (0 == strcmp(arg, "html"))
+ *tflags = OUTT_HTML;
+#endif
else {
warnx("bad argument: -T%s", arg);
return(0);