FreeBSD/contrib/mdocml/mdoc_macro.c
/*
 * Allocate a word and check whether it's punctuation or not.
 * Punctuation consists of those tokens found in mdoc_isdelim().
 */
Allocate a word and check whether it's punctuation or not.
Punctuation consists of those tokens found in mdoc_isdelim().
Allocate a word and check whether it ' s punctuation or not . Punctuation consists of those tokens found in mdoc_isdelim () .
static void
dword(struct roff_man *mdoc, int line, int col, const char *p,
		enum mdelim d, int may_append)
{
	if (d == DELIM_MAX)
		d = mdoc_isdelim(p);
	if (may_append &&
	    ! (mdoc->flags & (MDOC_SYNOPSIS | MDOC_KEEP | MDOC_SMOFF)) &&
	    d == DELIM_NONE && mdoc->last->type == ROFFT_TEXT &&
	    mdoc_isdelim(mdoc->last->string) == DELIM_NONE) {
		roff_word_append(mdoc, p);
		return;
	}
	roff_word_alloc(mdoc, line, col, p);
	if (d == DELIM_OPEN)
		mdoc->last->flags |= MDOC_DELIMO;
	else if (d == DELIM_CLOSE &&
	    ! (mdoc->flags & MDOC_NODELIMC) &&
	    mdoc->last->parent->tok != MDOC_Fd)
		mdoc->last->flags |= MDOC_DELIMC;
	mdoc->flags &= ~MDOC_NODELIMC;
}
static void dword ( struct roff_man * mdoc , int line , int col , const char * p , enum mdelim d , int may_append ) { if ( d == DELIM_MAX ) d = mdoc_isdelim ( p ) ; if ( may_append && ! ( mdoc -> flags & ( MDOC_SYNOPSIS | MDOC_KEEP | MDOC_SMOFF ) ) && d == DELIM_NONE && mdoc -> last -> type == ROFFT_TEXT && mdoc_isdelim ( mdoc -> last -> string ) == DELIM_NONE ) { roff_word_append ( mdoc , p ) ; return ; } roff_word_alloc ( mdoc , line , col , p ) ; if ( d == DELIM_OPEN ) mdoc -> last -> flags |= MDOC_DELIMO ; else if ( d == DELIM_CLOSE && ! ( mdoc -> flags & MDOC_NODELIMC ) && mdoc -> last -> parent -> tok != MDOC_Fd ) mdoc -> last -> flags |= MDOC_DELIMC ; mdoc -> flags &= ~ MDOC_NODELIMC ; }
Allocate a word and check whether it's punctuation or not.
Allocate a word and check whether it ' s punctuation or not .
/*
	 * If the word consists of a bare delimiter,
	 * flag the new node accordingly,
	 * unless doing so was vetoed by the invoking macro.
	 * Always clear the veto, it is only valid for one word.
	 */