summaryrefslogtreecommitdiffstats
path: root/roff.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-09-04 18:31:44 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-09-04 18:31:44 +0000
commit7625e8f17a7d4f1759b9fe5acfe13360c089811f (patch)
tree1660701b134b7ed6d0448a0d21111be66643d8a3 /roff.c
parent828f159f2ec0d034e7512b9ea38ae48fd02f433b (diff)
downloadmandoc-7625e8f17a7d4f1759b9fe5acfe13360c089811f.tar.gz
Fix premature return from sub-conditional roff statements. This fix
fully accomodates for the pod2man standard preamble!
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/roff.c b/roff.c
index 5cfacbb5..4a323478 100644
--- a/roff.c
+++ b/roff.c
@@ -248,6 +248,7 @@ roffnode_pop(struct roff *r)
if (r->rstackpos > -1)
r->rstackpos--;
+ ROFF_DEBUG("roff: popping scope\n");
r->last = r->last->parent;
if (p->end)
free(p->end);
@@ -426,8 +427,8 @@ roff_parseln(struct roff *r, int ln, char **bufp,
if (r->last) {
t = r->last->tok;
assert(roffs[t].sub);
- ROFF_DEBUG("roff: intercept scoped context: %s\n",
- roffs[t].name);
+ ROFF_DEBUG("roff: intercept scoped context: %s, [%s]\n",
+ roffs[t].name, &(*bufp)[pos]);
return((*roffs[t].sub)
(r, t, bufp, szp,
ln, pos, pos, offs));
@@ -761,9 +762,6 @@ roff_cond_sub(ROFF_ARGS)
l = r->last;
roffnode_cleanscope(r);
- if (l != r->last)
- return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT);
-
if (ROFF_MAX == (t = roff_parse(*bufp, &pos))) {
if ('\\' == (*bufp)[pos] && '}' == (*bufp)[pos + 1])
return(roff_ccond