Commit Graph
68 Commits
Author SHA1 Message Date
Assaf Gordon 3b29bece3e build: switch to non-recursive makefile
* .gitignore: Ignore '.dirstamp' files
* bootstrap.conf: Add 'non-recursive-gnulib-prefix-hack' gnulib module.
  Add missing 'stdalign' module.
  (bootstrap_post_import_hook): Use module to adjust gnulib.mk file.
* configure.ac: Add 'subdir-objects' automake option, don't generate
  makefiles in subdirectories. Adjust path of XFAIL tests.
* Makefile.am: Include 'local.mk' files, adjust for non-recursive make.
* doc/Makefile.am: Rename to ...
* doc/local.mk: Adjust paths. Rename SED to
  SEDBIN variable, to avoid overriding the default system-wide SED value
  which is automatically set by autotools.
* lib/Makefile.am: Rename to ...
* lib/local.mk: Adjust paths.
* lib/.gitignore: Ignore 'stdalign.h' from gnulib module.
* sed/Makefile.am: Rename to ...
* sed/local.mk: Adjust paths.
* testsuite/Makefile.am: Rename to ...
* testsuite/local.mk: Adjust paths.
* testsuite/init.cfg: Move to ...
* init.cfg: ... here. Moved to avoid changing the path in init.sh, and to
  keep the same directory structure as coreutils.
  (require_en_utf8_locale_): Adjust path for get-mb-cur-max executable.
  (require_ja_shiftjis_locale_,require_valid_ja_shiftjis_locale_): Adjust
  path for test-mbrtowc executable.
* m4/.gitignore: Add gnulib's non-recusive-make module.
* testsuite/runtest: Adjust paths of Makefile.tests and dir variables,
  Skip utility program 'get-mb-cur-max' which is not a standalone test.
* testsuite/Makefile.tests: Adjust path of sed exeutable.
* testsuite/eval.sed, testsuite/eval.good: Adjust path of sed executable.
* testsuite/cmd-R.sh,
  testsuite/cmd-l.sh,
  testsuite/colon-with-no-label.sh,
  testsuite/comment-n.sh,
  testsuite/compile-errors.sh,
  testsuite/compile-tests.sh,
  testsuite/convert-number.sh,
  testsuite/execute-tests.sh,
  testsuite/follow-symlinks-stdin.sh,
  testsuite/follow-symlinks.sh,
  testsuite/help-version.sh,
  testsuite/in-place-hyphen.sh,
  testsuite/in-place-suffix-backup.sh,
  testsuite/invalid-mb-seq-UMR.sh,
  testsuite/mb-bad-delim.sh,
  testsuite/mb-charclass-non-utf8.sh,
  testsuite/mb-match-slash.sh,
  testsuite/mb-y-translate.sh,
  testsuite/normalize-text.sh,
  testsuite/nulldata.sh,
  testsuite/panic-tests.sh,
  testsuite/posix-char-class.sh,
  testsuite/posix-mode-N.sh,
  testsuite/posix-mode-addr.sh,
  testsuite/posix-mode-bad-ref.sh,
  testsuite/posix-mode-s.sh,
  testsuite/range-overlap.sh,
  testsuite/recursive-escape-c.sh,
  testsuite/regex-errors.sh,
  testsuite/stdin-prog.sh,
  testsuite/subst-mb-incomplete.sh,
  testsuite/subst-options.sh,
  testsuite/subst-replacement.sh,
  testsuite/temp-file-cleanup.sh,
  testsuite/unbuffered.sh: Adjust paths of init.sh, sed executable.
2016-07-24 22:22:53 -04:00
Assaf Gordon 77a7c6a731 tests: skip tests upon buggy mbrtowc implementations
Sed tests purposefully use invalid non-utf8 multibyte sequences to
test sed's handling of invalid input/program.
Some implementations wrongly accept invalid sequences, causing false
alarms. Add a test program to detect such buggy implementations and skip
the tests if needed.
See discussion in:
http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00005.html
http://lists.gnu.org/archive/html/sed-devel/2016-07/msg00000.html
http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00031.html
http://lists.gnu.org/archive/html/sed-devel/2016-06/msg00014.html

