diff options
author | jaseg <git@jaseg.net> | 2020-08-30 15:27:11 +0200 |
---|---|---|
committer | jaseg <git@jaseg.net> | 2020-08-30 15:27:11 +0200 |
commit | cbb4ac1178362f61f854fd13f46ee0138c5d73ba (patch) | |
tree | 5c9f8e95a591e59fe623420e3e77919a41c657f0 /base.c | |
parent | c7cfa7c057c916843469c539eeaddf762cb0d720 (diff) | |
download | moargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.tar.gz moargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.tar.bz2 moargb-cbb4ac1178362f61f854fd13f46ee0138c5d73ba.zip |
Diffstat (limited to 'base.c')
-rw-r--r-- | base.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -15,6 +15,16 @@ void *memset(void *s, int c, size_t n) { return s; } +void *memcpy(void *dest, const void *src, size_t n) { + uint8_t *out = (uint8_t *)dest; + const uint8_t *in = (const uint8_t *)src; + + while (n--) + *out++ = *in++; + + return dest; +} + size_t strlen(const char *s) { const char *start = s; while (*s++); |