summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2013-06-02 18:16:52 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2013-06-02 18:16:52 +0000
commit45ee51737f7c0cc1d3ff136905d8368349df9bfc (patch)
treef00c7bcd9efe7ba8631ce94ea19d77c5dfecdcd8
parentac9dbcdec632775c46dd19a4bd6d1d28b60b0244 (diff)
Let .Do .Dq .Ql .So .Sq generate the correct roff(7) character escape
sequences such that output modes like -Tutf8 have a chance to select nice glyphs. This doesn't change anything for -Tascii, and, for now, it doesn't affect -Tps and -Tpdf either. OK matthew@ bentley@; like the idea tedu@; no opinion jmc@.
-rw-r--r--usr.bin/mandoc/mdoc_man.c12
-rw-r--r--usr.bin/mandoc/mdoc_term.c10
2 files changed, 11 insertions, 11 deletions
diff --git a/usr.bin/mandoc/mdoc_man.c b/usr.bin/mandoc/mdoc_man.c
index 4ad95c77063..5dde45804bd 100644
--- a/usr.bin/mandoc/mdoc_man.c
+++ b/usr.bin/mandoc/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.49 2013/05/29 15:40:14 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.50 2013/06/02 18:16:51 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -178,8 +178,8 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ NULL, pre_bx, NULL, NULL, NULL }, /* Bx */
{ NULL, NULL, NULL, NULL, NULL }, /* Db */
{ NULL, NULL, NULL, NULL, NULL }, /* Dc */
- { cond_body, pre_enc, post_enc, "``", "''" }, /* Do */
- { cond_body, pre_enc, post_enc, "``", "''" }, /* Dq */
+ { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Do */
+ { cond_body, pre_enc, post_enc, "\\(lq", "\\(rq" }, /* Dq */
{ NULL, NULL, NULL, NULL, NULL }, /* Ec */
{ NULL, NULL, NULL, NULL, NULL }, /* Ef */
{ NULL, pre_em, post_font, NULL, NULL }, /* Em */
@@ -195,14 +195,14 @@ static const struct manact manacts[MDOC_MAX + 1] = {
{ cond_body, pre_enc, post_enc, "(", ")" }, /* Po */
{ cond_body, pre_enc, post_enc, "(", ")" }, /* Pq */
{ NULL, NULL, NULL, NULL, NULL }, /* Qc */
- { cond_body, pre_enc, post_enc, "`", "'" }, /* Ql */
+ { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* Ql */
{ cond_body, pre_enc, post_enc, "\"", "\"" }, /* Qo */
{ cond_body, pre_enc, post_enc, "\"", "\"" }, /* Qq */
{ NULL, NULL, NULL, NULL, NULL }, /* Re */
{ cond_body, pre_rs, NULL, NULL, NULL }, /* Rs */
{ NULL, NULL, NULL, NULL, NULL }, /* Sc */
- { cond_body, pre_enc, post_enc, "`", "'" }, /* So */
- { cond_body, pre_enc, post_enc, "`", "'" }, /* Sq */
+ { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* So */
+ { cond_body, pre_enc, post_enc, "\\(oq", "\\(cq" }, /* Sq */
{ NULL, pre_sm, NULL, NULL, NULL }, /* Sm */
{ NULL, pre_em, post_font, NULL, NULL }, /* Sx */
{ NULL, pre_sy, post_font, NULL, NULL }, /* Sy */
diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c
index f2dd504e067..39d7314994f 100644
--- a/usr.bin/mandoc/mdoc_term.c
+++ b/usr.bin/mandoc/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.150 2013/05/29 16:11:32 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.151 2013/06/02 18:16:51 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012 Ingo Schwarze <schwarze@openbsd.org>
@@ -1921,7 +1921,7 @@ termp_quote_pre(DECL_ARGS)
case (MDOC_Do):
/* FALLTHROUGH */
case (MDOC_Dq):
- term_word(p, "``");
+ term_word(p, "\\(lq");
break;
case (MDOC_Eo):
break;
@@ -1942,7 +1942,7 @@ termp_quote_pre(DECL_ARGS)
case (MDOC_So):
/* FALLTHROUGH */
case (MDOC_Sq):
- term_word(p, "`");
+ term_word(p, "\\(oq");
break;
default:
abort();
@@ -1987,7 +1987,7 @@ termp_quote_post(DECL_ARGS)
case (MDOC_Do):
/* FALLTHROUGH */
case (MDOC_Dq):
- term_word(p, "''");
+ term_word(p, "\\(rq");
break;
case (MDOC_Eo):
break;
@@ -2008,7 +2008,7 @@ termp_quote_post(DECL_ARGS)
case (MDOC_So):
/* FALLTHROUGH */
case (MDOC_Sq):
- term_word(p, "'");
+ term_word(p, "\\(cq");
break;
default:
abort();