bstring(3C)


bstring: bcopy, bcmp, bzero -- bit and byte string operations

Synopsis

   #include <strings.h>
   

void bcopy(const void *b1, const void *b2, int length);

int bcmp(const void *b1, const void *b2, int length);

void bzero(void *b, int length);

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(3bsd) and string(3C) do.

bcopy copies length bytes from string b1 to the string b2. Overlapping strings are handled correctly.

bcmp compares the first length bytes of byte string b1 against byte string b2, returning zero if they are identical, 1 otherwise. Both strings are assumed to be length bytes long. bcmp of length zero bytes always returns zero.

bzero places length 0 bytes in the string b.

References

string(3bsd), string(3C)

Notices

The bcmp and bcopy routines take parameters backwards from memcmp and memcpy.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004