diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-10 23:36:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-01-10 23:36:34 +0000 |
commit | 01d369a8105af24b0d6df42f974ff6b8d59dd258 (patch) | |
tree | ce7914935d83a78777dec29cf29fcf9ae80a22c7 /mdoc_man.c | |
parent | b8b4c05111a45cab71949b527a6060013e5fac66 (diff) | |
download | mandoc-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_man.c')
-rw-r--r-- | mdoc_man.c | 25 |
1 files changed, 2 insertions, 23 deletions
@@ -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 <schwarze@openbsd.org> * @@ -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 */ @@ -1054,26 +1053,6 @@ pre_br(DECL_ARGS) } 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) { |