Create a branch for header work.

svn path=/branches/header-work/; revision=45691
This commit is contained in:
Timo Kreuzer 2010-02-26 22:57:55 +00:00
parent 14fe274b1c
commit 9ea495ba33
19538 changed files with 0 additions and 1063950 deletions

25
lib/sdk/crt/mem/memccpy.c Normal file
View file

@ -0,0 +1,25 @@
/*
* $Id$
*/
#include <string.h>
void *
_memccpy (void *to, const void *from,int c,size_t count)
{
char t;
size_t i;
char *dst=(char*)to;
const char *src=(const char*)from;
for ( i = 0; i < count; i++ )
{
dst[i] = t = src[i];
if ( t == '\0' )
break;
if ( t == c )
return &dst[i+1];
}
return NULL; /* didn't copy c */
}