CTRACE(tfp,
CTRACE((tfp,
PUBLIC HTChildAnchor * HTAnchor_findChildAndLink ARGS4(	HTParentAnchor *,	parent, /* May not be 0   */	CONST char *,		tag,	/* May be "" or 0 */	CONST char *,		href,	/* May be "" or 0 */	HTLinkType *,		ltype)	/* May be 0	  */{    HTChildAnchor * child = HTAnchor_findChild(parent, tag);    CTRACE(tfp,"Entered HTAnchor_findChildAndLink\n");    if (href && *href) {	char *relative_to = HTAnchor_address((HTAnchor *)parent);	DocAddress parsed_doc;	HTAnchor * dest;	parsed_doc.address = HTParse(href, relative_to, PARSE_ALL);#ifndef DONT_TRACK_INTERNAL_LINKS	if (ltype && parent->post_data && ltype == LINK_INTERNAL) {	    /* for internal links, find a destination with the same	       post data if the source of the link has post data. - kw */	    parsed_doc.post_data = parent->post_data;	    parsed_doc.post_content_type = parent->post_content_type;	} else#endif	{	    parsed_doc.post_data = NULL;	    parsed_doc.post_content_type = NULL;	}	parsed_doc.bookmark = NULL;	parsed_doc.isHEAD = FALSE;	parsed_doc.safe = FALSE;	dest = HTAnchor_findAddress(&parsed_doc);#define DUPLICATE_ANCHOR_NAME_WORKAROUND#ifdef DUPLICATE_ANCHOR_NAME_WORKAROUND	if (tag && *tag) {	    HTAnchor *testdest1;	    int nlinks;	    testdest1 = child->mainLink.dest;	    if (testdest1) {		nlinks = 1 + HTList_count(child->links);		CTRACE(tfp,		       "*** Duplicate ChildAnchor %p named `%s' with %d links",		       child, tag, nlinks);		if (dest == testdest1 && ltype == child->mainLink.type) {		    CTRACE(tfp,", same dest %p and type, keeping it\n",			   testdest1);		} else {		    CTRACE(tfp,", different dest %p, creating unnamed child\n",			   testdest1);		    child = HTAnchor_findChild(parent, 0);		}	    }	}#endif	HTAnchor_link((HTAnchor *)child, dest, ltype);	FREE(parsed_doc.address);	FREE(relative_to);    }    return(child);}