1 .\" Copyright 2014 Garett D'Amore <garrett@damore.org> 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 .Dd "Jul 19, 2014" 7 .Dt BSTRING 3C 8 .Os 9 .Sh NAME 10 .Nm bstring, bcopy, bcmp, bzero 11 .Nd memory operations 12 .Sh SYNOPSIS 13 .In strings.h 14 .Ft void 15 .Fn bcopy "const void *s1" "void *s2" "size_t n" 16 .Ft int 17 .Fn bcmp "const void *s1" "const void *s2" "size_t n" 18 .Ft void 19 .Fn bzero "void *s" "size_t n" 20 .Sh DESCRIPTION 21 The 22 .Fn bcopy , 23 .Fn bcmp , 24 and 25 .Fn bzero 26 functions operate as 27 efficiently as possible on memory areas (arrays of bytes bounded by a count, 28 not terminated by a null character). They do not check for the overflow of 29 any receiving memory area. These functions are similar to the 30 .Xr memcpy 3C , 31 .Xr memcmp 3C , 32 and 33 .Xr memset 3C 34 functions. 35 .Lp 36 The 37 .Fn bcopy 38 function copies 39 .Fa n 40 bytes from memory area 41 .Fa s1 42 to 43 .Fa s2 . 44 Copying between objects that overlap will take place correctly. 45 .Lp 46 The 47 .Fn bcmp 48 function compares the first 49 .Fa n 50 bytes of its arguments, returning 0 if they are identical and 1 otherwise. The 51 .Fn bcmp 52 function always returns 0 when 53 .Fa n 54 is 0. 55 .Lp 56 The 57 .Fn bzero 58 function sets the first 59 .Fa n 60 bytes in memory area 61 .Fn s 62 to 0. 63 .Sh WARNINGS 64 The 65 .Fn bcopy 66 function takes parameters backwards from 67 .Fn memcmp . 68 See 69 .Xr memory 3C 70 .Sh INTERFACE STABILITY 71 .Sy Obsolete Standard . 72 .Sh MT-LEVEL 73 .Sy MT-Safe . 74 .Sh SEE ALSO 75 .Xr memory 3C , 76 .Xr standards 5 77 .Sh STANDARDS 78 These interfaces were removed in 79 .St -p1003.1-2008 . The standard memory routines documented in 80 .Xr memory 3C 81 should be used instead.