24 Commits
Author SHA1 Message Date
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 b8eb0a13d4 fix cygwin binary mounts
2006-08-03  Paolo Bonzini  <bonzini@gnu.org>

	Revert this part of the previous change:

	2006-08-03  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (get_openfile): Change second argument to char
	and turn it into a string within the function.  Adjust callers.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-72
2008-01-09 16:12:11 +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 3ca529fbe2 hack to speed up UTF-8 processing
2006-08-03  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c (str_append): Use is_utf8 to skip useless work.
	* sed/mbcs.c (initialize_mbcs): Look for a UTF-8 locale.
	(is_utf8): New.
	* sed/sed.h (is_utf8): New.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-70
2008-01-09 16:12:10 +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 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 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 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 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 d3f8e118d5 fix handling of [^]xyz]
2005-05-16  Eero Hakkinen  <eero17@bigfoot.com>

	* sed/compile.c (snarf_char_class): Fix handling of
	[^]xyz].

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-47
2008-01-09 16:11:51 +01:00
Paolo Bonzini f7eed06223 do not add a default command-line in in-place editing mode
2005-04-11  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c (process_files): Do not add a default
	command-line in in-place editing mode.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-45
2008-01-09 16:11:49 +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 93f1e336c3 fix debian bug 294339
2005-02-10  Paolo Bonzini  <bonzini@gnu.org>

	* sed/regexp.c: Fix off-by-one error in the "invalid reference
	to subexpression" message.  Debian bug 294339.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-42
2008-01-09 16:11:47 +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 911678b24e make --enable-html enable building .html files, not just installing
2005-02-01  Paolo Bonzini  <bonzini@gnu.org>

	* doc/Makefile.am: Don't enable MAKEINFO_HTML and TEXI2HTML_HTML
	rules unless BUILD_HTML.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-39
2008-01-09 16:11:45 +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 bc7f50307a warn against localization issues
2004-12-26  Paolo Bonzini  <bonzini@gnu.org>

	* BUGS: Add section about [a-z] matching uppercase characters,
	and other locale issues.
	* doc/sed-in.texi [!PERL]: Likewise.

git-archimport-id: bonzini@gnu.org--2004b/sed--stable--4.1--patch-31
2008-01-09 16:11:39 +01:00
Paolo Bonzini 7f53c1c16e fix \l and \u in a multi-byte configuration
2004-11-15  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c (str_append_modified): Copy the first character
	when using \l or \u in a multi-byte configuration.  Use
	WCRTOMB instead of wcrtomb.
	* sed/sed.h (WCRTOMB): New.

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