Age | Commit message (Collapse) | Author |
|
* include/wctype.h: Add libc_hidden_proto for __towctrans.
* wctype/towctrans.c: Add libc_hidden_def.
* libio/memstream.c (open_memstream): Use _IO_init with INTUSE.
* posix/regexec.c (transit_state): Remove unused variable
next_state.
* posix/regcomp.c (init_dfa): Use __btowc instead of btowc.
|
|
2004-02-26 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (parse_expression): Avoid duplication in calls
to build_charclass_op.
* posix/regcomp.c (parse_expression): Add cast to (const unsigned
char *) in calls to `build_charclass_op'.
|
|
2004-02-06 Andreas Schwab <schwab@suse.de>
* posix/regcomp.c (build_range_exp): Fix off-by-one.
(parse_bracket_exp): Likewise.
|
|
|
|
2004-01-12 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c [_LIBC && !RE_ENABLE_I18N]:
Drop code to support this, it is never true.
(build_range_exp) [!_LIBC]: Do not create a range
in MBCSET for a single-byte character set.
(build_range_exp) [_LIBC]: Do not create a range
in MBCSET for a single-byte character set without
collation elements.
(init_dfa): Do not conditionalize on _LIBC, it
just makes the code less clear.
(parse_bracket_exp): Use NON_MATCH variable in
addition to "mbcset->non_match", not as an
alternative.
(build_charclass_op): rename NOT parameter to
NON_MATCH, use it instead of declaring a variable.
(parse_bracket_exp) [!_LIBC]: Pass NULL for MBCSET
if the character set is single-byte.
|
|
2004-01-14 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (peek_token_bracket): Check remaining
string length before re_string_peek_byte (x, 1).
(parse_bracket_symbol): Likewise.
* posix/regex_internal.h (re_string_is_single_byte_char): Return
true at last byte in the string.
* posix/bug-regex22.c (main): Add new test.
|
|
allocated, fastmap and translate fields.
(build_charclass, buld_charclass_op): Change first
argument to unsigned RE_TRANSLATE_TYPE.
|
|
2004-01-02 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.c (re_node_set_insert): Remove unused variables.
* posix/regex_internal.h (re_dfa_t): Add syntax field.
* posix/regcomp.c (parse): Initialize dfa->syntax.
* posix/regexec.c (acquire_init_state_context,
prune_impossible_nodes, check_matching, check_halt_state_context,
proceed_next_node, sift_states_iter_mb, sift_states_backward,
update_cur_sifted_state, sift_states_bkref, transit_state,
transit_state_sb, transit_state_mb, transit_state_bkref,
get_subexp, get_subexp_sub, check_arrival, expand_bkref_cache,
build_trtable): Remove preg argument, add dfa argument instead
and remove dfa = preg->buffer initialization in the body.
Adjust all callers.
(check_node_accept_bytes, group_nodes_into_DFAstates,
check_node_accept): Likewise. Use dfa->syntax instead of
preg->syntax.
(check_arrival_add_next_nodes): Remove preg argument.
* posix/regex_internal.h (re_match_context_t): Make input
re_string_t instead of a pointer to it.
* posix/regex_internal.c (re_string_construct_common): Don't clear
pstr here...
(re_string_construct): ... but only here.
* posix/regexec.c (match_ctx_init): Remove input argument. Don't
initialize fields to zero.
(re_search_internal): Move input into mctx.input.
(acquire_init_state_context, check_matching,
check_halt_state_context, proceed_next_node,
clean_state_log_if_needed, sift_states_bkref, sift_states_iter_mb,
transit_state, transit_state_sb, transit_state_mb,
transit_state_bkref, get_subexp, check_arrival,
check_arrival_add_next_nodes, check_node_accept, extend_buffers):
Change mctx->input into &mctx->input and mctx->input->field into
mctx->input.field.
2004-01-02 Jakub Jelinek <jakub@redhat.com>
Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.h (re_const_bitset_ptr_t): New type.
(re_string_t): Add newline_anchor, word_char and word_ops_used fields.
(re_dfa_t): Change word_char type to bitset. Add word_ops_used field.
(re_string_context_at, re_string_reconstruct): Remove last argument.
* posix/regex_internal.c (re_string_allocate): Initialize
pstr->word_char and pstr->word_ops_used.
(re_string_context_at): Remove newline_anchor argument.
Use input->newline_anchor instead, swap && conditions.
Only use IS_WIDE_WORD_CHAR if input->word_ops_used != 0.
Use input->word_char bitmap instead of IS_WORD_CHAR.
(re_string_reconstruct): Likewise.
Adjust re_string_context_at caller.
* posix/regexec.c (acquire_init_state_context,
check_halt_state_context, transit_state, transit_state_sb,
transit_state_mb, transit_state_bkref, check_arrival,
check_node_accept): Adjust re_string_context_at and
re_string_reconstruct callers.
(re_search_internal): Likewise. Set input.newline_anchor.
(build_trtable): Use dfa->word_char bitmap instead of IS_WORD_CHAR.
* posix/regcomp.c (init_word_char): Change return type to void.
Set dfa->word_ops_used.
(free_dfa_content): Don't free dfa->word_char.
(parse_expression): Remove error handling for init_word_char.
|
|
* posix/regcomp.c (mark_opt_subexp_iter): Declare IDX as int.
* posix/regexec.c (re_copy_regs): Fix testing for failed allocation.
_IO_peekc_unlocked, _IO_putc_unlocked, _IO_getwc_unlocked, and
|
|
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>
|
|
2003-12-22 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c: Remove C99-ism.
* posix/tst-rxspencer.c: Likewise.
Based on a patch by Alex Davis <alex14641@yahoo.com>.
2002-12-17 Paolo Bonzini <bonzini@gnu.org>
* posix/regex_internal.h [!_LIBC] (internal_function): Define.
(re_string_allocate, re_string_construct, re_string_reconstruct,
re_string_realloc_buffers, build_wcs_buffer,
build_wcs_upper_buffer, build_upper_buffer,
re_string_translate_buffer, re_string_destruct,
re_string_elem_size_at, re_string_char_size_at,
re_string_wchar_at, re_string_context_at,
re_node_set_alloc, re_node_set_init_1
re_node_set_init_2, re_node_set_init_copy,
re_node_set_add_intersect, re_node_set_init_union,
re_node_set_merge, re_node_set_insert
re_node_set_compare, re_node_set_contains
re_node_set_remove_at, re_dfa_add_node,
re_acquire_state, re_acquire_state_context,
free_state): Add internal_function to declaration.
* posix/regexec.c (match_ctx_init, match_ctx_clean,
match_ctx_free, match_ctx_free_subtops,
match_ctx_add_entry, search_cur_bkref_entry,
match_ctx_clear_flag, match_ctx_add_subtop,
match_ctx_add_sublast, sift_ctx_init,
re_search_internal, re_search_2_stub, re_search_stub,
re_copy_regs, acquire_init_state_context,
prune_impossible_nodes, check_matching,
check_halt_node_context, check_halt_state_context
update_regs, proceed_next_node, push_fail_stack,
pop_fail_stack, set_regs, free_fail_stack_return,
sift_states_iter_mb, sift_states_backward
update_cur_sifted_state, add_epsilon_src_nodes,
sub_epsilon_src_nodes, check_dst_limits,
check_dst_limits_calc_pos, check_subexp_limits,
sift_states_bkref, clean_state_log_if_need,
merge_state_array, transit_state,
check_subexp_matching_top, transit_state_sb,
transit_state_mb, transit_state_bkref,
get_subexp, get_subexp_sub, find_subexp_node,
check_arrival, check_arrival_add_next_nodes,
find_collation_sequence_value, check_arrival_expand_ecl,
check_arrival_expand_ecl_sub, expand_bkref_cache,
build_trtable, check_node_accept_bytes, extend_buffers,
group_nodes_into_DFAstates, check_node_accept): Likewise.
* posix/regex_internal.c (re_string_construct_common,
re_string_skip_chars, create_newstate_common,
register_state, create_ci_newstate, create_cd_newstate,
calc_state_hash): Likewise.
(re_string_peek_byte_case, re_fetch_byte_case): Change
declaration from ANSI to K&R.
2002-12-16 Paolo Bonzini <bonzini@gnu.org>
* posix/regexec.c (build_trtable): Don't allocate the trtable
until state->word_trtable is known. Don't hardcode UINT_BITS
iterations on each bitset item.
|
|
Optimize. (calc_first): Fix comment.
(duplicate_node, duplicate_node_closure): Revert 2003-11-24 changes.
|
|
* posix/regexec.c (check_arrival): Remove duplicate test.
2003-12-15 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c: Make !RE_ENABLE_I18N work again.
* posix/regex_internal.c: Likewise.
* posix/regexec.c: Likewise.
Patch by Paolo Bonzini.
2003-12-14 Paolo Bonzini <bonzini@gnu.org>
|
|
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.
|
|
2003-11-25 Ulrich Drepper <drepper@redhat.com>
* posix/runptests.c (main): Make errors fatal.
* posix/PTESTS: One test in GA135 and GA136 check functionality
which seems not guaranteed.
2003-11-25 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (re_search_internal): If prune_impossible_nodes
returned REG_NOMATCH, set match_last to -1. Don't initialize
pmatch[0] needlessly. Fix comment.
(prune_impossible_nodes): Don't segfault on NULL state_log entry.
(set_regs): Fix comment.
* posix/regcomp.c (parse_bracket_exp): Only set has_plural_match
if adding both SIMPLE_BRACKET and COMPLEX_BRACKET.
(build_charclass_op): Set has_plural_match if adding both
SIMPLE_BRACKET and COMPLEX_BRACKET.
* posix/bug-regex11.c (tests): Fix register values for one commented
out test. Add new tests.
* posix/regex_internal.c (re_string_allocate): Make sure init_len
is at least dfa->mb_cur_max.
(re_string_reconstruct): If is_utf8, don't fall back into
re_string_skip_chars just because idx points into a middle of
valid UTF-8 character. Instead, set the wcs bytes which correspond
to the partial character bytes to WEOF.
* posix/regexec.c (re_search_internal): Allocate input.bufs_len + 1
instead of dfa->nodes_len + 1 state_log entries initially.
* posix/bug-regex20.c (main): Uncomment backwards case insensitive
tests.
|
|
2003-11-24 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.h (re_token_t): Add word_char bit. Add
comment.
(re_dfa_t): Add sb_char field.
(bitset_mask): New function.
* posix/regcomp.c (free_dfa_content): Free sb_char.
(init_dfa): Don't initialize word_char unnecessarily.
Initialize sb_char.
(duplicate_node): Don't duplicate !word_char CHARACTERs with
NEXT_WORD_CONSTRAINT constraint or word_char CHARACTERs with
NEXT_NOTWORD_CONSTRAINT. Return -1 in *new_idx instead.
(duplicate_node_closure): Handle clone_dest == -1 from
duplicate_node.
(peek_token): Initialize word_char bit.
(parse_expression, parse_dup_op): Add comments.
(parse_bracket_exp): Don't set bitmask bits for multi-byte char
starting bytes here at the beginning. Mask off the bits right
before creating SIMPLE_BRACKET.
(build_charclass_op): Likewise.
* posix/regexec.c (group_nodes_into_DFAstates) <case OP_PERIOD>: Only
set accept bits for single-byte characters.
(group_nodes_into_DFAstates): Don't rely on characters 0 .. 127
being single byte encoded and the rest multi-byte.
* posix/bug-regex19.c (tests): Add new tests.
(do_mb_tests): Initialize t to *test.
(main): Fail even on do_mb_tests errors.
|
|
* posix/regexec.c: Correct several memory allocation problems.
Add more BE.
* posix/regex_internal.c: Likewise.
* posix/regcomp.c: Likewise.
|
|
* posix/regcomp.c (duplicate_node): Remove unnecessary local variable.
* posix/regcomp.c (re_dfa_add_tree_node): Make fourth parameter a
pointer. Adjust callers.
|
|
2003-11-21 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (fetch_token): Change interface to match
peek_token. This avoid some copying and reduces code size.
|
|
2003-11-19 Jakub Jelinek <jakub@redhat.com>
* posix/regexec.c (extend_buffers): Don't allocate
twice as big state_log as needed. Don't modify pstr->valid_len
for mb_cur_max == 1 !icase !trans.
* posix/regcomp.c (free_bin_tree): Removed.
(create_tree): Add dfa argument. Don't call re_malloc for
each tree, instead allocate from str_tree_storage.
(re_dfa_add_tree_node): New function.
(free_dfa_content): Handle freeing if dfa->nodes == NULL
or dfa->state_table == NULL.
(re_compile_internal): Call free_dfa_content if init_dfa
fails. Call free_workarea_compile, re_string_destruct
and free_dfa_content for most of the other failure paths.
(init_dfa): Initialize str_tree_storage_idx.
Don't clear any fields on allocation failure.
(free_workarea_compile): Free str_tree_storage chunks
instead of free_bin_tree (dfa->str_tree).
(parse): Call re_dfa_add_tree_node instead of re_dfa_add_node
followed by create_tree. Add dfa argument to remaining
create_tree calls. Remove new_idx variable. Remove calls
to free_bin_tree.
(parse_reg_exp, parse_branch, parse_expression, parse_sub_exp,
parse_dup_op, parse_bracket_exp, build_charclass_op): Likewise.
(duplicate_tree): Remove calls to free_bin_tree, add dfa
argument to create_tree.
* posix/regex_internal.h (BIN_TREE_STORAGE_SIZE): Define.
(bin_tree_storage_t): New type.
(re_dfa_t): Add str_tree_storage and str_tree_storage_idx
fields.
* posix/Makefile (tests): Add bug-regex21.
(generated): Add bug-regex21-mem, bug-regex21.mtrace,
tst-rxspencer-mem and tst-rxspencer.mtrace.
(tests): Depend on $(objpfx)bug-regex21-mem
and $(objpfx)tst-rxspencer-mem.
(bug-regex21-ENV, tst-rxspencer-ENV): Set.
($(objpfx)bug-regex21-mem, $(objpfx)tst-rxspencer-mem): New.
* posix/tst-rxspencer.c (main): Add call to mtrace.
Free line at the end.
* posix/bug-regex21.c: New test.
* posix/regexec.c (get_subexp): After calling get_subexp_sub
|
|
* posix/regex_internal.h (re_token_type_t): Remove unused ALT,
END_OF_RE_TOKEN_T and SUBEXP. Reorder values. Add OP_UTF8_PERIOD
and EPSILON_BIT.
(IS_EPSILON_NODE): Just test if EPSILON_BIT is set.
(ACCEPT_MB_NODE): Return 1 for OP_UTF8_PERIOD as well.
* posix/regex_internal.c (create_ci_newstate, create_cd_newstate):
Handle OP_UTF8_PERIOD.
(re_string_reconstruct): Set valid_len for single byte char searching
with no translation and case sensitivity.
* posix/regcomp.c (re_compile_fastmap_iter, calc_first): Handle
OP_UTF8_PERIOD.
(re_compile_internal): Don't call optimize_utf8 if preg->translate
!= NULL.
(optimize_utf8): Remove BACK_SLASH case.
Transform OP_PERIOD into OP_UTF8_PERIOD if the searching can be
optimized.
(parse_bracket_exp): Don't create SIMPLE_BRACKET if it doesn't have
any bits set and COMPLEX_BRACKET is used.
* posix/regexec.c (transit_state_mb): Fix comment typo.
(group_nodes_into_DFAstates, check_node_accept): Handle
OP_UTF8_PERIOD.
(check_node_accept_bytes): Likewise. Reorder slightly so that
re_string_char_size_at and re_string_elem_size_at are called
only when needed.
* posix/bug-regex20.c (BRE, ERE): Define.
(tests): Use them to make lines shorter. Expect . to be
optimized. Add lots of new tests.
(main): Run (ATM just case sensitive) test with backwards searching
as well.
2003-11-18 Jakub Jelinek <jakub@redhat.com>
|
|
2003-11-17 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (optimize_utf8): Optimize multi-byte chars as
well.
* posix/bug-regex20.c (tests): Add new tests. Multi-byte char
followed by dup operator is expected to be optimized.
* posix/regexec.c (check_node_accept_bytes): Move nrules and j
variables to the block where they are only used, initialize
nrules only immediately before using it.
2003-11-15 Andreas Jaeger <aj@suse.de>
* sysdeps/x86_64/fpu/s_scalbnl.S: New file.
* sysdeps/x86_64/fpu/s_truncl.S: New file.
* sysdeps/x86_64/fpu/s_nearbyintl.S: New file.
* sysdeps/x86_64/fpu/s_floorl.S: New file.
* sysdeps/x86_64/fpu/s_ilogbl.S: New file.
* sysdeps/x86_64/fpu/e_remainderl.S: New file.
* math/libm-test.inc (floor_test): Test also ±0.25.
(ceil_test): Test -0.25.
|
|
* posix/regex_internal.h: Add forward declaration of re_dfa_t.
Replace last two parameters of re_string_allocate and
re_string_construct with pointer to DFA.
(re_dfa_t): Add map_notascii field.
* posix/regcomp.c (re_compile_internal): Add call of
re_string_construct.
(init_dfa): Initialize mpa_notascii.
* posix/regex_internal.c: Adjust definitions of re_string_allocate
and re_string_construct.
Pass DFA to re_string_construct. Adjust definition. Initialize
map_notascii field.
(build_wcs_upper_buffer): If map_notascii is zero use simplfied
method to map ASCII values to upper case.
* posix/regex.c: Include localeinfo.h.
* posix/regexec.c: Adjust call of re_string_allocate.
* locale/langinfo.h: Add _NL_CTYPE_MAP_TO_NONASCII.
* locale/localeinfo.h (LIMAGIC): Change value.
* locale/categories.def. Add entry for _NL_CTYPE_MAP_TO_NONASCII.
* locale/C-ctype.h: Likewise.
* locale/programs/ld-ctype.c: Compute whether any mapping maps from
ASCII to non-ASCII value. Write out that value.
|
|
2003-11-13 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (optimize_utf8): Optimize even if SIMPLE_BRACKET
with no bits set for >= 0x80 chars is seen.
* posix/bug-regex20.c (tests): Add new tests. Expect [ABC] to be
optimized.
(main): Run all tests with RE_ICASE as well.
|
|
* posix/regcomp.c (parse_bracket_exp): Don't check for range if
this is no option given the first token.
* posix/regcomp.c (parse_bracket_exp): Fix test for EOS after
hyphen in range expression. Return EBRACK in this case.
* posix/regcomp.c (parse_bracket_element): Reject hyphens unless
we expect them or it's the last element in the bracket expression.
Indicated by new parameter. Adjust all callers.
Prettier error messages.
|
|
|
|
2003-11-13 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (parse_expression): In BRE consecutive
duplications are not allowed.
|
|
* posix/regcomp.c (parse_bracket_exp): If end of expression is
seen, return EBRACK error, not BADPAT.
|
|
* posix/regcomp.c (parse_expression): If token is OP_OPEN_DUP_NUM
and RE_CONTEXT_INVALID_DUP syntax flag is set, fail.
* posix/regex.h (RE_CONTEXT_INVALUD_OPS): New macro.
(RE_SYNTAX_POSIX_BASIC): Use RE_CONTEXT_INVALUD_OPS.
* posix/regcomp.c (parse_sub_exp): In case of not-matching ( )
return REG_EPAREN.
|
|
* posix/regcomp.c (optimize_utf8): New function.
(re_compile_fastmap_iter): Use dfa->mb_cur_max > 1 instead
of !icase.
(re_compile_internal): Call optimize_utf8 if not case insensitive
and in UTF-8 locale.
* posix/regex_internal.h: Ifdef out some prototypes if
RE_NO_INTERNAL_PROTOTYPES is defined to shut up warnings.
* posix/Makefile (tests): Add bug-regex20.
(bug-regex20-ENV): Add LOCPATH.
* posix/bug-regex20.c: New test.
2003-11-12 Jakub Jelinek <jakub@redhat.com>
|
|
2003-11-12 Jakub Jelinek <jakub@redhat.com>
* io/ftw.c (NFTW_NEW_NAME, NFTW_OLD_NAME): Add prototypes.
2003-11-12 Jakub Jelinek <jakub@redhat.com>
* posix/tst-regex.c (umemlen): New variable.
(test_expr): Add expectedicase argument. Test case insensitive
searches as well as backwards searches (case sensitive and
insensitive) too.
(run_test): Add icase argument. Use it to compute regcomp flags.
(run_test_backwards): New function.
(main): Cast read to size_t to avoid warning. Set umemlen.
Add expectedicase arguments to test_expr.
* posix/regex_internal.c (re_string_reconstruct): If is_utf8,
find previous character by walking back instead of converting
all chars from beginning.
2003-11-12 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.h (struct re_string_t): Add is_utf8
and mb_cur_max fields.
(struct re_dfa_t): Likewise. Reorder fields to make structure
smaller on 64-bit arches.
(re_string_allocate, re_string_construct): Add mb_cur_max and
is_utf8 arguments.
(re_string_char_size_at, re_string_wchar_at): Use pstr->mb_cur_max
instead of MB_CUR_MAX.
* posix/regcomp.c (re_compile_fastmap_iter): Use dfa->mb_cur_max
instead of MB_CUR_MAX.
(re_compile_internal): Pass new arguments to re_string_construct.
(init_dfa): Initialize mb_cur_max and is_utf8 fields.
(peek_token, peek_token_bracket): Use input->mb_cur_max instead
of MB_CUR_MAX.
(parse_expression, parse_bracket_exp, parse_charclass_op): Use
dfa->mb_cur_max instead of MB_CUR_MAX.
* posix/regex_internal.c (re_string_construct_common): Add
mb_cur_max and is_utf8 arguments. Initialize fields with them.
(re_string_allocate, re_string_construct): Add mb_cur_max and
is_utf8 arguments, pass them to re_string_construct_common.
Use mb_cur_max instead of MB_CUR_MAX.
(re_string_realloc_buffers): Use pstr->mb_cur_max instead of
MB_CUR_MAX.
(re_string_reconstruct): Likewise.
(re_string_context_at): Use input->mb_cur_max instead of
MB_CUR_MAX.
(create_ci_newstate, create_cd_newstate): Use dfa->mb_cur_max
instead of MB_CUR_MAX.
* posix/regexec.c (re_search_internal): Likewise.
Pass new arguments to re_string_allocate.
(check_matching, transit_state_sb): Use dfa->mb_cur_max instead of
MB_CUR_MAX.
(extend_buffers): Use pstr->mb_cur_max instead of MB_CUR_MAX.
2003-11-12 Jakub Jelinek <jakub@redhat.com>
* posix/Makefile (tests): Add bug-regex19.
(bug-regex19-ENV): Add LOCPATH.
* posix/bug-regex19.c: New test.
|
|
2003-11-11 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (re_compile_fastmap_iter): Handle RE_ICASE
with MB_CUR_MAX > 1 locales in the fastmap.
2003-11-11 Jakub Jelinek <jakub@redhat.com>
* posix/regex_internal.c (build_wcs_buffer): Fix comment typo.
(build_wcs_upper_buffer): Likewise. Use towupper for wchar_t instead
of toupper.
* posix/Makefile (tests): Add bug-regex17 and bug-regex18.
(bug-regex17-ENV, bug-regex18-ENV): Add LOCPATH.
* posix/bug-regex18.c: New test.
|
|
2003-10-12 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/hppa/sysdep.h: Undef JUMPTARGET before use.
* sysdeps/unix/sysv/linux/hppa/sysdep.h: Define PSEUDO_ERRVAL,
SYSCALL_ERROR_LABEL under all conditions, INTERNAL_SYSCALL_DECL,
INTERNAL_SYSCALL_ERROR_P, INTERNAL_SYSCALL_ERRNO, INTERNAL_SYSCALL,
and undef JUMPTARGET before use.
[PIC]: Save pic register around syscall.
* sysdeps/unix/sysv/linux/hppa/sysdep.c (syscall):
Cleanup asm statment.
2003-10-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
* sysdeps/unix/sysv/linux/sh/sysdep.h (DO_CALL): Add SYSCALL_INST_PAD
after trapa instruction.
|
|
2003-09-26 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c (parse_sub_exp): Pass RE_CARET_ANCHORS_HERE
for the first token in a subexpression as well.
2003-10-02 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (peek_token): Add 2003-09-20 changes for anchor
handling again.
(parse_reg_exp): Likewise.
* posix/regex.h (RE_CARET_ANCHORS_HERE): Define.
* posix/bug-regex11.c (tests): Add new tests.
* posix/bug-regex12.c (tests): Add new test.
|
|
* posix/regcomp.c (peek_token): Remove recent changes for anchor
handling again.
(parse_reg_exp): Likewise.
* posix/regex.h: Remove RE_CARET_ANCHORS_HERE.
(peek_token): Accept \s and \S as OP_SPACE and OP_NOTSPACE.
(parse_expression): Replace build_word_op with
|
|
* posix/regcomp.c (build_word_op): Rename like...
(build_charclass_op): ...this. Accept two extra parameters,
CLASS_NAME and EXTRA. Add EXTRA to the result, not only _.
(peek_token): accept \s and \S as OP_SPACE and OP_NOTSPACE.
(parse_expression): replace build_word_op with
build_charclass_op, add new arguments, accept OP_SPACE
and OP_NOTSPACE.
* posix/regex_internal.h (re_token_type_t): Add OP_SPACE
and OP_NOTSPACE.
|
|
2003-09-20 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c (peek_token): Don't look back for ( or |
to check whether to treat a caret as special. It fails
for the (extended) regex \(^.
(parse, parse_reg_exp): Pass RE_CARET_ANCHORS_HERE to fetch_token.
* posix/regex.h: Define RE_CARET_ANCHORS_HERE.
* posix/regexec.c: Check out of bounds value before shifting.
* posix/regex_internal.h: Define __attribute for non-gcc.
|
|
2003-06-17 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (build_word_op): Use alnum instead of alpha class.
|
|
2003-06-13 Ulrich Drepper <drepper@redhat.com>
Fixing gcc 3.3 warnings, part II.
* argp/argp-help.c (hol_entry_long_iterate): Always inline.
* elf/dl-load.c (cache_rpath): Don't inline.
* iconvdata/cns11642l2.h: Always inline all functions.
* iconvdata/iso-ir-165.h: Likewise.
* locale/Makefile (aux): Add coll-lookup.
* locale/coll-lookup.c: New file.
* locale/coll-lookup.h (collidx_table_lookup): Do not define here.
(collseq_table_lookup): Likewise.
* locale/weightwc.h: Adjust collidx_table_lookup calls for name change.
* posix/fnmatch_loop.c: Adjust collseq_table_lookup calls for name
change.
* posix/regcomp.c: Likewise.
* posix/regexec.c: Likewise.
* locale/programs/3level.h (*_get): Always inline.
* locale/programs/locfile.h: Move definition of handle_copy to...
* locale/programs/locfile.c: ...here.
* locale/programs/ld-collate.c (obstack_int32_grow): Always inline.
(obstack_int32_grow_fast): Likewise.
(utf8_encode): Likewise.
(find_element): Avoid aliasing problems.
(insert_value): Likewise.
(collate_read): Likewise.
* nss/getent.c (print_hosts): Don't inline
(print_networks): Likewise.
(print_shadow): Likewise.
(build_doc): Likewise.
* nss/nss_files/files-parse.c [ENTDATA] (parser_stclass): Don't
inline.
* posix/regcomp.c (re_set_fastmap): Always inline.
(seek_collating_symbol_entry): Likewise.
(lookup_collation_sequence_value): Likewise.
(build_range_exp): Likewise.
(build_collating_symbol): Likewise.
* posix/regexec.c (acquire_init_state_context): Don't inline.
(clean_state_log_if_need): Likewise.
* resolv/res_send.c (eConsIovec): Rewrite to not return struct and
adjust all callers.
(evConsTime): Likewise.
(evAddTime): Likewise.
(evSubTime): Likewise.
(evNowTime): Likewise.
(evTimeSpec): Removed.
(__libc_res_nsend): Avoid aliasing problem.
* sysdeps/unix/sysv/linux/ifreq.h: Move old_siocgifconf definition to..
* sysdeps/unix/sysv/linux/ifreq.c: ...here.
* sysdeps/unix/sysv/linux/i386/dl-procinfo.h (_dl_string_hwcap):
Always inline.
(_dl_string_platform): Likewise.
* wctype/wchar-lookup.h (wctype_table_lookup): Always inline.
(wcwidth_table_lookup): Likewise.
(wctrans_table_lookup): Likewise.
* sysdeps/unix/sysv/linux/sys/epoll.h: Include <stdint.h>.
|
|
2003-06-12 H.J. Lu <hongjiu.lu@intel.com>
* posix/transbug.c (run_test): Return 1 for failure.
(do_test): Compare only if run_test is successful.
2003-06-12 Simon Josefsson <jas@extundo.com>
* argp/argp.h [!__THROW]: Define if undefined.
* posix/transbug.c: New file.
* inet/Makefile (aux): Add check_pf.
* include/ifaddrs.h: Add prototype for __check_pf.
* sysdeps/generic/check_pf.c: New file.
* sysdeps/unix/sysv/linux/check_pf.c: New file.
|
|
* inet/rcmd.c (rresvport_af): Avoid using invliad values. Wrap
around in search if port IPPORT_RESERVED/2 has been test.
2002-02-20 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c: Remove inclusions.
* posix/regexec.c: Likewise.
* posix/regex_internal.c: Likewise.
* posix/regex_internal.h: Add inclusions here.
* posix/regex.c: Only include sys/types.h before regex.h. Include
regex_internal.h here. Include regex_internal.c before regcomp.c
and regexec.c (might expose more opportunities to the C compiler).
* posix/regcomp.c (parse_expression): Fix construct rejected by SGI CC.
* posix/regex_internal.h [!_LIBC] (__mempcpy): Fix typo.
[!_LIBC] (__wcrtomb): New definition.
[!_LIBC]: Conditionalize enabling of I18N on HAVE_WCSCOLL and
HAVE_LOCALE_H as well.
2003-02-20 Ulrich Drepper <drepper@redhat.com>
|
|
* posix/regcomp.c (parse_bracket_exp): If build_charclass fails,
set *err to the returned error, not to REG_ESPACE unconditionally.
(build_word_op): Likewise.
* posix/Makefile (tests): Add bug-regex16.
* posix/bug-regex16.c: New test.
2003-01-16 Jakub Jelinek <jakub@redhat.com>
|
|
|
|
2002-12-17 Isamu Hasegawa <isamu@yamato.ibm.com>
* posix/regcomp.c (free_workarea_compile): Free the new member
ORG_INDICES.
(analyze): Initialize ORG_INDICES.
(duplicate_node_closure): Search for a existing node, which is
duplicated from the node ORG_DEST and satisfies the constraint
CONSTRAINT. And use it to avoid inifimite loop.
(search_duplicated_node): New function.
(duplicate_node): Store the index of the original node.
* posix/regex_internal.c (re_dfa_add_node): Realloc ORG_INDICES
if needed.
* posix/regex_internal.h (re_dfa_t): Add new members.
|
|
code with #ifdef RE_ENABLE_I18N.
2002-11-22 Paolo Bonzini <bonzini@gnu.org>
* posix/regcomp.c (regcomp): __re_compile_fastmap -> re_compile_fastmap
|
|
2002-11-27 Isamu Hasegawa <isamu@yamato.ibm.com>
* posix/regcomp.c (parse_expression): Set the bit since the back
reference is used in the regular expression.
* posix/regex_internal.c (re_node_set_init_1): Make it clean in case
of malloc failure.
(re_node_set_init_copy): Likewise.
* posix/regex_internal.h (state_array_t): New structure.
(re_sub_match_last_t): Likewise.
(re_sub_match_top_t): Likewise.
(re_match_context_t): Add new members.
(re_dfa_t): Likewise.
* posix/regexec.c (re_search_internal): Invoke prune_impossible_nodes
to check the matching is really correct, and retry if failed.
Move the routin pruning the impossible nodes from here, ...
(prune_impossible_nodes): To this function.
(check_matching): Invoke check_subexp_matching_top, and replace
redundant checking with transit_state_bkref invocation.
(proceed_next_node): Replace strncmp with memcmp. Reported by
Paolo Bonzini <bonzini@gnu.org>.
(update_cur_sifted_state): Remove search_subexp invocation.
(search_subexp): Remove this function.
(check_dst_limits_calc_pos): Use search_cur_bkref_entry for
optimization.
(sift_states_bkref): Use search_cur_bkref_entry for optimization.
Remove unused invocation of match_ctx_add_entry.
(transit_state): Invoke check_subexp_matching_top.
(check_subexp_matching_top): New function.
(transit_state_bkref): Remove unused array.
Merge transit_state_bkref_loop.
(transit_state_bkref_loop): Use get_subexp instead of
sift_states_backward. Use search_cur_bkref_entry for optimization.
Merge this function to transit_state_bkref.
(get_subexp): New function.
(get_subexp_sub): Likewise.
(find_subexp_node): Likewise.
(check_arrival): Likewise.
(check_arrival_expand_ecl): Likewise.
(check_arrival_expand_ecl_sub): Likewise.
(expand_bkref_cache): Likewise.
(match_ctx_init): Initialize new members.
(match_ctx_clean): New function.
(match_ctx_free): Release new members.
(match_ctx_free_subtops): New function.
(match_ctx_add_entry): Fix indent.
(search_cur_bkref_entry): New function.
(match_ctx_add_subtop): Likewise.
(match_ctx_add_sublast): Likewise.
|
|
2002-11-06 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c: Use tabs instead of spaces.
* posix/regexec.c: Likewise.
* posix/regex_internal.h: Likewise.
* posix/regcomp.c (re_compile_fastmap_iter): Use __wcrtomb not wctomb.
|
|
2002-11-06 Jakub Jelinek <jakub@redhat.com>
* posix/regcomp.c (re_compile_pattern): Don't set regs_allocated
here.
(regcomp): Don't set can_be_null here.
(re_comp): Clear whole re_comp_buf with the exception of fastmap.
(re_compile_internal): Clear can_be_null, set regs_allocated.
* posix/regcomp.c (re_set_fastmap): New function.
(re_compile_fastmap_iter): Use it. Remove redundant type ==
COMPLEX_BRACKET check.
* posix/regexec.c (re_search_internal): Optimize searching with
fastmap. Call re_string_reconstruct even if match_first is
smaller than raw_mbs_idx.
2002-11-06 Isamu Hasegawa <isamu@yamato.ibm.com>
* posix/regcomp (free_dfa_content): Use free_state.
* posix/regex_internal.c (re_string_realloc_buffers): Don't edit
pointers in case that realloc failed.
(re_node_set_merge): Likewise.
(register_state): Likewise.
(create_newstate_common): Invoke memory release functions in case of
error conditions.
(create_ci_newstate): Likewise.
(create_cd_newstate): Likewise.
(free_state): New function.
* posix/regexec.c (re_search_internal): Invoke memory release
functions in case of error conditions.
(sift_states_backward): Likewise.
(merge_state_array): Likewise.
(add_epsilon_src_nodes): Likewise.
(sub_epsilon_src_nodes): Likewise.
(search_subexp): Likewise.
(sift_states_bkref): Likewise.
(transit_state_sb): Likewise.
(transit_state_mb): Likewise.
(transit_state_bkref_loop): Likewise.
(group_nodes_into_DFAstates): Likewise.
(push_fail_stack): Don't edit pointers in case that realloc failed.
(extend_buffers): Likewise.
(match_ctx_add_entry): Likewise.
|
|
|
|
2002-11-06 Ulrich Drepper <drepper@redhat.com>
* posix/regcomp.c (regcomp): __re_compile_fastmap can never fail.
If re_compile_internal failed free fastmap buffer.
(free_dfa_content): Broken out of regfree function. Frees all dfa
related data.
(regfree): Add free_dfa_content.
(re_compile_internal): If any of the called functions fails free
all dfa related memory.
|