From 01d369a8105af24b0d6df42f974ff6b8d59dd258 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 10 Jan 2017 23:36:34 +0000 Subject: Use new NODE_NOSRC and NODE_NOPRT flags for .Bx and .At. More rigorous AST and 40 lines less code. --- mdoc_man.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) (limited to 'mdoc_man.c') diff --git a/mdoc_man.c b/mdoc_man.c index 30291909..594ade1f 100644 --- a/mdoc_man.c +++ b/mdoc_man.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_man.c,v 1.99 2017/01/10 21:59:47 schwarze Exp $ */ +/* $Id: mdoc_man.c,v 1.100 2017/01/10 23:36:34 schwarze Exp $ */ /* * Copyright (c) 2011-2017 Ingo Schwarze * @@ -79,7 +79,6 @@ static int pre_bf(DECL_ARGS); static int pre_bk(DECL_ARGS); static int pre_bl(DECL_ARGS); static int pre_br(DECL_ARGS); -static int pre_bx(DECL_ARGS); static int pre_dl(DECL_ARGS); static int pre_en(DECL_ARGS); static int pre_enc(DECL_ARGS); @@ -183,7 +182,7 @@ static const struct manact manacts[MDOC_MAX + 1] = { { cond_body, pre_enc, post_enc, "[", "]" }, /* Bo */ { cond_body, pre_enc, post_enc, "[", "]" }, /* Bq */ { NULL, NULL, NULL, NULL, NULL }, /* Bsx */ - { NULL, pre_bx, NULL, NULL, NULL }, /* Bx */ + { NULL, NULL, NULL, NULL, NULL }, /* Bx */ { NULL, pre_skip, NULL, NULL, NULL }, /* Db */ { NULL, NULL, NULL, NULL, NULL }, /* Dc */ { cond_body, pre_enc, post_enc, "\\(Lq", "\\(Rq" }, /* Do */ @@ -1053,26 +1052,6 @@ pre_br(DECL_ARGS) return 0; } -static int -pre_bx(DECL_ARGS) -{ - - n = n->child; - if (n) { - print_word(n->string); - outflags &= ~MMAN_spc; - n = n->next; - } - print_word("BSD"); - if (NULL == n) - return 0; - outflags &= ~MMAN_spc; - print_word("-"); - outflags &= ~MMAN_spc; - print_word(n->string); - return 0; -} - static int pre_dl(DECL_ARGS) { -- cgit v1.2.3