9103 opengroup acknowledgement should be properly formatted in man pages
[unleashed.git] / usr / src / man / man3c / bstring.3c
blob873c64fe80aa9988deba85989ab4efe3bbe20249
1 '\" te
2 .\"  Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved
3 .\" Copyright (c) 2015, Joyent, Inc.
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH BSTRING 3C "Dec 31, 2014"
8 .SH NAME
9 bstring, bcopy, bcmp, bzero, explicit_bzero \- memory operations
10 .SH SYNOPSIS
11 .LP
12 .nf
13 #include <strings.h>
15 \fBvoid\fR \fBbcopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
16 .fi
18 .LP
19 .nf
20 \fBint\fR \fBbcmp\fR(\fBconst void *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR);
21 .fi
23 .LP
24 .nf
25 \fBvoid\fR \fBbzero\fR(\fBvoid *\fR\fIs\fR, \fBsize_t\fR \fIn\fR);
26 .fi
28 .LP
29 .nf
30 \fBvoid\fR \fBexplicit_bzero\fR(\fBvoid *\fR\fIs\fR, \fBsize_t\fR \fIn\fR);
31 .fi
33 .SH DESCRIPTION
34 .LP
35 The  \fBbcopy()\fR, \fBbcmp()\fR, and \fBbzero()\fR functions operate as
36 efficiently as possible on memory areas (arrays of bytes bounded by a count,
37 not terminated by a null character).  They do not check for  the  overflow  of
38 any receiving memory area.  These functions are similar to the \fBmemcpy()\fR,
39 \fBmemcmp()\fR, and \fBmemset()\fR functions described on the \fBmemory\fR(3C)
40 manual page.
41 .sp
42 .LP
43 The \fBbcopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to
44 \fIs2\fR. Copying between objects that overlap will take place correctly.
45 .sp
46 .LP
47 The \fBbcmp()\fR function compares the first \fIn\fR bytes of its arguments,
48 returning 0 if they are identical and 1 otherwise. The \fBbcmp()\fR function
49 always returns 0 when \fIn\fR is 0.
50 .sp
51 .LP
52 The \fBbzero()\fR function sets the first \fIn\fR bytes in memory area \fIs\fR
53 to 0.
54 .sp
55 .LP
56 The \fBexplicit_bzero()\fR function behaves the same as \fBbzero()\fR, except it
57 should not be removed by the compiler's optimization passes.
58 .SH WARNINGS
59 .LP
60 The \fBbcopy()\fR and \fBexplicit_bzero()\fR functions take parameters backwards
61 from \fBmemcmp()\fR.  See \fBmemory\fR(3C).
62 .SH ATTRIBUTES
63 .LP
64 See \fBattributes\fR(5) for descriptions of the following attributes:
65 .sp
67 .sp
68 .TS
69 box;
70 c | c
71 l | l .
72 ATTRIBUTE TYPE  ATTRIBUTE VALUE
74 Interface Stability     See NOTES
76 MT-Level        MT-Safe
77 .TE
79 .SH SEE ALSO
80 .LP
81 \fBmemory\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)
82 .SH NOTES
83 .LP
84 \fBbcopy\fR(), \fBbcmp\fR(), and \fBbzero\fR() are \fBSTANDARD\fR.
85 \fBexplicit_bzero\fR() is \fBCOMMITTED\fR.