Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /* memcpy( void *, const void *, size_t )
  2.  
  3.    This file is part of the Public Domain C Library (PDCLib).
  4.    Permission is granted to use, modify, and / or redistribute at will.
  5. */
  6.  
  7. #include <string.h>
  8.  
  9. void * memcpy( void * s1, const void * s2, size_t n )
  10. {
  11.     char * dest = ( char * ) s1;
  12.     const char * src = ( const char * ) s2;
  13.  
  14.     while ( n-- )
  15.     {
  16.         *dest++ = *src++;
  17.     }
  18.  
  19.     return s1;
  20. }