src/gedlib/equaliso.c
/*=================================================
 * iso_list -- See if two node lists are isomorphic
 *===============================================*/
- See if two node lists are isomorphic
- See if two node lists are isomorphic
BOOLEAN
iso_list (NODE root1,
          NODE root2)
{
	INT len1, len2;
	NODE node1, node2;
	if (!root1 && !root2) return TRUE;
	if (!root1 || !root2) return FALSE;
	len1 = length_nodes(root1);
	len2 = length_nodes(root2);
	if (len1 != len2) return FALSE;
	if (len1 == 0) return TRUE;
	node1 = root1;
	while (node1) {
		node2 = root2;
		while (node2) {
			if (equal_node(node1, node2))
				break;
			node2 = nsibling(node2);
		}
		if (!node2) return FALSE;
		node1 = nsibling(node1);
	}
	return TRUE;
}
BOOLEAN iso_list ( NODE root1 , NODE root2 ) { INT len1 , len2 ; NODE node1 , node2 ; if ( ! root1 && ! root2 ) return TRUE ; if ( ! root1 || ! root2 ) return FALSE ; len1 = length_nodes ( root1 ) ; len2 = length_nodes ( root2 ) ; if ( len1 != len2 ) return FALSE ; if ( len1 == 0 ) return TRUE ; node1 = root1 ; while ( node1 ) { node2 = root2 ; while ( node2 ) { if ( equal_node ( node1 , node2 ) ) break ; node2 = nsibling ( node2 ) ; } if ( ! node2 ) return FALSE ; node1 = nsibling ( node1 ) ; } return TRUE ; }
iso_list -- See if two node lists are isomorphic
iso_list -- See if two node lists are isomorphic