Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

string(3c)



BSTRING(3C)             COMMAND REFERENCE             BSTRING(3C)



NAME
     bstring, bcopy, bcmp, bzero, ffs - bit and byte string
     operations

SYNOPSIS
     bcopy(b1, b2, length)
     char *b1, *b2;
     int length;

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

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

     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, and nonzero otherwise.
     Both strings are assumed to be length bytes long.

     Bzero places length 0 bytes in the string b1.

     Ffs find the first bit set in the argument passed it and
     returns the index of that bit.  A return value of zero means
     that no bits are set.  Bits are numbered starting at 1
     (i.e., ffs (1) returns 1, and ffs (8) returns 4).

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

     Unlike strcmp, bcmp only returns an indication of equality,
     and not of relative order.

SEE ALSO
     string(3c).








Printed 3/13/89                                                 1



%%index%%
na:336,122;
sy:458,1571;
de:2029,1271;
ca:3300,585;
se:3885,117;
%%index%%000000000098

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