2016-05-19 14:15:22 +02:00
|
|
|
#include <string.h>
|
|
|
|
|
2006-09-07 16:14:53 +02:00
|
|
|
typedef unsigned char uc;
|
2016-05-19 14:15:22 +02:00
|
|
|
int memcmp(const void* buf1,const void* buf2,size_t count)
|
2006-09-07 16:14:53 +02:00
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for (i=0;i<count;i++)
|
|
|
|
{
|
|
|
|
if (*(uc*)buf1<*(uc*)buf2)
|
|
|
|
return -1;
|
2016-05-19 14:15:22 +02:00
|
|
|
if (*(uc*)buf1>*(uc*)buf2)
|
2006-09-07 16:14:53 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|