summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--regress/usr.bin/mandoc/mdoc/Rs/Makefile3
-rw-r--r--regress/usr.bin/mandoc/mdoc/Rs/allch.out_utf821
-rw-r--r--regress/usr.bin/mandoc/mdoc/Rs/break.out_utf819
-rw-r--r--regress/usr.bin/mandoc/mdoc/Rs/empty.out_utf814
-rw-r--r--regress/usr.bin/mandoc/mdoc/Rs/three_authors.out_utf89
-rw-r--r--usr.bin/mandoc/mdoc_man.c8
-rw-r--r--usr.bin/mandoc/mdoc_term.c8
7 files changed, 73 insertions, 9 deletions
diff --git a/regress/usr.bin/mandoc/mdoc/Rs/Makefile b/regress/usr.bin/mandoc/mdoc/Rs/Makefile
index 45fd8cb2f1a..0ea8398800c 100644
--- a/regress/usr.bin/mandoc/mdoc/Rs/Makefile
+++ b/regress/usr.bin/mandoc/mdoc/Rs/Makefile
@@ -1,6 +1,7 @@
-# $OpenBSD: Makefile,v 1.7 2015/02/04 18:03:28 schwarze Exp $
+# $OpenBSD: Makefile,v 1.8 2017/02/17 19:14:39 schwarze Exp $
REGRESS_TARGETS = allch args break empty three_authors
+UTF8_TARGETS = allch break empty three_authors
LINT_TARGETS = allch args empty
# groff-1.22.3 defect:
diff --git a/regress/usr.bin/mandoc/mdoc/Rs/allch.out_utf8 b/regress/usr.bin/mandoc/mdoc/Rs/allch.out_utf8
new file mode 100644
index 00000000000..ddfbd7b05b0
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Rs/allch.out_utf8
@@ -0,0 +1,21 @@
+RS-ALLCH(1) General Commands Manual RS-ALLCH(1)
+
+NNAAMMEE
+ RRss--aallllcchh – reference block using all supported child macros
+
+DDEESSCCRRIIPPTTIIOONN
+ reference on the same line: some _b_o_g_u_s text author name, “title of
+ article”, _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e, _j_o_u_r_n_a_l _n_a_m_e, report name, number of
+ journal, volume number, uniform resource locator, page number,
+ institutional author, city name, date of publication, optional
+ information.
+
+SSEEEE AALLSSOO
+ reference after a blank line:
+
+ some _b_o_g_u_s text author name, “title of article”, _b_o_o_k _t_i_t_l_e, _i_s_s_u_e_r _n_a_m_e,
+ _j_o_u_r_n_a_l _n_a_m_e, report name, number of journal, volume number, uniform
+ resource locator, page number, institutional author, city name, date of
+ publication, optional information.
+
+OpenBSD July 7, 2014 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Rs/break.out_utf8 b/regress/usr.bin/mandoc/mdoc/Rs/break.out_utf8
new file mode 100644
index 00000000000..0164c5c0e4c
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Rs/break.out_utf8
@@ -0,0 +1,19 @@
+RS-BREAK(1) General Commands Manual RS-BREAK(1)
+
+NNAAMMEE
+ RRss--bbrreeaakk – line break before reference start
+
+DDEESSCCRRIIPPTTIIOONN
+ reference on the same line: author, _j_o_u_r_n_a_l, 42.
+
+SSEEEE AALLSSOO
+ reference after a blank line:
+
+ author, _j_o_u_r_n_a_l, 42.
+
+SSEEEE _A_L_S_O
+ reference after a blank line:
+
+ author, _j_o_u_r_n_a_l, 42.
+
+OpenBSD April 15, 2014 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Rs/empty.out_utf8 b/regress/usr.bin/mandoc/mdoc/Rs/empty.out_utf8
new file mode 100644
index 00000000000..419a5d90904
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Rs/empty.out_utf8
@@ -0,0 +1,14 @@
+RS-EMPTY(1) General Commands Manual RS-EMPTY(1)
+
+NNAAMMEE
+ RRss--eemmppttyy – empty reference blocks
+
+DDEESSCCRRIIPPTTIIOONN
+ initial text final text
+
+SSEEEE AALLSSOO
+ initial text
+
+ final text
+
+OpenBSD February 4, 2015 OpenBSD
diff --git a/regress/usr.bin/mandoc/mdoc/Rs/three_authors.out_utf8 b/regress/usr.bin/mandoc/mdoc/Rs/three_authors.out_utf8
new file mode 100644
index 00000000000..72c10d6d919
--- /dev/null
+++ b/regress/usr.bin/mandoc/mdoc/Rs/three_authors.out_utf8
@@ -0,0 +1,9 @@
+RS-THREE_AUTHORS(1) General Commands Manual RS-THREE_AUTHORS(1)
+
+NNAAMMEE
+ RRss--tthhrreeee__aauutthhoorrss – listing three authors in a reference block
+
+AAUUTTHHOORRSS
+ kristaps, joerg, and ingo, _m_a_n_d_o_c.
+
+OpenBSD May 1, 2009 OpenBSD
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index ac22229291a..ca1f8cadabf 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_man.c,v 1.101 2017/02/16 02:59:42 schwarze Exp $ */
+/* $OpenBSD: mdoc_man.c,v 1.102 2017/02/17 19:14:39 schwarze Exp $ */
/*
* Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -715,8 +715,7 @@ pre__t(DECL_ARGS)
if (n->parent && MDOC_Rs == n->parent->tok &&
n->parent->norm->Rs.quote_T) {
- print_word("");
- putchar('\"');
+ print_word("\\(lq");
outflags &= ~MMAN_spc;
} else
font_push('I');
@@ -730,8 +729,7 @@ post__t(DECL_ARGS)
if (n->parent && MDOC_Rs == n->parent->tok &&
n->parent->norm->Rs.quote_T) {
outflags &= ~MMAN_spc;
- print_word("");
- putchar('\"');
+ print_word("\\(rq");
} else
font_pop();
post_percent(meta, n);
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index cc52257bd04..b7bb513791f 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mdoc_term.c,v 1.244 2017/02/16 14:38:07 schwarze Exp $ */
+/* $OpenBSD: mdoc_term.c,v 1.245 2017/02/17 19:14:39 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1712,6 +1712,8 @@ termp_quote_pre(DECL_ARGS)
case MDOC_Bq:
term_word(p, "[");
break;
+ case MDOC__T:
+ /* FALLTHROUGH */
case MDOC_Do:
case MDOC_Dq:
term_word(p, "\\(Lq");
@@ -1726,7 +1728,6 @@ termp_quote_pre(DECL_ARGS)
case MDOC_Pq:
term_word(p, "(");
break;
- case MDOC__T:
case MDOC_Qo:
case MDOC_Qq:
term_word(p, "\"");
@@ -1769,6 +1770,8 @@ termp_quote_post(DECL_ARGS)
case MDOC_Bq:
term_word(p, "]");
break;
+ case MDOC__T:
+ /* FALLTHROUGH */
case MDOC_Do:
case MDOC_Dq:
term_word(p, "\\(Rq");
@@ -1785,7 +1788,6 @@ termp_quote_post(DECL_ARGS)
case MDOC_Pq:
term_word(p, ")");
break;
- case MDOC__T:
case MDOC_Qo:
case MDOC_Qq:
term_word(p, "\"");