* bootstrap.conf: Add gnulib's closeout module.
* m4/.gitignore, lib/.gitignore, po/POTFILES.in: Adjust after adding
closeout module.
* testsuite/Makefile.am (check_PROGRAMS): Add new program.
* testsuite/test-mbrtowc.c: New program.
* testsuite/init.cfg (require_valid_ja_eucjp_locale_)
(require_valid_ja_shiftjis_locale_): New functions. Call test-mbrtowc
with known invalid multibyte sequences to ensure implementation is not
buggy and rejects them; Skip test otherwise.
* testsuite/invalid-mb-seq-UMR.sh: Use require_valid_ja_eucjp_locale_.
* testsuite/mb-charclass-non-utf8.sh: Use require_valid_ja_shiftjis_locale_.
2016-07-06 20:29:07 -04:00
Jim Meyering 57f405ad56 maint: update copyright year, bootstrap, init.sh
Run "make update-copyright" and then...

* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
* bootstrap: Likewise.
2016-01-01 15:02:20 -08:00
Jim Meyering 082b25cc3e maint: update copyright year ranges to include 2015; update gnulib 2015-01-01 19:18:17 -08:00
Jim Meyering 383efa5436 build: avoid warning about unused fchown result
* sed/execute.c: Include "ignore-value.h".
(closedown): Explicitly ignore fchown return value.
* bootstrap.conf (gnulib_modules): Add ignore-value.
* lib/.gitignore: Ignore the new .h file.
* .gitignore: Ignore all **~ backup files.
2014-12-01 11:07:16 -08:00
Jim Meyering 8ad1b31305 maint: enable sc_program_name syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* sed/sed.c: Include progname.h".
(program_name): Remove now-unnecessary declaration.
(main): Call set_program_name.
* bootstrap.conf (gnulib_modules): Add progname.
* lib/.gitignore: Append the two new names.
2014-11-30 18:59:34 -08:00
Jim Meyering f147efc9ef maint: update autogenerated .gitignore files 2014-11-30 18:59:32 -08:00
Jim Meyering f6756292cf maint: update build/gnulib infrastructure; generate ChangeLog
* ChangeLog-2014: Renamed from ChangeLog.
* po/ChangeLog-2014: Renamed from po/ChangeLog.
* Makefile.am (EXTRA_DIST): Add the two new file names.
(dist-hook): Generate ChangeLog at tarball-creation time.
(gen-ChangeLog): New rule.  Just like the one in coreutils and grep.
* bootstrap.conf (gnulib_modules): Add the modules, readme-release
and gitlog-to-changelog, and revamp to be much more like grep and
coreutils.
* lib/Makefile.am: Update.
2014-11-30 18:59:32 -08:00
Paolo Bonzini a0f80adf07 Update to latest gnulib.
2012-12-21  Paolo Bonzini  <bonzini@gnu.org>

	* gnulib: Update.
	* testsuite/version.gin: Regenerate.
2012-12-22 15:17:30 +01:00
Paolo Bonzini 1e0501c438 update gnulib to latest
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* gnulib: Update.
2012-03-16 09:42:52 +01:00
Paolo Bonzini 90b2d54032 update .gitignore files 2011-08-29 10:29:31 +02:00
Paolo Bonzini 971249a020 update .gitignore files 2010-10-31 22:56:22 +01:00
Paolo Bonzini a9bf076c0b use version-etc-fsf
2010-08-30  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.am (dist-hook): Remove COPYRIGHT_YEAR check.
	* autoboot.conf (gnulib_modules): Add version-etc-fsf.
	* configure.ac (COPYRIGHT_YEAR): Remove.  Change package name to
	"GNU sed".
	* doc/sed.1: Regenerate.
	* sed/sed.c (AUTHORS): New.
	(main): Use version_etc.
