From de81475355220cd15315b1eb9c0a33ce571ac512 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 2 Jul 2010 12:54:33 +0000 Subject: Stash `Bf' parameters into struct mdoc_bf. --- mdoc_term.c | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 642eda34..6ab8bb9c 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -2057,30 +2057,19 @@ termp_fo_post(DECL_ARGS) static int termp_bf_pre(DECL_ARGS) { - const struct mdoc_node *nn; if (MDOC_HEAD == n->type) return(0); else if (MDOC_BLOCK != n->type) return(1); - if (NULL == (nn = n->head->child)) { - if (arg_hasattr(MDOC_Emphasis, n)) - term_fontpush(p, TERMFONT_UNDER); - else if (arg_hasattr(MDOC_Symbolic, n)) - term_fontpush(p, TERMFONT_BOLD); - else - term_fontpush(p, TERMFONT_NONE); + assert(n->data.Bf); - return(1); - } - - assert(MDOC_TEXT == nn->type); - if (0 == strcmp("Em", nn->string)) + if (FONT_Em == n->data.Bf->font) term_fontpush(p, TERMFONT_UNDER); - else if (0 == strcmp("Sy", nn->string)) + else if (FONT_Sy == n->data.Bf->font) term_fontpush(p, TERMFONT_BOLD); - else + else term_fontpush(p, TERMFONT_NONE); return(1); -- cgit