Lines Matching refs:i

107 	size_t i;  in longcmp()  local
109 for (i = 0; i < n; i++) { in longcmp()
110 if (l1[i] < l2[i]) in longcmp()
112 if (l1[i] > l2[i]) in longcmp()
121 size_t i; in longcpy() local
123 for (i = 0; i < n; i++) in longcpy()
124 dest[i] = src[i]; in longcpy()
130 size_t i; in longset() local
132 for (i = 0; i < n; i++) in longset()
133 s[i] = c; in longset()
140 int i; in dec_key() local
142 for (i = geo->keylen - 1; i >= 0; i--) { in dec_key()
143 val = key[i]; in dec_key()
144 key[i] = val - 1; in dec_key()
234 int i; in keyzero() local
236 for (i = 0; i < geo->keylen; i++) in keyzero()
237 if (key[i]) in keyzero()
246 int i, height = head->height; in btree_lookup() local
253 for (i = 0; i < geo->no_pairs; i++) in btree_lookup()
254 if (keycmp(geo, node, i, key) <= 0) in btree_lookup()
256 if (i == geo->no_pairs) in btree_lookup()
258 node = bval(geo, node, i); in btree_lookup()
266 for (i = 0; i < geo->no_pairs; i++) in btree_lookup()
267 if (keycmp(geo, node, i, key) == 0) in btree_lookup()
268 return bval(geo, node, i); in btree_lookup()
276 int i, height = head->height; in btree_update() local
283 for (i = 0; i < geo->no_pairs; i++) in btree_update()
284 if (keycmp(geo, node, i, key) <= 0) in btree_update()
286 if (i == geo->no_pairs) in btree_update()
288 node = bval(geo, node, i); in btree_update()
296 for (i = 0; i < geo->no_pairs; i++) in btree_update()
297 if (keycmp(geo, node, i, key) == 0) { in btree_update()
298 setval(geo, node, i, val); in btree_update()
316 int i, height; in btree_get_prev() local
331 for (i = 0; i < geo->no_pairs; i++) in btree_get_prev()
332 if (keycmp(geo, node, i, key) <= 0) in btree_get_prev()
334 if (i == geo->no_pairs) in btree_get_prev()
337 node = bval(geo, node, i); in btree_get_prev()
340 retry_key = bkey(geo, oldnode, i); in btree_get_prev()
346 for (i = 0; i < geo->no_pairs; i++) { in btree_get_prev()
347 if (keycmp(geo, node, i, key) <= 0) { in btree_get_prev()
348 if (bval(geo, node, i)) { in btree_get_prev()
349 longcpy(__key, bkey(geo, node, i), geo->keylen); in btree_get_prev()
350 return bval(geo, node, i); in btree_get_prev()
368 int i; in getpos() local
370 for (i = 0; i < geo->no_pairs; i++) { in getpos()
371 if (keycmp(geo, node, i, key) <= 0) in getpos()
374 return i; in getpos()
379 int i; in getfill() local
381 for (i = start; i < geo->no_pairs; i++) in getfill()
382 if (!bval(geo, node, i)) in getfill()
384 return i; in getfill()
394 int i, height; in find_level() local
397 for (i = 0; i < geo->no_pairs; i++) in find_level()
398 if (keycmp(geo, node, i, key) <= 0) in find_level()
401 if ((i == geo->no_pairs) || !bval(geo, node, i)) { in find_level()
405 i--; in find_level()
406 setkey(geo, node, i, key); in find_level()
408 BUG_ON(i < 0); in find_level()
409 node = bval(geo, node, i); in find_level()
455 int i, pos, fill, err; in btree_insert_level() local
485 for (i = 0; i < fill / 2; i++) { in btree_insert_level()
486 setkey(geo, new, i, bkey(geo, node, i)); in btree_insert_level()
487 setval(geo, new, i, bval(geo, node, i)); in btree_insert_level()
488 setkey(geo, node, i, bkey(geo, node, i + fill / 2)); in btree_insert_level()
489 setval(geo, node, i, bval(geo, node, i + fill / 2)); in btree_insert_level()
490 clearpair(geo, node, i + fill / 2); in btree_insert_level()
493 setkey(geo, node, i, bkey(geo, node, fill - 1)); in btree_insert_level()
494 setval(geo, node, i, bval(geo, node, fill - 1)); in btree_insert_level()
502 for (i = fill; i > pos; i--) { in btree_insert_level()
503 setkey(geo, node, i, bkey(geo, node, i - 1)); in btree_insert_level()
504 setval(geo, node, i, bval(geo, node, i - 1)); in btree_insert_level()
527 int i; in merge() local
529 for (i = 0; i < rfill; i++) { in merge()
531 setkey(geo, left, lfill + i, bkey(geo, right, i)); in merge()
532 setval(geo, left, lfill + i, bval(geo, right, i)); in merge()
546 int i, no_left, no_right; in rebalance() local
559 i = getpos(geo, parent, key); in rebalance()
560 BUG_ON(bval(geo, parent, i) != child); in rebalance()
562 if (i > 0) { in rebalance()
563 left = bval(geo, parent, i - 1); in rebalance()
569 parent, i - 1); in rebalance()
573 if (i + 1 < getfill(geo, parent, i)) { in rebalance()
574 right = bval(geo, parent, i + 1); in rebalance()
580 parent, i); in rebalance()
597 int i, pos, fill; in btree_remove_level() local
615 for (i = pos; i < fill - 1; i++) { in btree_remove_level()
616 setkey(geo, node, i, bkey(geo, node, i + 1)); in btree_remove_level()
617 setval(geo, node, i, bval(geo, node, i + 1)); in btree_remove_level()
685 int i; in __btree_for_each() local
688 for (i = 0; i < geo->no_pairs; i++) { in __btree_for_each()
689 child = bval(geo, node, i); in __btree_for_each()
696 func(child, opaque, bkey(geo, node, i), count++, in __btree_for_each()