(bitsetv_alloc, bitsetv_create, bitsetv_free, bitsetv_zero,

bitsetv_ones, bitsetv_transitive_closure, bitsetv_dump,
debug_bitsetv): Use function prototypes; this removes the need for
declaring static functions simply to provide their prototypes.
This commit is contained in:
Paul Eggert
2002-10-16 06:23:21 +00:00
parent bba392ec8a
commit a182371d69

View File

@@ -29,10 +29,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Create a vector of N_VECS bitsets, each of N_BITS, and of /* Create a vector of N_VECS bitsets, each of N_BITS, and of
type TYPE. */ type TYPE. */
bitset * bitset *
bitsetv_alloc (n_vecs, n_bits, type) bitsetv_alloc (bitset_bindex n_vecs, bitset_bindex n_bits,
bitset_bindex n_vecs; enum bitset_type type)
bitset_bindex n_bits;
enum_bitset_type type;
{ {
size_t vector_bytes; size_t vector_bytes;
size_t bytes; size_t bytes;
@@ -67,10 +65,7 @@ bitsetv_alloc (n_vecs, n_bits, type)
/* Create a vector of N_VECS bitsets, each of N_BITS, and with /* Create a vector of N_VECS bitsets, each of N_BITS, and with
attribute hints specified by ATTR. */ attribute hints specified by ATTR. */
bitset * bitset *
bitsetv_create (n_vecs, n_bits, attr) bitsetv_create (bitset_bindex n_vecs, bitset_bindex n_bits, unsigned int attr)
bitset_bindex n_vecs;
bitset_bindex n_bits;
unsigned int attr;
{ {
enum bitset_type type; enum bitset_type type;
@@ -81,8 +76,7 @@ bitsetv_create (n_vecs, n_bits, attr)
/* Free bitset vector BSETV. */ /* Free bitset vector BSETV. */
void void
bitsetv_free (bsetv) bitsetv_free (bitsetv bsetv)
bitset *bsetv;
{ {
bitset_bindex i; bitset_bindex i;
@@ -94,8 +88,7 @@ bitsetv_free (bsetv)
/* Zero a vector of bitsets. */ /* Zero a vector of bitsets. */
void void
bitsetv_zero (bsetv) bitsetv_zero (bitsetv bsetv)
bitsetv bsetv;
{ {
bitset_bindex i; bitset_bindex i;
@@ -106,8 +99,7 @@ bitsetv_zero (bsetv)
/* Set a vector of bitsets to ones. */ /* Set a vector of bitsets to ones. */
void void
bitsetv_ones (bsetv) bitsetv_ones (bitsetv bsetv)
bitset *bsetv;
{ {
bitset_bindex i; bitset_bindex i;
@@ -119,8 +111,7 @@ bitsetv_ones (bsetv)
/* Given a vector BSETV of N bitsets of size N, modify its contents to /* Given a vector BSETV of N bitsets of size N, modify its contents to
be the transitive closure of what was given. */ be the transitive closure of what was given. */
void void
bitsetv_transitive_closure (bsetv) bitsetv_transitive_closure (bitsetv bsetv)
bitset *bsetv;
{ {
bitset_bindex i; bitset_bindex i;
bitset_bindex j; bitset_bindex j;
@@ -128,7 +119,7 @@ bitsetv_transitive_closure (bsetv)
for (i = 0; bsetv[i]; i++) for (i = 0; bsetv[i]; i++)
for (j = 0; bsetv[j]; j++) for (j = 0; bsetv[j]; j++)
if (bitset_test (bsetv[j], i)) if (bitset_test (bsetv[j], i))
bitset_or (bsetv[j], bsetv[j], bsetv[i]); bitset_or (bsetv[j], bsetv[j], bsetv[i]);
} }
@@ -150,10 +141,8 @@ bitsetv_reflexive_transitive_closure (bitsetv bsetv)
/* Dump the contents of a bitset vector BSETV with N_VECS elements to /* Dump the contents of a bitset vector BSETV with N_VECS elements to
FILE. */ FILE. */
void void
bitsetv_dump (file, title, subtitle, bsetv) bitsetv_dump (FILE *file, char const *title, char const *subtitle,
FILE *file; bitsetv bsetv)
const char *title, *subtitle;
bitset *bsetv;
{ {
bitset_windex i; bitset_windex i;
@@ -169,8 +158,7 @@ bitsetv_dump (file, title, subtitle, bsetv)
void void
debug_bitsetv (bsetv) debug_bitsetv (bitsetv bsetv)
bitset *bsetv;
{ {
bitset_windex i; bitset_windex i;