2010-08-30 12:18:50 +02:00
Paolo Bonzini a85e83d0db use mkostemp(template, 0) instead of mkstemp to work around Cygwin oddity
2010-07-16  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
	* bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c.
        * gnulib: Update.
        * NEWS: Mention change.
	* sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin
	oddity.  Reported by Stepan Kasal.
2010-07-16 22:01:35 +02:00
Paolo Bonzini feaa20792f bump version number to 4.2.1
2009-06-27  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Bump version.
	* NEWS: Bump version.
	* gnulib: Update.
	* doc/sed.1: Regenerate.
2009-06-27 15:25:59 +02:00
Paolo Bonzini fa01dd7e73 preserve security contexts too on sed -i
2009-06-25  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf: Add selinux-h.
	* execute.c: Copy over file creation context before creating a new file.
2009-06-26 12:13:56 +02:00
Paolo Bonzini 559a106598 use gnulib's emulation for mb functions
2008-12-22  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf: Request modules emulating mb functions.
	* configure.ac: Do not look for mb functions here.
2008-12-22 11:26:19 +01:00
Jim Meyering 51d634a52f switch to external gettext
2008-10-03  Paolo Bonzini  <bonzini@gnu.org>
	    Jim Meyering  <meyering@redhat.com>

	* Makefile.am: Remove intl subdir.  Require Automake 1.10.
	* configure.ac: Remove useless macros, switch to external gettext.
	* lib/Makefile.am: Remove intl subdir from CPPFLAGS.
	* sed/Makefile.am: Remove intl subdir from CPPFLAGS.
2008-10-03 10:34:54 +02:00
Paolo Bonzini 07df2df3c2 update gnulib
2008-09-28  Paolo Bonzini  <bonzini@gnu.org>

	* basicdefs.h: Replace alloca cruft with alloca.h.
	* bootstrap.sh.in: Update for new gnulib.
	* bootstrap.sh: Update for new gnulib.
	* configure.ac: Move gnulib macros earlier.
	* sed/execute.c: Do not include acl.h when bootstrapping.
2008-09-28 18:47:58 +02:00
Paolo Bonzini 21a4305c72 gnulib removed strverscmp.c
2008-08-19  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c: Do not include strverscmp.c.
2008-08-20 10:09:13 +02:00
Paolo Bonzini 17a36e7d1f update .gitignore files 2008-07-11 15:21:33 +02:00
Paolo Bonzini 9f72627d7b commit new .gitignore files produced by autoboot 2008-01-16 08:56:07 +01:00
Paolo Bonzini f3eea031a6 upgrade autoboot 2008-01-16 08:37:50 +01:00
Paolo Bonzini 4dd2b28fd0 update .gitignore for more recent gnulib 2008-01-16 08:25:12 +01:00
Paolo Bonzini 318f4cd247 portability fixes from Bruno Haible
2006-12-22  Bruno Haible  <bruno@clisp.org>

	* sed/utils.c: Include pathmax.
	* sed/mbcs.c: Use local_charset.
	* sed/execute.c: Copy with padding after the mbstate_t member.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-90
2008-01-09 16:12:24 +01:00
Paolo Bonzini 59ee990c6b gnulibify part 2, use gnulib-tool in autoboot and remove PO files from repo
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-76
2008-01-09 16:12:14 +01:00
Paolo Bonzini e2fe13c4f8 gnulib .gitignore files 2008-01-09 16:12:14 +01:00
Paolo Bonzini ac9a20b3fb gnulibify and add ACL support
2006-09-24  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c: Support ACLs.
	* lib/utils.c: Move...
	* sed/utils.c: ... here, and remove xmalloc.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-74
