src/gedlib/node.c
/*======================================
 * node_to_tag -- Return a subtag of a node
 * (presumably top level, but not necessarily)
 *====================================*/
- Return a subtag of a node
(presumably top level, but not necessarily)
- Return a subtag of a node ( presumably top level but not necessarily )
STRING node_to_tag (NODE node, STRING tag, INT len)
{
	static char scratch[MAXGEDNAMELEN+1];
	STRING refn;
	if (!node) return NULL;
	if (!(node = find_tag(nchild(node), tag)))
		return NULL;
	refn = nval(node);
	if (len > (INT)sizeof(scratch)-1)
		len = sizeof(scratch)-1;
	llstrsets(scratch, len, uu8, refn);
	return scratch;
}
STRING node_to_tag ( NODE node , STRING tag , INT len ) { static char scratch [ MAXGEDNAMELEN + 1 ] ; STRING refn ; if ( ! node ) return NULL ; if ( ! ( node = find_tag ( nchild ( node ) , tag ) ) ) return NULL ; refn = nval ( node ) ; if ( len > ( INT ) sizeof ( scratch ) - 1 ) len = sizeof ( scratch ) - 1 ; llstrsets ( scratch , len , uu8 , refn ) ; return scratch ; }
node_to_tag -- Return a subtag of a node
 (presumably top level, but not necessarily)
node_to_tag -- Return a subtag of a node ( presumably top level but not necessarily )