From: kristaps@mdocml.bsd.lv
To: source@mdocml.bsd.lv
Subject: mdocml: Turn on -Tutf8 in the frontend.
Date: Fri, 20 May 2011 11:51:18 -0400 (EDT) [thread overview]
Message-ID: <201105201551.p4KFpIMj030653@krisdoz.my.domain> (raw)
Log Message:
-----------
Turn on -Tutf8 in the frontend. Here we go!
Modified Files:
--------------
mdocml:
main.c
mandoc.1
Revision Data
-------------
Index: mandoc.1
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mandoc.1,v
retrieving revision 1.87
retrieving revision 1.88
diff -Lmandoc.1 -Lmandoc.1 -u -p -r1.87 -r1.88
--- mandoc.1
+++ mandoc.1
@@ -158,10 +158,13 @@ utility accepts the following
.Fl T
arguments, which correspond to output modes:
.Bl -tag -width Ds
+.It Fl T Ns Cm utf8
+Encode output in the UTF-8 multi-byte format.
+See
+.Xr UTF-8 Output .
.It Fl T Ns Cm locale
-This option encodes output characters using the current
-.Xr locale 1
-configuration.
+Encode output using the current
+.Xr locale 1 .
See
.Sx Locale Output .
.It Fl T Ns Cm ascii
@@ -195,6 +198,13 @@ See
.Pp
If multiple input files are specified, these will be processed by the
corresponding filter in-order.
+.Ss UTF-8 Output
+Use
+.Fl T Ns Cm utf8
+to force a UTF-8 locale.
+See
+.Sx Locale Output
+for details and options.
.Ss Locale Output
Locale-depending output encoding is triggered with
.Fl T Ns Cm locale .
Index: main.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/main.c,v
retrieving revision 1.162
retrieving revision 1.163
diff -Lmain.c -Lmain.c -u -p -r1.162 -r1.163
--- main.c
+++ main.c
@@ -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 *ar
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"))
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
reply other threads:[~2011-05-20 15:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201105201551.p4KFpIMj030653@krisdoz.my.domain \
--to=kristaps@mdocml.bsd.lv \
--cc=source@mdocml.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).