2008-01-09 16:12:13 +01:00
Paolo Bonzini 3a8e165ab0 treat cygwin CR/LF correctly (and by design, not by chance)
2006-08-03  Paolo Bonzini  <bonzini@gnu.org>
            Corinna Vinschen  <vinschen@redhat.com>

        * lib/getline.c (getline): Remove Windows special casing.
        * lib/utils.c (register_open_file, ck_fdopen): New.
        (ck_fopen, ck_mkstemp): Use register_open_file.
        * lib/utils.h (ck_fdopen): New.
        * sed/execute.c (open_next_file): Reopen stdin.
        * sed/sed.h (read_mode): New.
        * sed/sed.c (read_mode): New.
        (main): Set it on --binary.
        (usage): Document --binary.
        * sed/compile.c (get_openfile): Change second argument to char
        and turn it into a string within the function.  Adjust callers.
        * sed/execute.c (dump_append_queue, open_next_file): Use it
        as mode for ck_fopen.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-71
2008-01-09 16:12:11 +01:00
Paolo Bonzini 4ca34ac568 don't rely on malloc(0) != NULL
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-69
2008-01-09 16:12:09 +01:00
Paolo Bonzini ec9561cfa4 robustify bootstrap process, ensure distribution of updated boostrap.sh
2006-07-13  Paolo Bonzini  <bonzini@gnu.org>

	* bootstrap.sh.in: Add a few autoconfy tests.
	* Makefile.am: Update distributed bootstrap.sh.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-68
2008-01-09 16:12:08 +01:00
Paolo Bonzini 3cfe7fdf8a Fix compilation on non-GCC compilers, update po files
2006-05-15  Hans-Bernhard Bröker <broeker@physik.rwth-aachen.de>

	* sed/basicdefs.h (OB_MALLOC): Turn VCAST into void * cast.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-66
2008-01-09 16:12:07 +01:00
Paolo Bonzini 811c3446c6 merge with glibc regex
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-59
2008-01-09 16:12:01 +01:00
Paolo Bonzini 6cf9fe5b1b add LANG_SORBIAN and other mingw fixes
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-57
2008-01-09 16:11:59 +01:00
Paolo Bonzini 912c1770ac update regex from upstream
2005-09-07  Paolo Bonzini  <bonzini@gnu.org>

	* lib/regcomp.c: Update from upstream.
	* lib/regex.c: Update from upstream.
	* lib/regex_.h: Update from upstream.
	* lib/regex_internal.c: Update from upstream.
	* lib/regex_internal.h: Update from upstream.
	* lib/regexec.c: Update from upstream.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-54
2008-01-09 16:11:57 +01:00
Paolo Bonzini bdbfe6d711 merge regex with glibc and adjust doc/.arch-inventory
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-51
2008-01-09 16:11:54 +01:00
Paolo Bonzini 584e5cedc2 more updates to the FSF address
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-50
2008-01-09 16:11:53 +01:00
Paolo Bonzini 07e543c45f update FSF address
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-49
2008-01-09 16:11:52 +01:00
Paolo Bonzini 20a67b75e7 fix crash on /\(\)/x
2005-02-10  Paolo Bonzini  <bonzini@gnu.org>

	* lib/regcomp.c (lower_subexp): Do not optimize empty
	subexpressions even with REG_NOSUB.
	* testsuite/SPENCER.tests: Add a previously failing testcase.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-43
2008-01-09 16:11:48 +01:00
Paolo Bonzini cf7d4aadd2 include config.h from within obstack.h
2005-02-08  Paolo Bonzini  <bonzini@gnu.org>

	* lib/obstack.h: include config.h.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-41
