=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.162 retrieving revision 1.164 diff -u -p -r1.162 -r1.164 --- mandoc/main.c 2011/05/17 14:38:34 1.162 +++ mandoc/main.c 2011/09/17 15:00:51 1.164 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.162 2011/05/17 14:38:34 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 @@ -44,7 +44,9 @@ typedef void (*out_free)(void *); enum outt { OUTT_ASCII = 0, /* -Tascii */ OUTT_LOCALE, /* -Tlocale */ + OUTT_UTF8, /* -Tutf8 */ OUTT_TREE, /* -Ttree */ + OUTT_MAN, /* -Tman */ OUTT_HTML, /* -Thtml */ OUTT_XHTML, /* -Txhtml */ OUTT_LINT, /* -Tlint */ @@ -213,6 +215,10 @@ parse(struct curparse *curp, int fd, curp->outdata = html_alloc(curp->outopts); curp->outfree = html_free; break; + case (OUTT_UTF8): + curp->outdata = utf8_alloc(curp->outopts); + curp->outfree = ascii_free; + break; case (OUTT_LOCALE): curp->outdata = locale_alloc(curp->outopts); curp->outfree = ascii_free; @@ -244,10 +250,15 @@ 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): /* FALLTHROUGH */ + case (OUTT_UTF8): + /* FALLTHROUGH */ case (OUTT_LOCALE): /* FALLTHROUGH */ case (OUTT_PS): @@ -305,8 +316,12 @@ 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")) + curp->outtype = OUTT_UTF8; else if (0 == strcmp(arg, "locale")) curp->outtype = OUTT_LOCALE; else if (0 == strcmp(arg, "xhtml"))