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