Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4973 right-hear 1
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
2
#include 
3
#include 
4
 
5
int
6
memcmp(const void *s1, const void *s2, size_t n)
7
{
8
  if (n != 0)
9
  {
10
    const unsigned char *p1 = s1, *p2 = s2;
11
 
12
    do {
13
      if (*p1++ != *p2++)
14
	return (*--p1 - *--p2);
15
    } while (--n != 0);
16
  }
17
  return 0;
18
}