FreeBSD/contrib/mdocml/man_macro.c
/*
 * Parse an implicit-block macro.  These contain a ROFFT_HEAD and a
 * ROFFT_BODY contained within a ROFFT_BLOCK.  Rules for closing out other
 * scopes, such as `SH' closing out an `SS', are defined in the rew
 * routines.
 */
Parse an implicit-block macro.  These contain a ROFFT_HEAD and a
ROFFT_BODY contained within a ROFFT_BLOCK.  Rules for closing out other
scopes, such as `SH' closing out an `SS', are defined in the rew
routines.
Parse an implicit - block macro . These contain a ROFFT_HEAD and a ROFFT_BODY contained within a ROFFT_BLOCK . Rules for closing out other scopes such as ` SH ' closing out an ` SS ' are defined in the rew routines .
void
blk_imp(MACRO_PROT_ARGS)
{
	int		 la;
	char		*p;
	struct roff_node *n;
	rew_scope(man, tok);
	n = roff_block_alloc(man, line, ppos, tok);
	if (n->tok == MAN_SH || n->tok == MAN_SS)
		man->flags &= ~MAN_LITERAL;
	n = roff_head_alloc(man, line, ppos, tok);
	for (;;) {
		la = *pos;
		if ( ! man_args(man, line, pos, buf, &p))
			break;
		roff_word_alloc(man, line, la, p);
	}
	if (man_macros[tok].flags & MAN_SCOPED &&
	    (tok == MAN_TP || n == man->last)) {
		man->flags |= MAN_BLINE;
		return;
	}
	man_unscope(man, n);
	roff_body_alloc(man, line, ppos, tok);
}
void blk_imp ( MACRO_PROT_ARGS ) { int la ; char * p ; struct roff_node * n ; rew_scope ( man , tok ) ; n = roff_block_alloc ( man , line , ppos , tok ) ; if ( n -> tok == MAN_SH || n -> tok == MAN_SS ) man -> flags &= ~ MAN_LITERAL ; n = roff_head_alloc ( man , line , ppos , tok ) ; for ( ; ; ) { la = * pos ; if ( ! man_args ( man , line , pos , buf , & p ) ) break ; roff_word_alloc ( man , line , la , p ) ; } if ( man_macros [ tok ] . flags & MAN_SCOPED && ( tok == MAN_TP || n == man -> last ) ) { man -> flags |= MAN_BLINE ; return ; } man_unscope ( man , n ) ; roff_body_alloc ( man , line , ppos , tok ) ; }
Parse an implicit-block macro.
Parse an implicit - block macro .
/* Add line arguments. */ /*
	 * For macros having optional next-line scope,
	 * keep the head open if there were no arguments.
	 * For `TP', always keep the head open.
	 */ /* Close out the head and open the body. */