diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-17 15:00:51 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-09-17 15:00:51 +0000 |
commit | d896fc86c4e9a18cefb558d7bfd1c987306de938 (patch) | |
tree | 9821eaa5690811ede58dcb6c8ecb6d2319da1540 /main.c | |
parent | 16e745d5f0fcf9edaa4f0733c6dd0a128075b31a (diff) | |
download | mandoc-d896fc86c4e9a18cefb558d7bfd1c987306de938.tar.gz mandoc-d896fc86c4e9a18cefb558d7bfd1c987306de938.tar.zst mandoc-d896fc86c4e9a18cefb558d7bfd1c987306de938.zip |
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.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.163 2011/05/20 15:51:18 kristaps Exp $ */ +/* $Id: main.c,v 1.164 2011/09/17 15:00:51 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -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")) |