Lines Matching defs:cpy_num
305 * last_first == FIRST_TO_LAST means, that we copy cpy_num items beginning
307 * last_first == LAST_TO_FIRST means, that we copy cpy_num items beginning
312 int first, int cpy_num)
324 RFALSE(B_NR_ITEMS(src) - first < cpy_num,
326 B_NR_ITEMS(src), cpy_num, first);
327 RFALSE(cpy_num < 0, "vs-10110: can not copy negative amount of items");
334 if (cpy_num == 0)
350 RFALSE(blkh_free_space(blkh) < cpy_num * IH_SIZE,
352 B_FREE_SPACE(dest), cpy_num * IH_SIZE);
355 memmove(ih + cpy_num, ih, (nr - dest_before) * IH_SIZE);
358 memcpy(ih, item_head(src, first), cpy_num * IH_SIZE);
360 free_space -= (IH_SIZE * cpy_num);
365 for (i = dest_before; i < nr + cpy_num; i++) {
371 last_loc = ih_location(&ih[nr + cpy_num - 1 - dest_before]);
372 last_inserted_loc = ih_location(&ih[cpy_num - 1]);
385 item_body(src, (first + cpy_num - 1)),
389 set_blkh_nr_item(blkh, nr + cpy_num);
403 IH_SIZE * cpy_num));
516 * If cpy_bytes equals minus one than copy cpy_num whole items from SOURCE
517 * to DEST. If cpy_bytes not equal to minus one than copy cpy_num-1 whole
518 * items from SOURCE to DEST. From last item copy cpy_num bytes for regular
519 * item and cpy_num directory entries for directory item.
522 int last_first, int cpy_num, int cpy_bytes)
531 RFALSE(B_NR_ITEMS(src) < cpy_num,
533 cpy_num);
534 RFALSE(cpy_num < 0, "vs-10240: cpy_num < 0 (%d)", cpy_num);
536 if (cpy_num == 0)
542 if (cpy_num == 1)
552 cpy_num -= i;
553 if (cpy_num == 0)
558 * copy first cpy_num items starting from position
562 pos, cpy_num);
565 * copy first cpy_num-1 items starting from position
569 pos, cpy_num - 1);
573 * cpy_num+pos-1 to the end of the DEST
576 cpy_num + pos - 1, cpy_bytes);
581 if (cpy_num == 1)
593 cpy_num -= i;
594 if (cpy_num == 0)
597 pos = src_nr_item - cpy_num - i;
600 * starting from position 'pos' copy last cpy_num
604 pos, cpy_num);
607 * copy last cpy_num-1 items starting from position
611 pos + 1, cpy_num - 1);