aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit1bb02c5f3f0a6d9a75dfb2e644608cf5f870931d (patch)
tree2149d3794bf31127adb2a5897661235cd41b5f45 /roff.c
parent0dd9e4fce7c0b9444311670b6068714c46322fa6 (diff)
downloadmandoc-1bb02c5f3f0a6d9a75dfb2e644608cf5f870931d.tar.gz
mandoc-1bb02c5f3f0a6d9a75dfb2e644608cf5f870931d.tar.zst
mandoc-1bb02c5f3f0a6d9a75dfb2e644608cf5f870931d.zip
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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/roff.c b/roff.c
index ece3dfd2..07e76503 100644
--- a/roff.c
+++ b/roff.c
@@ -1,4 +1,4 @@
-/* $Id: roff.c,v 1.100 2010/08/29 11:29:51 kristaps Exp $ */
+/* $Id: roff.c,v 1.101 2010/09/04 18:31:44 kristaps Exp $ */
/*
* Copyright (c) 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
@@ -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