rem: int32 count = 0, i, j;
add: int32 count = 0, j; uint32 i;
context: get_nth_symbol(image_id imageID, int32 num, char *nameBuffer, int32 *_nameLength,	int32 *_type, void **_location){	int32 count = 0, i, j;	image_t *image;	rld_lock();	// get the image from those who have been already initialized	image = find_loaded_image_by_id(imageID);	if (image == NULL) {		rld_unlock();		return B_BAD_IMAGE_ID;	}	// iterate through all the hash buckets until we've found the one	for (i = 0; i < HASHTABSIZE(image); i++) {		for (j = HASHBUCKETS(image)[i]; j != STN_UNDEF; j = HASHCHAINS(image)[j]) {			struct Elf32_Sym *symbol = &image->syms[i];			if (count == num) {				strlcpy(nameBuffer, SYMNAME(image, symbol), *_nameLength);				*_nameLength = strlen(SYMNAME(image, symbol));				// ToDo: check with the return types of that BeOS function				if (ELF32_ST_TYPE(symbol->st_info) == STT_FUNC)					*_type = B_SYMBOL_TYPE_TEXT;				else if (ELF32_ST_TYPE(symbol->st_info) == STT_OBJECT)					*_type = B_SYMBOL_TYPE_DATA;				else					*_type = B_SYMBOL_TYPE_ANY;				*_location = (void *)(symbol->st_value + image->regions[0].delta);				goto out;			}			count++;		}	}out:	rld_unlock();		if (num != count)		return B_BAD_INDEX;	return B_OK;}