| iMatix home page
| << | < | > | >>
SFL Logo SFL
Version 2.11

 

bits_test

#include "sflbits.h"
int
bits_test (
    const BITS *bits,
    long bit)

Synopsis

Tests the specified bit in the bitmap. Returns 1 or 0.

Source Code - (sflbits.c)

{
    int
        index,                          /*  Number of index block            */
        section;                        /*  Number of section in index       */
    dbyte
        bit_nbr;                        /*  Number of bit in section         */

    ASSERT (bits);

    locate_bit  (bits, bit, &index, &section, &bit_nbr);
    get_section ((BITS *) bits, index, section, section_data, FALSE);
    if ((section_data [bit_nbr / 8]) & (1 << (bit_nbr % 8)))
        return (1);
    else
        return (0);
}

| << | < | > | >> iMatix Copyright © 1996-2000 iMatix Corporation