library/src/datastructures/BP-DataLists.cc
// activates the next entry in the data list
activates the next entry in the data list
activates the next entry in the data list
BP_ERROR_T BP_DataListActivateNextEntry(P_BP_DATA_LIST data_list)
{
	if(!data_list)
		return ERR_FAILURE;
	if(!data_list->entries_n)
		return ERR_FAILURE;
	if(data_list->last_entry_activated >= data_list->entries_n)
	{
		return ERR_FAILURE;
	}
	data_list->last_entry_activated++;
	BP_DataListActivateEntry(data_list, &data_list->entries[data_list->last_entry_activated-1]);
	return ERR_SUCCESS;
}
BP_ERROR_T BP_DataListActivateNextEntry ( P_BP_DATA_LIST data_list ) { if ( ! data_list ) return ERR_FAILURE ; if ( ! data_list -> entries_n ) return ERR_FAILURE ; if ( data_list -> last_entry_activated >= data_list -> entries_n ) { return ERR_FAILURE ; } data_list -> last_entry_activated ++ ; BP_DataListActivateEntry ( data_list , & data_list -> entries [ data_list -> last_entry_activated - 1 ] ) ; return ERR_SUCCESS ; }
activates the next entry in the data list
activates the next entry in the data list
// ensure we have a data list // ensure we have entries // ensure we have not hit the top // increment the entry position // activate the entry // return indicating success