'\"macro stdmacro .\" 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 3C "May 15, 1985" .UC 5 .SH NAME bcopy, bcmp, blkclr, bzero, ffs \- bit and byte string operations .SH SYNOPSIS .B "#include " .PP .B "void bcopy(const void \(**src, void \(**dst, size_t length); .PP .B "int bcmp(const void \(**b1, const void \(**b2, size_t length); .PP .B "void bzero(void \(**b, size_t length); .PP .B "void blkclr(void \(**b, size_t length); .PP .B "int ffs(unsigned 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 and .I blkclr place .I length zero bytes in the string .IR b . .PP .I ffs finds 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 NOTE The use of overlapping buffers with .I bcopy is not guaranteed to work. Use the .IR memmove (3C) function if the buffers might overlap. .SH SEE ALSO memory(3c) '\".so /pubs/tools/origin.bsd