FreeBSD/contrib/mdocml/eqn.c
/*
 * Undefine a previously-defined string.
 */
Undefine a previously-defined string.
Undefine a previously - defined string .
static void
eqn_undef(struct eqn_node *ep)
{
	const char	*start;
	struct eqn_def	*def;
	size_t		 sz;
	if ((start = eqn_nextrawtok(ep, &sz)) == NULL) {
		mandoc_msg(MANDOCERR_REQ_EMPTY, ep->parse,
		    ep->eqn.ln, ep->eqn.pos, "undef");
		return;
	}
	if ((def = eqn_def_find(ep, start, sz)) == NULL)
		return;
	free(def->key);
	free(def->val);
	def->key = def->val = NULL;
	def->keysz = def->valsz = 0;
}
static void eqn_undef ( struct eqn_node * ep ) { const char * start ; struct eqn_def * def ; size_t sz ; if ( ( start = eqn_nextrawtok ( ep , & sz ) ) == NULL ) { mandoc_msg ( MANDOCERR_REQ_EMPTY , ep -> parse , ep -> eqn . ln , ep -> eqn . pos , " " ) ; return ; } if ( ( def = eqn_def_find ( ep , start , sz ) ) == NULL ) return ; free ( def -> key ) ; free ( def -> val ) ; def -> key = def -> val = NULL ; def -> keysz = def -> valsz = 0 ; }
Undefine a previously-defined string.
Undefine a previously - defined string .