aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_macro.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-03-29 04:52:14 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-03-29 04:52:14 +0000
commit17fb05b577517a04553bc0c0a3301f3113889621 (patch)
tree1f407e5401c453e90e704ded2eb538c3a0a43601 /man_macro.c
parent6d187d884b79f4f01b272770304b8c5ecac272f9 (diff)
downloadmandoc-17fb05b577517a04553bc0c0a3301f3113889621.tar.gz
mandoc-17fb05b577517a04553bc0c0a3301f3113889621.tar.zst
mandoc-17fb05b577517a04553bc0c0a3301f3113889621.zip
Initial step in fixing badness reported by Sascha Wildner (wip).
Diffstat (limited to 'man_macro.c')
-rw-r--r--man_macro.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/man_macro.c b/man_macro.c
index cc6d116c..81dd6057 100644
--- a/man_macro.c
+++ b/man_macro.c
@@ -1,4 +1,4 @@
-/* $Id: man_macro.c,v 1.40 2010/03/27 10:14:32 kristaps Exp $ */
+/* $Id: man_macro.c,v 1.41 2010/03/29 04:52:14 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -328,6 +328,14 @@ blk_dotted(MACRO_PROT_ARGS)
break;
}
+ /*
+ * Restore flags set when we got here and also stipulate that we
+ * don't post-process the line when exiting the macro op
+ * function in man_pmacro().
+ */
+ m->flags = m->svflags;
+ m->flags |= MAN_ILINE;
+
return(1);
}
@@ -385,6 +393,13 @@ blk_exp(MACRO_PROT_ARGS)
return(0);
if ( ! rew_scope(MAN_BLOCK, m, tok))
return(0);
+ } else {
+ /*
+ * Save our state; we restore it when exiting from the
+ * roff instruction block.
+ */
+ m->svflags = m->flags;
+ m->flags = 0;
}
if ( ! man_block_alloc(m, line, ppos, tok))