mirror of
https://github.com/reactos/reactos.git
synced 2025-06-24 15:29:55 +00:00
Create a branch for header work.
svn path=/branches/header-work/; revision=45691
This commit is contained in:
parent
14fe274b1c
commit
9ea495ba33
19538 changed files with 0 additions and 1063950 deletions
25
lib/sdk/crt/mem/memccpy.c
Normal file
25
lib/sdk/crt/mem/memccpy.c
Normal 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 */
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue