mirror of
https://github.com/libretro/libretro-common.git
synced 2024-11-26 18:00:35 +00:00
Update SDK
This commit is contained in:
parent
24e0c71553
commit
3a056429ee
10
crt/include/string.h
Normal file
10
crt/include/string.h
Normal file
@ -0,0 +1,10 @@
|
||||
#ifndef __LIBRETRO_SDK_CRT_STRING_H_
|
||||
#define __LIBRETRO_SDK_CRT_STRING_H_
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void *memcpy(void *dst, const void *src, size_t len);
|
||||
|
||||
void *memset(void *b, int c, size_t len);
|
||||
|
||||
#endif
|
12
crt/string.c
12
crt/string.c
@ -23,16 +23,12 @@ void *memset(void *dst, int val, size_t count)
|
||||
return start;
|
||||
}
|
||||
|
||||
void *memcpy(void *dst, const void *src, size_t count)
|
||||
void *memcpy(void *dst, const void *src, size_t len)
|
||||
{
|
||||
void *ret = dst;
|
||||
size_t i;
|
||||
|
||||
while (count--)
|
||||
{
|
||||
*(char *)dst = *(char *)src;
|
||||
dst = (char*)dst + 1;
|
||||
src = (char*)src + 1;
|
||||
}
|
||||
for (i = 0; i < len; i++)
|
||||
((unsigned char *)dst)[i] = ((unsigned char *)src)[i];
|
||||
|
||||
return dst;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user