Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmemccpy.c
Go to the documentation of this file.
00001 /* 00002 * $Id: memccpy.c 30288 2007-11-09 11:22:29Z fireball $ 00003 */ 00004 00005 #include <string.h> 00006 00007 00008 void * 00009 _memccpy (void *to, const void *from,int c,size_t count) 00010 { 00011 char t; 00012 size_t i; 00013 char *dst=(char*)to; 00014 const char *src=(const char*)from; 00015 00016 for ( i = 0; i < count; i++ ) 00017 { 00018 dst[i] = t = src[i]; 00019 if ( t == '\0' ) 00020 break; 00021 if ( t == c ) 00022 return &dst[i+1]; 00023 } 00024 return NULL; /* didn't copy c */ 00025 } Generated on Sat May 26 2012 04:35:28 for ReactOS by
1.7.6.1
|