/* Determine number of bytes for each set. */
bytes = bitset_bytes (type, n_bits);
/* If size calculation overflows, memory is exhausted. */
if (BITSET_SIZE_MAX / (sizeof (bitset) + bytes) <= n_vecs)
xalloc_die ();
/* Determine number of bytes for each set. */
bytes = bitset_bytes (type, n_bits);
/* If size calculation overflows, memory is exhausted. */
if (BITSET_SIZE_MAX / (sizeof (bitset) + bytes) <= n_vecs)
xalloc_die ();
/* Create a vector of N_VECS bitsets, each of N_BITS, and with
attribute hints specified by ATTR. */
bitset *
/* Create a vector of N_VECS bitsets, each of N_BITS, and with
attribute hints specified by ATTR. */
bitset *
type = bitset_type_choose (n_bits, attr);
return bitsetv_alloc (n_vecs, n_bits, type);
}
type = bitset_type_choose (n_bits, attr);
return bitsetv_alloc (n_vecs, n_bits, type);
}
/* Given a vector BSETV of N bitsets of size N, modify its contents to
be the transitive closure of what was given. */
void
/* Given a vector BSETV of N bitsets of size N, modify its contents to
be the transitive closure of what was given. */
void
for (i = 0; bsetv[i]; i++)
for (j = 0; bsetv[j]; j++)
if (bitset_test (bsetv[j], i))
for (i = 0; bsetv[i]; i++)
for (j = 0; bsetv[j]; j++)
if (bitset_test (bsetv[j], i))
-bitsetv_dump (file, title, subtitle, bsetv)
- FILE *file;
- const char *title, *subtitle;
- bitset *bsetv;
+bitsetv_dump (FILE *file, char const *title, char const *subtitle,
+ bitsetv bsetv)
fprintf (file, "%s\n", title);
for (i = 0; bsetv[i]; i++)
{
fprintf (file, "%s %lu\n", subtitle, (unsigned long) i);
bitset_dump (file, bsetv[i]);
}
fprintf (file, "%s\n", title);
for (i = 0; bsetv[i]; i++)
{
fprintf (file, "%s %lu\n", subtitle, (unsigned long) i);
bitset_dump (file, bsetv[i]);
}
for (i = 0; bsetv[i]; i++)
{
fprintf (stderr, "%lu: ", (unsigned long) i);
debug_bitset (bsetv[i]);
}
for (i = 0; bsetv[i]; i++)
{
fprintf (stderr, "%lu: ", (unsigned long) i);
debug_bitset (bsetv[i]);
}