=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/man.c,v retrieving revision 1.62 retrieving revision 1.63 diff -c -r1.62 -r1.63 *** src/usr.bin/mandoc/man.c 2011/10/09 17:59:56 1.62 --- src/usr.bin/mandoc/man.c 2011/11/05 16:02:18 1.63 *************** *** 1,4 **** ! /* $Id: man.c,v 1.62 2011/10/09 17:59:56 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * --- 1,4 ---- ! /* $Id: man.c,v 1.63 2011/11/05 16:02:18 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * *************** *** 539,548 **** n = n->parent; mandoc_vmsg(MANDOCERR_LINESCOPE, m->parse, n->line, ! n->pos, "%s", man_macronames[n->tok]); man_node_delete(m, n); m->flags &= ~MAN_ELINE; } /* --- 539,575 ---- n = n->parent; mandoc_vmsg(MANDOCERR_LINESCOPE, m->parse, n->line, ! n->pos, "%s breaks %s", man_macronames[tok], ! man_macronames[n->tok]); man_node_delete(m, n); m->flags &= ~MAN_ELINE; + } + + /* + * Remove prior BLINE macro that is being clobbered. + */ + if ((m->flags & MAN_BLINE) && + (MAN_BSCOPE & man_macros[tok].flags)) { + n = m->last; + assert(MAN_TEXT != n->type); + + /* Remove element that didn't end BLINE, if any. */ + + if ( ! (MAN_BSCOPE & man_macros[n->tok].flags)) + n = n->parent; + + assert(MAN_HEAD == n->type); + n = n->parent; + assert(MAN_BLOCK == n->type); + assert(MAN_SCOPED & man_macros[n->tok].flags); + + mandoc_vmsg(MANDOCERR_LINESCOPE, m->parse, n->line, + n->pos, "%s breaks %s", man_macronames[tok], + man_macronames[n->tok]); + + man_node_delete(m, n); + m->flags &= ~MAN_BLINE; } /*