Print this page
Minor markup tweaks (Sy instead of Nm).
first round of POSIX 2008 stuff

*** 1,75 **** ! '\" te .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] ! .TH BSTRING 3C "Apr 15, 2002" ! .SH NAME ! bstring, bcopy, bcmp, bzero \- memory operations ! .SH SYNOPSIS ! .LP ! .nf ! #include <strings.h> ! ! \fBvoid\fR \fBbcopy\fR(\fBconst void *\fR\fIs1\fR, \fBvoid *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR); ! .fi ! ! .LP ! .nf ! \fBint\fR \fBbcmp\fR(\fBconst void *\fR\fIs1\fR, \fBconst void *\fR\fIs2\fR, \fBsize_t\fR \fIn\fR); ! .fi ! ! .LP ! .nf ! \fBvoid\fR \fBbzero\fR(\fBvoid *\fR\fIs\fR, \fBsize_t\fR \fIn\fR); ! .fi ! ! .SH DESCRIPTION ! .sp ! .LP ! The \fBbcopy()\fR, \fBbcmp()\fR, and \fBbzero()\fR functions operate as efficiently as possible on memory areas (arrays of bytes bounded by a count, not terminated by a null character). They do not check for the overflow of ! any receiving memory area. These functions are similar to the \fBmemcpy()\fR, ! \fBmemcmp()\fR, and \fBmemset()\fR functions described on the \fBmemory\fR(3C) ! manual page. ! .sp ! .LP ! The \fBbcopy()\fR function copies \fIn\fR bytes from memory area \fIs1\fR to ! \fIs2\fR. Copying between objects that overlap will take place correctly. ! .sp ! .LP ! The \fBbcmp()\fR function compares the first \fIn\fR bytes of its arguments, ! returning 0 if they are identical and 1 otherwise. The \fBbcmp()\fR function ! always returns 0 when \fIn\fR is 0. ! .sp ! .LP ! The \fBbzero()\fR function sets the first \fIn\fR bytes in memory area \fIs\fR to 0. ! .SH WARNINGS ! .sp ! .LP ! The \fBbcopy()\fR function takes parameters backwards from \fBmemcmp()\fR. See ! \fBmemory\fR(3C). ! .SH ATTRIBUTES ! .sp ! .LP ! See \fBattributes\fR(5) for descriptions of the following attributes: ! .sp ! ! .sp ! .TS ! box; ! c | c ! l | l . ! ATTRIBUTE TYPE ATTRIBUTE VALUE ! _ ! Interface Stability Standard ! _ ! MT-Level MT-Safe ! .TE ! ! .SH SEE ALSO ! .sp ! .LP ! \fBmemory\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5) --- 1,81 ---- ! .\" Copyright 2014 Garett D'Amore <garrett@damore.org> .\" Copyright (c) 2002, Sun Microsystems, Inc. All Rights Reserved .\" 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. .\" 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. .\" 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] ! .Dd "Jul 19, 2014" ! .Dt BSTRING 3C ! .Os ! .Sh NAME ! .Nm bstring, bcopy, bcmp, bzero ! .Nd memory operations ! .Sh SYNOPSIS ! .In strings.h ! .Ft void ! .Fn bcopy "const void *s1" "void *s2" "size_t n" ! .Ft int ! .Fn bcmp "const void *s1" "const void *s2" "size_t n" ! .Ft void ! .Fn bzero "void *s" "size_t n" ! .Sh DESCRIPTION ! The ! .Fn bcopy , ! .Fn bcmp , ! and ! .Fn bzero ! functions operate as efficiently as possible on memory areas (arrays of bytes bounded by a count, not terminated by a null character). They do not check for the overflow of ! any receiving memory area. These functions are similar to the ! .Xr memcpy 3C , ! .Xr memcmp 3C , ! and ! .Xr memset 3C ! functions. ! .Lp ! The ! .Fn bcopy ! function copies ! .Fa n ! bytes from memory area ! .Fa s1 ! to ! .Fa s2 . ! Copying between objects that overlap will take place correctly. ! .Lp ! The ! .Fn bcmp ! function compares the first ! .Fa n ! bytes of its arguments, returning 0 if they are identical and 1 otherwise. The ! .Fn bcmp ! function always returns 0 when ! .Fa n ! is 0. ! .Lp ! The ! .Fn bzero ! function sets the first ! .Fa n ! bytes in memory area ! .Fn s to 0. ! .Sh WARNINGS ! The ! .Fn bcopy ! function takes parameters backwards from ! .Fn memcmp . ! See ! .Xr memory 3C ! .Sh INTERFACE STABILITY ! .Sy Obsolete Standard . ! .Sh MT-LEVEL ! .Sy MT-Safe . ! .Sh SEE ALSO ! .Xr memory 3C , ! .Xr standards 5 ! .Sh STANDARDS ! These interfaces were removed in ! .St -p1003.1-2008 . The standard memory routines documented in ! .Xr memory 3C ! should be used instead.