src/bitvector.c
/*  Allocate a new bit vector and set all of the bits to FALSE.  */
Allocate a new bit vector and set all of the bits to FALSE.
Allocate a new bit vector and set all of the bits to FALSE .
bit_vector *
new_bit_vector (int num_bits)
{
    int num_words = NUM_WORDS(num_bits);
    bit_vector *result = (bit_vector *)malloc(sizeof(bit_vector));
    assert(num_bits >= 0);
    result->num_bits = num_bits;
    result->bits = (unsigned *)calloc(num_words, sizeof(unsigned));
    return result;
}
bit_vector * new_bit_vector ( int num_bits ) { int num_words = NUM_WORDS ( num_bits ) ; bit_vector * result = ( bit_vector * ) malloc ( sizeof ( bit_vector ) ) ; assert ( num_bits >= 0 ) ; result -> num_bits = num_bits ; result -> bits = ( unsigned * ) calloc ( num_words , sizeof ( unsigned ) ) ; return result ; }
Allocate a new bit vector and set all of the bits to FALSE.
Allocate a new bit vector and set all of the bits to FALSE .