=================================================================== RCS file: /cvs/mandoc/man_term.c,v retrieving revision 1.193 retrieving revision 1.196 diff -u -p -r1.193 -r1.196 --- mandoc/man_term.c 2017/05/04 17:48:28 1.193 +++ mandoc/man_term.c 2017/05/05 13:17:55 1.196 @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.193 2017/05/04 17:48:28 schwarze Exp $ */ +/* $Id: man_term.c,v 1.196 2017/05/05 13:17:55 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2015, 2017 Ingo Schwarze @@ -80,11 +80,9 @@ static int pre_SS(DECL_ARGS); static int pre_TP(DECL_ARGS); static int pre_UR(DECL_ARGS); static int pre_alternate(DECL_ARGS); -static int pre_ft(DECL_ARGS); static int pre_ign(DECL_ARGS); static int pre_in(DECL_ARGS); static int pre_literal(DECL_ARGS); -static int pre_ll(DECL_ARGS); static int pre_sp(DECL_ARGS); static void post_IP(DECL_ARGS); @@ -126,13 +124,11 @@ static const struct termact __termacts[MAN_MAX - MAN_T { pre_PD, NULL, MAN_NOTEXT }, /* PD */ { pre_ign, NULL, 0 }, /* AT */ { pre_in, NULL, MAN_NOTEXT }, /* in */ - { pre_ft, NULL, MAN_NOTEXT }, /* ft */ { pre_OP, NULL, 0 }, /* OP */ { pre_literal, NULL, 0 }, /* EX */ { pre_literal, NULL, 0 }, /* EE */ { pre_UR, post_UR, 0 }, /* UR */ { NULL, NULL, 0 }, /* UE */ - { pre_ll, NULL, MAN_NOTEXT }, /* ll */ }; static const struct termact *termacts = __termacts - MAN_TH; @@ -219,14 +215,6 @@ pre_ign(DECL_ARGS) } static int -pre_ll(DECL_ARGS) -{ - - term_setwidth(p, n->child != NULL ? n->child->string : NULL); - return 0; -} - -static int pre_I(DECL_ARGS) { @@ -362,41 +350,6 @@ pre_OP(DECL_ARGS) } static int -pre_ft(DECL_ARGS) -{ - const char *cp; - - if (NULL == n->child) { - term_fontlast(p); - return 0; - } - - cp = n->child->string; - switch (*cp) { - case '4': - case '3': - case 'B': - term_fontrepl(p, TERMFONT_BOLD); - break; - case '2': - case 'I': - term_fontrepl(p, TERMFONT_UNDER); - break; - case 'P': - term_fontlast(p); - break; - case '1': - case 'C': - case 'R': - term_fontrepl(p, TERMFONT_NONE); - break; - default: - break; - } - return 0; -} - -static int pre_in(DECL_ARGS) { struct roffsu su; @@ -457,9 +410,7 @@ pre_sp(DECL_ARGS) } } - if (n->tok == ROFF_br) - len = 0; - else if (n->child == NULL) + if (n->child == NULL) len = 1; else { if ( ! a2roffsu(n->child->string, &su, SCALE_VS)) @@ -987,13 +938,7 @@ print_man_node(DECL_ARGS) } if (n->tok < ROFF_MAX) { - switch (n->tok) { - case ROFF_br: - pre_sp(p, mt, n, meta); - break; - default: - abort(); - } + roff_term_pre(p, n); return; }