* mdocml: Make "sub" for conditionals run roffnode_cleanscope() before
@ 2010-06-09 20:00 kristaps
0 siblings, 0 replies; only message in thread
From: kristaps @ 2010-06-09 20:00 UTC (permalink / raw)
To: source
Log Message:
-----------
Make "sub" for conditionals run roffnode_cleanscope() before calling
down to sub-arguments. From a bug report by Ulrich Spoerlein.
Modified Files:
--------------
mdocml:
roff.c
Revision Data
-------------
Index: roff.c
===================================================================
RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/roff.c,v
retrieving revision 1.86
retrieving revision 1.87
diff -Lroff.c -Lroff.c -u -p -r1.86 -r1.87
--- roff.c
+++ roff.c
@@ -621,11 +621,21 @@ roff_cond_sub(ROFF_ARGS)
{
enum rofft t;
enum roffrule rr;
+ struct roffnode *l;
ppos = pos;
rr = r->last->rule;
- roff_cond_text(r, tok, bufp, szp, ln, ppos, pos, offs);
+ /*
+ * Clean out scope. If we've closed ourselves, then don't
+ * continue.
+ */
+
+ 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)))
return(ROFFRULE_DENY == rr ? ROFF_IGN : ROFF_CONT);
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-06-09 20:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-09 20:00 mdocml: Make "sub" for conditionals run roffnode_cleanscope() before kristaps
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).