Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

BSTRING(3)  —  Silicon Graphics

NAME

bcopy, bcmp, bzero, bswap − byte string operations

SYNOPSIS

bcopy(from, to, length)
char *from, *to;
int length;

bcmp(b1, b2, length)
char *b1, *b2;
int length;

bzero(b, length)
char *b;
int length;

bswap(from, to, length)
char *from, *to;
int length;

DESCRIPTION

The functions bcopy, bcmp, bswap, 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 from to the string to. If the from and to strings overlap, the copy is done in a manner that yields the correct destination. 

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 bytes of zeros in the string b.

Bswap swaps length bytes in the from buffer and places the result in the to buffer. 

WARNINGS

The bcmp and bcopy routines take parameters backwards from strcmp and strcpy.

Version 2.5r1  —  October 29, 1986

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026