Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/modules/klibc/memcmp.c

Source at commit 1308 created 12 years 8 months ago.
By meklort, Add a few placeholders for file io
1/*
2 * memcmp.c
3 */
4
5#include <string.h>
6
7int memcmp(const void *s1, const void *s2, size_t n)
8{
9const unsigned char *c1 = s1, *c2 = s2;
10int d = 0;
11
12while (n--) {
13d = (int)*c1++ - (int)*c2++;
14if (d)
15break;
16}
17
18return d;
19}
20

Archive Download this file

Revision: 1308