summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2011-02-06 23:02:31 +0000
committerIngo Schwarze <schwarze@openbsd.org>2011-02-06 23:02:31 +0000
commit767fc8584f19cfc0b04f9395f95211bfdae21acd (patch)
tree72cc92d508d5fcabdb11768d984dd11594c190fb
parentebcafa00a9a7b3da8e91fdf0f0d0ea03e2a38e7d (diff)
downloadmandoc-767fc8584f19cfc0b04f9395f95211bfdae21acd.tar.gz
mandoc-767fc8584f19cfc0b04f9395f95211bfdae21acd.tar.zst
mandoc-767fc8584f19cfc0b04f9395f95211bfdae21acd.zip
Fix a regression caused by mdoc_term.c 1.214 / mdoc_html.c 1.148:
Inside .Bk or inside the SYNOPSIS, Unix variant macros cleared the keep flag.
-rw-r--r--mdoc_html.c8
-rw-r--r--mdoc_term.c6
2 files changed, 9 insertions, 5 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index cf71aef6..b6e61034 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,6 +1,6 @@
-/* $Id: mdoc_html.c,v 1.151 2011/02/06 21:44:36 kristaps Exp $ */
+/* $Id: mdoc_html.c,v 1.152 2011/02/06 23:02:31 schwarze Exp $ */
/*
- * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
+ * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -806,6 +806,7 @@ mdoc_xx_pre(MDOC_ARGS)
{
const char *pp;
struct htmlpair tag;
+ int flags;
switch (n->tok) {
case (MDOC_Bsx):
@@ -835,9 +836,10 @@ mdoc_xx_pre(MDOC_ARGS)
print_text(h, pp);
if (n->child) {
+ flags = h->flags;
h->flags |= HTML_KEEP;
print_text(h, n->child->string);
- h->flags &= ~HTML_KEEP;
+ h->flags = flags;
}
return(0);
}
diff --git a/mdoc_term.c b/mdoc_term.c
index a6f9c80b..25ad7fea 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.217 2011/02/06 22:33:38 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.218 2011/02/06 23:02:31 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -1713,6 +1713,7 @@ static int
termp_xx_pre(DECL_ARGS)
{
const char *pp;
+ int flags;
pp = NULL;
switch (n->tok) {
@@ -1740,9 +1741,10 @@ termp_xx_pre(DECL_ARGS)
term_word(p, pp);
if (n->child) {
+ flags = p->flags;
p->flags |= TERMP_KEEP;
term_word(p, n->child->string);
- p->flags &= ~TERMP_KEEP;
+ p->flags = flags;
}
return(0);
}