From d896fc86c4e9a18cefb558d7bfd1c987306de938 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 17 Sep 2011 15:00:51 +0000 Subject: 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@ --- main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'main.c') diff --git a/main.c b/main.c index 4c2e7e79..b76a6047 100644 --- a/main.c +++ b/main.c @@ -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 * Copyright (c) 2010, 2011 Ingo Schwarze @@ -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")) -- cgit v1.2.3