library/src/datastructures/BP-HashTable.cc
// simply displays a key path to standard out
simply displays a key path to standard out
simply displays a key path to standard out
BP_ERROR_T BP_HashRegDisplayKeyPath
(
	BP_HASH_TABLE_TRAVERSAL_PATH table_path
)
{
	if(!table_path)
		return ERR_FAILURE;
	if(!table_path[0])
		return ERR_FAILURE;
	size_t path_idx = 0;
	for
	(
		;
		(path_idx < BP_HASH_REG_MAX_TABLE_DEPTH);
		path_idx++
	)
	{
		if(!table_path[path_idx])
			break;
		printf(" > %s", table_path[path_idx]);
	}
	return ERR_SUCCESS;
}
BP_ERROR_T BP_HashRegDisplayKeyPath ( BP_HASH_TABLE_TRAVERSAL_PATH table_path ) { if ( ! table_path ) return ERR_FAILURE ; if ( ! table_path [ 0 ] ) return ERR_FAILURE ; size_t path_idx = 0 ; for ( ; ( path_idx < BP_HASH_REG_MAX_TABLE_DEPTH ) ; path_idx ++ ) { if ( ! table_path [ path_idx ] ) break ; printf ( " " , table_path [ path_idx ] ) ; } return ERR_SUCCESS ; }
simply displays a key path to standard out
simply displays a key path to standard out
// ensure we have a path // set path index // walk path items and display // exit immediately if necessary // display the path item // return indicating success