Lines Matching refs:gKeys

41 key* gKeys;  variable
172 printf("% 8ld. (%3ld) key = ", i, gKeys[i].in); in dumpKeys()
173 dumpKey(gKeys[i].data, gKeys[i].length); in dumpKeys()
240 gKeys[i].value = i; in fillBuffer()
248 gKeys = (key*)malloc(gNum * sizeof(key)); in createKeys()
249 if (gKeys == NULL) in createKeys()
275 gKeys[i].data = malloc(length + 1); in createKeys()
276 memcpy(gKeys[i].data, name, length + 1); in createKeys()
277 gKeys[i].length = length; in createKeys()
278 gKeys[i].in = 0; in createKeys()
279 gKeys[i].count = 0; in createKeys()
280 gKeys[i].value = i; in createKeys()
307 gKeys[i].data = (void*)(buffer + i * length); in createKeys()
308 gKeys[i].length = length; in createKeys()
309 gKeys[i].in = 0; in createKeys()
310 gKeys[i].count = 0; in createKeys()
326 gKeys[i].count = 0; in checkTreeContents()
341 if (gKeys[value].value != value) { in checkTreeContents()
344 value, gKeys[value].value); in checkTreeContents()
347 if (length != gKeys[value].length in checkTreeContents()
348 || memcmp(key, gKeys[value].data, length)) { in checkTreeContents()
351 "%ld. occassion):\n\tfound: ", value, gKeys[value].in, in checkTreeContents()
352 gKeys[value].count + 1); in checkTreeContents()
355 dumpKey(gKeys[value].data, gKeys[value].length); in checkTreeContents()
360 gKeys[value].count++; in checkTreeContents()
369 if (gKeys[i].in != gKeys[i].count) { in checkTreeContents()
371 dumpKey(gKeys[i].data, gKeys[i].length); in checkTreeContents()
372 printf(" found only %ld from %ld\n", gKeys[i].count, gKeys[i].in); in checkTreeContents()
387 status_t status = iterator.Find((uint8*)gKeys[i].data, gKeys[i].length); in checkTreeIntegrity()
388 if (gKeys[i].in == 0) { in checkTreeIntegrity()
391 bailOutWithKey(gKeys[i].data, gKeys[i].length); in checkTreeIntegrity()
395 bailOutWithKey(gKeys[i].data, gKeys[i].length); in checkTreeIntegrity()
427 status_t status = tree->Insert(transaction, (uint8*)gKeys[i].data, in addAllKeys()
428 gKeys[i].length, gKeys[i].value); in addAllKeys()
432 bailOutWithKey(gKeys[i].data, gKeys[i].length); in addAllKeys()
434 gKeys[i].in++; in addAllKeys()
447 while (gKeys[i].in > 0) { in removeAllKeys()
448 status_t status = tree->Remove(transaction, (uint8*)gKeys[i].data, in removeAllKeys()
449 gKeys[i].length, gKeys[i].value); in removeAllKeys()
453 dumpKey(gKeys[i].data, gKeys[i].length); in removeAllKeys()
456 gKeys[i].in--; in removeAllKeys()
474 dumpKey(gKeys[index].data, gKeys[index].length); in duplicateTest()
484 insertTotal + gKeys[index].in); in duplicateTest()
488 status = tree->Insert(transaction, (uint8*)gKeys[index].data, in duplicateTest()
489 gKeys[index].length, gKeys[index].value); in duplicateTest()
492 bailOutWithKey(gKeys[index].data, gKeys[index].length); in duplicateTest()
496 gKeys[index].in++; in duplicateTest()
512 insertTotal + gKeys[index].in); in duplicateTest()
517 (uint8*)gKeys[index].data, gKeys[index].length, in duplicateTest()
518 gKeys[index].value); in duplicateTest()
521 bailOutWithKey(gKeys[index].data, gKeys[index].length); in duplicateTest()
525 gKeys[index].in--; in duplicateTest()
550 gKeys[index].in); in addRandomSet()
553 status_t status = tree->Insert(transaction, (uint8*)gKeys[index].data, in addRandomSet()
554 gKeys[index].length, gKeys[index].value); in addRandomSet()
557 bailOutWithKey(gKeys[index].data, gKeys[index].length); in addRandomSet()
559 gKeys[index].in++; in addRandomSet()
586 if (gKeys[index].in == 0) { in removeRandomSet()
595 gKeys[index].in); in removeRandomSet()
598 status_t status = tree->Remove(transaction, (uint8*)gKeys[index].data, in removeRandomSet()
599 gKeys[index].length, gKeys[index].value); in removeRandomSet()
602 bailOutWithKey(gKeys[index].data, gKeys[index].length); in removeRandomSet()
604 gKeys[index].in--; in removeRandomSet()