Run "make update-copyright" and then...
* gnulib: Update to latest with copyright year adjusted.
* tests/init.sh: Sync with gnulib to pick up copyright year.
* bootstrap: Likewise.
$ seq 3 | sed --debug -e 's/./--&--/ ; 2d'
SED PROGRAM:
s/./--&--/
2 d
INPUT: 'STDIN' line 1
PATTERN: 1
COMMAND: s/./--&--/
MATCHED REGEX REGISTERS
regex[0] = 0-1 '1'
PATTERN: --1--
COMMAND: 2 d
END-OF-CYCLE:
--1--
INPUT: 'STDIN' line 2
PATTERN: 2
COMMAND: s/./--&--/
MATCHED REGEX REGISTERS
regex[0] = 0-1 '2'
PATTERN: --2--
COMMAND: 2 d
END-OF-CYCLE:
INPUT: 'STDIN' line 3
PATTERN: 3
COMMAND: s/./--&--/
MATCHED REGEX REGISTERS
regex[0] = 0-1 '3'
PATTERN: --3--
COMMAND: 2 d
END-OF-CYCLE:
--3--
Discussed in https://lists.gnu.org/r/sed-devel/2018-07/msg00006.html
and https://lists.gnu.org/r/sed-devel/2018-10/msg00007.html .
* NEWS: Mention new option.
* doc/sed.texi (Program options): Mention new option.
* sed/debug.c: New unit with debug printing functions.
* sed/sed.h (debug_print_command, debug_print_char, debug_print_program,
debug): Declare functions and global variable.
(struct sed_cmd): Add label_name member variable.
* sed/compile.c (compile_program): Save the label's name.
(cleanup_program_filenames): extracted function to free filenames.
(check_final_program) Don't delete the filenames, instead move it to ...
(finish_program) ... here.
* sed/execute.c (debug_print_end_of_cycle, debug_print_input,
debug_print_line): New debug functions (cannot be defined in debug.c as
execute's structures are private).
(execute_program, process_files): Call debug functions.
* sed/sed.c: (DEBUG_OPTION): New option for getoptlong.
(debug): New global variable.
(usage): Mention new option.
(main): Process new option and call debug functions if needed.
* testsuite/debug.pl: New tests.
* testsuite/local.mk (T): Add new tests.
Discussed in https://bugs.gnu.org/22636 .
* doc/sed.texi: Use '@kbd{@key{TAB}}' instead of '@kbd{tab}' to improve
rendering in HTML and info formats.
Copyright-paperwork-exempt: Yes
Reported in https://bugs.gnu.org/30479 .
doc/sed.x: Change a HYPHEN-MINUS (code 0x55, 2D) to a dash (\-, minus)
if it matches " -[:alpha:]" or \(aq-[:alpha:] (for options); Use a pronoun
instead of a repeated noun.
Copyright-paperwork-exempt: Yes
* doc/sed.texi: s/only accepts/accepts only/.
(BRE vs ERE): Tweak ERE and BRE definitions, and convert a
passive-voice sentence to active voice. Insert a comma.
* doc/config.texi, doc/sed-dummy.1, doc/sed.texi: Change http to https for
GNU URLs. External links (e.g. sed.sf.net, autsingroup.org) currently do
not support https and kept as-is.
Reported by Bamber Ward in https://bugs.gnu.org/28140 .
* doc/sed.texi (Line length adjustment): Fix sed script;
Rewrite example to long script with inlined comments;
Remove second example.
* doc/sed.texi, doc/config.texi: Remove all uses of @acronym{...},
per recommendation by Karl Berry.
* cfg.mk (local-checks-to-skip): Remove exemption, enabling
the @acronym{-prohibiting syntax-check rule.
'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.
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.
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.
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.
Fixes few missing issues from commit v4.2.2-176-g801a2c8,
discussed in
http://lists.gnu.org/archive/html/sed-devel/2016-12/msg00005.html
* doc/config.texi: Add stub texinfo macros '@codequotebacktick' and
'@codequoteundirected' (needed if using older versions of texinfo).
* doc/sed-in.texi: Fix syntax that's accepted by newer texinfo but
rejected by texinfo-4.13; Disable directed quote characters in examples.
* doc/sed.texi: Auto-regenerated.
* bootstrap.conf: Add gnulib's fdl module.
* doc/sed-in.texi: Update license blurb to latest recommended text.
Remove duplicated copyright information from title page (copied from
coreutil's texinfo style). Include fdl.texi in a new appendix.
Regenerate sed.texi from sed-in.texi after
doc change in v4.2.2-160-10549b7 ( https://bugs.gnu.org/24799 ).
* doc/sed.texi: Regenerated with 'make info'.
In sandbox mode, r/w/e commands are not allowed.
This ensures sed operates only on files designated on the command line,
and cannot execute external programs.
* sed/sed.c (sandbox): New option variable.
(usage): List new option.
(main): Accept new option in getopt.
* sed/sed.h (sandbox): New extern option variable.
* sed/compile.c (DISALLOWED_CMD): New error message.
(read_filename): Abort in sandbox mode (r/w commands).
(compile_program): Abort on 'e' in sandbox mode.
* testsuite/sandbox.sh: Test new option.
* testsuite/local.mk: Add new test.
* NEWS: Mention new option.
* doc/sed-in.texi, doc/sed.texi: Document new option.
* doc/local.mk (distclean-local): Remove rule. Moved to ...
* Makefile.am (distclean-local): ...here, and add a command to
remove all .deps directories. It could have stayed in that .mk
file, but since with this change, it is no longer specific to doc/,
the top level makes more sense.
* lib/local.mk (MOSTLYCLEANFILES): Remove this. Covered by the above.
Reported by Assaf Gordon in
https://lists.gnu.org/archive/html/sed-devel/2016-08/msg00019.html
* doc/local.mk (doc/sed.1): Depend not on sed.c, but on the binary
that help2man must run. Also depend on .version, to be sure we
pick up a version change. Also, be careful not to write directly
to $@: instead write to $@-t, and make read-only to mark as generated,
and then, only if all is well, rename atomically to $@.
Also, prefix commands with $(AM_V_GEN) and $(AM_V_at) and ensure
that doc/ exists via $(MKDIR_P).
(distclean-local): New target. Use this instead of ...
(dist-hook-man-page): ... this. Remove rule.
(SEDBIN): Remove unnecessary $(top_builddir)/ prefix.
(doc/sed.texi, doc/s-texi): Remove some uses of $(top_builddir).
Replace others with $(srcdir).
* Makefile (dist-hook): remove dependency on dist-hook-man-page.
* lib/local.mk (MOSTLYCLEANFILES): Arrange for lib/.deps/*.Po
to be removed as part of "make distclean", so that make distcheck
no longer fails when using latest automake.