bsearch (SunOS) bsearch (SunOS)
NAME
bsearch - Performs a binary search
LIBRARY
Standard C Library (libc.a)
SUN OS SYNOPSIS
#include <search.h>
char *bsearch(
char *key,
char *base,
unsigned nmemb,
sizeof (size),
int (*compar)( ));
DIGITAL UNIX SYNOPSIS
#include <stdlib.h>
void *bsearch(
const void *key,
const void *base,
size_t nmemb,
size_t size,
int (*compar)(const void *, const void *));
PARAMETERS
Target of search. Points to the initial object in the array. Speciā
fies the number of elements in the array. Specifies the byte size of
each element of the array. Points to the comparison function, which is
called with two parameters that point to the key object and to an array
member, in that order.
DIFFERENCES
Requires stdlib.h instead of search.h. Changes in argument data types.
RELATED INFORMATION
Digital UNIX Functions:
bsearch(3) delim off
bsearch (SunOS)