25 Commits
Author SHA1 Message Date
Paolo Bonzini d38fd83b62 add utf8 tests for commit 7f53c1c16e
2008-09-29  Paolo Bonzini  <bonzini@gnu.org>

	* testsuite/Makefile.am: Add the utf8-{1,2,3,4} tests.
	* testsuite/Makefile.tests: Add the utf8-{1,2,3,4} tests.
	* testsuite/runtest: Support skipping tests.
	* testsuite/utf8-1.good: New.
	* testsuite/utf8-1.inp: New.
	* testsuite/utf8-1.sed: New.
	* testsuite/utf8-2.good: New.
	* testsuite/utf8-2.inp: New.
	* testsuite/utf8-2.sed: New.
	* testsuite/utf8-3.good: New.
	* testsuite/utf8-3.inp: New.
	* testsuite/utf8-3.sed: New.
	* testsuite/utf8-4.good: New.
	* testsuite/utf8-4.inp: New.
	* testsuite/utf8-4.sed: New.
2008-09-29 10:54:15 +02:00
Paolo Bonzini 41e0cf2dac add `z' extension
2008-09-29  Paolo Bonzini  <bonzini@gnu.org>

	* BUGS: Document s/.*.// behavior with invalid multibyte sequences.
	* NEWS: Document `z' extension.
	* doc/sed-in.texi: Document both things.
	* sed/compile.c (compile_program): Recognize `z'.
	* sed/execute.c (execute_program): Execute `z'.
	* testsuite/Makefile.am: Add badenc test.
	* testsuite/Makefile.tests: Add badenc test.
	* testsuite/badenc.good: New.
	* testsuite/badenc.inp: New.
	* testsuite/badenc.sed: New.
2008-09-29 10:24:09 +02:00
Paul Eggert eb8496d9de treat 's&foo&\&&' compatibly with traditional 'sed'
2008-04-24  Paul Eggert  <eggert@twinsun.com>

	* sed/compile.c (match_slash): Treat 's&foo&\&&' compatibly with
	traditional 'sed'.
	* testsuite/bsd.sh: Add test case for this.
	* testsuite/bsd.good: Add test case output.
2008-04-24 16:22:56 +02:00
Paolo Bonzini f3eea031a6 upgrade autoboot 2008-01-16 08:37:50 +01:00
Paolo Bonzini c1067081c5 switch to GPLv3
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-94
2008-01-09 16:12:27 +01:00
Paolo Bonzini 4090489434 upgrade regex tests from glibc
2007-02-05  Paolo Bonzini  <bonzini@gnu.org>

	* testsuite/bug-regex27.c, testsuite/bug-regex28.c: New, from
	glibc (written by Jakub Jelinek).

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-93
2008-01-09 16:12:26 +01:00
Paolo Bonzini e022b2c87b fix '/foo/i\'
2007-01-26  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (check_final_program): Don't set text if the
	pending_text is initialized but empty.
	* sed/execute.c (output_line): Don't print text if it is NULL.
	* tests/Makefile.am (TESTS): Add insert.
	* tests/Makefile.tests (insert): New.
	* tests/insert.good, tests/insert.sed, tests/insert.inp: New
	testcase from Jonas Koelker.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-92
