mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
Remove PARAMS and upgrade to latest obstack.h.
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support abitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
#include "bitset.h"
|
#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
|
#endif
|
||||||
|
|||||||
@@ -111,46 +111,45 @@ typedef union bitset_union *bitset;
|
|||||||
/* The contents of this structure should be considered private. */
|
/* The contents of this structure should be considered private. */
|
||||||
struct bitset_vtable
|
struct bitset_vtable
|
||||||
{
|
{
|
||||||
void (*set) PARAMS ((bitset, bitset_bindex));
|
void (*set) (bitset, bitset_bindex);
|
||||||
void (*reset) PARAMS ((bitset, bitset_bindex));
|
void (*reset) (bitset, bitset_bindex);
|
||||||
bool (*toggle) PARAMS ((bitset, bitset_bindex));
|
bool (*toggle) (bitset, bitset_bindex);
|
||||||
bool (*test) PARAMS ((bitset, bitset_bindex));
|
bool (*test) (bitset, bitset_bindex);
|
||||||
bitset_bindex (*resize) PARAMS ((bitset, bitset_bindex));
|
bitset_bindex (*resize) (bitset, bitset_bindex);
|
||||||
bitset_bindex (*size) PARAMS ((bitset));
|
bitset_bindex (*size) (bitset);
|
||||||
bitset_bindex (*count) PARAMS ((bitset));
|
bitset_bindex (*count) (bitset);
|
||||||
|
|
||||||
bool (*empty_p) PARAMS ((bitset));
|
bool (*empty_p) (bitset);
|
||||||
void (*ones) PARAMS ((bitset));
|
void (*ones) (bitset);
|
||||||
void (*zero) PARAMS ((bitset));
|
void (*zero) (bitset);
|
||||||
|
|
||||||
void (*copy) PARAMS ((bitset, bitset));
|
void (*copy) (bitset, bitset);
|
||||||
bool (*disjoint_p) PARAMS ((bitset, bitset));
|
bool (*disjoint_p) (bitset, bitset);
|
||||||
bool (*equal_p) PARAMS ((bitset, bitset));
|
bool (*equal_p) (bitset, bitset);
|
||||||
void (*not) PARAMS ((bitset, bitset));
|
void (*not) (bitset, bitset);
|
||||||
bool (*subset_p) PARAMS ((bitset, bitset));
|
bool (*subset_p) (bitset, bitset);
|
||||||
|
|
||||||
void (*and) PARAMS ((bitset, bitset, bitset));
|
void (*and) (bitset, bitset, bitset);
|
||||||
bool (*and_cmp) PARAMS ((bitset, bitset, bitset));
|
bool (*and_cmp) (bitset, bitset, bitset);
|
||||||
void (*andn) PARAMS ((bitset, bitset, bitset));
|
void (*andn) (bitset, bitset, bitset);
|
||||||
bool (*andn_cmp) PARAMS ((bitset, bitset, bitset));
|
bool (*andn_cmp) (bitset, bitset, bitset);
|
||||||
void (*or) PARAMS ((bitset, bitset, bitset));
|
void (*or) (bitset, bitset, bitset);
|
||||||
bool (*or_cmp) PARAMS ((bitset, bitset, bitset));
|
bool (*or_cmp) (bitset, bitset, bitset);
|
||||||
void (*xor) PARAMS ((bitset, bitset, bitset));
|
void (*xor) (bitset, bitset, bitset);
|
||||||
bool (*xor_cmp) PARAMS ((bitset, bitset, bitset));
|
bool (*xor_cmp) (bitset, bitset, bitset);
|
||||||
|
|
||||||
void (*and_or) PARAMS ((bitset, bitset, bitset, bitset));
|
void (*and_or) (bitset, bitset, bitset, bitset);
|
||||||
bool (*and_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
bool (*and_or_cmp) (bitset, bitset, bitset, bitset);
|
||||||
void (*andn_or) PARAMS ((bitset, bitset, bitset, bitset));
|
void (*andn_or) (bitset, bitset, bitset, bitset);
|
||||||
bool (*andn_or_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
bool (*andn_or_cmp) (bitset, bitset, bitset, bitset);
|
||||||
void (*or_and) PARAMS ((bitset, bitset, bitset, bitset));
|
void (*or_and) (bitset, bitset, bitset, bitset);
|
||||||
bool (*or_and_cmp) PARAMS ((bitset, bitset, bitset, bitset));
|
bool (*or_and_cmp) (bitset, bitset, bitset, bitset);
|
||||||
|
|
||||||
bitset_bindex (*list) PARAMS ((bitset, bitset_bindex *,
|
bitset_bindex (*list) (bitset, bitset_bindex *, bitset_bindex,
|
||||||
bitset_bindex, bitset_bindex *));
|
bitset_bindex *);
|
||||||
bitset_bindex (*list_reverse) PARAMS ((bitset,
|
bitset_bindex (*list_reverse) (bitset, bitset_bindex *, bitset_bindex,
|
||||||
bitset_bindex *, bitset_bindex,
|
bitset_bindex *);
|
||||||
bitset_bindex *));
|
void (*free) (bitset);
|
||||||
void (*free) PARAMS ((bitset));
|
|
||||||
enum bitset_type type;
|
enum bitset_type type;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -280,24 +279,24 @@ if (!BITSET_COMPATIBLE_ (DST, SRC1) || !BITSET_COMPATIBLE_ (DST, SRC2) \
|
|||||||
|
|
||||||
/* Private functions for bitset implementations. */
|
/* 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 */
|
#endif /* _BBITSET_H */
|
||||||
|
|||||||
65
lib/bitset.h
65
lib/bitset.h
@@ -1,5 +1,5 @@
|
|||||||
/* Generic bitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -23,17 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
Only use the functions and macros defined in this file. */
|
Only use the functions and macros defined in this file. */
|
||||||
|
|
||||||
#include "bbitset.h"
|
#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 "obstack.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* Attributes used to select a bitset implementation. */
|
/* Attributes used to select a bitset implementation. */
|
||||||
@@ -103,38 +93,37 @@ typedef struct
|
|||||||
|
|
||||||
|
|
||||||
/* Return bytes required for bitset of desired type and size. */
|
/* 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. */
|
/* 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
|
/* Select an implementation type based on the desired bitset size
|
||||||
and attributes. */
|
and attributes. */
|
||||||
extern enum bitset_type bitset_type_choose PARAMS ((bitset_bindex,
|
extern enum bitset_type bitset_type_choose (bitset_bindex, bitset_attrs);
|
||||||
bitset_attrs));
|
|
||||||
|
|
||||||
/* Create a bitset of desired type and size. The bitset is zeroed. */
|
/* 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. */
|
/* 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
|
/* Create a bitset of desired type and size using an obstack. The
|
||||||
bitset is zeroed. */
|
bitset is zeroed. */
|
||||||
extern bitset bitset_obstack_alloc PARAMS ((struct obstack *bobstack,
|
extern bitset bitset_obstack_alloc (struct obstack *bobstack,
|
||||||
bitset_bindex, enum bitset_type));
|
bitset_bindex, enum bitset_type);
|
||||||
|
|
||||||
/* Free bitset allocated on obstack. */
|
/* 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. */
|
/* 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. */
|
/* Return bitset type. */
|
||||||
extern enum bitset_type bitset_type_get PARAMS ((bitset));
|
extern enum bitset_type bitset_type_get (bitset);
|
||||||
|
|
||||||
/* Return bitset type name. */
|
/* 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. */
|
/* Set bit BITNO in bitset BSET. */
|
||||||
@@ -186,7 +175,7 @@ bitset_test (bitset bset, bitset_bindex bitno)
|
|||||||
#define bitset_size(SRC) BITSET_SIZE_ (SRC)
|
#define bitset_size(SRC) BITSET_SIZE_ (SRC)
|
||||||
|
|
||||||
/* Change size of bitset. */
|
/* 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. */
|
/* Return number of bits set in bitset SRC. */
|
||||||
#define bitset_count(SRC) BITSET_COUNT_ (SRC)
|
#define bitset_count(SRC) BITSET_COUNT_ (SRC)
|
||||||
@@ -289,22 +278,22 @@ extern void bitset_resize PARAMS ((bitset, bitset_bindex));
|
|||||||
extern bool bitset_compatible_p (bitset bset1, bitset bset2);
|
extern bool bitset_compatible_p (bitset bset1, bitset bset2);
|
||||||
|
|
||||||
/* Find next set bit from the given bit index. */
|
/* 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. */
|
/* 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. */
|
/* Find first set bit. */
|
||||||
extern bitset_bindex bitset_first PARAMS ((bitset));
|
extern bitset_bindex bitset_first (bitset);
|
||||||
|
|
||||||
/* Find last set bit. */
|
/* 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. */
|
/* 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. */
|
/* 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
|
/* Loop over all elements of BSET, starting with MIN, setting INDEX
|
||||||
to the index of each set bit. For example, the following will print
|
to the index of each set bit. For example, the following will print
|
||||||
@@ -373,28 +362,28 @@ extern void bitset_dump PARAMS ((FILE *, bitset));
|
|||||||
|
|
||||||
|
|
||||||
/* Release any memory tied up with bitsets. */
|
/* Release any memory tied up with bitsets. */
|
||||||
extern void bitset_release_memory PARAMS ((void));
|
extern void bitset_release_memory (void);
|
||||||
|
|
||||||
/* Enable bitset stats gathering. */
|
/* Enable bitset stats gathering. */
|
||||||
extern void bitset_stats_enable PARAMS ((void));
|
extern void bitset_stats_enable (void);
|
||||||
|
|
||||||
/* Disable bitset stats gathering. */
|
/* Disable bitset stats gathering. */
|
||||||
extern void bitset_stats_disable PARAMS ((void));
|
extern void bitset_stats_disable (void);
|
||||||
|
|
||||||
/* Read bitset stats file of accummulated stats. */
|
/* 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. */
|
/* 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. */
|
/* Dump bitset stats. */
|
||||||
extern void bitset_stats_dump PARAMS ((FILE *));
|
extern void bitset_stats_dump (FILE *);
|
||||||
|
|
||||||
/* Function to debug bitset from debugger. */
|
/* Function to debug bitset from debugger. */
|
||||||
extern void debug_bitset PARAMS ((bitset));
|
extern void debug_bitset (bitset);
|
||||||
|
|
||||||
/* Function to debug bitset stats from debugger. */
|
/* Function to debug bitset stats from debugger. */
|
||||||
extern void debug_bitset_stats PARAMS ((void));
|
extern void debug_bitset_stats (void);
|
||||||
|
|
||||||
#endif /* _BITSET_H */
|
#endif /* _BITSET_H */
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support bitset statistics.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -23,11 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
extern bool bitset_stats_enabled;
|
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,
|
extern bitset bitset_stats_init (bitset, bitset_bindex, enum bitset_type);
|
||||||
enum bitset_type));
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Bitset vectors.
|
/* Bitset vectors.
|
||||||
Copyright (C) 2002 Free Software Foundation, Inc.
|
Copyright (C) 2002, 2004 Free Software Foundation, Inc.
|
||||||
Contributed by Akim Demaille (akim@freefriends.org).
|
Contributed by Akim Demaille (akim@freefriends.org).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
#include "bitsetv.h"
|
#include "bitsetv.h"
|
||||||
|
|
||||||
/* Dump vector of bitsets as a matrix. */
|
/* Dump vector of bitsets as a matrix. */
|
||||||
extern void bitsetv_matrix_dump PARAMS ((FILE *, const char *,
|
extern void bitsetv_matrix_dump (FILE *, const char *, bitsetv);
|
||||||
bitsetv));
|
|
||||||
|
|
||||||
#endif /* _BITSETV_H */
|
#endif /* _BITSETV_H */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Bitset vectors.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -25,38 +25,35 @@ typedef bitset * bitsetv;
|
|||||||
|
|
||||||
/* 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. */
|
||||||
extern bitsetv bitsetv_alloc PARAMS ((bitset_bindex, bitset_bindex,
|
extern bitsetv bitsetv_alloc (bitset_bindex, bitset_bindex, enum bitset_type);
|
||||||
enum bitset_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. */
|
||||||
extern bitsetv bitsetv_create PARAMS ((bitset_bindex, bitset_bindex,
|
extern bitsetv bitsetv_create (bitset_bindex, bitset_bindex, unsigned int);
|
||||||
unsigned int));
|
|
||||||
|
|
||||||
/* Free vector of bitsets. */
|
/* Free vector of bitsets. */
|
||||||
extern void bitsetv_free PARAMS ((bitsetv));
|
extern void bitsetv_free (bitsetv);
|
||||||
|
|
||||||
/* Zero vector of bitsets. */
|
/* Zero vector of bitsets. */
|
||||||
extern void bitsetv_zero PARAMS ((bitsetv));
|
extern void bitsetv_zero (bitsetv);
|
||||||
|
|
||||||
/* Set vector of bitsets. */
|
/* 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
|
/* 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. */
|
||||||
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
|
/* 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
|
be the reflexive transitive closure of what was given. This is
|
||||||
the same as transitive closure but with all bits on the diagonal
|
the same as transitive closure but with all bits on the diagonal
|
||||||
of the bit matrix set. */
|
of the bit matrix set. */
|
||||||
extern void bitsetv_reflexive_transitive_closure PARAMS ((bitsetv));
|
extern void bitsetv_reflexive_transitive_closure (bitsetv);
|
||||||
|
|
||||||
/* Dump vector of bitsets. */
|
/* Dump vector of bitsets. */
|
||||||
extern void bitsetv_dump PARAMS ((FILE *, const char *,
|
extern void bitsetv_dump (FILE *, const char *, const char *, bitsetv);
|
||||||
const char *, bitsetv));
|
|
||||||
|
|
||||||
/* Function to debug vector of bitsets from debugger. */
|
/* Function to debug vector of bitsets from debugger. */
|
||||||
extern void debug_bitsetv PARAMS ((bitsetv));
|
extern void debug_bitsetv (bitsetv);
|
||||||
|
|
||||||
#endif /* _BITSETV_H */
|
#endif /* _BITSETV_H */
|
||||||
|
|||||||
@@ -216,9 +216,7 @@ ebitset_elt_alloc (void)
|
|||||||
|
|
||||||
obstack_specify_allocation (&ebitset_obstack, OBSTACK_CHUNK_SIZE,
|
obstack_specify_allocation (&ebitset_obstack, OBSTACK_CHUNK_SIZE,
|
||||||
__alignof__ (ebitset_elt),
|
__alignof__ (ebitset_elt),
|
||||||
(void *(*)PARAMS ((long int)))
|
|
||||||
OBSTACK_CHUNK_ALLOC,
|
OBSTACK_CHUNK_ALLOC,
|
||||||
(void (*)PARAMS ((void *)))
|
|
||||||
OBSTACK_CHUNK_FREE);
|
OBSTACK_CHUNK_FREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support ebitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,10 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
#include "bitset.h"
|
#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
|
#endif
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static struct obstack lbitset_obstack;
|
|||||||
static bool lbitset_obstack_init = false;
|
static bool lbitset_obstack_init = false;
|
||||||
static lbitset_elt *lbitset_free_list; /* Free list of bitset elements. */
|
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) \
|
#define LBITSET_CURRENT1(X) \
|
||||||
((lbitset_elt *) (void *) ((char *) (X) - offsetof (lbitset_elt, words)))
|
((lbitset_elt *) (void *) ((char *) (X) - offsetof (lbitset_elt, words)))
|
||||||
@@ -127,9 +127,7 @@ lbitset_elt_alloc (void)
|
|||||||
|
|
||||||
obstack_specify_allocation (&lbitset_obstack, OBSTACK_CHUNK_SIZE,
|
obstack_specify_allocation (&lbitset_obstack, OBSTACK_CHUNK_SIZE,
|
||||||
__alignof__ (lbitset_elt),
|
__alignof__ (lbitset_elt),
|
||||||
(void *(*)PARAMS ((long int)))
|
|
||||||
OBSTACK_CHUNK_ALLOC,
|
OBSTACK_CHUNK_ALLOC,
|
||||||
(void (*)PARAMS ((void *)))
|
|
||||||
OBSTACK_CHUNK_FREE);
|
OBSTACK_CHUNK_FREE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support lbitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,10 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
#include "bitset.h"
|
#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
|
#endif
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Variable array bitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -33,17 +33,15 @@
|
|||||||
has the same size.
|
has the same size.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void vbitset_unused_clear PARAMS ((bitset));
|
static void vbitset_unused_clear (bitset);
|
||||||
|
|
||||||
static void vbitset_set PARAMS ((bitset, bitset_bindex));
|
static void vbitset_set (bitset, bitset_bindex);
|
||||||
static void vbitset_reset PARAMS ((bitset, bitset_bindex));
|
static void vbitset_reset (bitset, bitset_bindex);
|
||||||
static bool vbitset_test PARAMS ((bitset, bitset_bindex));
|
static bool vbitset_test (bitset, bitset_bindex);
|
||||||
static bitset_bindex vbitset_list PARAMS ((bitset, bitset_bindex *,
|
static bitset_bindex vbitset_list (bitset, bitset_bindex *,
|
||||||
bitset_bindex,
|
bitset_bindex, bitset_bindex *);
|
||||||
bitset_bindex *));
|
static bitset_bindex vbitset_list_reverse (bitset, bitset_bindex *,
|
||||||
static bitset_bindex vbitset_list_reverse PARAMS ((bitset, bitset_bindex *,
|
bitset_bindex, bitset_bindex *);
|
||||||
bitset_bindex,
|
|
||||||
bitset_bindex *));
|
|
||||||
|
|
||||||
#define VBITSET_N_WORDS(N) (((N) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
|
#define VBITSET_N_WORDS(N) (((N) + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
|
||||||
#define VBITSET_WORDS(X) ((X)->b.cdata)
|
#define VBITSET_WORDS(X) ((X)->b.cdata)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to support vbitsets.
|
/* 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).
|
Contributed by Michael Hayes (m.hayes@elec.canterbury.ac.nz).
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
|
|
||||||
#include "bitset.h"
|
#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
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user