check_arrival_add_next_nodes): Avoid using uninitialized variable.
* malloc/memusage.c (dest): Fix a bunch of warnings on 32-bit arches.
* sysdeps/i386/fpu/libm-test-ulps: Update for GCC 4.0.x.
2005-09-06 Paul Eggert <eggert@cs.ucla.edu>
Ulrich Drepper <drepper@redhat.com>
[BZ #1302]
Change bitset word type from unsigned int to unsigned long int,
as this has better performance on typical 64-bit hosts. Change
bitset type name to bitset_t.
* posix/regcomp.c (build_equiv_class, build_charclass):
(build_range_exp, build_collating_symbol):
Prefer bitset_t to re_bitset_ptr_t in prototypes, when the actual
argument is a bitset. This is merely a style issue, but it makes
it clearer that an entire array is expected.
(re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps,
lower_subexp): Adjust for new bitset_t definition.
(lower_subexp, parse_bracket_exp, built_charclass_op): Likewise.
* posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain,
bitset_not, bitset_merge, bitset_set_all, bitset_mask): Likewise.
* posix/regexec.c (check_dst_limits_calc_pos_1,
check_subexp_matching_top, build_trtable, group_nodes_into_DFAstates):
Likewise.
* posix/regcomp.c (utf8_sb_map): Don't assume initializer
== 0xffffffff.
* posix/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
All uses changed.
(BITSET_WORDS): Renamed from BITSET_UINTS. All uses changed.
(bitset_word_t): New type, replacing 'unsigned int' for bitset uses.
All uses changed.
(BITSET_WORD_MAX): New macro.
(bitset_set, bitset_clear, bitset_contain, bitset_empty,
(bitset_set_all, bitset_copy): Adjust for bitset_t change.
(bitset_empty, bitset_copy):
Prefer sizeof (bitset_t) to multiplying it out ourselves.
(bitset_not_merge): Remove; unused.
(bitset_contain): Return bool, not unsigned int with one bit on.
All callers changed.
* posix/regexec.c (build_trtable): Don't assume bitset_t has no
stricter alignment than re_node_set; do this by defining a new
internal type struct dests_alloc and using it to allocate memory.
(get_subexp): Likewise.
(check_arrival): Likewise.
(check_arrival_expand_ecl): Mark DFA parameter as const.
(check_arrival_expand_ecl_sub): Likewise.
(check_arrival_expand_ecl): Mark eclosure as const.
mbrtowc for very simple UTF-8 case.
2005-09-01 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex_internal.c (build_wcs_upper_buffer): Fix portability
bugs in int versus size_t comparisons.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex_internal.c (re_acquire_state): Make DFA pointer arg
a pointer-to-const.
(re_acquire_state_context): Likewise.
* posix/regex_internal.h: Adjust prototypes.
2005-08-31 Jim Meyering <jim@meyering.net>
* posix/regcomp.c (search_duplicated_node): Make first pointer arg
a pointer-to-const.
* posix/regex_internal.c (create_ci_newstate, create_cd_newstate,
register_state): Likewise.
* posix/regexec.c (search_cur_bkref_entry, check_dst_limits):
(check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
(group_nodes_into_DFAstates): Likewise.
* posix/regexec.c (re_search_internal): Simplify update of
rm_so and rm_eo by replacing "if (A == B) A += C - B;"
with the equivalent of "if (A == B) A = C;".
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (re_compile_internal): Change third parameter type
to size_t.
(init_dfa): Likewise. Make sure that arithmetic on pat_len doesn't
overflow.
* posix/regex_internal.h (struct re_dfa_t): Change type of nodes_alloc
and nodes_len to size_t.
* posix/regex_internal.c (re_dfa_add_node): Use size_t as type for
new_nodes_alloc. Check for overflow.
2005-08-31 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
(optimize_subexps, lower_subexp):
Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
since the signed shift might overflow. Use 1u<<31 instead.
* posix/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
Likewise.
* posix/regexec.c (check_dst_limits_calc_pos_1): Likewise.
(check_subexp_matching_top): Likewise.
* posix/regcomp.c (optimize_subexps, lower_subexp):
Use CHAR_BIT rather than 8, for clarity.
* posix/regexec.c (check_dst_limits_calc_pos_1):
(check_subexp_matching_top): Likewise.
* posix/regcomp.c (init_dfa): Make table_size unsigned, so that we
don't have to worry about portability issues when shifting it left.
Remove no-longer-needed test for table_size > 0.
* posix/regcomp.c (parse_sub_exp): Do not shift more bits than there
are in a word, as the resulting behavior is undefined.
* posix/regexec.c (check_dst_limits_calc_pos_1): Likewise;
in one case, a <= should have been an <, and in another case the
whole test was missing.
* posix/regex_internal.h (BYTE_BITS): Remove. All uses changed to
the standard name CHAR_BIT.
next_last_offset.
(struct re_dfa_t): Remove unused member states_alloc.
* posix/regcomp.c (init_dfa): Don't initialize unused members.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (set_regs): Don't alloca with an unbounded size.
alloca modernization/simplification for regex.
* posix/regex.c: Remove portability cruft for alloca. This no longer
needs to be at the start of the file, and can be moved into
regex_internal.h and simplified.
* posix/regex_internal.h: Include <alloca.h>.
(__libc_use_alloca) [!defined _LIBC]: New macro.
* posix/regexec.c (build_trtable): Remove "#ifdef _LIBC",
since the code now works outside glibc.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/regex.h: Remove use of _RE_ARGS.
2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (find_recover_state): Change "err" to "*err".
2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (regerror): Pointer args are 'restrict',
as per POSIX.
* posix/regex.h (regerror): Likewise.
* manual/pattern.texi (POSIX Regexp Compilation): Likewise.
Similarly for regcomp and regexec. Also, first 2 args of regexec
and 2nd arg of regerror are const.
* posix/regex.c: Do not include <sys/types.h>, as POSIX no longer
requires this. (The code never needed it.)
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regexec.c (sift_states_bkref): re_node_set_insert returns
int, not reg_errcode_t.
* posix/regex_internal.c (calc_state_hash): Put 'inline' before type,
since some broken compilers warn about it otherwise.
* posix/regcomp.c (create_initial_state): Remove duplicate decl.
2005-08-20 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex.h (_RE_ARGS): Remove. No longer needed, since we assume
C89 or better. All uses removed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex.c: Prevent using C++ compilers.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (duplicate_node): Return new index, not an error
code, and let the caller return REG_ESPACE if out of space. This
removes an uninitialied-variable warning with GCC 4.0.1, and also
avoids taking the address of a local variable. All callers
changed.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* include/time.h (__strptime_internal): Rename parameter to avoid
bogus compiler warning.
2005-08-19 Jim Meyering <jim@meyering.net>
* posix/regexec.c (proceed_next_node): Redo local variables to
avoid GCC shadowing warnings.
2005-09-06 Ulrich Drepper <drepper@redhat.com>
* posix/regex_internal.c (re_acquire_state): Minor code rearrangement.
(re_acquire_state_context): Likewise.
2005-08-19 Paul Eggert <eggert@cs.ucla.edu>
* posix/regex_internal.c (re_string_realloc_buffers):
(re_node_set_insert, re_node_set_insert_last, re_dfa_add_node):
Rename local variables to avoid GCC shadowing warnings.
2005-07-08 Eric Blake <ebb9@byu.net>
Paul Eggert <eggert@cs.ucla.edu>
* posix/regcomp.c (init_dfa): Store __btowc value in wint_t, not
wchar_t. Remove now-unnecessary cast.
(build_range_exp): Likewise.
Update.
2005-01-27 Paolo Bonzini <bonzini@gnu.org>
[BZ #558]
* posix/regcomp.c (calc_inveclosure): Return reg_errcode_t.
Initialize the node sets in dfa->inveclosures.
(analyze): Initialize inveclosures only if it is needed.
Check errors from calc_inveclosure.
* posix/regex_internal.c (re_dfa_add_node): Do not initialize
the inveclosure node set.
* posix/regexec.c (re_search_internal): If nmatch includes unused
subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here.
* posix/regcomp.c (parse_bracket_exp) [!RE_ENABLE_I18N]:
Do build a SIMPLE_BRACKET token.
* posix/regexec.c (transit_state_mb): Do not examine nodes
where ACCEPT_MB is not set.
Update.
2004-12-13 Paolo Bonzini <bonzini@gnu.org>
Separate parsing and creation of the NFA. Avoided recursion on
the (very unbalanced) parse tree.
[BZ #611]
* posix/regcomp.c (struct subexp_optimize, analyze_tree, calc_epsdest,
re_dfa_add_tree_node, mark_opt_subexp_iter): Removed.
(optimize_subexps, duplicate_tree, calc_first, calc_next,
mark_opt_subexp): Rewritten.
(preorder, postorder, lower_subexps, lower_subexp, link_nfa_nodes,
create_token_tree, free_tree, free_token): New.
(analyze): Accept a regex_t *. Invoke the passes via the preorder and
postorder generic visitors. Do not initialize the fields in the
re_dfa_t that represent the transitions.
(free_dfa_content): Use free_token.
(re_compile_internal): Analyze before UTF-8 optimizations. Do not
include optimization of subexpressions.
(create_initial_state): Fetch the DFA node index from the first node's
bin_tree_t *.
(optimize_utf8): Abort on unexpected nodes, including OP_DUP_QUESTION.
Return on COMPLEX_BRACKET.
(duplicate_node_closure): Fix comment.
(duplicate_node): Do not initialize the fields in the
re_dfa_t that represent the transitions.
(calc_eclosure, calc_inveclosure): Do not handle OP_DELETED_SUBEXP.
(create_tree): Remove final argument. All callers adjusted. Rewritten
to use create_token_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_bracket_exp,
build_charclass_op): Use create_tree or create_token_tree instead
of re_dfa_add_tree_node.
(parse_dup_op): Likewise. Also free the tree using free_tree for
"<re>{0}", and lower OP_DUP_QUESTION to OP_ALT: "a?" is equivalent
to "a|". Adjust invocation of mark_opt_subexp.
(parse_sub_exp): Create a single SUBEXP node.
* posix/regex_internal.c (re_dfa_add_node): Remove last parameter,
always perform as if it was 1. Do not initialize OPT_SUBEXP and
DUPLICATED, and initialize the DFA fields representing the transitions.
* posix/regex_internal.h (re_dfa_add_node): Adjust prototype.
(re_token_type_t): Move OP_DUP_PLUS and OP_DUP_QUESTION to the tokens
section. Add a tree-only code SUBEXP. Remove OP_DELETED_SUBEXP.
(bin_tree_t): Include a full re_token_t for TOKEN. Turn FIRST and
NEXT into pointers to trees. Remove ECLOSURE.
2004-12-28 Paolo Bonzini <bonzini@gnu.org >
[BZ #605]
* posix/regcomp.c (parse_bracket_exp): Do not modify DFA nodes
that were already created.
* posix/regex_internal.c (re_dfa_add_node): Set accept_mb field
in the token if needed.
(create_ci_newstate, create_cd_newstate): Set accept_mb field
from the tokens' field.
* posix/regex_internal.h (re_token_t): Add accept_mb field.
(ACCEPT_MB_NODE): Removed.
* posix/regexec.c (proceed_next_node, transit_states_mb,
build_sifted_states, check_arrival_add_next_nodes): Use
accept_mb instead of ACCEPT_MB_NODE.
2004-04-27 Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.h (struct re_dfastate_t): Make
word_trtable a pointer to the 512-item transition table.
* posix/regexec.c (build_trtable): Fill in either state->trtable
or state->word_trtable. Return a boolean indicating success.
(transit_state): Expect state->trtable to be a 256-item
transition table. Reorganize code to have less tests in
the common case, and to save an indentation level.
2004-12-07 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (proceed_next_node): Simplify treatment of epsilon
nodes. Pass the pushed node to push_fail_stack.
(push_fail_stack): Accept a single node rather than an array
of two epsilon destinations.
(build_sifted_states): Only walk non-epsilon nodes.
(check_arrival): Don't pass epsilon nodes to
check_arrival_add_next_nodes.
(check_arrival_add_next_nodes) [DEBUG]: Abort if an epsilon node is
found.
(check_node_accept): Do expensive checks later.
(add_epsilon_src_nodes): Cache result of merging the inveclosures.
* posix/regex_internal.h (re_dfastate_t): Add non_eps_nodes and
inveclosure.
(re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at,
re_string_context_at, re_string_peek_byte_case,
re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
Declare as pure.
* posix/regex_internal.c (create_newstate_common): Remove.
(register_state): Move part of it here. Initialize non_eps_nodes.
(free_state): Free inveclosure and non_eps_nodes.
(create_cd_newstate, create_ci_newstate): Allocate the new
re_dfastate_t here.
2004-12-01 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c (free_dfa_content, init_dfa): Remove
references to re_dfa_t's subexps field.
(parse_sub_exp, parse_expression): Do not use it. Use
completed_bkref_map instead.
(create_initial_state, peek_token): Store a backreference \N
with opr.idx = N-1.
* posix/regexec.c (proceed_next_node, check_dst_limits, get_subexp):
Likewise.
(check_subexp_limits): Remove useless condition.
* posix/regex_internal.h (re_subexp_t): Remove.
(re_dfa_t): Remove subexps and subexps_alloc field, add
completed_bkref_map.
Update.
2004-11-18 Jakub Jelinek <jakub@redhat.com>
[BZ #544]
* posix/regex.h (RE_NO_SUB): New define.
* posix/regex_internal.h (OP_DELETED_SUBEXP): New.
(re_dfa_t): Add subexp_map.
* posix/regcomp.c (struct subexp_optimize): New type.
(optimize_subexps): New routine.
(re_compile_internal): Call it.
(re_compile_pattern): Set preg->no_sub to 1 if RE_NO_SUB.
(free_dfa_content): Free subexp_map.
(calc_inveclosure, calc_eclosure): Skip OP_DELETED_SUBEXP
nodes.
* posix/regexec.c (re_search_internal): If subexp_map
is not NULL, duplicate registers as needed.
* posix/Makefile: Add rules to build and run tst-regex2.
* posix/tst-regex2.c: New test.
* posix/rxspencer/tests: Fix last two tests (\0 -> \1).
Add some new tests for nested subexpressions.
2004-11-12 Ulrich Drepper <drepper@redhat.com>
* posix/Makefile (tests): Add bug-regex24.
* posix/bug-regex24.c: New file.
2004-11-12 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (check_dst_limits_calc_pos_1): Use the map to
cut recursive paths. Make exit condition more precise.
(match_ctx_add_entry): Initialize the map.
* posix/regex_internal.h (struct re_backref_cache_entry): Add a map of
reachable subexpression nodes from each backreference cache entry.
2004-11-09 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (transit_state): Remove the check for
out-of-bounds buffers.
(check_matching): Check here for out-of-bounds buffers.
(re_search_internal): Store into match_kind a set of bits
indicating which incantation of fastmap scanning must be
used. Use a switch statement instead of multiple ifs.
Exit the final "for (;;)" with goto free_return unless
the match succeeded, thus simplifying some conditionals.
* posix/regex_internal.c (re_string_reconstruct,
re_string_context_at): Add several branch predictions for
case-sensitive matching and no transition table being used.
2004-11-10 Ulrich Drepper <drepper@redhat.com>
* posix/tst-waitid.c: Don't use error to print error message, they
won't end up in the .out file.
* nscd/nscd_getgr_r.c: Likewise. Make map externally visible.
* nscd/nscd_gethst_r.c: Likewise.
2004-11-08 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (utf8_sb_map): Define.
(free_dfa_content): Don't free dfa->sb_char if it's a pointer to
utf8_sb_map.
(init_dfa): Use utf8_sb_map instead of initializing memory when the
encoding is UTF-8.
* posix/regcomp.c (init_dfa): Get the codeset name outside glibc as
well. Check if it is spelled UTF8 as well as UTF-8, and check
case-insensitively. Set dfa->map_notascii manually when outside
glibc.
* posix/regex_internal.c (build_wcs_upper_buffer) [!_LIBC]: Enable
optimizations based on map_notascii.
* posix/regex_internal.h [HAVE_LANGINFO_H || HAVE_LANGINFO_CODESET
|| _LIBC]: Include langinfo.h.
* posix/regex_internal.h (struct re_backref_cache_entry): Add "more"
field.
* posix/regexec.c (check_dst_limits): Hoist computation of the source
and destination bkref_idx out of the loop. Pass it to
check_dst_limits_calc_pos.
(check_dst_limits_calc_pos_1): New function, containing the recursive
loop of check_dst_limits_calc_pos; uses the "more" field of
struct re_backref_cache to control the loop.
(check_dst_limits_calc_pos): Store into "boundaries" the position
relative to lim's start and end positions. Do not accept eclosures,
accept bkref_idx instead. Call check_dst_limits_calc_pos_1 to do the
work.
(sift_states_bkref): Use the "more" field of struct re_backref_cache
to control the loop. A big "if" was turned into a continue and the
function was reindented.
(get_subexp): Use the "more" field of struct re_backref_cache
to control the loop.
(match_ctx_add_entry): Initialize the bkref_ents' "more" field.
(search_cur_bkref_entry): Return -1 if out of bounds.
* posix/regexec.c (empty_set): Remove.
(sift_states_backward): Remove cur_src variable. Move inner loop
to build_sifted_states.
(build_sifted_states): Extract from sift_states_backward. Do not
use empty_set.
(update_cur_sifted_state): Do not use empty_set. Special case
dest_nodes->nelem == 0.
2004-11-03 Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.h (struct re_backref_cache_entry): Remove flag
field.
(struct re_sift_context_t): Remove cur_bkref, cls_subexp_idx,
check_subexp fields. Move limits last.
* posix/regexec.c (match_ctx_clear_flag): Remove.
(sift_ctx_init): Remove check_subexp parameter. Do not set removed
fields. Callers adjusted.
(expand_bkref_cache): Remove last_str parameter. Callers adjusted.
(re_search_internal): Remove fast_translate variable.
(update_cur_sifted_state): Pass candidates as the final parameter
to sift_states_bkref.
(sift_states_bkref): Change last unused parameter to be "candidates",
do not fetch candidates into a local variable.
Remove dead test for "node == sctx->bkref", and the cur_bkref_idx
variable.
Remove loops that set/reset the flag field of backref cache entries.
(check_arrival_add_next_nodes): Use a signed int to hold the return
value of re_node_set_insert.
(group_nodes_into_DFAstates): Likewise.
(match_ctx_add_entry): Do not set the flag field of the new entry.
2004-03-10 Richard Henderson <rth@redhat.com>
* sysdeps/generic/errno.c: Disable versioning for rtld.
* sysdeps/generic/Makefile (elf/shared): Add unwind-pe.
* sysdeps/generic/unwind-pe.c: New file.
* sysdeps/generic/unwind-pe.h: Only prototypes for _LIBC without
_LIBC_DEFINITIONS.
* posix/regexec.c: Likewise.
2004-02-29 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (transit_state): Don't handle state == NULL.
Move state log and backreference management...
(merge_state_with_log): ... to this function.
(find_recover_state): New function.
(check_matching): Use find_recover_state to get a non-NULL
state when an invalid state is reached. Compute the amount
of initial characters to be skipped less conservatively when
multi-byte character sets are in use. Do not check
dfa->nbackref if the state log is NULL. Initialize err.
(acquire_init_state_context): Expect err to be initialized.
Fix spacing.
2004-03-05 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/sparc32/elf/start.S: Handle PIEs.
* sysdeps/sparc/sparc64/elf/start.S: Likewise.
2004-02-02 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (check_matching): Add P_MATCH_FIRST parameter.
(re_search_internal): Pass new parameter to check_matching.
(check_matching): Unless a parenthesized group is found at the
beginning of the regexp, advance P_MATCH_FIRST until we entered
a state different from the initial state.
* posix/regexec.c (get_subexp): Only set bkref_str after the first
loop, use buf + bkref_str_off in the loop instead.
* posix/bug-regex11.c (tests): Add 3 new tests.
* posix/regexec.c (clean_state_log_if_need): Rename to...
(clean_state_log_if_needed): ...this.
(transit_state_mb, get_subexp_sub): Adjust callers.
* posix/regexec.c (re_copy_regs): Allocate start and end array in
one block.
(push_fail_stack): Add missing check for failed memory allocation.
_IO_peekc_unlocked, _IO_ptc_unlocked, _IO_getwc_unlocked, and
overflow for 0 as argument. Raise Invalid exception for negative args.
2003-12-23 Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.c (re_dfa_add_node): Initialize opt_subexp.
* posix/regex_internal.h (re_token_type_t): Put OP_DUP_PLUS
among the tokens, rather than among the epsilon-transiting nodes.
(re_token_t): Add the opt_subexp flag.
* posix/regcomp.c (optimize_utf8, calc_first,
calc_next, calc_epsdest): Don't consider OP_DUP_PLUS.
(mark_opt_subexp, mark_opt_subexp_iter): New functions.
(parse_dup_op): Mostly rewritten, lowering OP_DUP_PLUS to
OP_DUP_ASTERISK and marking optional subexpressions
as such using mark_opt_subexp.
* posix/regexec.c (set_regs): Initialize PREV_INDEX_MATCH
and pass it to update_regs.
(update_regs): Use the PREV_INDEX_MATCH parameter, together
with the opt_subexp flag, in order to discard a final empty
match of a repeated subexpression.
* posix/BOOST.tests: Adjust test vectors.
* posix/PCRE.tests: Likewise.
* posix/rxspencer/tests: Likewise.
2003-12-17 Paolo Bonzini <bonzini@gnu.org>
2003-12-16 Paolo Bonzini <bonzini@gnu.org>
2003-12-17 Paolo Bonzini <bonzini@gnu.org>
2003-12-16 Jakub Jelinek <jakub@redhat.com>
2003-04-06 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2003-02-20 Paolo Bonzini <bonzini@gnu.org>
2003-01-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
2003-01-09 Richard Henderson <rth@redhat.com>
2003-01-09 Richard Henderson <rth@redhat.com>
2003-01-03 Paul Eggert <eggert@twinsun.com>
2002-12-16 Jakub Jelinek <jakub@redhat.com>
Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (group_nodes_into_DFAstates): Never produce
dests_ch items that are empty.
2003-11-28 Ulrich Drepper <drepper@redhat.com>
* sysdeps/x86_64/fpu/libm-test-ulps: Add some more minor changes
to compensate other setup.
2003-11-27 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/fpu/libm-test-ulps: Add ulps for new atan2 test.
* math/libm-test.inc (atan2_test): Add test that run infinitly.
Reported by "Willus" <etc231etc231@willus.com>.
2003-11-27 Michael Matz <matz@suse.de>
* sysdeps/ieee754/dbl-64/mpsqrt.c (fastiroot): Fix 64-bit problem
with wrong types.
2003-11-28 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (acquire_init_state_context): Make inline.
Add always_inline attribute.
(check_matching): Add BE macro. Move if (cur_state->has_backref)
into if (dfa->nbackref).
(sift_states_backward): Fix comment.
(transit_state): Add BE macro. Move if (next_state->has_backref)
into if (dfa->nbackref && next_state). Don't check for next_state
!= NULL twice.
* posix/regcomp.c (peek_token): Use opr.ctx_type instead of opr.idx
for ANCHOR.
(parse_expression): Only call init_word_char if word context will be
needed.
* posix/bug-regex11.c (tests): Add new tests.
* posix/tst-regex.c: Include getopt.h.
(timing): New variable.
(main): Set timing to 1 if --timing argument is present.
Add 2 new tests.
(run_test, run_test_backwards): Handle timing.
2003-11-27 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.h (re_string_t): Remove mbs_case field.
Add offsets, valid_raw_len, raw_len, raw_stop, mbs_allocated and
offsets_needed fields. Change icase, is_utf8 and map_notascii
type from int bitfield to unsigned char.
(MBS_ALLOCATED, MBS_CASE_ALLOCATED): Remove.
(build_wcs_upper_buffer): Change prototype to return int.
(re_string_peek_byte_case, re_string_fetch_byte_case): Remove
defines, add prototypes.
* posix/regex_internal.c (re_string_allocate): Don't initialize
stop here. Don't initialize mbs_case. Set valid_raw_len.
Use mbs_allocated instead of MBS_* macros.
(re_string_construct): Don't initialize stop and valid_len here.
Don't initialize mbs_case. Use mbs_allocated instead of MBS_*
macros. Reallocate buffers if build_wcs_upper_buffer converted
too few bytes. Set valid_len to bufs_len only for single byte
no translation and set in that case valid_raw_len as well.
(re_string_realloc_buffers): Reallocate offsets if not NULL.
Use mbs_allocated instead of MBS_ALLOCATED. Don't reallocate
mbs_case.
(re_string_construct_common): Initialize raw_len, mbs_allocated,
stop and raw_stop.
(build_wcs_buffer): Apply pstr->trans before mbrtowc instead of
after it. Set valid_raw_len. Don't set mbs_case.
(build_wcs_upper_buffer): Return REG_NOERROR or REG_ESPACE.
Only use the fast path if !pstr->offsets_needed. Apply pstr->trans
before mbrtowc instead of after it. If upper case character
uses different number of bytes than lower case, goto to the
slow path. Don't call towupper unnecessarily twice. Set
valid_raw_len as well. Handle in the slow path the case if
lower and upper case use different number of characters.
Don't set mbs_case.
(re_string_skip_chars): Use valid_raw_len instead of valid_len.
(build_upper_buffer): Don't set mbs_case. Add BE macro. Set
valid_raw_len.
(re_string_translate_buffer): Set mbs instead of mbs_case. Set
valid_raw_len.
(re_string_reconstruct): Use raw_len/raw_stop to initialize
len/stop. Clear valid_raw_len and offsets_needed when clearing
valid_len. Use mbs_allocated instead of MBS_* macros.
Check original offset against valid_raw_len instead of valid_len.
Remove mbs_case handling. Adjust valid_raw_len together with
valid_len. If is_utf8 and looking for tip context, apply
pstr->trans first. If buffers start with partial multi-byte
character, initialize mbs array as well if mbs_allocated.
Check return value of build_wcs_upper_buffer.
(re_string_peek_byte_case): New function.
(re_string_fetch_byte_case): New function.
(re_string_destruct): Use mbs_allocated instead of MBS_ALLOCATED.
Don't free mbs_case. Free offsets.
* posix/regcomp.c (init_dfa): Only check if charset name is UTF-8
if mb_cur_max == 6.
* posix/regexec.c (re_search_internal): Initialize input.raw_stop
as well. Use valid_raw_len instead of valid_len when looking
through fastmap. Adjust registers through input.offsets.
(extend_buffers): Allow build_wcs_upper_buffer to fail.
* posix/bug-regex18.c (tests): Enable #ifdefed out tests. Add new
tests.