Back to index

cell-binutils  2.17cvs20070401
bcmp.c
Go to the documentation of this file.
00001 /* bcmp
00002    This function is in the public domain.  */
00003 
00004 /*
00005 
00006 @deftypefn Supplemental int bcmp (char *@var{x}, char *@var{y}, int @var{count})
00007 
00008 Compares the first @var{count} bytes of two areas of memory.  Returns
00009 zero if they are the same, nonzero otherwise.  Returns zero if
00010 @var{count} is zero.  A nonzero result only indicates a difference,
00011 it does not indicate any sorting order (say, by having a positive
00012 result mean @var{x} sorts before @var{y}).
00013 
00014 @end deftypefn
00015 
00016 */
00017 
00018 #include <stddef.h>
00019 
00020 extern int memcmp(const void *, const void *, size_t);
00021 
00022 int
00023 bcmp (const void *s1, const void *s2, size_t count)
00024 {
00025   return memcmp (s1, s2, count);
00026 }
00027