Commit Graph

124 Commits

Author SHA1 Message Date
Paul Eggert
9e2c5ef112 (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
float, as this generates a warning on Solaris 8 + GCC 3.2 with
--enable-gcc-warnings.  Instead, divide into 1.0 rather than 1;
this generates a more-accurate value anyway.
(timervar_accumulate): Rename local variables to avoid confusion
with similarly-named global 'start_time'.
2002-10-20 05:34:55 +00:00
Paul Eggert
24c7b92b25 (AUTOMAKE_OPTIONS): Remove. 2002-10-17 01:29:01 +00:00
Paul Eggert
dddb8b6121 Remove ansi2knr, ansi2knr.*. 2002-10-17 01:26:33 +00:00
Paul Eggert
829f74d293 (enum_lbitset_find_mode): Remove. All uses of "enum_" changed to "enum ".
(debug_lbitset, lbitset_and, lbitset_and_cmp, lbitset_andn,
lbitset_andn_cmp, lbitset_bytes, lbitset_copy, lbitset_copy_cmp,
lbitset_disjoint_p, lbitset_elt_alloc, lbitset_elt_calloc,
lbitset_elt_find, lbitset_elt_free, lbitset_elt_link,
lbitset_elt_unlink, lbitset_elt_zero_p, lbitset_empty_p,
lbitset_equal_p, lbitset_free, lbitset_init, lbitset_list,
lbitset_list_reverse, lbitset_not, lbitset_ones, lbitset_op3_cmp,
lbitset_or, lbitset_or_cmp, lbitset_prune, lbitset_release_memory,
lbitset_reset, lbitset_set, lbitset_size, lbitset_subset_p,
lbitset_test, lbitset_weed, lbitset_xor, lbitset_xor_cmp,
lbitset_zero): Use function prototypes; this removes the need for
declaring static functions simply to provide their prototypes.
2002-10-16 06:27:59 +00:00
Paul Eggert
75f10004fe (enum_ebitset_find_mode): Remove. All uses of "enum_" changed to "enum ".
(ebitset_and, ebitset_and_cmp, ebitset_andn, ebitset_andn_cmp,
ebitset_bytes, ebitset_copy, ebitset_copy_, ebitset_copy_cmp,
ebitset_disjoint_p, ebitset_elt_add, ebitset_elt_alloc,
ebitset_elt_calloc, ebitset_elt_find, ebitset_elt_free,
ebitset_elt_last, ebitset_elt_remove, ebitset_elt_zero_p,
ebitset_elts_grow, ebitset_empty_p, ebitset_equal_p, ebitset_free,
ebitset_init, ebitset_list, ebitset_list_reverse, ebitset_not,
ebitset_ones, ebitset_op3_cmp, ebitset_or, ebitset_or_cmp,
ebitset_release_memory, ebitset_reset, ebitset_set, ebitset_size,
ebitset_subset_p, ebitset_test, ebitset_weed, ebitset_xor,
ebitset_xor_cmp, ebitset_zero): Use function prototypes; this removes
the need for declaring static functions simply to provide their
prototypes.
2002-10-16 06:26:31 +00:00
Paul Eggert
24f4e18b77 (bitsetv_alloc): enum_bitset_type -> enum bitset_type 2002-10-16 06:24:26 +00:00
Paul Eggert
a182371d69 (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.
2002-10-16 06:23:21 +00:00
Paul Eggert
bba392ec8a (bitset_stats_init): enum_bitset_type -> enum bitset_type. 2002-10-16 06:22:04 +00:00
Paul Eggert
d65ec44e3b (bitset_log_histogram_print, bitset_percent_histogram_print,
bitset_stats_and, bitset_stats_and_cmp, bitset_stats_and_or,
bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
bitset_stats_zero): Use function prototypes; this removes the need for
declaring static functions simply to provide their prototypes.
2002-10-16 06:20:44 +00:00
Paul Eggert
04af9e5267 (bitset_set, bitset_reset, bitset_test): Use function prototypes; this
removes the need for declaring static functions simply to provide
their prototypes.
2002-10-16 06:19:22 +00:00
Paul Eggert
447e90bcef (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_, bitset_andn_or_,
bitset_andn_or_cmp_, bitset_bytes, bitset_copy_, bitset_count_,
bitset_create, bitset_dump, bitset_first, bitset_free, bitset_init,
bitset_last, bitset_next, bitset_obstack_alloc, bitset_obstack_free,
bitset_only_set_p, bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_,
bitset_prev, bitset_print, bitset_release_memory, bitset_toggle_,
bitset_type_choose, bitset_type_get, bitset_type_name_get,
debug_bitset): Use function prototypes; this removes the need for
declaring static functions simply to provide their prototypes.
2002-10-16 06:18:00 +00:00
Paul Eggert
59fc3dcdf4 (enum_bitset_ops, enum_bitset_type): Remove.
All uses of "enum_" changed to "enum ".
2002-10-16 06:16:29 +00:00
Paul Eggert
a911db9cba (abitset_and, abitset_and_cmp, abitset_and_or,
abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
abitset_copy1, abitset_disjoint_p, abitset_empty_p,
abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
abitset_not, abitset_ones, abitset_or, abitset_or_and,
abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
Use function prototypes; this removes the need for declaring
static functions simply to provide their prototypes.
2002-10-16 06:15:02 +00:00
Paul Eggert
bd0ba42d72 Import GCC version as of today, then merge Bison's changes.
Change "GCC" to "Bison" in copyright notice.
2002-10-13 05:58:38 +00:00
Paul Eggert
46b8b6ce90 Fix copyright and authorship notice to point to Bison, not GCC. 2002-10-13 05:57:10 +00:00
Paul Eggert
fdabfd76d6 [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
Update copyright date and clarify comments.
(get_time) [IN_GCC]: Keep the GCC version for reference.

Merge GCC changes.  Change "GCC" to "Bison" in the copyright notice.
2002-10-13 05:56:20 +00:00
Paul Eggert
ea9ed226e0 Import of GCC head 2002-10-11 2002-10-13 04:42:59 +00:00
Paul Eggert
303e6da265 Include bitset.h, not bbitset.h. 2002-10-10 07:35:19 +00:00
Paul Eggert
ef5da92061 Include <stddef.h>, for offsetof.
(lbitset_bytes): Adjust to new, unique names for structures.

(lbitset_and, lbitset_and_cmp, lbitset_andn, lbitset_andn_cmp,
lbitset_or, lbitset_or_cmp, lbitset_xor, lbitset_xor_cmp,
lbitset_empty_p, lbitset_ones, lbitset_not, lbitset_subset_p,
lbitset_disjoint_p, debug_lbitset): Supply prototype decls.

(enum_lbitset_find_mode): New type.  All instances of parameters of
type enum FOO are now of type enum_FOO, to conform to the C Standard.

(struct lbitset_struct, lbitset, bitset_struct, PFV): Remove.

(lbitset_and, lbitset_andn, lbitset_or, lbitset_xor): New functions.
2002-10-10 07:33:59 +00:00
Paul Eggert
3e0a8627e1 (ebitset_bytes): Adjust to new, unique names for structures.
(enum_ebitset_find_mode): New type.
(struct ebitset_struct, ebitset, struct bitset_struct, PFV): Remove.
(ebitset_and, ebitset_andn, ebitset_or,
ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New decls.
2002-10-10 07:28:53 +00:00
Paul Eggert
fd5c1e824e enum -> enum_ 2002-10-10 07:26:15 +00:00
Paul Eggert
f5e211a120 (bitsetv_alloc): Return a size that is aligned properly for vectors of
objects.  Do not assume that adding a header size to a multiple of a
word size yields a value that is properly aligned for the whole union.

(bitsetv_alloc): Add a cast to (void *) to avoid a GCC warning.
2002-10-10 07:25:21 +00:00
Paul Eggert
55e728eb31 (bitset_stats_bytes): Adjust to new, unique names for structures.
(bitset_stats_count, bitset_stats_empty_p, bitset_stats_ones,
bitset_stats_zero, bitset_stats_copy, bitset_stats_disjoint_p,
bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
bitset_stats_and_or_cmp, bitset_stats_andn_or,
bitset_stats_andn_or_cmp, bitset_stats_or_and,
bitset_stats_or_and_cmp): Supply prototype decls, to improve the
type-checking that GCC can do.

(struct bitset_stats_struct, bitset_stats, struct bitset_struct): Remove.
2002-10-10 07:23:15 +00:00
Paul Eggert
47c8386f83 (struct bitset_struct): Remove, replacing with....
(union bitset_union, struct abitset_struct, struct ebitset_struct,
struct lbitset_struct, struct bitset_stats_struct): New types.
All uses of struct bitset_struct changed to union bitset_union,
etc.
(bitset_next, bitset_prev, bitset_only_set_p): Declare.
2002-10-10 07:20:24 +00:00
Paul Eggert
d5c559cde4 (bitset_op4_cmp): Supply prototype decls,
to improve the type-checking that GCC can do.

(bitset_and_or_, bitset_andn_or_, bitset_or_and_): New functions.
2002-10-10 07:18:47 +00:00
Paul Eggert
d9d83ef277 (enum_bitset_ops, enum_bitset_type): New types.
All instances of parameters of type enum bitset_opts are now of
type enum_bitset_opts, to conform to the C Standard, and similarly
for enum_bitset_type.

(bitset): Now points to a union, not to a struct.
All instances of "struct bitset_struct *" replaced with "bitset".

(bitset_and_or_, bitset_andn_or_, bitset_or_and_): New decls.
2002-10-10 07:15:56 +00:00
Paul Eggert
d4d399fcce Include <stddef.h>, for offsetof.
(abitset_bytes): Return a size that is aligned
properly for vectors of objects.  Do not assume that adding a
header size to a multiple of a word size yields a value that is
properly aligned for the whole union.

(abitset_ones, abitset_zero, abitset_empty_p, abitset_copy1,
abitset_not, abitset_equal_p, abitset_subset_p, abitset_disjoint_p,
abitset_and, abitset_and_cmp, abitset_andn, abitset_andn_cmp,
abitset_or, abitset_or_cmp, abitset_xor, abitset_xor_cmp,
abitset_and_or, abitset_and_or_cmp, abitset_andn_or,
abitset_andn_or_cmp, abitset_or_and, abitset_or_and_cmp,
abitset_copy): Supply prototype decls, to improve the type-checking
that GCC can do.

(struct abitset_struct, abitset, struct bitset_struct): Remove.
2002-10-10 07:13:58 +00:00
Paul Eggert
0f9cd74fdb (bitset_reset): Do not assume that bitset_word is
the same width as int.  This reapplies a hunk of the 2002-08-12 patch
<http://mail.gnu.org/pipermail/bison-patches/2002-August/001111.html>,
which was inadvertently undone by the 2002-09-30 patch.
2002-10-07 05:43:35 +00:00
Paul Eggert
09147be095 (debug_lbitset): Do not assume that bitset_word is the same width as
int.
2002-10-07 05:41:35 +00:00
Paul Eggert
5beedd9b58 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
interpreted as signed.
* lib/ebitset.c (ebitset_list): Fix bug.
From Michael Hayes.
2002-10-05 05:02:30 +00:00
Paul Eggert
cd931d9b53 (AM_CFLAGS): Renamed from CFLAGS. 2002-10-05 04:53:54 +00:00
Paul Eggert
bf5c381136 (lbitset_bytes): Use size_t, not unsigned int, to count bytes. 2002-10-02 08:02:06 +00:00
Paul Eggert
5c319390d7 (lbitset_size, lbitset_list, lbitset_list_merge):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(lbitset_bytes): Use size_t, not unsigned int, to count bytes.
Use proper printf formats for widths of integer types.

(lbitset_ones, lbitset_not): Use bitset_windex instead of unsigned int.

(lbitset_elt_find): Simplify windex calculation and avoid cast to unsigned.
2002-10-02 08:00:19 +00:00
Paul Eggert
effda851f6 (ebitset_bytes): Use size_t, not unsigned int, to count bytes. 2002-10-02 07:58:11 +00:00
Paul Eggert
52f8da14ea (ebitset_size, ebitset_list, ebitset_list_reverse):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(ebitset_bytes): Use size_t, not unsigned int, to count bytes.

(struct ebitset_struct.size, ebitset_elts_grow,
ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
Use bitset_windex instead of unsigned int.

(ebitset_elts_grow): Check for arithmetic overflow when computing sizes.
2002-10-02 07:57:24 +00:00
Paul Eggert
eb6172cd1e (bitsetv_alloc, bitsetv_create):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.
2002-10-02 07:55:44 +00:00
Paul Eggert
32e218da16 (bitsetv_alloc, bitsetv_create, bitsetv_free,
bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
bitsetv_reflexive_transitive_closure):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(bitsetv_alloc): Use size_t, not unsigned int, to count bytes.

(bitsetv_dump, debug_bitsetv):
Use bitset_windex instead of unsigned int.
Use proper printf formats for widths of integer types.

(bitsetv_alloc): Check for arithmetic overflow when computing sizes.
2002-10-02 07:54:52 +00:00
Paul Eggert
4fc71aa390 (bitsetv_matrix_dump):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.
Use proper printf formats for widths of integer types.
2002-10-02 07:52:50 +00:00
Paul Eggert
c9de3b4080 (bitset_stats_bytes): Use size_t, not unsigned int, to count bytes. 2002-10-02 07:50:39 +00:00
Paul Eggert
2d382ea853 (bitset_stats_size, bitset_stats_list,
bitset_stats_list_reverse, bitset_stats_size,
bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(bitset_stats_bytes, bitset_stats_init):
Use size_t, not unsigned int, to count bytes.

(bitset_percent_histogram_print,
bitset_log_histogram_print, bitset_stats_print_1):
Use proper printf formats for width of integer types.
2002-10-02 07:49:35 +00:00
Paul Eggert
808a5918e6 (bitset_iterator.num, bitset_iterator.i, bitset_first, bitset_last):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(bitset_bytes): Use size_t, not unsigned int, to count bytes.
2002-10-02 07:47:03 +00:00
Paul Eggert
d32fe6f64f (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
Use size_t, not unsigned int, to count bytes.

(bitset_print): Use proper printf format for bitset types.

(bitset_next, bitset_prev, bitset_first, bitset_last):
Return BITSET_BINDEX_MAX (not -1) for no value,
since we now return the bitset_bindex type (not int).
2002-10-02 07:45:37 +00:00
Paul Eggert
f6ebdb3174 (struct bitset_vtable.size, struct bitset_vtable.count,
struct bitset_vtable.list, struct bitset_vtable.list_reverse,
bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
bitset_count_):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(BITSET_BINDEX_MAX, BITSET_WINDEX_MAX, BITSET_SIZE_MAX): New macros.
(BITSET_INDEX_MAX): Remove.  It wasn't right, since it assumed that
sizeof (bitset_word) == sizeof (bitset_windex).  All uses changed
to BITSET_WINDEX_MAX.
2002-10-02 07:44:07 +00:00
Paul Eggert
8207d52123 (abitset_bytes): Use size_t, not unsigned int, to count bytes. 2002-10-02 07:42:26 +00:00
Paul Eggert
62a34c3eb6 (struct abitset_struct.n_bits, abitset_small_list, abitset_size,
abitset_list, abitset_list_reverse, abitset_list):
Use bitset_bindex, not int or unsigned int or size_t, to count bits.

(abitset_ones, abitset_zero, abitset_bytes):
Use size_t, not unsigned int, to count bytes.

(abitset_empty_p, abitset_not, abitset_equal_p,
abitset_subset_p, abitset_disjoint_p, abitset_and,
abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
abitset_or_and, abitset_or_and_cmp): Use bitset_windex instead of
unsigned int.
2002-10-02 07:41:04 +00:00
Akim Demaille
6aa452a643 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
* lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
Updates from Michael Hayes.
2002-09-30 12:50:49 +00:00
Akim Demaille
8280e1797d Playing with Autoscan.
* configure.ac: Remove the old LIBOBJ tweaks.
(AC_REPLACE_FUNCS): Add strrchr and strtol.
* lib/strrchr.c: New.
* lib/strtol.c: New, from the Coreutils 4.5.1.
2002-09-27 13:19:59 +00:00
Akim Demaille
ae64af3556 Playing with Autoscan.
* m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
* lib/Makefile.am (libbison_a_SOURCES): No longer include
argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
* lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
Coreutils 4.5.1.
2002-09-27 13:03:32 +00:00
Paul Eggert
eb9568566a Sync with fileutils. 2002-08-12 14:25:24 +00:00
Paul Eggert
d5629ce34a Sync with diffutils. 2002-08-12 14:25:03 +00:00