From 93a6626101a75d16172b09ad5201078daf1c61b3 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 | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'mdoc_term.c') diff --git a/mdoc_term.c b/mdoc_term.c index 6a174bee..62414099 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.166 2010/07/02 10:53:28 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.167 2010/07/02 12:54:33 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -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 v1.2.3