Commit Graph
445 Commits
Author SHA1 Message Date
Alexandre Jasmin 45aae495cb doc: rework BRE/ERE table to fit PDF manual
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.
2017-02-09 23:00:35 -05:00
Alexandre Jasmin 5fbc15c812 doc: change description of the r command
"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
2017-02-07 09:29:48 +00:00
Alexandre Jasmin 755e9434c0 doc: fix copy-pasted examples of regexp
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
2017-02-07 09:28:04 +00:00
Jim Meyering fe3f8af814 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2017-02-03 17:17:45 -08:00
Jim Meyering 63101f3408 version 4.4
* NEWS: Record release date.
v4.4
2017-02-03 17:14:13 -08:00
Jim Meyering d8962bc8e1 gnulib: update to latest 2017-02-03 16:35:47 -08:00
Jim Meyering db7c7674ae maint: avoid %x-format argument type mismatch
* sed/compile.c (savchar): Cast %x-format argument to "unsigned int"
rather than to "unsigned char".  Reported by Eric Blake in
https://lists.gnu.org/archive/html/sed-devel/2017-02/msg00000.html
2017-02-03 16:35:47 -08:00
Assaf Gordon 61cf98dc1c doc: fix broken xref
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.
2017-02-03 02:38:45 -05:00
Jim Meyering e9ab614280 gnulib: update to latest 2017-01-31 09:45:43 -08:00
Assaf Gordon 3b0404131f doc: add NEWS entry for recent newline bugfix
Bugfix in sed-4.3-12-g44d99bf (for https://bugs.gnu.org/25390) did not
included a corresponding NEWS entry.

* NEWS: Mention bugfix.
2017-01-31 12:22:46 -05:00
Assaf Gordon cca9795a71 doc: new 'multiple commands syntax' section
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.
2017-01-28 15:21:39 -05:00
Assaf Gordon 3365c939c8 doc: update 'other resources' 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.
2017-01-24 22:23:23 -05:00
Jim Meyering 572d0a59d3 maint: update bootstrap and init.sh
* bootstrap: Update from gnulib.
* testsuite/init.sh: Likewise.
2017-01-18 08:03:15 -08:00
Assaf Gordon b0009b8dd7 doc: add 'branching and flow control' section
* doc/sed.texi (Branching and flow control): New section under 'Advanced
Sed' chapter.
2017-01-17 00:11:25 -05:00
Assaf Gordon 8143a730f2 doc: add 'join lines' example
* doc/sed.texi (Joining lines): Add example of joining SMTP header
lines.
2017-01-17 00:11:25 -05:00
Norihiro Tanaka 0f98f0055e tests: new test for dfa newline bug
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.
2017-01-16 23:40:25 -05:00
Assaf Gordon 44d99bf5c9 gnulib: update to latest (with fix for dfa newline bug)
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'.
2017-01-16 23:40:00 -05:00
Assaf Gordon 2ecd4e1d91 doc: improve README installation instructions
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.
2017-01-16 21:47:24 -05:00
Jim Meyering 33e29e5863 maint: avoid syntax-check-exposed nit
* doc/local.mk (doc/sed.1): Use $(...) rather than @...@.
2017-01-16 14:36:00 -08:00
Jim Meyering 03e44bade8 maint: do not distribute COPYING.DOC
* COPYING.DOC: Remove this file, now that we have doc/fdl.texi.
* Makefile.am (EXTRA_DIST): Don't distribute it.
2017-01-15 09:19:12 -08:00
Jim Meyering 1d7ee2d553 tests: skip valgrind-running tests when ASAN-enabled
* init.cfg (require_valgrind_): Skip when we detect that the
binary is ASAN-enabled.
2017-01-14 15:34:08 -08:00
Vagelis Prokopiou 2724baeb68 maint: insert missing word in comment
* sed/sed.h (struct vector)[v_allocated]: Insert "of".
Copyright-paperwork-exempt: Yes
2017-01-13 14:39:54 -08:00
Assaf Gordon a0a25e3ee3 build: skip building man page if needed
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.
2017-01-09 22:24:07 -05:00
Assaf Gordon ad68a128df build: fix out-of-tree builds without dep-tracking
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.
2017-01-08 21:36:25 -05:00
Jim Meyering 2a6eccb7ee doc: fix NEWS typo
* NEWS: Fix typo s/introducted/introduced/
* cfg.mk (old_NEWS_hash): Update.
Reported by Karl Berry.
2017-01-07 16:46:55 -08:00
Jim Meyering 1ceaa652a5 maint: update gnulib and copyright dates for 2017
* gnulib: Update to latest.
* all files: Run "make update-copyright".
2017-01-01 03:17:39 -08:00
Jim Meyering a14ff8c426 maint: compile warning-free with -DDEBUG_LEAKS
* sed/regexp.c (release_regex) [DEBUG_LEAKS]: Modernize declaration.
2017-01-01 03:12:34 -08:00
Jim Meyering a05ba694a3 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2016-12-30 01:28:29 -08:00
Jim Meyering c99c370e7c version 4.3
* NEWS: Record release date.
v4.3
2016-12-30 01:27:19 -08:00
Jim Meyering 1e7c126cda gnulib: update to latest, to fix parallel getopt test failure 2016-12-30 01:24:10 -08:00
Assaf Gordon 5a77cbf29a doc: new annotated example for N/P/D/b commands
Illustrates how to restructure line breaks over multiple lines.

* doc/sed.texi (Line length adjustment): New section.
2016-12-28 22:33:02 -05:00
Assaf Gordon aed5e43919 doc: new annotated example section for N/D commands
Illustrate how to use N/D to search for doubled-word spanning
multiple lines.

* doc/sed.texi (Text search across mutliple lines): New section.
2016-12-28 22:33:02 -05:00
Assaf Gordon 1d57c105e6 doc: add 'multiline techniques' section
Expand on using D,G,H,N,P commands to process multiple lines.

* doc/sed.texi (Multiline techniques): New section.
2016-12-28 21:26:28 -05:00
Assaf Gordon 53e2747eb5 maint: update m4/.gitignore
* m4/.gitignore: Add 'dirfd.m4', 'hard-locale.m4'.
2016-12-22 09:44:33 +01:00
Jim Meyering 24393537a7 maint: RE_ICASE, RE_NO_SUB: remove useless '#ifdef's
* 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.
2016-12-20 12:25:10 +01:00
Jim Meyering 6df8dd295f gnulib: update to latest; dfa improvement and getopt-posix-tests build fix 2016-12-19 08:50:14 -08:00
Jim Meyering 9ce9ee19f8 gnulib: update to latest and adapt to modified dfa API
* 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.
2016-12-18 11:13:06 -08:00
Jim Meyering 937b1ba642 tests: use just-built sed in more places
* 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.
2016-12-18 11:19:15 +01:00
Jim Meyering 62f8375628 doc: fix sed.1-building rule to work on mingw
* doc/local.mk (doc/sed.1): Add $(EXEEXT) suffix on "sed/sed" dependent.
Patch by Miodrag Milanovic via Stephan T. Lavavej, in
https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00026.html
2016-12-14 08:54:46 -08:00
Jim Meyering 70d57098dd tests: port tests to avoid tr NUL-eliding behavior on Solaris
* 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
2016-12-12 17:51:18 -08:00
Jim Meyering e43965d076 gnulib: update to latest, for solaris-10-vs-configure fix 2016-12-12 15:04:24 -08:00
Jim Meyering e38c18a676 doc: add a README-hacking file
* README-hacking: New file: instructions for building from a git clone.
Copied from grep's repo, but with s/grep/sed/.
2016-12-12 07:56:59 -08:00
Jim Meyering 5a56178244 build: avoid "make dist" failure due to missing dependencies
* sed/local.mk ($(sed_sed_OBJECTS)): Depend on $(BUILT_SOURCES).
Reported by Assaf Gordon in
https://lists.gnu.org/archive/html/sed-devel/2016-12/msg00016.html
2016-12-11 10:08:06 -08:00
Assaf Gordon adcc31c126 doc: simplify documentation building
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.
2016-12-10 21:48:34 -05:00
Assaf Gordon 77f32cf6c6 maint: add missing fdl.texi to distribution
Neglected to add it in commit v4.2.2-175-gc6a55aa.

* doc/local.mk (sed_TEXINFOS, dist_noinst_DATA): Add doc/fdl.texi.
2016-12-06 19:59:08 -05:00
Assaf Gordon 0989654f71 doc: follow-up changes for manual improvements
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.
2016-12-06 19:59:08 -05:00
Jim Meyering a3486ce3dd gnulib: update to latest 2016-12-05 15:23:41 -08:00
Assaf Gordon 801a2c83b2 doc: reorganize and expand manual
Discussed in
http://lists.gnu.org/archive/html/sed-devel/2016-11/msg00005.html

* doc/sed-in.texi: Reorganize and expand.
* doc/sed.texi: Auto-regenerated.
2016-12-05 08:46:34 -05:00
Assaf Gordon c6a55aa201 maint: upgrade documentation license to GFDL-1.3 (or later)
* 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.
2016-12-02 17:31:15 -05:00
Jim Meyering 2d426c3711 tests: use "returns_ N env VAR=val ..."
Use "returns_ N env VAR=val ..." rather than "VAR=val returns_ N ...".
Some shells do not propagate envvar settings through our use
of the "returns_" function, so set any envvar via use of "env".
This was an issue at least on Ubuntu, Debian and *BSD-based systems.
* testsuite/mb-bad-delim.sh: As above.
* testsuite/mb-y-translate.sh: Likewise.
2016-11-29 17:14:46 -08:00