~ubuntu-branches/ubuntu/precise/manpages-posix/precise

1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
1
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved 
2 by Francesco Paolo Lovergine
* Alligned to linux main manpages edition.
2
.TH "BCMP" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual"
1 by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages.
3
.\" bcmp 
4
.SH NAME
5
bcmp \- memory operations (\fBLEGACY\fP)
6
.SH SYNOPSIS
7
.LP
8
\fB#include <strings.h>
9
.br
10
.sp
11
int bcmp(const void *\fP\fIs1\fP\fB, const void *\fP\fIs2\fP\fB, size_t\fP
12
\fIn\fP\fB); \fP
13
\fB
14
.br
15
\fP
16
.SH DESCRIPTION
17
.LP
18
The \fIbcmp\fP() function shall compare the first \fIn\fP bytes of
19
the area pointed to by \fIs1\fP with the area pointed to
20
by \fIs2\fP.
21
.SH RETURN VALUE
22
.LP
23
The \fIbcmp\fP() function shall return 0 if \fIs1\fP and \fIs2\fP
24
are identical; otherwise, it shall return non-zero. Both
25
areas are assumed to be \fIn\fP bytes long. If the value of \fIn\fP
26
is 0, \fIbcmp\fP() shall return 0.
27
.SH ERRORS
28
.LP
29
No errors are defined.
30
.LP
31
\fIThe following sections are informative.\fP
32
.SH EXAMPLES
33
.LP
34
None.
35
.SH APPLICATION USAGE
36
.LP
37
The \fImemcmp\fP() function is preferred over this function.
38
.LP
39
For maximum portability, it is recommended to replace the function
40
call to \fIbcmp\fP() as follows:
41
.sp
42
.RS
43
.nf
44
45
\fB#define bcmp(b1,b2,len) memcmp((b1), (b2), (size_t)(len))
46
\fP
47
.fi
48
.RE
49
.SH RATIONALE
50
.LP
51
None.
52
.SH FUTURE DIRECTIONS
53
.LP
54
This function may be withdrawn in a future version.
55
.SH SEE ALSO
56
.LP
57
\fImemcmp\fP() , the Base Definitions volume of IEEE\ Std\ 1003.1-2001,
58
\fI<strings.h>\fP
59
.SH COPYRIGHT
60
Portions of this text are reprinted and reproduced in electronic form
61
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
62
-- Portable Operating System Interface (POSIX), The Open Group Base
63
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
64
Electrical and Electronics Engineers, Inc and The Open Group. In the
65
event of any discrepancy between this version and the original IEEE and
66
The Open Group Standard, the original IEEE and The Open Group Standard
67
is the referee document. The original Standard can be obtained online at
68
http://www.opengroup.org/unix/online.html .