Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. /*
  2. FUNCTION
  3.         <<bcmp>>---compare two memory areas
  4.  
  5. INDEX
  6.         bcmp
  7.  
  8. ANSI_SYNOPSIS
  9.         #include <strings.h>
  10.         int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
  11.  
  12. TRAD_SYNOPSIS
  13.         #include <strings.h>
  14.         int bcmp(<[s1]>, <[s2]>, <[n]>)
  15.         const void *<[s1]>;
  16.         const void *<[s2]>;
  17.         size_t <[n]>;
  18.  
  19. DESCRIPTION
  20.         This function compares not more than <[n]> bytes of the
  21.         object pointed to by <[s1]> with the object pointed to by <[s2]>.
  22.  
  23.         This function is identical to <<memcmp>>.
  24.  
  25. RETURNS
  26.         The function returns an integer greater than, equal to or
  27.         less than zero  according to whether the object pointed to by
  28.         <[s1]> is greater than, equal to or less than the object
  29.         pointed to by <[s2]>.
  30.  
  31. PORTABILITY
  32. <<bcmp>> requires no supporting OS subroutines.
  33.  
  34. QUICKREF
  35.         bcmp ansi pure
  36. */
  37.  
  38. #include <string.h>
  39. #include <strings.h>
  40.  
  41. int
  42. _DEFUN (bcmp, (m1, m2, n),
  43.         _CONST void *m1 _AND
  44.         _CONST void *m2 _AND
  45.         size_t n)
  46.  
  47. {
  48.   return memcmp (m1, m2, n);
  49. }
  50.