diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 12:54:33 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-02 12:54:33 +0000 |
commit | 93a6626101a75d16172b09ad5201078daf1c61b3 (patch) | |
tree | 85382023409b33ff7c59b10f3eb8e2545165ef84 /mdoc_term.c | |
parent | 966c1bc6fc8cf98168d9d17b82cc2e7b414d2e15 (diff) | |
download | mandoc-93a6626101a75d16172b09ad5201078daf1c61b3.tar.gz mandoc-93a6626101a75d16172b09ad5201078daf1c61b3.tar.zst mandoc-93a6626101a75d16172b09ad5201078daf1c61b3.zip |
Stash `Bf' parameters into struct mdoc_bf.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 21 |
1 files changed, 5 insertions, 16 deletions
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 <kristaps@bsd.lv> * @@ -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); |