2008-01-09 16:12:25 +01:00
Paolo Bonzini ee7d1bf56c fix my own braindead-ness
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-82
2008-01-09 16:12:18 +01:00
Paolo Bonzini ca83026c92 autogenerate version.good within configure
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-81
2008-01-09 16:12:18 +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 1ca31d6728 fix y/[/X/ and add more testcases for the y command
2006-02-03  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (compile_program) <case 'y'>: Pass false to match_slash.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-62
2008-01-09 16:12:04 +01:00
Paolo Bonzini 9015803ab0 fix 0~2, signaled by Guglielmo Bondioni
2005-08-30  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c (reset_addresses): Never activate ADDR_IS_NUM_MOD
	addresses.
	* testsuite/modulo.good, testsuite/modulo.inp, testsuite/modulo.sed:
	New.
	* testsuite/Makefile.tests: Add new testcase.
	* testsuite/Makefile.am: Add new testcase.
	* testsuite/Makefile.in: Regenerate.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-52
2008-01-09 16:11:55 +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 479184e226 fix a/r/R commands when q is encountered
2005-02-10  Paolo Bonzini  <bonzini@gnu.org>

	* testsuite/appquit.good, testsuite/appquit.inp,
	testsuite/appquit.sed: New testcase.
	* testsuite/readin.sed: Quit after the last r command.
	* testsuite/readin.good: Adjust.
	* sed/execute.c (execute_program): Dump the results of the
	a/r/R commands just before quitting.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-44
2008-01-09 16:11:49 +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 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 5135bf4814 do not use leftmost-longest matching for addresses.
2004-12-26  Paolo Bonzini  <bonzini@gnu.org>

	Do not use leftmost-longest matching for addresses.

	* NEWS: Add a note about this.
	* testsuite/recall2.good, testsuite/recall2.inp,
	testsuite/recall2.sed: New test.
	* testsuite/Makefile.am, testsuite/Makefile.tests: Add the
	recall2 test.
	* sed/sed.h (struct regex): New.
	(struct addr, struct subst, compile_regex, match_regex,
	release_regex): Use it instead of regex_t.
	* sed/compile.c (compile_program): Update for new meaning of
	the third parameter of compile_regex.
	* sed/execute.c (do_subst): Pass less conservative value to
	the regsize parameter of match_regex.
	* sed/regexp.c (compile_regex_1): New, extracted out of
	compile_regex.  The third parameter, needed_sub, now includes
	\0 (so 10 means that \0 .. \9 are needed).  Pass RE_NO_SUB
	if needed_sub is zero.
	(compile_regex): Accept a struct regex instead of a regex_t.
	Save the regular expression's text.
	(match_regex): Accept a struct regex instead of a regex_t.
	Recompile the pattern if it was compiled with RE_NO_SUB.
	(release_regex): Accept a struct regex instead of a regex_t.

	* doc/Makefile.am: Generate sed.texi correctly when
	building outside srcdir.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-33
2008-01-09 16:11:40 +01:00
Paolo Bonzini deb1e06415 speed up .{1,2048}
2004-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* regcomp.c (analyze_tree): Always call calc_epsdest.
	(calc_inveclosure): Use re_node_set_insert_last.
	(parse_dup_op): Lower X{1,5} to (X(X(X(XX?)?)?)?)?
	rather than X?X?X?X?X?.
	* regex_internal.h (re_node_set_insert_last): New declaration.
	* regex_internal.c (re_node_set_insert_last): New function.
	* PCRE.tests: Add testcases.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-22
2008-01-09 16:10:55 +01:00
Paolo Bonzini 611e77d579 git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-20 2008-01-09 16:10:54 +01:00
Paolo Bonzini fd8f5daad7 more portability improvements
2004-11-11  Paolo Bonzini  <bonzini@gnu

	* tst-rxspecer.c: Do not mix instructions and
	declarations.
	* basicdefs.h: Include locale.h before #defining
	gettext, to avoid breakage under Solaris.
	* sed/sed.c: do not include locale.h.

po:
2004-11-11  Paolo Bonzini  <bonzini@gnu.org>

	* Makevars: New.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-18
2008-01-09 16:10:52 +01:00
Paolo Bonzini a525606abd merge from glibc
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-16
2008-01-09 16:10:51 +01:00
Paolo Bonzini fdf570a596 always enable regex tests when included regex is used
2004-11-03  Paolo Bonzini  <bonzini@gnu

	* bug-regex11.c: Improve portability.
	* bug-regex12.c: Improve portability.
	* bug-regex13.c: Improve portability.
	* bug-regex14.c: Improve portability.
	* bug-regex21.c: Improve portability.
	* bug-regex9.c: Improve portability.
	* tst-boost.c: Improve portability.
	* tst-pcre.c: Improve portability.
	* tst-regex.c: Improve portability.
	* tst-rxspencer.c: Improve portability.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-9
2008-01-09 16:10:46 +01:00
Paolo Bonzini 9c9919efe2 initial import
(automatically generated log message)

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--base-0
2004-10-20 21:42:31 +00:00