DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

bstring(S-osr5)


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

Syntax

cc . . . -lc
#include <strings.h>

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

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

void bzero(void *b, size_t length);

Description

The functions bcopy, bcmp and bzero operate on variable length strings of bytes.

bcopy copies length bytes from string b1 to string b2.

bcmp compares length bytes of string b1 against string b2. Both strings are assumed to be length bytes long.

bzero places length zero-valued bytes into string b.

Return values

bcopy and bzero return no value. bcmp returns zero if b1 and b2 are identical, otherwise it returns non-zero; if length is zero, it returns zero.

Diagnostics

bcopy, bcmp and bzero return no errors.

See also

memcmp(S-osr5), memmove(S-osr5), memset(S-osr5)

Standards conformance

bcopy, bcmp and bzero are conformant with:
X/Open Portability Guide Issue 4, Version 2 (Spec-1170).
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005