4.3BSD/usr/man/man3/bstring.3

Compare this file to the similar file:
Show the results in this format:

.\" Copyright (c) 1983 Regents of the University of California.
.\" All rights reserved.  The Berkeley software License Agreement
.\" specifies the terms and conditions for redistribution.
.\"
.\"	@(#)bstring.3	6.1 (Berkeley) 5/15/85
.\"
.TH BSTRING 3  "May 15, 1985"
.UC 5
.SH NAME
bcopy, bcmp, bzero, ffs \- bit and byte string operations
.SH SYNOPSIS
.nf
.B bcopy(src, dst, length)
.B char *src, *dst;
.B int length;
.PP
.B bcmp(b1, b2, length)
.B char *b1, *b2;
.B int length;
.PP
.B bzero(b, length)
.B char *b;
.B int length;
.PP
.B ffs(i)
.B int i;
.fi
.SH DESCRIPTION
The functions
.IR bcopy ,
.IR bcmp ,
and
.I bzero
operate on variable length strings of bytes.
They do not check for null bytes as the routines in
.IR string (3)
do.
.PP
.I Bcopy
copies 
.I length
bytes from string
.I src
to the string
.IR dst .
.PP
.I Bcmp
compares byte string
.I b1
against byte string
.IR b2 ,
returning zero if they are identical,
non-zero otherwise.  Both strings are
assumed to be
.I length
bytes long.
.PP
.I Bzero
places
.I length
0 bytes in the string
.IR b1 .
.PP
.I Ffs
find the first bit set in the argument passed it and
returns the index of that bit.  Bits are numbered
starting at 1.  A return value of 0 indicates the
value passed is zero.
.SH BUGS
The
.I bcopy
routine take parameters backwards from
.IR strcpy .