memcpy.c - scc - simple c99 compiler
(HTM) git clone git://git.simple-cc.org/scc
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) Submodules
(DIR) README
(DIR) LICENSE
---
memcpy.c (190B)
---
1 #include <string.h>
2
3 #undef memcpy
4
5 void *
6 memcpy(void *restrict s1, const void *restrict s2, size_t n)
7 {
8 char *d = s1;
9 const char *s = s2;
10
11 while (n-- > 0)
12 *d++ = *s++;
13
14 return s1;
15 }