A modern Music Player Daemon based on Rockbox open source high quality audio player
libadwaita audio rust zig deno mpris rockbox mpd
at master 47 lines 1.1 kB view raw
1/* 2FUNCTION 3 <<mempcpy>>---copy memory regions and return end pointer 4 5ANSI_SYNOPSIS 6 #include <string.h> 7 void* mempcpy(void *<[out]>, const void *<[in]>, size_t <[n]>); 8 9TRAD_SYNOPSIS 10 void *mempcpy(<[out]>, <[in]>, <[n]> 11 void *<[out]>; 12 void *<[in]>; 13 size_t <[n]>; 14 15DESCRIPTION 16 This function copies <[n]> bytes from the memory region 17 pointed to by <[in]> to the memory region pointed to by 18 <[out]>. 19 20 If the regions overlap, the behavior is undefined. 21 22RETURNS 23 <<mempcpy>> returns a pointer to the byte following the 24 last byte copied to the <[out]> region. 25 26PORTABILITY 27<<mempcpy>> is a GNU extension. 28 29<<mempcpy>> requires no supporting OS subroutines. 30 31 */ 32 33#include "config.h" 34#include "_ansi.h" /* for _DEFUN */ 35#include <string.h> 36 37/* This may be conjoined with memcpy in <cpu>/memcpy.S to get it nearly for 38 free */ 39 40_PTR 41_DEFUN (mempcpy, (dst0, src0, len0), 42 _PTR dst0 _AND 43 _CONST _PTR src0 _AND 44 size_t len0) 45{ 46 return memcpy(dst0, src0, len0) + len0; 47}