Back to index

cell-binutils  2.17cvs20070401
memmove.c
Go to the documentation of this file.
00001 /* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
00002 /* This function is in the public domain.  --Per Bothner. */
00003 
00004 /*
00005 
00006 @deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
00007 
00008 Copies @var{count} bytes from memory area @var{from} to memory area
00009 @var{to}, returning a pointer to @var{to}.
00010 
00011 @end deftypefn
00012 
00013 */
00014 
00015 #include <ansidecl.h>
00016 #include <stddef.h>
00017 
00018 void bcopy (const void*, void*, size_t);
00019 
00020 PTR
00021 memmove (PTR s1, const PTR s2, size_t n)
00022 {
00023   bcopy (s2, s1, n);
00024   return s1;
00025 }