diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-30 17:42:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2011-01-30 17:42:00 +0000 |
commit | 038f0c90a72f721a19b941a520c5a8b45535f64e (patch) | |
tree | a6ead4d46f0eae5694d792b9ccbffea41bdae845 | |
parent | 6ef6a9a3366a49c1ffa1ce1aecf1b3f18bbe037c (diff) |
Like in groff, if .%B is specified, quote .%T; from kristaps@.
-rw-r--r-- | usr.bin/mandoc/mdoc.h | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_term.c | 6 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/mandoc/mdoc.h b/usr.bin/mandoc/mdoc.h index b24ac1a0b5e..f495fa0c16f 100644 --- a/usr.bin/mandoc/mdoc.h +++ b/usr.bin/mandoc/mdoc.h @@ -1,4 +1,4 @@ -/* $Id: mdoc.h,v 1.42 2011/01/04 22:28:17 schwarze Exp $ */ +/* $Id: mdoc.h,v 1.43 2011/01/30 17:41:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -355,7 +355,7 @@ struct mdoc_an { }; struct mdoc_rs { - struct mdoc_node *child_J; /* pointer to %J */ + int quote_T; /* whether to quote %T */ }; /* diff --git a/usr.bin/mandoc/mdoc_term.c b/usr.bin/mandoc/mdoc_term.c index eeece6df44c..5506013497e 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.124 2011/01/16 02:56:47 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.125 2011/01/30 17:41:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org> @@ -2165,7 +2165,7 @@ termp__t_post(DECL_ARGS) * us instead of underlining us (for disambiguation). */ if (n->parent && MDOC_Rs == n->parent->tok && - n->parent->norm->Rs.child_J) + n->parent->norm->Rs.quote_T) termp_quote_post(p, pair, m, n); termp____post(p, pair, m, n); @@ -2181,7 +2181,7 @@ termp__t_pre(DECL_ARGS) * us instead of underlining us (for disambiguation). */ if (n->parent && MDOC_Rs == n->parent->tok && - n->parent->norm->Rs.child_J) + n->parent->norm->Rs.quote_T) return(termp_quote_pre(p, pair, m, n)); term_fontpush(p, TERMFONT_UNDER); diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index b7b537b8038..0e7f7703b6e 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.85 2011/01/22 13:55:50 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.86 2011/01/30 17:41:59 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1660,8 +1660,8 @@ post_rs(POST_ARGS) break; if (i < RSORD_MAX) { - if (MDOC__J == rsord[i]) - mdoc->last->norm->Rs.child_J = nn; + if (MDOC__J == rsord[i] || MDOC__B == rsord[i]) + mdoc->last->norm->Rs.quote_T++; next = nn->next; continue; } |