bstring(3C) — 4 BSD
NAME
bcopy, bcmp, bzero, ffs − byte string operations
SYNOPSIS
void bcopy (b1, b2, length)
char ∗b1, ∗b2;
int length;
int bcmp (b1, b2, length)
char ∗b1, ∗b2;
int length;
void bzero (b, length)
char ∗b;
int length;
int ffs (i)
int i;
DESCRIPTION
The functions bcopy, bcmp, and bzero operate on variable length strings of bytes. They do not check for null bytes as the routines in string(3C) do.
Bcopy copies length bytes from string b1 to the string b2.
Bcmp compares byte string b1 against byte string b2, returning zero if they are identical, non-zero otherwise. Both strings are assumed to be length bytes long.
Bzero places length 0 bytes in the string b1.
Ffs finds the first bit set in the argument passed to it and returns the index of that bit. Bits are numbered starting at 1, with bit 1 being the least significant bit in the argument. A return value of -1 indicates the value passed is zero.
BUGS
The bcmp and bcopy routines take parameters backwards from strcmp and strcpy.
CX/UX Programmer’s Reference Manual