summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-09-17 15:00:51 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-09-17 15:00:51 +0000
commitecc3c51a504af643161c53660cd2cfa8c3dc334d (patch)
tree0f97a5f3edce1fdc0910b60e9c0eb3fe47ad2632 /main.c
parent42092681fc893b2d2207082f50a1d0997489566e (diff)
downloadmandoc-ecc3c51a504af643161c53660cd2cfa8c3dc334d.tar.gz
Initial, incomplete support for -Tman
to convert mdoc(7) documents to the man(7) language. This is work in progress and will be developed in tree. It does already handle the cat(1) manual, but will hardly handle all your fancy manuals yet. go ahead kristaps@ jmc@ millert@ deraadt@
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.c b/main.c
index cfd3de1c..1316fdf7 100644
--- a/main.c
+++ b/main.c
@@ -46,6 +46,7 @@ enum outt {
OUTT_LOCALE, /* -Tlocale */
OUTT_UTF8, /* -Tutf8 */
OUTT_TREE, /* -Ttree */
+ OUTT_MAN, /* -Tman */
OUTT_HTML, /* -Thtml */
OUTT_XHTML, /* -Txhtml */
OUTT_LINT, /* -Tlint */
@@ -249,6 +250,9 @@ parse(struct curparse *curp, int fd,
curp->outman = tree_man;
curp->outmdoc = tree_mdoc;
break;
+ case (OUTT_MAN):
+ curp->outmdoc = man_mdoc;
+ break;
case (OUTT_PDF):
/* FALLTHROUGH */
case (OUTT_ASCII):
@@ -312,6 +316,8 @@ toptions(struct curparse *curp, char *arg)
curp->wlevel = MANDOCLEVEL_WARNING;
} else if (0 == strcmp(arg, "tree"))
curp->outtype = OUTT_TREE;
+ else if (0 == strcmp(arg, "man"))
+ curp->outtype = OUTT_MAN;
else if (0 == strcmp(arg, "html"))
curp->outtype = OUTT_HTML;
else if (0 == strcmp(arg, "utf8"))