diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-20 15:51:18 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2011-05-20 15:51:18 +0000 |
commit | 433a90c2f7dcb09169f4a6dba3a070c56967fa14 (patch) | |
tree | 0048ee5214736bfd482dc3b367fb1f3cb685515d /main.c | |
parent | b2f39fae68970f2ba88e13f91f76cc3d0efd418a (diff) | |
download | mandoc-433a90c2f7dcb09169f4a6dba3a070c56967fa14.tar.gz mandoc-433a90c2f7dcb09169f4a6dba3a070c56967fa14.tar.zst mandoc-433a90c2f7dcb09169f4a6dba3a070c56967fa14.zip |
Turn on -Tutf8 in the frontend. Here we go!
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.162 2011/05/17 14:38:34 kristaps Exp $ */ +/* $Id: main.c,v 1.163 2011/05/20 15:51:18 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org> @@ -44,6 +44,7 @@ typedef void (*out_free)(void *); enum outt { OUTT_ASCII = 0, /* -Tascii */ OUTT_LOCALE, /* -Tlocale */ + OUTT_UTF8, /* -Tutf8 */ OUTT_TREE, /* -Ttree */ OUTT_HTML, /* -Thtml */ OUTT_XHTML, /* -Txhtml */ @@ -213,6 +214,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; @@ -248,6 +253,8 @@ parse(struct curparse *curp, int fd, /* FALLTHROUGH */ case (OUTT_ASCII): /* FALLTHROUGH */ + case (OUTT_UTF8): + /* FALLTHROUGH */ case (OUTT_LOCALE): /* FALLTHROUGH */ case (OUTT_PS): @@ -307,6 +314,8 @@ toptions(struct curparse *curp, char *arg) curp->outtype = OUTT_TREE; 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")) |