Back to index

cell-binutils  2.17cvs20070401
Functions
memcpy.c File Reference
#include <ansidecl.h>
#include <stddef.h>

Go to the source code of this file.

Functions

void bcopy (const void *, void *, size_t)
PTR memcpy (PTR out, const PTR in, size_t length)

Function Documentation

void bcopy ( const void *  ,
void *  ,
size_t   
)

Definition at line 15 of file bcopy.c.

{
  if (dest < src)
    {
      const char *firsts = (const char *) src;
      char *firstd = (char *) dest;
      while (len--)
       *firstd++ = *firsts++;
    }
  else
    {
      const char *lasts = (const char *)src + (len-1);
      char *lastd = (char *)dest + (len-1);
      while (len--)
        *lastd-- = *lasts--;
    }
}
PTR memcpy ( PTR  out,
const PTR  in,
size_t  length 
)

Definition at line 21 of file memcpy.c.

{
    bcopy(in, out, length);
    return out;
}

Here is the call graph for this function: