Commit | Line | Data |
---|---|---|
252b5132 RH |
1 | /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */ |
2 | /* This function is in the public domain. --Per Bothner. */ | |
39423523 DD |
3 | |
4 | /* | |
5 | ||
d4d868a2 RW |
6 | @deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, @ |
7 | size_t @var{count}) | |
39423523 DD |
8 | |
9 | Copies @var{count} bytes from memory area @var{from} to memory area | |
10 | @var{to}, returning a pointer to @var{to}. | |
11 | ||
12 | @end deftypefn | |
13 | ||
14 | */ | |
15 | ||
252b5132 | 16 | #include <ansidecl.h> |
252b5132 | 17 | #include <stddef.h> |
252b5132 | 18 | |
49b1fae4 | 19 | void bcopy (const void*, void*, size_t); |
7ec2fc6f | 20 | |
252b5132 | 21 | PTR |
49b1fae4 | 22 | memmove (PTR s1, const PTR s2, size_t n) |
252b5132 RH |
23 | { |
24 | bcopy (s2, s1, n); | |
25 | return s1; | |
26 | } |