library/src/decoders/HTML/BP-HTMLDecoder.cc
// Entry version and recursive version of the parse anchors function.  If
// unsure, use HTMLParseAnchors with a root xmlNode.  The HTMLParseAnchors
// function will automatically recurse where needed.
Entry version and recursive version of the parse anchors function.  If
unsure, use HTMLParseAnchors with a root xmlNode.  The HTMLParseAnchors
function will automatically recurse where needed.
Entry version and recursive version of the parse anchors function . If unsure use HTMLParseAnchors with a root xmlNode . The HTMLParseAnchors function will automatically recurse where needed .
P_BP_HTML_ANCHOR_LIST HTMLParseAnchors
(
		xmlNode *                   node,
		P_BP_HTML_ANCHOR_DELIMITERS delims,
		P_BP_GARBAGE_COLLECTOR_DATA gc,
		P_BP_HTML_FULL_EXTRACTION extraction
)
{
	BP_HTML_ANCHOR_LIST dummyCmp;
	BP_ZERO_STACK(dummyCmp);
	P_BP_HTML_ANCHOR_LIST appendList = (P_BP_HTML_ANCHOR_LIST) BP_calloc(gc, NULL, sizeof(BP_HTML_ANCHOR_LIST), 1);
	appendList->first = appendList;
	appendList->prev = NULL;
	appendList->next = NULL;
	P_BP_HTML_ANCHOR_LIST retAnchors = HTMLParseAnchorsRecurse(node, delims, appendList, true, gc, extraction);
	BP_GarbageCollectorLogChunk(gc, ".", (void *) retAnchors, 4, BP_GARBAGE_COLLECTOR_DATA_ALLOC_CALLOC);
	if(retAnchors != NULL)
	{
		return retAnchors->first;
	}
	return NULL;
}
P_BP_HTML_ANCHOR_LIST HTMLParseAnchors ( xmlNode * node , P_BP_HTML_ANCHOR_DELIMITERS delims , P_BP_GARBAGE_COLLECTOR_DATA gc , P_BP_HTML_FULL_EXTRACTION extraction ) { BP_HTML_ANCHOR_LIST dummyCmp ; BP_ZERO_STACK ( dummyCmp ) ; P_BP_HTML_ANCHOR_LIST appendList = ( P_BP_HTML_ANCHOR_LIST ) BP_calloc ( gc , NULL , sizeof ( BP_HTML_ANCHOR_LIST ) , 1 ) ; appendList -> first = appendList ; appendList -> prev = NULL ; appendList -> next = NULL ; P_BP_HTML_ANCHOR_LIST retAnchors = HTMLParseAnchorsRecurse ( node , delims , appendList , true , gc , extraction ) ; BP_GarbageCollectorLogChunk ( gc , " " , ( void * ) retAnchors , 4 , BP_GARBAGE_COLLECTOR_DATA_ALLOC_CALLOC ) ; if ( retAnchors != NULL ) { return retAnchors -> first ; } return NULL ; }
Entry version and recursive version of the parse anchors function.
Entry version and recursive version of the parse anchors function .
// Dummy comparison funciton used in order to verify struct content // callos new anchor list element // list pointers // run recursive parse // log the chunk in the list // return if we have a good pointer // return null on failure