aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit5429c6324d2969b17da51f6de9f445e7bb44294b (patch)
treec6109493394aa20eeb8da1d34cde23327f9cfec0 /mdoc_term.c
parentd78af72a5fc16f78890e7b519b7b1b5da7aabd39 (diff)
downloadmandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.tar.gz
mandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.tar.zst
mandoc-5429c6324d2969b17da51f6de9f445e7bb44294b.zip
Properly uppercase the first-letter of the `Bx' second argument.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 169b2b4b..3d48b453 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.211 2011/01/25 15:17:18 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.212 2011/01/25 15:28:56 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);