CTRACE(tfp,"Entered HTAnchor_findAddress\n");
CTRACE((tfp,"Entered HTAnchor_findAddress\n"));
PUBLIC HTAnchor * HTAnchor_findAddress ARGS1(	CONST DocAddress *,	newdoc){    /* Anchor tag specified ? */    char *tag = HTParse(newdoc->address, "", PARSE_ANCHOR);    CTRACE(tfp,"Entered HTAnchor_findAddress\n");    /*    **	If the address represents a sub-anchor, we recursively load its    **	parent, then we create a child anchor within that document.    */    if (*tag) {	DocAddress parsed_doc;	HTParentAnchor * foundParent;	HTChildAnchor * foundAnchor;	parsed_doc.address = HTParse(newdoc->address, "",		PARSE_ACCESS | PARSE_HOST | PARSE_PATH | PARSE_PUNCTUATION);	parsed_doc.post_data = newdoc->post_data;	parsed_doc.post_content_type = newdoc->post_content_type;	parsed_doc.bookmark = newdoc->bookmark;	parsed_doc.isHEAD = newdoc->isHEAD;	parsed_doc.safe = newdoc->safe;	foundParent = (HTParentAnchor *)HTAnchor_findAddress(&parsed_doc);	foundAnchor = HTAnchor_findChild (foundParent, tag);	FREE(parsed_doc.address);	FREE(tag);	return (HTAnchor *)foundAnchor;    } else {	/*	**  If the address has no anchor tag,	**  check whether we have this node.	*/	int hash;	HTList * adults;	HTList *grownups;	HTParentAnchor * foundAnchor;	FREE(tag);	/*	**  Select list from hash table,	*/	hash = HASH_FUNCTION(newdoc->address);	if (!adult_table) {	    adult_table = (HTList **)calloc(HASH_SIZE, sizeof(HTList *));	    if (!adult_table)		outofmem(__FILE__, "HTAnchor_findAddress");#ifdef LY_FIND_LEAKS	    atexit(free_adult_table);#endif	}	if (!adult_table[hash])	    adult_table[hash] = HTList_new();	adults = adult_table[hash];	/*	**  Search list for anchor.	*/	grownups = adults;	while (NULL != (foundAnchor =			(HTParentAnchor *)HTList_nextObject(grownups))) {#ifdef CASE_INSENSITIVE_ANCHORS	    if (HTEquivalent(foundAnchor->address, newdoc->address) &&		HTEquivalent(foundAnchor->post_data, newdoc->post_data) &&		foundAnchor->isHEAD == newdoc->isHEAD)#else	    if (HTIdentical(foundAnchor->address, newdoc->address) &&		HTIdentical(foundAnchor->post_data, newdoc->post_data) &&		foundAnchor->isHEAD == newdoc->isHEAD)#endif /* CASE_INSENSITIVE_ANCHORS */	    {		CTRACE(tfp, "Anchor %p with address `%s' already exists.\n",			    (void *)foundAnchor, newdoc->address);		 return (HTAnchor *)foundAnchor;	     }	}	/*	**  Node not found: create new anchor.	*/	foundAnchor = HTParentAnchor_new();	CTRACE(tfp, "New anchor %p has hash %d and address `%s'\n",		    (void *)foundAnchor, hash, newdoc->address);	StrAllocCopy(foundAnchor->address, newdoc->address);	if (newdoc->post_data)	    StrAllocCopy(foundAnchor->post_data, newdoc->post_data);	if (newdoc->post_content_type)	    StrAllocCopy(foundAnchor->post_content_type,			 newdoc->post_content_type);	if (newdoc->bookmark)	    StrAllocCopy(foundAnchor->bookmark, newdoc->bookmark);	foundAnchor->isHEAD = newdoc->isHEAD;	foundAnchor->safe = newdoc->safe;	HTList_addObject (adults, foundAnchor);	return (HTAnchor *)foundAnchor;    }}