2000-02-18 03:39:52 +08:00
|
|
|
/*
|
|
|
|
FUNCTION
|
|
|
|
<<bcmp>>---compare two memory areas
|
|
|
|
|
|
|
|
INDEX
|
|
|
|
bcmp
|
|
|
|
|
2017-11-30 16:20:06 +08:00
|
|
|
SYNOPSIS
|
2011-08-23 20:01:51 +08:00
|
|
|
#include <strings.h>
|
2002-05-24 02:46:04 +08:00
|
|
|
int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
DESCRIPTION
|
2002-05-24 02:46:04 +08:00
|
|
|
This function compares not more than <[n]> bytes of the
|
2000-02-18 03:39:52 +08:00
|
|
|
object pointed to by <[s1]> with the object pointed to by <[s2]>.
|
|
|
|
|
|
|
|
This function is identical to <<memcmp>>.
|
|
|
|
|
|
|
|
RETURNS
|
|
|
|
The function returns an integer greater than, equal to or
|
|
|
|
less than zero according to whether the object pointed to by
|
|
|
|
<[s1]> is greater than, equal to or less than the object
|
|
|
|
pointed to by <[s2]>.
|
|
|
|
|
|
|
|
PORTABILITY
|
|
|
|
<<bcmp>> requires no supporting OS subroutines.
|
|
|
|
|
|
|
|
QUICKREF
|
|
|
|
bcmp ansi pure
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <string.h>
|
2011-08-20 00:58:20 +08:00
|
|
|
#include <strings.h>
|
2000-02-18 03:39:52 +08:00
|
|
|
|
|
|
|
int
|
2017-12-04 11:43:30 +08:00
|
|
|
bcmp (const void *m1,
|
2017-12-04 10:25:16 +08:00
|
|
|
const void *m2,
|
2000-02-18 03:39:52 +08:00
|
|
|
size_t n)
|
|
|
|
|
|
|
|
{
|
|
|
|
return memcmp (m1, m2, n);
|
|
|
|
}
|