aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mandoc.3
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 11:50:20 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-05-17 11:50:20 +0000
commit1ee1eeda195d12cccd87b8fdfca9e982035a89e7 (patch)
treedc8c759f44513405842fdbdf491a24a9926a28b9 /mandoc.3
parent6fcb5ea18d95e1cc79dd37b4e2860f4e8c898346 (diff)
downloadmandoc-1ee1eeda195d12cccd87b8fdfca9e982035a89e7.tar.gz
mandoc-1ee1eeda195d12cccd87b8fdfca9e982035a89e7.tar.zst
mandoc-1ee1eeda195d12cccd87b8fdfca9e982035a89e7.zip
Flip on unicode output (via \[uNNNN]) in -T[x]html. Here we go!
Diffstat (limited to 'mandoc.3')
-rw-r--r--mandoc.318
1 files changed, 14 insertions, 4 deletions
diff --git a/mandoc.3 b/mandoc.3
index 66148c4d..0521e391 100644
--- a/mandoc.3
+++ b/mandoc.3
@@ -1,4 +1,4 @@
-.\" $Id: mandoc.3,v 1.6 2011/05/01 10:40:52 kristaps Exp $
+.\" $Id: mandoc.3,v 1.7 2011/05/17 11:50:20 kristaps Exp $
.\"
.\" Copyright (c) 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
.\" Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -15,7 +15,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 1 2011 $
+.Dd $Mdocdate: May 17 2011 $
.Dt MANDOC 3
.Os
.Sh NAME
@@ -26,6 +26,7 @@
.Nm mchars_alloc ,
.Nm mchars_free ,
.Nm mchars_num2char ,
+.Nm mchars_num2uc ,
.Nm mchars_res2cp ,
.Nm mchars_res2str ,
.Nm mchars_spec2cp ,
@@ -64,6 +65,8 @@
.Fn mchars_free "struct mchars *p"
.Ft char
.Fn mchars_num2char "const char *cp" "size_t sz"
+.Ft int
+.Fn mchars_num2uc "const char *cp" "size_t sz"
.Ft "const char *"
.Fo mchars_res2str
.Fa "struct mchars *p"
@@ -188,6 +191,9 @@ library also contains routines for translating character strings into glyphs
.Pq see Fn mchars_alloc
and parsing escape sequences from strings
.Pq see Fn mandoc_escape .
+.Pp
+This library is
+.Ud
.Sh REFERENCE
This section documents the functions, types, and variables available
via
@@ -247,8 +253,12 @@ The object must be freed with
Free an object created with
.Fn mchars_alloc .
.It Fn mchars_num2char
-Convert a character index as found in \eN\(aq\(aq into a printable
-character.
+Convert a character index (e.g., the \eN\(aq\(aq escape) into a
+printable ASCII character.
+Returns \e0 (the nil character) if the input sequence is malformed.
+.It Fn mchars_num2uc
+Convert a hexadecimal character index (e.g., the \e[uNNNN] escape) into
+a Unicode codepoint.
Returns \e0 (the nil character) if the input sequence is malformed.
.It Fn mchars_res2cp
Convert a predefined character into a valid Unicode codepoint.