summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-01-25 15:28:56 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-01-25 15:28:56 +0000
commit643af1edaf881ac08f66cfdf17d2807aa0629a3d (patch)
treec85a14503ed0f42d4c71e00c8a64d2bb317c866e /mdoc_term.c
parent99f9e0ced799039092a15e576a2ba9f04fff9d0a (diff)
downloadmandoc-643af1edaf881ac08f66cfdf17d2807aa0629a3d.tar.gz
Properly uppercase the first-letter of the `Bx' second argument.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 703f2d06..221a6424 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1677,6 +1677,7 @@ termp_bd_post(DECL_ARGS)
static int
termp_bx_pre(DECL_ARGS)
{
+ char buf[3];
if (NULL != (n = n->child)) {
term_word(p, n->string);
@@ -1688,10 +1689,14 @@ termp_bx_pre(DECL_ARGS)
}
if (NULL != (n = n->next)) {
+ buf[0] = '-';
+ buf[1] = toupper((unsigned char)*n->string);
+ buf[2] = '\0';
+
p->flags |= TERMP_NOSPACE;
- term_word(p, "-");
+ term_word(p, buf);
p->flags |= TERMP_NOSPACE;
- term_word(p, n->string);
+ term_word(p, n->string + 1);
}
return(0);