2008-01-09 16:11:46 +01:00
Paolo Bonzini 5b8a413620 finally resync with glibc
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-38
2008-01-09 16:11:44 +01:00
Paolo Bonzini 87cdf72890 fix meaning of \B
2005-01-26  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (peek_token): Fix ctx_type for \B.
	(parse_expression): Lower token->opr.ctx_type == NOT_WORD_DELIM.
 	* posix/regex_internal.h (re_context_type): Add NOT_WORD_DELIM
	and OUTSIDE_WORD.
	* posix/PCRE.tests: Adjust \B tests to check if it matches outside
	a word.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-36
2008-01-09 16:11:43 +01:00
Paolo Bonzini b48e80e8ad prepare for 4.1.4 release
2005-01-25  Paolo Bonzini  <bonzini@gnu.org>

	* sed/regexp.c: Fix building on GCC 2.95 and earlier.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-35
2008-01-09 16:11:42 +01:00
Paolo Bonzini 32cf31f2ba compute inveclosure only if actually needed.
2004-12-31  Paolo Bonzini  <bonzini@gnu.org>

	* 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.
	* regex_internal.c (re_dfa_add_node): Do not initialize
	the inveclosure node set.
	* regexec.c (re_search_internal): If nmatch includes unused
	subexpressions, reset them to { rm_so: -1, rm_eo: -1 } here.
	Limit to preg->re_nsubs the nmatch that is passed to set_regs.
	(set_regs): Remove the real_nmatch variable, the nmatch
	parameter now is <= preg->re_nsubs.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-34
2008-01-09 16:11:41 +01:00
Paolo Bonzini 65048613e4 speed up transit_state_mb
2004-12-27  Paolo Bonzini  <bonzini@gnu.org>

	* lib/regexec.c (transit_state_mb): Do not examine nodes where
	the ACCEPT_MB is not set.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-30
2008-01-09 16:11:38 +01:00
Paolo Bonzini 312aa45e81 separate parsing and creation of the NFA. Avoid recursion on the parse tree.
2004-12-13  Paolo Bonzini  <bonzini@gnu.org>

	Separate parsing and creation of the NFA.  Avoided recursion on
	the (very unbalanced) parse tree.

	* 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.
	* 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.
	* 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.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-29
2008-01-09 16:11:38 +01:00
Paolo Bonzini 827706c007 speed up parentheses
2004-12-07  Paolo Bonzini  <bonzini@gnu.org>

	* 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.
	* 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.
	* 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.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-28
2008-01-09 16:11:37 +01:00
Paolo Bonzini 14f43c2486 Fix bugs in the accept_mb optimization.
2004-12-03  Paolo Bonzini  <bonzini@gnu.org>

	* regcomp.c (peek_token, parse_expression, build_charclass_op): Do
	not set accept_mb in the token.
	(parse_bracket_exp): Do not modify existing DFA nodes.
	* regex-internal.c (re_node_set_insert_last): Remove unused variable.
	(re_dfa_add_node): Set accept_mb in the DFA node.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-27
2008-01-09 16:11:36 +01:00
Paolo Bonzini 52e232ab96 do not make single-byte searches go through slow MBCS paths
2004-01-12  Paolo Bonzini  <bonzini@gnu.org>

	* posix/regcomp.c (peek_token, parse_bracket_exp, build_charclass_op)
	[RE_ENABLE_I18N]: Initialize the tokens' accept_mb field.
	* posix/regex_internal.c (create_ci_newstate, create_cd_newstate)
	[RE_ENABLE_I18N]: Initialize the DFA state's accept_mb field
	from the nodes'.
	* posix/regex_internal.h (re_token_t) [RE_ENABLE_I18N]: Add the
	accept_mb bitfield.
	(ACCEPT_MB_NODE): Remove.
	* posix/regexec.c (transit_state_mb, check_arrival_add_next_nodes,
	proceed_next_node, build_sifted_states): Look at the nodes' accept_mb
	field.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-26
2008-01-09 16:11:36 +01:00
Paolo Bonzini 8a00600bfc simplify handling of subexpressions
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.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-25
2008-01-09 16:11:35 +01:00