static struct mc_results *
mc_results_create (void)
{
- struct mc_results *results = xcalloc (1, sizeof (struct mc_results));
+ struct mc_results *results = XCALLOC (1, struct mc_results);
results->stop_reason = MC_CONTINUING;
gettimeofday (&results->start, NULL);
return results;
/* Array of 2**(options->hash_bits) bits representing states
already visited. */
- unsigned char *hash;
+ unsigned long int *hash;
/* State queue. */
struct mc_state **queue; /* Array of pointers to states. */
if (!mc->state_error && mc->options->hash_bits > 0)
{
hash &= (1u << mc->options->hash_bits) - 1;
- if (TEST_BIT (mc->hash, hash))
+ if (bitvector_is_set (mc->hash, hash))
{
if (mc->options->verbosity > 2)
fprintf (mc->options->output_file,
next_operation (mc);
return true;
}
- SET_BIT (mc->hash, hash);
+ bitvector_set1 (mc->hash, hash);
}
return false;
}
mc->results = mc_results_create ();
mc->hash = (mc->options->hash_bits > 0
- ? xcalloc (1, DIV_RND_UP (1 << mc->options->hash_bits, CHAR_BIT))
+ ? bitvector_allocate (1 << mc->options->hash_bits)
: NULL);
mc->queue = NULL;