filler-merge.c 448 B

123456789101112131415161718
  1. // SPDX-License-Identifier: GPL-2.0 or GPL-3.0
  2. // Copyright © 2019 Ariadne Devos
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. #include <sHT/string/setops.h>
  6. #include <sHT/string/filler-merge.h>
  7. void
  8. sHT_merge16(uint16_t dest[], const uint16_t from[], size_t n, size_t brk, size_t end)
  9. {
  10. size_t end_gap = brk + (n - end);
  11. sHT_bzero16_r1(dest, end_gap, brk);
  12. sHT_memcpy16_r2(dest, from, n, end_gap, brk);
  13. sHT_memcpy16_r2(dest, from, brk, 0, 0);
  14. }