Example #1
0
int fpLookupEquals(fingerPrintCache cache, fingerPrint *fp,
	          const char * dirName, const char * baseName)
{
    struct fingerPrint_s ofp;
    doLookup(cache, dirName, baseName, &ofp);
    return FP_EQUAL(*fp, ofp);
}
Example #2
0
int fpEqual(const fingerPrint * k1, const fingerPrint * k2)
{
    /* If the addresses are the same, so are the values. */
    if (k1 == k2)
	return 0;

    /* Otherwise, compare fingerprints by value. */
    if (FP_EQUAL(*k1, *k2))
	return 0;
    return 1;

}
Example #3
0
bool dxExporter::UsableAnimationKey( DX_AnimationKey* dx_key )
{
	DX_TimedFloatKeys*  base = dx_key->keys;
	DX_DWORD            n, m;

	for (n = 1; n < dx_key->nKeys; n++) 
	{
		for (m = 0; m < base->tfkeys.nValues; m++) {
			if (!FP_EQUAL(base->tfkeys.values[m], base[n].tfkeys.values[m])) return false;
		}
	}

	return true;
}
Example #4
0
static int segmentExist(const char * name, uint32_t cnt, Fingerprint * fps, char * exist) {
	uint32_t i;
	DBService * dbs = getDBService();
	StorageService * sts = getStorageService();
	Image * img = dbs->findImage(name);
	ImageVersion * iv = NULL;
	if (img) {
		iv = dbs->findImageVersion(img, img->versions - 1);
	}
	for (i = 0; i < cnt; i++) {
		Segment * seg = dbs->findSegment(&fps[i]);
		exist[i] = (seg != NULL) && (seg->refcnt >= 0);
		if (iv && !FP_EQUAL(&fps[i], &iv->segmentfps[i])) {
			Segment * prev_seg = dbs->findSegment(&iv->segmentfps[i]);
			sts->prefetchSegmentStore(prev_seg);
			sts->prefetchBlockFPStore(prev_seg);
		}
	}
	return 0;
}