FreeBSD/contrib/mdocml/mdoc_macro.c
/*
 * If there is an open sub-block of the target requiring
 * explicit close-out, postpone closing out the target until
 * the rew_pending() call closing out the sub-block.
 */
If there is an open sub-block of the target requiring
explicit close-out, postpone closing out the target until
the rew_pending() call closing out the sub-block.
If there is an open sub - block of the target requiring explicit close - out postpone closing out the target until the rew_pending () call closing out the sub - block .
static int
find_pending(struct roff_man *mdoc, int tok, int line, int ppos,
	struct roff_node *target)
{
	struct roff_node	*n;
	int			 irc;
	irc = 0;
	for (n = mdoc->last; n != NULL && n != target; n = n->parent) {
		if (n->flags & MDOC_ENDED) {
			if ( ! (n->flags & MDOC_VALID))
				n->flags |= MDOC_BROKEN;
			continue;
		}
		if (n->type == ROFFT_BLOCK &&
		    mdoc_macros[n->tok].flags & MDOC_EXPLICIT) {
			irc = 1;
			n->flags = MDOC_BROKEN;
			if (target->type == ROFFT_HEAD)
				target->flags = MDOC_ENDED;
			else if ( ! (target->flags & MDOC_ENDED)) {
				mandoc_vmsg(MANDOCERR_BLK_NEST,
				    mdoc->parse, line, ppos,
				    "%s breaks %s", mdoc_macronames[tok],
				    mdoc_macronames[n->tok]);
				mdoc_endbody_alloc(mdoc, line, ppos,
				    tok, target, ENDBODY_NOSPACE);
			}
		}
	}
	return irc;
}
static int find_pending ( struct roff_man * mdoc , int tok , int line , int ppos , struct roff_node * target ) { struct roff_node * n ; int irc ; irc = 0 ; for ( n = mdoc -> last ; n != NULL && n != target ; n = n -> parent ) { if ( n -> flags & MDOC_ENDED ) { if ( ! ( n -> flags & MDOC_VALID ) ) n -> flags |= MDOC_BROKEN ; continue ; } if ( n -> type == ROFFT_BLOCK && mdoc_macros [ n -> tok ] . flags & MDOC_EXPLICIT ) { irc = 1 ; n -> flags = MDOC_BROKEN ; if ( target -> type == ROFFT_HEAD ) target -> flags = MDOC_ENDED ; else if ( ! ( target -> flags & MDOC_ENDED ) ) { mandoc_vmsg ( MANDOCERR_BLK_NEST , mdoc -> parse , line , ppos , " " , mdoc_macronames [ tok ] , mdoc_macronames [ n -> tok ] ) ; mdoc_endbody_alloc ( mdoc , line , ppos , tok , target , ENDBODY_NOSPACE ) ; } } } return irc ; }
If there is an open sub-block of the target requiring
 explicit close-out, postpone closing out the target until
 the rew_pending() call closing out the sub-block.
If there is an open sub - block of the target requiring explicit close - out postpone closing out the target until the rew_pending () call closing out the sub - block .