00001 #include <string.h> 00002 00003 int memcmp(const void *src1, const void *src2, size_t bytes) 00004 { 00005 const unsigned char *s1, *s2; 00006 int result; 00007 s1 = src1; 00008 s2 = src2; 00009 result = 0; 00010 while((bytes > 0) && (result == 0)) { 00011 result = *s1 - *s2; 00012 bytes--; 00013 s1++; 00014 s2++; 00015 } 00016 return result; 00017 }
1.5.5