Lines Matching refs:item_pos

80 	int item_pos = PATH_LAST_POSITION(tb->tb_path);  in balance_leaf_when_delete_del()  local
83 struct item_head *ih = item_head(tbS0, item_pos); in balance_leaf_when_delete_del()
91 leaf_delete_items(&bi, 0, item_pos, 1, -1); in balance_leaf_when_delete_del()
93 if (!item_pos && tb->CFL[0]) { in balance_leaf_when_delete_del()
103 RFALSE(!item_pos && !tb->CFL[0], in balance_leaf_when_delete_del()
112 int item_pos = PATH_LAST_POSITION(tb->tb_path); in balance_leaf_when_delete_cut() local
113 struct item_head *ih = item_head(tbS0, item_pos); in balance_leaf_when_delete_cut()
127 leaf_cut_from_buffer(&bi, item_pos, pos_in_item, in balance_leaf_when_delete_cut()
130 RFALSE(!item_pos && !pos_in_item && !tb->CFL[0], in balance_leaf_when_delete_cut()
134 if (!item_pos && !pos_in_item && tb->CFL[0]) in balance_leaf_when_delete_cut()
137 leaf_cut_from_buffer(&bi, item_pos, pos_in_item, in balance_leaf_when_delete_cut()
295 if (tb->item_pos == tb->lnum[0] - 1 && tb->lbytes != -1) { in balance_leaf_insert_left()
313 leaf_insert_into_buf(&bi, n + tb->item_pos - ret, ih, body, in balance_leaf_insert_left()
343 leaf_insert_into_buf(&bi, n + tb->item_pos - ret, ih, body, in balance_leaf_insert_left()
372 if (ret && !tb->item_pos) { in balance_leaf_paste_left_shift_dirent()
380 leaf_paste_in_buffer(&bi, n + tb->item_pos - ret, in balance_leaf_paste_left_shift_dirent()
395 leaf_paste_entries(&bi, n + tb->item_pos - ret, in balance_leaf_paste_left_shift_dirent()
422 if (is_direntry_le_ih(item_head(tbS0, tb->item_pos))) { in balance_leaf_paste_left_shift()
430 RFALSE(tb->pos_in_item != ih_item_len(item_head(tbS0, tb->item_pos)), in balance_leaf_paste_left_shift()
433 ih_item_len(item_head(tbS0, tb->item_pos)), tb->pos_in_item); in balance_leaf_paste_left_shift()
442 tbS0_pos_ih = item_head(tbS0, tb->item_pos); in balance_leaf_paste_left_shift()
461 tbL0_ih = item_head(tb->L[0], n + tb->item_pos - ret); in balance_leaf_paste_left_shift()
465 leaf_paste_in_buffer(&bi, n + tb->item_pos - ret, in balance_leaf_paste_left_shift()
478 leaf_key(tb->L[0], n + tb->item_pos - ret)), in balance_leaf_paste_left_shift()
543 if (!tb->item_pos && in balance_leaf_paste_left_whole()
564 leaf_paste_in_buffer(&bi, n + tb->item_pos - ret, tb->pos_in_item, in balance_leaf_paste_left_whole()
568 pasted = item_head(tb->L[0], n + tb->item_pos - ret); in balance_leaf_paste_left_whole()
570 leaf_paste_entries(&bi, n + tb->item_pos - ret, in balance_leaf_paste_left_whole()
591 if (tb->item_pos == tb->lnum[0] - 1 && tb->lbytes != -1) in balance_leaf_paste_left()
607 if (tb->item_pos < tb->lnum[0]) { in balance_leaf_left()
631 if (n - tb->rnum[0] >= tb->item_pos) { in balance_leaf_insert_right()
639 if (tb->item_pos == n - tb->rnum[0] + 1 && tb->rbytes != -1) { in balance_leaf_insert_right()
696 leaf_insert_into_buf(&bi, tb->item_pos - n + tb->rnum[0] - 1, in balance_leaf_insert_right()
699 if (tb->item_pos - n + tb->rnum[0] - 1 == 0) in balance_leaf_insert_right()
717 entry_count = ih_entry_count(item_head(tbS0, tb->item_pos)); in balance_leaf_paste_right_shift_dirent()
769 if (is_direntry_le_ih(item_head(tbS0, tb->item_pos))) { in balance_leaf_paste_right_shift()
784 RFALSE(tb->pos_in_item != ih_item_len(item_head(tbS0, tb->item_pos)), in balance_leaf_paste_right_shift()
787 ih_item_len(item_head(tbS0, tb->item_pos))); in balance_leaf_paste_right_shift()
851 leaf_paste_in_buffer(&bi, tb->item_pos - n + tb->rnum[0], in balance_leaf_paste_right_whole()
857 pasted = item_head(tb->R[0], tb->item_pos - n + tb->rnum[0]); in balance_leaf_paste_right_whole()
859 leaf_paste_entries(&bi, tb->item_pos - n + tb->rnum[0], in balance_leaf_paste_right_whole()
866 RFALSE(tb->item_pos - n + tb->rnum[0], in balance_leaf_paste_right_whole()
888 if (n - tb->rnum[0] > tb->item_pos) { in balance_leaf_paste_right()
895 if (tb->item_pos == n - tb->rnum[0] && tb->rbytes != -1) in balance_leaf_paste_right()
932 if (n - tb->snum[i] >= tb->item_pos) { in balance_leaf_new_nodes_insert()
941 if (tb->item_pos == n - tb->snum[i] + 1 && tb->sbytes[i] != -1) { in balance_leaf_new_nodes_insert()
1001 leaf_insert_into_buf(&bi, tb->item_pos - n + tb->snum[i] - 1, in balance_leaf_new_nodes_insert()
1017 struct item_head *aux_ih = item_head(tbS0, tb->item_pos); in balance_leaf_new_nodes_paste_dirent()
1072 struct item_head *aux_ih = item_head(tbS0, tb->item_pos); in balance_leaf_new_nodes_paste_shift()
1089 RFALSE(tb->pos_in_item != ih_item_len(item_head(tbS0, tb->item_pos)) || in balance_leaf_new_nodes_paste_shift()
1152 struct item_head *ih_check = item_head(tbS0, tb->item_pos); in balance_leaf_new_nodes_paste_whole()
1171 leaf_paste_in_buffer(&bi, tb->item_pos - n + tb->snum[i], in balance_leaf_new_nodes_paste_whole()
1175 pasted = item_head(tb->S_new[i], tb->item_pos - n + in balance_leaf_new_nodes_paste_whole()
1178 leaf_paste_entries(&bi, tb->item_pos - n + tb->snum[i], in balance_leaf_new_nodes_paste_whole()
1201 if (n - tb->snum[i] > tb->item_pos) { in balance_leaf_new_nodes_paste()
1209 if (tb->item_pos == n - tb->snum[i] && tb->sbytes[i] != -1) in balance_leaf_new_nodes_paste()
1267 leaf_insert_into_buf(&bi, tb->item_pos, ih, body, tb->zeroes_num); in balance_leaf_finish_node_insert()
1270 if (tb->item_pos == 0) { in balance_leaf_finish_node_insert()
1282 struct item_head *pasted = item_head(tbS0, tb->item_pos); in balance_leaf_finish_node_paste_dirent()
1291 leaf_paste_in_buffer(&bi, tb->item_pos, tb->pos_in_item, in balance_leaf_finish_node_paste_dirent()
1295 leaf_paste_entries(&bi, tb->item_pos, tb->pos_in_item, 1, in balance_leaf_finish_node_paste_dirent()
1299 if (!tb->item_pos && !tb->pos_in_item) { in balance_leaf_finish_node_paste_dirent()
1317 struct item_head *pasted = item_head(tbS0, tb->item_pos); in balance_leaf_finish_node_paste()
1332 leaf_paste_in_buffer(&bi, tb->item_pos, in balance_leaf_finish_node_paste()
1360 if (0 <= tb->item_pos && tb->item_pos < tb->s0num) { in balance_leaf_finish_node()
1395 tb->item_pos = PATH_LAST_POSITION(tb->tb_path), in balance_leaf()
1406 && is_indirect_le_ih(item_head(tbS0, tb->item_pos))) in balance_leaf()
1413 tb->item_pos -= (tb->lnum[0] - ((tb->lbytes != -1) ? 1 : 0)); in balance_leaf()