summaryrefslogtreecommitdiffstats
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
commitf1073511b0d42c759d7f3aac33e0f567c69e7dfe (patch)
treee0811e4923917dea3b3276a6d352752f5747109c /mdoc_term.c
parent88adc8bfc4d6844007b7f059956fa0ce17eeee04 (diff)
downloadmandoc-f1073511b0d42c759d7f3aac33e0f567c69e7dfe.tar.gz
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.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 183d5224..0a420442 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -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)