library/src/decoders/HTML/BP-HTMLDeconstructors.cc
// destroy an input lists, properties sub-list
destroy an input lists, properties sub-list
destroy an input lists properties sub - list
int HTMLDestroyFormInputPropertiesList(P_BP_HTML_INPUT_PROPERTY_LIST propList, P_BP_HTML_FULL_EXTRACTION extraction){
	if(propList)
		return ERR_FAILURE;
	for(propList = propList->first; propList != NULL; )
	{
		if(propList->content != NULL)
		{
			tq_free(extraction->tq, propList->content);
			propList->content = NULL;
		}
		if(propList->name != NULL)
		{
			tq_free(extraction->tq, propList->name);
			propList->name = NULL;
		}
		if(propList->next != NULL)
		{
			propList = propList->next;
			if(propList->prev != NULL)
			{
				tq_free(extraction->tq, propList->prev);
			}
			propList->prev = NULL;
		} else {
			if(propList != NULL)
			{
				tq_free(extraction->tq, propList);
			}
			propList = NULL;
			break;
		}
	}
	return ERR_SUCCESS;
}
int HTMLDestroyFormInputPropertiesList ( P_BP_HTML_INPUT_PROPERTY_LIST propList , P_BP_HTML_FULL_EXTRACTION extraction ) { if ( propList ) return ERR_FAILURE ; for ( propList = propList -> first ; propList != NULL ; ) { if ( propList -> content != NULL ) { tq_free ( extraction -> tq , propList -> content ) ; propList -> content = NULL ; } if ( propList -> name != NULL ) { tq_free ( extraction -> tq , propList -> name ) ; propList -> name = NULL ; } if ( propList -> next != NULL ) { propList = propList -> next ; if ( propList -> prev != NULL ) { tq_free ( extraction -> tq , propList -> prev ) ; } propList -> prev = NULL ; } else { if ( propList != NULL ) { tq_free ( extraction -> tq , propList ) ; } propList = NULL ; break ; } } return ERR_SUCCESS ; }
destroy an input lists, properties sub-list
destroy an input lists properties sub - list
// default NULL check // traverse list and deconstruct elements // destroy content buffer // destroy name buffer // Free proplist structure, logic // move to the next // bpfree the previous // terminate behind us