1 '\" te 2 .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved 3 .\" 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. 4 .\" 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. 5 .\" 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] 6 .TH BSTRING 3C "Apr 15, 2002" 7 .SH NAME 8 bstring, bcopy, bcmp, bzero \- memory operations 9 .SH SYNOPSIS 10 .LP 11 .nf 12 #include <strings.h> 13 14 \fBvoid\fR \fBbcopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR); 15 .fi 16 17 .LP 18 .nf 19 \fBint\fR \fBbcmp\fR(\fBconst void *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR); 20 .fi 21 22 .LP 23 .nf 24 \fBvoid\fR \fBbzero\fR(\fBvoid *\fR\fIs\fR, \fBsize_t\fR \fIn\fR); 25 .fi 26 27 .SH DESCRIPTION 28 .sp 29 .LP 30 The \fBbcopy()\fR, \fBbcmp()\fR, and \fBbzero()\fR functions operate as 31 efficiently as possible on memory areas (arrays of bytes bounded by a count, 32 not terminated by a null character). They do not check for the overflow of 33 any receiving memory area. These functions are similar to the \fBmemcpy()\fR, 34 \fBmemcmp()\fR, and \fBmemset()\fR functions described on the \fBmemory\fR(3C) 35 manual page. 36 .sp 37 .LP 38 The \fBbcopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to 39 \fIs2\fR. Copying between objects that overlap will take place correctly. 40 .sp 41 .LP 42 The \fBbcmp()\fR function compares the first \fIn\fR bytes of its arguments, 43 returning 0 if they are identical and 1 otherwise. The \fBbcmp()\fR function 44 always returns 0 when \fIn\fR is 0. 45 .sp 46 .LP 47 The \fBbzero()\fR function sets the first \fIn\fR bytes in memory area \fIs\fR 48 to 0. 49 .SH WARNINGS 50 .sp 51 .LP 52 The \fBbcopy()\fR function takes parameters backwards from \fBmemcmp()\fR. See 53 \fBmemory\fR(3C). 54 .SH ATTRIBUTES 55 .sp 56 .LP 57 See \fBattributes\fR(5) for descriptions of the following attributes: 58 .sp 59 60 .sp 61 .TS 62 box; 63 c | c 64 l | l . 65 ATTRIBUTE TYPE ATTRIBUTE VALUE 66 _ 67 Interface Stability Standard 68 _ 69 MT-Level MT-Safe 70 .TE 71 72 .SH SEE ALSO 73 .sp 74 .LP 75 \fBmemory\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)