OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgcc/] [memcmp.c] - Blame information for rev 758

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 734 jeremybenn
/* Public domain.  */
2
#include <stddef.h>
3
 
4
int
5
memcmp (const void *str1, const void *str2, size_t count)
6
{
7
  const unsigned char *s1 = str1;
8
  const unsigned char *s2 = str2;
9
 
10
  while (count-- > 0)
11
    {
12
      if (*s1++ != *s2++)
13
          return s1[-1] < s2[-1] ? -1 : 1;
14
    }
15
  return 0;
16
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.