Listing 4 A fully compatible plug-in for memcpy()
/* /////////////////////////////////////////////////////////////
* ...
*
* Extract from memcpy.c
*
* Copyright (C) 2002, Synesis Software Pty Ltd.
* (Licensed under the Synesis Software Standard Source License:
* http://www.synesis.com.au/licenses/ssssl.html)
*
* ...
* ////////////////////////////////////////////////////////// */
void *__cdecl memcpy(void *pvDest, const void *pvSrc, size_t count)
{
byte *begin = (byte*)pvDest;
byte *src = (byte*)pvSrc;
byte *end = begin + count;
for(; begin != end; ++begin, ++src)
{
*begin = *src;
}
return pvDest;
}