133965Sjdp/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
233965Sjdp/* This function is in the public domain.  --Per Bothner. */
389857Sobrien
489857Sobrien/*
589857Sobrien
689857Sobrien@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
789857Sobrien
889857SobrienCopies @var{count} bytes from memory area @var{from} to memory area
989857Sobrien@var{to}, returning a pointer to @var{to}.
1089857Sobrien
1189857Sobrien@end deftypefn
1289857Sobrien
1389857Sobrien*/
1489857Sobrien
1533965Sjdp#include <ansidecl.h>
1633965Sjdp#include <stddef.h>
1733965Sjdp
18218822Sdimvoid bcopy (const void*, void*, size_t);
19130561Sobrien
2033965SjdpPTR
21218822Sdimmemmove (PTR s1, const PTR s2, size_t n)
2233965Sjdp{
2333965Sjdp  bcopy (s2, s1, n);
2433965Sjdp  return s1;
2533965Sjdp}
26