=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.350 retrieving revision 1.354 diff -u -p -r1.350 -r1.354 --- mandoc/mdoc_term.c 2017/04/24 23:06:18 1.350 +++ mandoc/mdoc_term.c 2017/05/05 13:17:55 1.354 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.350 2017/04/24 23:06:18 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.354 2017/05/05 13:17:55 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2017 Ingo Schwarze @@ -106,7 +106,6 @@ static int termp_ft_pre(DECL_ARGS); static int termp_in_pre(DECL_ARGS); static int termp_it_pre(DECL_ARGS); static int termp_li_pre(DECL_ARGS); -static int termp_ll_pre(DECL_ARGS); static int termp_lk_pre(DECL_ARGS); static int termp_nd_pre(DECL_ARGS); static int termp_nm_pre(DECL_ARGS); @@ -244,11 +243,9 @@ static const struct termact __termacts[MDOC_MAX - MDOC { termp_quote_pre, termp_quote_post }, /* En */ { termp_xx_pre, termp_xx_post }, /* Dx */ { NULL, termp____post }, /* %Q */ - { termp_sp_pre, NULL }, /* br */ { termp_sp_pre, NULL }, /* sp */ { NULL, termp____post }, /* %U */ { NULL, NULL }, /* Ta */ - { termp_ll_pre, NULL }, /* ll */ }; static const struct termact *const termacts = __termacts - MDOC_Dd; @@ -365,6 +362,11 @@ print_mdoc_node(DECL_ARGS) term_tbl(p, n->span); break; default: + if (n->tok < ROFF_MAX) { + roff_term_pre(p, n); + return; + } + assert(n->tok >= MDOC_Dd && n->tok < MDOC_MAX); if (termacts[n->tok].pre != NULL && (n->end == ENDBODY_NOT || n->child != NULL)) chld = (*termacts[n->tok].pre) @@ -403,10 +405,8 @@ print_mdoc_node(DECL_ARGS) if (NODE_EOS & n->flags) p->flags |= TERMP_SENTENCE; - if (MDOC_ll != n->tok) { - p->offset = offset; - p->rmargin = rmargin; - } + p->offset = offset; + p->rmargin = rmargin; } static void @@ -598,14 +598,6 @@ print_bvspace(struct termp *p, static int -termp_ll_pre(DECL_ARGS) -{ - - term_setwidth(p, n->child != NULL ? n->child->string : NULL); - return 0; -} - -static int termp_it_pre(DECL_ARGS) { struct roffsu su; @@ -1504,7 +1496,7 @@ termp_bd_pre(DECL_ARGS) */ switch (nn->tok) { case MDOC_Sm: - case MDOC_br: + case ROFF_br: case MDOC_sp: case MDOC_Bl: case MDOC_D1: @@ -1666,7 +1658,7 @@ termp_sp_pre(DECL_ARGS) } else len = 1; break; - case MDOC_br: + case ROFF_br: len = 0; break; default: