]> git.cameronkatri.com Git - mandoc.git/commitdiff
Use typographic quotes rather than '"' for .Rs %T (no change for -Tascii
authorIngo Schwarze <schwarze@openbsd.org>
Fri, 17 Feb 2017 19:15:41 +0000 (19:15 +0000)
committerIngo Schwarze <schwarze@openbsd.org>
Fri, 17 Feb 2017 19:15:41 +0000 (19:15 +0000)
output, of course).  Patch from bentley@ in November 2014.  This can be
committed now because groff merged Anthony's patch yesterday.

mdoc_man.c
mdoc_term.c
regress/mdoc/Rs/Makefile
regress/mdoc/Rs/allch.out_utf8 [new file with mode: 0644]
regress/mdoc/Rs/break.out_utf8 [new file with mode: 0644]
regress/mdoc/Rs/empty.out_utf8 [new file with mode: 0644]
regress/mdoc/Rs/three_authors.out_utf8 [new file with mode: 0644]

index 253dc7cebe1ac56d239b1d50c7cb3e4df352f4d5..88d39370e8c2a872badcdad69c81ee3340df741d 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_man.c,v 1.103 2017/02/16 03:00:23 schwarze Exp $ */
+/*     $Id: mdoc_man.c,v 1.104 2017/02/17 19:15:41 schwarze Exp $ */
 /*
  * Copyright (c) 2011-2017 Ingo Schwarze <schwarze@openbsd.org>
  *
@@ -717,8 +717,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');
@@ -732,8 +731,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);
index bc125f29a3cf2b5fb73b551f36dbef2c1bd87be8..e9ea455a48e833c04698998e0ad77ebcce7a5598 100644 (file)
@@ -1,4 +1,4 @@
-/*     $Id: mdoc_term.c,v 1.345 2017/02/16 14:38:12 schwarze Exp $ */
+/*     $Id: mdoc_term.c,v 1.346 2017/02/17 19:15:41 schwarze Exp $ */
 /*
  * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
  * Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -1714,6 +1714,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");
@@ -1728,7 +1730,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, "\"");
@@ -1771,6 +1772,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");
@@ -1787,7 +1790,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, "\"");
index 45fd8cb2f1a293fe0cbbef150260924b564dac61..3732dc0a8be7021920a260e0d1bb070046474896 100644 (file)
@@ -1,6 +1,7 @@
 # $OpenBSD: Makefile,v 1.7 2015/02/04 18:03:28 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/mdoc/Rs/allch.out_utf8 b/regress/mdoc/Rs/allch.out_utf8
new file mode 100644 (file)
index 0000000..ddfbd7b
--- /dev/null
@@ -0,0 +1,21 @@
+RS-ALLCH(1)                 General Commands Manual                RS-ALLCH(1)
+
+N\bNA\bAM\bME\bE
+     R\bRs\bs-\b-a\bal\bll\blc\bch\bh – reference block using all supported child macros
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     reference on the same line: some _\bb_\bo_\bg_\bu_\bs text author name, “title of
+     article”, _\bb_\bo_\bo_\bk _\bt_\bi_\bt_\bl_\be, _\bi_\bs_\bs_\bu_\be_\br _\bn_\ba_\bm_\be, _\bj_\bo_\bu_\br_\bn_\ba_\bl _\bn_\ba_\bm_\be, report name, number of
+     journal, volume number, uniform resource locator, page number,
+     institutional author, city name, date of publication, optional
+     information.
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+     reference after a blank line:
+
+     some _\bb_\bo_\bg_\bu_\bs text author name, “title of article”, _\bb_\bo_\bo_\bk _\bt_\bi_\bt_\bl_\be, _\bi_\bs_\bs_\bu_\be_\br _\bn_\ba_\bm_\be,
+     _\bj_\bo_\bu_\br_\bn_\ba_\bl _\bn_\ba_\bm_\be, 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/mdoc/Rs/break.out_utf8 b/regress/mdoc/Rs/break.out_utf8
new file mode 100644 (file)
index 0000000..0164c5c
--- /dev/null
@@ -0,0 +1,19 @@
+RS-BREAK(1)                 General Commands Manual                RS-BREAK(1)
+
+N\bNA\bAM\bME\bE
+     R\bRs\bs-\b-b\bbr\bre\bea\bak\bk – line break before reference start
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     reference on the same line: author, _\bj_\bo_\bu_\br_\bn_\ba_\bl, 42.
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+     reference after a blank line:
+
+     author, _\bj_\bo_\bu_\br_\bn_\ba_\bl, 42.
+
+S\bSE\bEE\bE _\bA_\bL_\bS_\bO
+     reference after a blank line:
+
+     author, _\bj_\bo_\bu_\br_\bn_\ba_\bl, 42.
+
+OpenBSD                         April 15, 2014                         OpenBSD
diff --git a/regress/mdoc/Rs/empty.out_utf8 b/regress/mdoc/Rs/empty.out_utf8
new file mode 100644 (file)
index 0000000..419a5d9
--- /dev/null
@@ -0,0 +1,14 @@
+RS-EMPTY(1)                 General Commands Manual                RS-EMPTY(1)
+
+N\bNA\bAM\bME\bE
+     R\bRs\bs-\b-e\bem\bmp\bpt\bty\by – empty reference blocks
+
+D\bDE\bES\bSC\bCR\bRI\bIP\bPT\bTI\bIO\bON\bN
+     initial text final text
+
+S\bSE\bEE\bE A\bAL\bLS\bSO\bO
+     initial text
+
+     final text
+
+OpenBSD                        February 4, 2015                        OpenBSD
diff --git a/regress/mdoc/Rs/three_authors.out_utf8 b/regress/mdoc/Rs/three_authors.out_utf8
new file mode 100644 (file)
index 0000000..72c10d6
--- /dev/null
@@ -0,0 +1,9 @@
+RS-THREE_AUTHORS(1)         General Commands Manual        RS-THREE_AUTHORS(1)
+
+N\bNA\bAM\bME\bE
+     R\bRs\bs-\b-t\bth\bhr\bre\bee\be_\b_a\bau\but\bth\bho\bor\brs\bs – listing three authors in a reference block
+
+A\bAU\bUT\bTH\bHO\bOR\bRS\bS
+     kristaps, joerg, and ingo, _\bm_\ba_\bn_\bd_\bo_\bc.
+
+OpenBSD                           May 1, 2009                          OpenBSD