'sed -iE' is not the same as 'sed -Ei'. 'sed -ni' is dangerous.
From https://bugs.debian.org/832088
* doc/sed.texi (Command-Line Options): Explain and add examples
to '-i/--in-place' item.
Regex addresses work on current pattern space, not on the original
input lines. From https://bugs.debian.org/284646
* doc/sed.texi (Regexp Addresses): Add a paragraph and an example.
* doc/sed.x (Addresses): Add a sentence about regexp.
Unescaping takes place before passing the pattern to the regex engine:
$ echo 'a^c' | sed -e 's/\x5e/b/'
ba^c
From: https://bugs.debian.org/605142
* doc/sed.texi (Escaping Precedence): Add new subsection under 'escape
sequences' with examples.
Switching to non-recursive makefiles broke the 'install-html' target:
The gettext plumbing requires an 'install-html' target in po/Makefile.
This was fixed in gettext v0.19.8.1-41-ge5a008a, but packages using
older gettext need to manually patch po/Makefile.in.in.
Report and suggested fix by Eric Blake in https://debbugs.gnu.org/25690 .
* bootstrap.conf (bootstrap_epilogue): Add 'install-{html,pdf,dvi,ps}'
targets to po/Makefile.in.in (if needed).
Sample code in the basic/extended table was too wide to fit on a Letter
size printout. Text was overlapping and unreadable. Remove margin,
split commands in two lines and change the column with.
* doc/sed.texi (Basic and extended regexp): Rework table.
"Reads text file a file" was probably a typo. Also remove "Example: " in
the summary as there's no example there.
* doc/sed.texi (sed scripts): Fix r command description.
Copyright-paperwork-exempt: Yes
The samples commands demonstrating '\B' and '\S' were both using '\w'.
The commands output is correct.
* doc/sed.texi (Regular Expression Extensions): Use the proper commands.
Copyright-paperwork-exempt: Yes
Remove an extraneous space after @xref. Older 'makeinfo' would fail with:
./doc/sed.texi:3461: @xref expected braces.
./doc/sed.texi:3461: ` {Execution Cycle} and @ref{Addresses ov...' is
too long for expansion; not expanded.
Introduced in sed-4.3-15-gb0009b8.
* doc/sed.texi: Remove space after @xref.
Explain which commands can be separated by semicolon and which require
newlines. Requested by Ori Avtalion in https://bugs.gnu.org/21845 .
* doc/sed.texi (Multiple commands syntax): New section in "sed scripts"
chapter.
Remove broken link and update other resources in the manual.
Reported by olszkocj@aol.com in https://bugs.gnu.org/24770 .
* doc/sed.texi (Other Resources): Update wording.
sed-4.3 would segfault with:
printf '$LINENO $LINEN\nB\n' | sed -e 'N;s/\$LINENO\(.*\n\)/\1/'
Culprit is dfa crash if multi-lines are read in pattern space.
It is fixed at gnulib commit v0.1-1117-g823b5cb .
Reported by S. Gilles in https://bugs.gnu.org/25390
* testsuite/newline-dfa-bug.sh: New test.
* testsuite/local.mk: Add the test.
sed-4.3 would segfault due to dfa bug, see https://bugs.gnu.org/25390 .
* gnulib: Update to latest with various dfa fixes and improvement.
* m4/.gitignore: Add 'std-gnu11.m4', 'pthread_rwlock_rdlock.m4'.
Mention README-hacking for git users.
Issue raised by Jean-Christophe Manciot in https://bugs.gnu.org/25377 .
* README: Improve installation paragraph based on coreutils' README.
Skip building the man page if building from tarball (where 'doc/sed.1'
is already prebuilt). Build a stub if building from git but generating
the man page isn't possible (if there's no Perl or cross-compiling).
Cross-compilation issue reported by Vishal Biswas in
https://bugs.gnu.org/25358 .
Problematic 'perl' is related to https://bugs.gnu.org/25367 .
* configure.ac: Check for Perl, cross-compilation and tarball build;
Set automake variable BUILD_MAN_PAGE, BUILD_DUMMY_MAN_PAGE accordingly.
* doc/local.mk (doc/sed.1): Build conditionally if BUILD_MAN_PAGE is true;
Create a dummy man page if BUILD_DUMMY_MAN_PAGE is true.
* doc/sed-dummy.1: Stub man page.
Create sed,lib,doc,testsuite subdirectories at the end of
'configure', preventing build problems when building out of tree
with --disable-dependency-tracking.
Reported by Juan M. Guerrero in https://bugs.gnu.org/25371 .
* configure.ac: Call AS_MKDIR_P() to create subdirectories.
* sed/regexp.c (compile_regex_1): Remove #ifdef RE_ICASE guard,
since dfa.c uses it unconditionally. Suggested by Norihiro Tanaka.
Also remove the nearby "#ifdef RE_NO_SUB". Those macros are guaranteed
to be defined by virtue of configure-time tests that ensure we're using
either a new-enough native glibc (RE_NO_SUB was added in 2004), or the
included replacement.
* sed/regexp.c (compile_regex_1): Do away with use of DFA_CASE_FOLD.
This gnulib update pulls in a dfa module in which that symbol no
longer exists. Instead, it uses RE_ICASE in syntax bits.
* m4/.gitignore: Add files created by running bootstrap.
* lib/.gitignore: Likewise.
* cfg.mk (PATH): Prepend $(srcdir)/src, so that we use the just-
built sed also when running commands like those of "make distcheck".
Tested by running this in a just-built directory:
f=sed/sed; printf '%s\n' '#!/bin/sh' 'sleep 9h' > $f; chmod a+x $f
and then verifying that nearly every "make syntax-check" rule hangs.
* testsuite/Makefile.tests (elide_cr): Define this to use sed.
Replace every prior use of "$(TR) -d \\r" with it.
Our just-built sed can do that job (elide CR bytes) even when the
input contains NUL bytes. Solaris 11.3's /bin/tr would remove any
NUL byte from the result. Reported by Nelson H.F. Beebe in
https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00006.html
Do not bother autogenerating sed.texi from sed-in.texi. All it did
was to add a few '@group' commands. Since these are rarely modified,
add them manually. This simplifies the documentation-building rules
and lets us distribute only one copy of the texinfo manual.
See http://lists.gnu.org/archive/html/sed-devel/2016-12/msg00013.html
* doc/groupify.sed, doc/sed-in.texi: Remove files.
* doc/sed.texi: Remove the 'auto-generated' warning, as this file is no
longer auto-generated.
* doc/local.mk (doc_sed_TEXINFOS): Rename from sed_TEXINFOS.
(dist_noinst_DATA): The above renaming enables us to remove
doc/config.texi and doc/fdl.texi from this list.
(dist_noinst_SCRIPTS): Remove.
(doc/sed.texi): Remove rule.
(doc/s-texi): Likewise.