/* Functions to support abitsets.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
#include "bitset.h"
-extern size_t abitset_bytes PARAMS ((bitset_bindex));
+extern size_t abitset_bytes (bitset_bindex);
-extern bitset abitset_init PARAMS ((bitset, bitset_bindex));
+extern bitset abitset_init (bitset, bitset_bindex);
#endif
/* The contents of this structure should be considered private. */
struct bitset_vtable
{
- void (*set) PARAMS ((bitset, bitset_bindex));
- void (*reset) PARAMS ((bitset, bitset_bindex));
- bool (*toggle) PARAMS ((bitset, bitset_bindex));
- bool (*test) PARAMS ((bitset, bitset_bindex));
- bitset_bindex (*resize) PARAMS ((bitset, bitset_bindex));
- bitset_bindex (*size) PARAMS ((bitset));
- bitset_bindex (*count) PARAMS ((bitset));
-
- bool (*empty_p) PARAMS ((bitset));
- void (*ones) PARAMS ((bitset));
- void (*zero) PARAMS ((bitset));
-
- void (*copy) PARAMS ((bitset, bitset));
- bool (*disjoint_p) PARAMS ((bitset, bitset));
- bool (*equal_p) PARAMS ((bitset, bitset));
- void (*not) PARAMS ((bitset, bitset));
- bool (*subset_p) PARAMS ((bitset, bitset));
-
- void (*and) PARAMS ((bitset, bitset, bitset));
- bool (*and_cmp) PARAMS ((bitset, bitset, bitset));
- void (*andn) PARAMS ((bitset, bitset, bitset));
- bool (*andn_cmp) PARAMS ((bitset, bitset, bitset));
- void (*or) PARAMS ((bitset, bitset, bitset));
- bool (*or_cmp) PARAMS ((bitset, bitset, bitset));
- void (*xor) PARAMS ((bitset, bitset, bitset));
- bool (*xor_cmp) PARAMS ((bitset, bitset, bitset));
-
- void (*and_or) PARAMS ((bitset, bitset, bitset, bitset));
- bool (*and_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
- void (*andn_or) PARAMS ((bitset, bitset, bitset, bitset));
- bool (*andn_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
- void (*or_and) PARAMS ((bitset, bitset, bitset, bitset));
- bool (*or_and_cmp) PARAMS ((bitset, bitset, bitset, bitset));
-
- bitset_bindex (*list) PARAMS ((bitset, bitset_bindex *,
- bitset_bindex, bitset_bindex *));
- bitset_bindex (*list_reverse) PARAMS ((bitset,
- bitset_bindex *, bitset_bindex,
- bitset_bindex *));
- void (*free) PARAMS ((bitset));
+ void (*set) (bitset, bitset_bindex);
+ void (*reset) (bitset, bitset_bindex);
+ bool (*toggle) (bitset, bitset_bindex);
+ bool (*test) (bitset, bitset_bindex);
+ bitset_bindex (*resize) (bitset, bitset_bindex);
+ bitset_bindex (*size) (bitset);
+ bitset_bindex (*count) (bitset);
+
+ bool (*empty_p) (bitset);
+ void (*ones) (bitset);
+ void (*zero) (bitset);
+
+ void (*copy) (bitset, bitset);
+ bool (*disjoint_p) (bitset, bitset);
+ bool (*equal_p) (bitset, bitset);
+ void (*not) (bitset, bitset);
+ bool (*subset_p) (bitset, bitset);
+
+ void (*and) (bitset, bitset, bitset);
+ bool (*and_cmp) (bitset, bitset, bitset);
+ void (*andn) (bitset, bitset, bitset);
+ bool (*andn_cmp) (bitset, bitset, bitset);
+ void (*or) (bitset, bitset, bitset);
+ bool (*or_cmp) (bitset, bitset, bitset);
+ void (*xor) (bitset, bitset, bitset);
+ bool (*xor_cmp) (bitset, bitset, bitset);
+
+ void (*and_or) (bitset, bitset, bitset, bitset);
+ bool (*and_or_cmp) (bitset, bitset, bitset, bitset);
+ void (*andn_or) (bitset, bitset, bitset, bitset);
+ bool (*andn_or_cmp) (bitset, bitset, bitset, bitset);
+ void (*or_and) (bitset, bitset, bitset, bitset);
+ bool (*or_and_cmp) (bitset, bitset, bitset, bitset);
+
+ bitset_bindex (*list) (bitset, bitset_bindex *, bitset_bindex,
+ bitset_bindex *);
+ bitset_bindex (*list_reverse) (bitset, bitset_bindex *, bitset_bindex,
+ bitset_bindex *);
+ void (*free) (bitset);
enum bitset_type type;
};
/* Private functions for bitset implementations. */
-extern bool bitset_toggle_ PARAMS ((bitset, bitset_bindex));
+extern bool bitset_toggle_ (bitset, bitset_bindex);
-extern bitset_bindex bitset_count_ PARAMS ((bitset));
+extern bitset_bindex bitset_count_ (bitset);
-extern bitset_bindex bitset_size_ PARAMS ((bitset));
+extern bitset_bindex bitset_size_ (bitset);
-extern bool bitset_copy_ PARAMS ((bitset, bitset));
+extern bool bitset_copy_ (bitset, bitset);
-extern void bitset_and_or_ PARAMS ((bitset, bitset, bitset, bitset));
+extern void bitset_and_or_ (bitset, bitset, bitset, bitset);
-extern bool bitset_and_or_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
+extern bool bitset_and_or_cmp_ (bitset, bitset, bitset, bitset);
-extern void bitset_andn_or_ PARAMS ((bitset, bitset, bitset, bitset));
+extern void bitset_andn_or_ (bitset, bitset, bitset, bitset);
-extern bool bitset_andn_or_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
+extern bool bitset_andn_or_cmp_ (bitset, bitset, bitset, bitset);
-extern void bitset_or_and_ PARAMS ((bitset, bitset, bitset, bitset));
+extern void bitset_or_and_ (bitset, bitset, bitset, bitset);
-extern bool bitset_or_and_cmp_ PARAMS ((bitset, bitset, bitset, bitset));
+extern bool bitset_or_and_cmp_ (bitset, bitset, bitset, bitset);
#endif /* _BBITSET_H */
/* Generic bitsets.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
Only use the functions and macros defined in this file. */
#include "bbitset.h"
-
-/* obstack.h tries to be portable to K&R compilers, but its
- __INT_TO_PTR macro generates diagnostics on compilers like Tru64 cc
- that define __STDC__ to 0 when not in strict ANSI mode. The bitset
- code assumes C89 or later, so it can avoid these glitches by
- defining __INT_TO_PTR appropriately for C89 or later. */
-#ifndef __INT_TO_PTR
-# define __INT_TO_PTR(P) ((void *) ((P) + (char *) 0))
-#endif
#include "obstack.h"
-
#include <stdio.h>
/* Attributes used to select a bitset implementation. */
/* Return bytes required for bitset of desired type and size. */
-extern size_t bitset_bytes PARAMS ((enum bitset_type, bitset_bindex));
+extern size_t bitset_bytes (enum bitset_type, bitset_bindex);
/* Initialise a bitset with desired type and size. */
-extern bitset bitset_init PARAMS ((bitset, bitset_bindex, enum bitset_type));
+extern bitset bitset_init (bitset, bitset_bindex, enum bitset_type);
/* Select an implementation type based on the desired bitset size
and attributes. */
-extern enum bitset_type bitset_type_choose PARAMS ((bitset_bindex,
- bitset_attrs));
+extern enum bitset_type bitset_type_choose (bitset_bindex, bitset_attrs);
/* Create a bitset of desired type and size. The bitset is zeroed. */
-extern bitset bitset_alloc PARAMS ((bitset_bindex, enum bitset_type));
+extern bitset bitset_alloc (bitset_bindex, enum bitset_type);
/* Free bitset. */
-extern void bitset_free PARAMS ((bitset));
+extern void bitset_free (bitset);
/* Create a bitset of desired type and size using an obstack. The
bitset is zeroed. */
-extern bitset bitset_obstack_alloc PARAMS ((struct obstack *bobstack,
- bitset_bindex, enum bitset_type));
+extern bitset bitset_obstack_alloc (struct obstack *bobstack,
+ bitset_bindex, enum bitset_type);
/* Free bitset allocated on obstack. */
-extern void bitset_obstack_free PARAMS ((bitset));
+extern void bitset_obstack_free (bitset);
/* Create a bitset of desired size and attributes. The bitset is zeroed. */
-extern bitset bitset_create PARAMS ((bitset_bindex, bitset_attrs));
+extern bitset bitset_create (bitset_bindex, bitset_attrs);
/* Return bitset type. */
-extern enum bitset_type bitset_type_get PARAMS ((bitset));
+extern enum bitset_type bitset_type_get (bitset);
/* Return bitset type name. */
-extern const char *bitset_type_name_get PARAMS ((bitset));
+extern const char *bitset_type_name_get (bitset);
/* Set bit BITNO in bitset BSET. */
#define bitset_size(SRC) BITSET_SIZE_ (SRC)
/* Change size of bitset. */
-extern void bitset_resize PARAMS ((bitset, bitset_bindex));
+extern void bitset_resize (bitset, bitset_bindex);
/* Return number of bits set in bitset SRC. */
#define bitset_count(SRC) BITSET_COUNT_ (SRC)
extern bool bitset_compatible_p (bitset bset1, bitset bset2);
/* Find next set bit from the given bit index. */
-extern bitset_bindex bitset_next PARAMS ((bitset, bitset_bindex));
+extern bitset_bindex bitset_next (bitset, bitset_bindex);
/* Find previous set bit from the given bit index. */
-extern bitset_bindex bitset_prev PARAMS ((bitset, bitset_bindex));
+extern bitset_bindex bitset_prev (bitset, bitset_bindex);
/* Find first set bit. */
-extern bitset_bindex bitset_first PARAMS ((bitset));
+extern bitset_bindex bitset_first (bitset);
/* Find last set bit. */
-extern bitset_bindex bitset_last PARAMS ((bitset));
+extern bitset_bindex bitset_last (bitset);
/* Return nonzero if this is the only set bit. */
-extern bool bitset_only_set_p PARAMS ((bitset, bitset_bindex));
+extern bool bitset_only_set_p (bitset, bitset_bindex);
/* Dump bitset. */
-extern void bitset_dump PARAMS ((FILE *, bitset));
+extern void bitset_dump (FILE *, bitset);
/* Loop over all elements of BSET, starting with MIN, setting INDEX
to the index of each set bit. For example, the following will print
/* Release any memory tied up with bitsets. */
-extern void bitset_release_memory PARAMS ((void));
+extern void bitset_release_memory (void);
/* Enable bitset stats gathering. */
-extern void bitset_stats_enable PARAMS ((void));
+extern void bitset_stats_enable (void);
/* Disable bitset stats gathering. */
-extern void bitset_stats_disable PARAMS ((void));
+extern void bitset_stats_disable (void);
/* Read bitset stats file of accummulated stats. */
-void bitset_stats_read PARAMS ((const char *filename));
+void bitset_stats_read (const char *filename);
/* Write bitset stats file of accummulated stats. */
-void bitset_stats_write PARAMS ((const char *filename));
+void bitset_stats_write (const char *filename);
/* Dump bitset stats. */
-extern void bitset_stats_dump PARAMS ((FILE *));
+extern void bitset_stats_dump (FILE *);
/* Function to debug bitset from debugger. */
-extern void debug_bitset PARAMS ((bitset));
+extern void debug_bitset (bitset);
/* Function to debug bitset stats from debugger. */
-extern void debug_bitset_stats PARAMS ((void));
+extern void debug_bitset_stats (void);
#endif /* _BITSET_H */
/* Functions to support bitset statistics.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
extern bool bitset_stats_enabled;
-extern enum bitset_type bitset_stats_type_get PARAMS ((bitset));
+extern enum bitset_type bitset_stats_type_get (bitset);
-extern size_t bitset_stats_bytes PARAMS ((void));
+extern size_t bitset_stats_bytes (void);
-extern bitset bitset_stats_init PARAMS ((bitset, bitset_bindex,
- enum bitset_type));
+extern bitset bitset_stats_init (bitset, bitset_bindex, enum bitset_type);
#endif
/* Bitset vectors.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Akim Demaille (akim@freefriends.org).
This program is free software; you can redistribute it and/or modify
#include "bitsetv.h"
/* Dump vector of bitsets as a matrix. */
-extern void bitsetv_matrix_dump PARAMS ((FILE *, const char *,
- bitsetv));
+extern void bitsetv_matrix_dump (FILE *, const char *, bitsetv);
#endif /* _BITSETV_H */
/* Bitset vectors.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
/* Create a vector of N_VECS bitsets, each of N_BITS, and of
type TYPE. */
-extern bitsetv bitsetv_alloc PARAMS ((bitset_bindex, bitset_bindex,
- enum bitset_type));
+extern bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type);
/* Create a vector of N_VECS bitsets, each of N_BITS, and with
attribute hints specified by ATTR. */
-extern bitsetv bitsetv_create PARAMS ((bitset_bindex, bitset_bindex,
- unsigned int));
+extern bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned int);
/* Free vector of bitsets. */
-extern void bitsetv_free PARAMS ((bitsetv));
+extern void bitsetv_free (bitsetv);
/* Zero vector of bitsets. */
-extern void bitsetv_zero PARAMS ((bitsetv));
+extern void bitsetv_zero (bitsetv);
/* Set vector of bitsets. */
-extern void bitsetv_ones PARAMS ((bitsetv));
+extern void bitsetv_ones (bitsetv);
/* Given a vector BSETV of N bitsets of size N, modify its contents to
be the transitive closure of what was given. */
-extern void bitsetv_transitive_closure PARAMS ((bitsetv));
+extern void bitsetv_transitive_closure (bitsetv);
/* Given a vector BSETV of N bitsets of size N, modify its contents to
be the reflexive transitive closure of what was given. This is
the same as transitive closure but with all bits on the diagonal
of the bit matrix set. */
-extern void bitsetv_reflexive_transitive_closure PARAMS ((bitsetv));
+extern void bitsetv_reflexive_transitive_closure (bitsetv);
/* Dump vector of bitsets. */
-extern void bitsetv_dump PARAMS ((FILE *, const char *,
- const char *, bitsetv));
+extern void bitsetv_dump (FILE *, const char *, const char *, bitsetv);
/* Function to debug vector of bitsets from debugger. */
-extern void debug_bitsetv PARAMS ((bitsetv));
+extern void debug_bitsetv (bitsetv);
#endif /* _BITSETV_H */
obstack_specify_allocation (&ebitset_obstack, OBSTACK_CHUNK_SIZE,
__alignof__ (ebitset_elt),
- (void *(*)PARAMS ((long int)))
OBSTACK_CHUNK_ALLOC,
- (void (*)PARAMS ((void *)))
OBSTACK_CHUNK_FREE);
}
/* Functions to support ebitsets.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
#include "bitset.h"
-extern size_t ebitset_bytes PARAMS ((bitset_bindex));
+extern size_t ebitset_bytes (bitset_bindex);
-extern bitset ebitset_init PARAMS ((bitset, bitset_bindex));
+extern bitset ebitset_init (bitset, bitset_bindex);
-extern void ebitset_release_memory PARAMS ((void));
+extern void ebitset_release_memory (void);
#endif
static bool lbitset_obstack_init = false;
static lbitset_elt *lbitset_free_list; /* Free list of bitset elements. */
-extern void debug_lbitset PARAMS ((bitset));
+extern void debug_lbitset (bitset);
#define LBITSET_CURRENT1(X) \
((lbitset_elt *) (void *) ((char *) (X) - offsetof (lbitset_elt, words)))
obstack_specify_allocation (&lbitset_obstack, OBSTACK_CHUNK_SIZE,
__alignof__ (lbitset_elt),
- (void *(*)PARAMS ((long int)))
OBSTACK_CHUNK_ALLOC,
- (void (*)PARAMS ((void *)))
OBSTACK_CHUNK_FREE);
}
/* Functions to support lbitsets.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
#include "bitset.h"
-extern size_t lbitset_bytes PARAMS ((bitset_bindex));
+extern size_t lbitset_bytes (bitset_bindex);
-extern bitset lbitset_init PARAMS ((bitset, bitset_bindex));
+extern bitset lbitset_init (bitset, bitset_bindex);
-extern void lbitset_release_memory PARAMS ((void));
+extern void lbitset_release_memory (void);
#endif
/* Variable array bitsets.
- Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
has the same size.
*/
-static void vbitset_unused_clear PARAMS ((bitset));
-
-static void vbitset_set PARAMS ((bitset, bitset_bindex));
-static void vbitset_reset PARAMS ((bitset, bitset_bindex));
-static bool vbitset_test PARAMS ((bitset, bitset_bindex));
-static bitset_bindex vbitset_list PARAMS ((bitset, bitset_bindex *,
- bitset_bindex,
- bitset_bindex *));
-static bitset_bindex vbitset_list_reverse PARAMS ((bitset, bitset_bindex *,
- bitset_bindex,
- bitset_bindex *));
+static void vbitset_unused_clear (bitset);
+
+static void vbitset_set (bitset, bitset_bindex);
+static void vbitset_reset (bitset, bitset_bindex);
+static bool vbitset_test (bitset, bitset_bindex);
+static bitset_bindex vbitset_list (bitset, bitset_bindex *,
+ bitset_bindex, bitset_bindex *);
+static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
+ bitset_bindex, bitset_bindex *);
#define VBITSET_N_WORDS(N) (((N) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
#define VBITSET_WORDS(X) ((X)->b.cdata)
/* Functions to support vbitsets.
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
This program is free software; you can redistribute it and/or modify
#include "bitset.h"
-extern size_t vbitset_bytes PARAMS ((bitset_bindex));
+extern size_t vbitset_bytes (bitset_bindex);
-extern bitset vbitset_init PARAMS ((bitset, bitset_bindex));
+extern bitset vbitset_init (bitset, bitset_bindex);
#endif