aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-01-10 23:36:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-01-10 23:36:34 +0000
commit01d369a8105af24b0d6df42f974ff6b8d59dd258 (patch)
treece7914935d83a78777dec29cf29fcf9ae80a22c7 /mdoc_term.c
parentb8b4c05111a45cab71949b527a6060013e5fac66 (diff)
downloadmandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.tar.gz
mandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.tar.zst
mandoc-01d369a8105af24b0d6df42f974ff6b8d59dd258.zip
Use new NODE_NOSRC and NODE_NOPRT flags for .Bx and .At.
More rigorous AST and 40 lines less code.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 0442165a..9540b326 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.339 2017/01/10 21:59:47 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.340 2017/01/10 23:36:34 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -92,7 +92,6 @@ static int termp_bk_pre(DECL_ARGS);
static int termp_bl_pre(DECL_ARGS);
static int termp_bold_pre(DECL_ARGS);
static int termp_bt_pre(DECL_ARGS);
-static int termp_bx_pre(DECL_ARGS);
static int termp_cd_pre(DECL_ARGS);
static int termp_d1_pre(DECL_ARGS);
static int termp_eo_pre(DECL_ARGS);
@@ -191,7 +190,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ termp_quote_pre, termp_quote_post }, /* Bo */
{ termp_quote_pre, termp_quote_post }, /* Bq */
{ termp_xx_pre, termp_xx_post }, /* Bsx */
- { termp_bx_pre, NULL }, /* Bx */
+ { NULL, NULL }, /* Bx */
{ termp_skip_pre, NULL }, /* Db */
{ NULL, NULL }, /* Dc */
{ termp_quote_pre, termp_quote_post }, /* Do */
@@ -1653,29 +1652,6 @@ termp_bd_post(DECL_ARGS)
}
static int
-termp_bx_pre(DECL_ARGS)
-{
-
- if (NULL != (n = n->child)) {
- term_word(p, n->string);
- p->flags |= TERMP_NOSPACE;
- term_word(p, "BSD");
- } else {
- term_word(p, "BSD");
- return 0;
- }
-
- if (NULL != (n = n->next)) {
- p->flags |= TERMP_NOSPACE;
- term_word(p, "-");
- p->flags |= TERMP_NOSPACE;
- term_word(p, n->string);
- }
-
- return 0;
-}
-
-static int
termp_xx_pre(DECL_ARGS)
{
if ((n->aux = p->flags & TERMP_PREKEEP) == 0)