Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bcmp(3) — AIX PS/2 1.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

memory: memccpy, memchr, memcmp, memcpy, memset, bcopy

string



BCMP(3,L)                   AIX Technical Reference                   BCMP(3,L)



-------------------------------------------------------------------------------
bcmp, bzero, ffs



PURPOSE

Performs byte operations on strings of variable length.

LIBRARY

Standard C Library (libc.a)

SYNTAX



   int bcmp (string1, string2, length)    int ffs (integer)
   char *string1, *string2;               int integer;
   int length;

   void bzero (string, length)
   char *string;
   int length;



DESCRIPTION

These functions perform various operations on variable length strings of bytes.
They do not check for null bytes as the routines in string.  (See "string" for
a description of those routines.)

The bcmp subroutine compares the bytes in string1 with the bytes in string2.
The bcmp subroutine returns a 0 value if the two strings are identical and a
nonzero value otherwise.  Both strings are assumed to be length bytes long.

The bzero subroutine places the number of bytes set to 0 that the length
parameter specifies into the string pointed to by string.

The ffs subroutine finds the first set bit in the integer passed to it and
returns the number of that bit.  Bits are numbered starting at 1 from the least
significant bit.  A return value of 0 indicates that the value passed is 0.

For more information on the memcmp and memset subroutines, which can be used to
perform the same functions as bcmp and bzero, respectively, and on the bcopy
subroutine, see "memory: memccpy, memchr, memcmp, memcpy, memset, bcopy."

RELATED INFORMATION

In this book:  "memory: memccpy, memchr, memcmp, memcpy, memset, bcopy" and
"string."



Processed November 7, 1990         BCMP(3,L)                                  1



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