]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
93015253 | 3 | .\" %%%LICENSE_START(VERBATIM) |
fea681da MK |
4 | .\" Permission is granted to make and distribute verbatim copies of this |
5 | .\" manual provided the copyright notice and this permission notice are | |
6 | .\" preserved on all copies. | |
7 | .\" | |
8 | .\" Permission is granted to copy and distribute modified versions of this | |
9 | .\" manual under the conditions for verbatim copying, provided that the | |
10 | .\" entire resulting derived work is distributed under the terms of a | |
11 | .\" permission notice identical to this one. | |
c13182ef | 12 | .\" |
fea681da MK |
13 | .\" Since the Linux kernel and libraries are constantly changing, this |
14 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
15 | .\" responsibility for errors or omissions, or for damages resulting from | |
16 | .\" the use of the information contained herein. The author(s) may not | |
17 | .\" have taken the same level of care in the production of this manual, | |
18 | .\" which is licensed free of charge, as they might when working | |
19 | .\" professionally. | |
c13182ef | 20 | .\" |
fea681da MK |
21 | .\" Formatted or processed versions of this manual, if unaccompanied by |
22 | .\" the source, must acknowledge the copyright and authors of this work. | |
4b72fb64 | 23 | .\" %%%LICENSE_END |
fea681da MK |
24 | .\" |
25 | .\" References consulted: | |
26 | .\" Linux libc source code | |
27 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
28 | .\" 386BSD man pages | |
29 | .\" Modified Sat Jul 24 21:36:50 1993 by Rik Faith <faith@cs.unc.edu> | |
30 | .\" Modified Tue Oct 22 23:47:36 1996 by Eric S. Raymond <esr@thyrsus.com> | |
31a1b45e | 31 | .TH BCMP 3 2017-03-13 "Linux" "Linux Programmer's Manual" |
fea681da MK |
32 | .SH NAME |
33 | bcmp \- compare byte sequences | |
34 | .SH SYNOPSIS | |
35 | .nf | |
36 | .B #include <strings.h> | |
68e4db0a | 37 | .PP |
fea681da MK |
38 | .BI "int bcmp(const void *" s1 ", const void *" s2 ", size_t " n ); |
39 | .fi | |
40 | .SH DESCRIPTION | |
41 | The | |
63aa9df0 | 42 | .BR bcmp () |
fea681da MK |
43 | function compares the two byte sequences |
44 | .I s1 | |
45 | and | |
46 | .I s2 | |
47 | of length | |
48 | .I n | |
c13182ef MK |
49 | each. |
50 | If they are equal, and in particular if | |
fea681da MK |
51 | .I n |
52 | is zero, | |
63aa9df0 | 53 | .BR bcmp () |
c13182ef | 54 | returns 0. |
2b9b829d | 55 | Otherwise, it returns a nonzero result. |
47297adb | 56 | .SH RETURN VALUE |
fea681da | 57 | The |
63aa9df0 | 58 | .BR bcmp () |
fea681da | 59 | function returns 0 if the byte sequences are equal, |
c7094399 | 60 | otherwise a nonzero result is returned. |
3d678a4c | 61 | .SH ATTRIBUTES |
8e6ca3c3 MK |
62 | For an explanation of the terms used in this section, see |
63 | .BR attributes (7). | |
64 | .TS | |
65 | allbox; | |
66 | lb lb lb | |
67 | l l l. | |
68 | Interface Attribute Value | |
69 | T{ | |
3d678a4c | 70 | .BR bcmp () |
8e6ca3c3 MK |
71 | T} Thread safety MT-Safe |
72 | .TE | |
47297adb | 73 | .SH CONFORMING TO |
c13182ef | 74 | 4.3BSD. |
68e1685c | 75 | This function is deprecated (marked as LEGACY in POSIX.1-2001): use |
fb186734 | 76 | .BR memcmp (3) |
fea681da | 77 | in new programs. |
fed87652 MK |
78 | POSIX.1-2008 removes the specification of |
79 | .BR bcmp (). | |
47297adb | 80 | .SH SEE ALSO |
879091c9 | 81 | .BR bstring (3), |
fea681da MK |
82 | .BR memcmp (3), |
83 | .BR strcasecmp (3), | |
84 | .BR strcmp (3), | |
85 | .BR strcoll (3), | |
86 | .BR strncasecmp (3), | |
87 | .BR strncmp (3) |