22 Commits
Author SHA1 Message Date
Paolo Bonzini 5a30fa2129 bump version number 2009-05-11 09:05:08 +02:00
Paolo Bonzini 4381be08bd bump version 2009-04-28 08:55:08 +02:00
Paolo Bonzini 12e758ad53 fix "x", "g", "G" commands with "sed -i" to match BSD sed
2009-01-05  Paolo Bonzini  <bonzini@gnu.org>

        * execute.c (read_pattern_space): Reset hold space at end-of-file
	if input->reset_at_next_file.
2009-01-05 17:01:36 +01:00
Paolo Bonzini 6ea4dbce16 fix configure.ac version number 2009-01-04 14:38:29 +01:00
Ralf Wildenhues ed1c249d94 Let --posix turn off more GNU extensions.
2008-12-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	Let --posix turn off more GNU extensions.
	* sed/compile.c (mark_subst_opts): Turn off subst options i, I,
	s, S, x, X, m, and M in --posix mode.
	(compile_address): Disallow address modifiers, `FIRST~STEP',
	`ADDR1,+N', and `ADDR1,~N' in --posix mode.
	(compile_program): In --posix mode, do not accept e or z commands;
	do not accept text between an a, c, or i command and the following
	backslash; do not accept an argument to the l command.
2008-12-31 10:05:03 +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 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
Paolo Bonzini 95792f701c fix cross-device links with --follow-symlinks
2007-08-14  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c (open_next_file): Follow symlink here...
	(closedown): ... not here.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-96
2008-01-09 16:12:28 +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 068afd076e bump version to 4.1c and fix some warnings
2006-12-29  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c: Fix warnings.
	* sed/execute.c: Fix warnings.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-91
2008-01-09 16:12:25 +01:00
Paolo Bonzini ba68fb42b8 --posix disables all extensions to regular expressions
2006-12-15  Paolo Bonzini  <bonzini@gnu.org>

	* sed/regexp.c: Disable all extensions on --posix.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-84
2008-01-09 16:12:20 +01:00
Paolo Bonzini cba6413f07 finish gnulib conversion -- upgrade bootstrap and a few details
git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-79
2008-01-09 16:12:16 +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 0177318fa6 accept NUL for `.'
2006-08-21  Paolo Bonzini  <bonzini@gnu.org>

	* sed/regexp.c: Accept NUL bytes for `.'.  Accept 'a\(b' in
	POSIXLY_CORRECT/POSIXLY_BASIC posixicity.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-73
2008-01-09 16:12:12 +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 72edd0eea0 add cache variable for -lcP test
2005-05-18  Maciej W. Rozycki  <macro@linux-mips.org>

	* configure.ac: Use a cache variable for the libcP test.
	* configure: Regenerate.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-48
2008-01-09 16:11:51 +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 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 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 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