library/src/decoders/HTML/BP-HTMLDeconstructors.cc
// destroy an input list and sub properties list
destroy an input list and sub properties list
destroy an input list and sub properties list
int HTMLDestroyFormInputList(P_BP_HTML_INPUT_LIST inputList, P_BP_HTML_FULL_EXTRACTION extraction)
{
	if(!inputList)
		return ERR_FAILURE;
	if(inputList)
	for
	(
		inputList = inputList->first;
		inputList;
		inputList = inputList->next
	)
	{
		if(inputList->properties)
		{
			HTMLDestroyFormInputPropertiesList(inputList->properties->first, extraction);
		}
		if(!inputList->next)
		{
			tq_free(extraction->tq, inputList);
			inputList = NULL;
			break;
		}
		else
		{
			inputList = inputList->next;
			if(inputList->prev)
				tq_free(extraction->tq, inputList->prev);
		}
	}
	return ERR_SUCCESS;
}
int HTMLDestroyFormInputList ( P_BP_HTML_INPUT_LIST inputList , P_BP_HTML_FULL_EXTRACTION extraction ) { if ( ! inputList ) return ERR_FAILURE ; if ( inputList ) for ( inputList = inputList -> first ; inputList ; inputList = inputList -> next ) { if ( inputList -> properties ) { HTMLDestroyFormInputPropertiesList ( inputList -> properties -> first , extraction ) ; } if ( ! inputList -> next ) { tq_free ( extraction -> tq , inputList ) ; inputList = NULL ; break ; } else { inputList = inputList -> next ; if ( inputList -> prev ) tq_free ( extraction -> tq , inputList -> prev ) ; } } return ERR_SUCCESS ; }
destroy an input list and sub properties list
destroy an input list and sub properties list
// default null checks // destroy a form input list and its sub-property lists // if we have properties, destroy them // destroy the input list element if we have no next // since we have a next, move to it // if we have a previous, destroy it // return indicating success