Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ bcmp(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

memccpy, memchr, memcmp, memcpy, memset, bcopy

string

bcmp, bzero, ffs

Purpose

     Performs byte operations on strings of variable length.

Library

     Berkeley Library (libbsd.a)

Syntax

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

     int 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 do.  (See "string" a for
     description of those routines.)

     The bcmp  subroutine compares  the bytes in  string1 with
     the bytes in string2.  The bcmp subroutine returns a zero
     value if  the two  strings are  identical and  a non-zero
     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.   A return value of  0 indi-
     cates that the value passed is 0.

     For  more information  on the  memcmp and  memset subrou-
     tines, which can be used to perform the same functions as
     bcmp and  bzero, respectively,  and on the  bcopy subrou-
     tine,  see "  memccpy,  memchr,  memcmp, memcpy,  memset,
     bcopy."

     Related Information

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

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