Home | History | Annotate | Line # | Download | only in libiberty
      1  1.1  christos /* bcmp
      2  1.1  christos    This function is in the public domain.  */
      3  1.1  christos 
      4  1.1  christos /*
      5  1.1  christos 
      6  1.1  christos @deftypefn Supplemental int bcmp (char *@var{x}, char *@var{y}, int @var{count})
      7  1.1  christos 
      8  1.1  christos Compares the first @var{count} bytes of two areas of memory.  Returns
      9  1.1  christos zero if they are the same, nonzero otherwise.  Returns zero if
     10  1.1  christos @var{count} is zero.  A nonzero result only indicates a difference,
     11  1.1  christos it does not indicate any sorting order (say, by having a positive
     12  1.1  christos result mean @var{x} sorts before @var{y}).
     13  1.1  christos 
     14  1.1  christos @end deftypefn
     15  1.1  christos 
     16  1.1  christos */
     17  1.1  christos 
     18  1.1  christos #include <stddef.h>
     19  1.1  christos 
     20  1.1  christos extern int memcmp(const void *, const void *, size_t);
     21  1.1  christos 
     22  1.1  christos int
     23  1.1  christos bcmp (const void *s1, const void *s2, size_t count)
     24  1.1  christos {
     25  1.1  christos   return memcmp (s1, s2, count);
     26  1.1  christos }
     27  1.1  christos 
     28