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

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

.TH BSTRING 3  "4 March 1983"
.UC 4
.SH NAME
bcopy, bcmp, bzero, ffs \- bit and byte string operations
.SH SYNOPSIS
.nf
.B bcopy(b1, b2, length)
.B char *b1, *b2;
.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 b1
to the string
.IR b2 .
.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 \-1 indicates the
value passed is zero.
.SH BUGS
The
.I bcmp
and 
.I bcopy
routines take parameters backwards from
.I strcmp
and
.IR strcpy .