From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from krisdoz.my.domain (kristaps@localhost [127.0.0.1]) by krisdoz.my.domain (8.14.3/8.14.3) with ESMTP id o59K0cdX000989 for ; Wed, 9 Jun 2010 16:00:38 -0400 (EDT) Received: (from kristaps@localhost) by krisdoz.my.domain (8.14.3/8.14.3/Submit) id o59K0ct7004383; Wed, 9 Jun 2010 16:00:38 -0400 (EDT) Date: Wed, 9 Jun 2010 16:00:38 -0400 (EDT) Message-Id: <201006092000.o59K0ct7004383@krisdoz.my.domain> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: kristaps@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Make "sub" for conditionals run roffnode_cleanscope() before X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 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