1 /*
2 Copyright (c) 1994 Cygnus Support.
3 All rights reserved.
4
5 Redistribution and use in source and binary forms are permitted
6 provided that the above copyright notice and this paragraph are
7 duplicated in all such forms and that any documentation,
8 and/or other materials related to such
9 distribution and use acknowledge that the software was developed
10 at Cygnus Support, Inc. Cygnus Support, Inc. may not be used to
11 endorse or promote products derived from this software without
12 specific prior written permission.
13 THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14 IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16 */
17 /*
18 FUNCTION
19 <<bcmp>>---compare two memory areas
20
21 INDEX
22 bcmp
23
24 SYNOPSIS
25 #include <strings.h>
26 int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
27
28 DESCRIPTION
29 This function compares not more than <[n]> bytes of the
30 object pointed to by <[s1]> with the object pointed to by <[s2]>.
31
32 This function is identical to <<memcmp>>.
33
34 RETURNS
35 The function returns an integer greater than, equal to or
36 less than zero according to whether the object pointed to by
37 <[s1]> is greater than, equal to or less than the object
38 pointed to by <[s2]>.
39
40 PORTABILITY
41 <<bcmp>> requires no supporting OS subroutines.
42
43 QUICKREF
44 bcmp ansi pure
45 */
46
47 #include <string.h>
48 #include <strings.h>
49
50 int
bcmp(const void * m1,const void * m2,size_t n)51 bcmp (const void *m1,
52 const void *m2,
53 size_t n)
54
55 {
56 return memcmp (m1, m2, n);
57 }
58