Commit Graph
226 Commits
Author SHA1 Message Date
Stefano Lattarini 2c99bdaf9b testsuite: make test logs more verbose
The Automake-provided parallel testsuite harness take care of
redirection the stdout and stderr of the run test cases to a
corresponding log file, so we no longer have to worry about
avoiding to pollute the "make test" output.

* testsuite/runtest: Adjust and simplify.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-01-01 17:14:07 +01:00
Stefano Lattarini 44d9fbdc2b tests: enable Automake parallel testsuite harness
It is better than the older test driver.  It is also the default now,
starting from Automake 1.13; so having it enabled unconditionally will
allow GNU sed to be seamlessly bootstrapped by Automake 1.13.

* configure.ac (AM_INIT_AUTOMAKE): Add 'parallel-tests' option.  Also
require Automake 1.11.1, since that is the minimal version to have a
sane 'parallel-tests' support.
(AC_PREREQ): Bump requirement to 2.62, since that is the minimal
version required by Automake 1.11.1.
* testsuite/Makefile.am (TESTS_ENVIRONMENT): Remove the invocation
for the test runner "$(srcdir)/runtest"; it's correct place is ...
(LOG_COMPILER): ... here.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-01-01 17:13:10 +01:00
Stefano Lattarini 8de7fd4d78 build: avoid bootstrap failure
Without this change, trying to bootstrap GNU sed from a freshly-cloned
Git checkout aborts with an error like this:

  ./bootstrap: aclocal --force -I m4 ...
  ./bootstrap: autoconf --force ...
  configure.ac:20: error: possibly undefined macro: gl_DISABLE_THREADS
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.

* bootstrap.conf (gnulib_modules): Add 'threadlib'.

Copyright-paperwork-exempt: yes
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
2013-01-01 17:13:08 +01:00
Paolo Bonzini aa90a76f40 add missing files to repository 2013-01-01 17:09:33 +01:00
Paolo Bonzini e265d716a9 bump version number, set copyright year
2012-12-21  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Bump version number.  Replace COPYRIGHT_YEAR.
	* Makefile.am (dist-hook): Revert 2010-08-10 change.
v4.2.2
2012-12-22 15:23:47 +01:00
Paolo Bonzini 216ed03a5e Comply more to gnulib usage standards
2012-12-21  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot: Rename to bootstrap.
	* autoboot.conf: Rename to bootstrap.conf.
	* README.boot: Remove.
	* Makefile.am: Remove README.boot, add bootstrap and bootstrap.conf.
2012-12-22 15:17:39 +01:00
Paolo Bonzini a0f80adf07 Update to latest gnulib.
2012-12-21  Paolo Bonzini  <bonzini@gnu.org>

	* gnulib: Update.
	* testsuite/version.gin: Regenerate.
2012-12-22 15:17:30 +01:00
Paolo Bonzini ced39febc8 Regenerate files
2012-12-21  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed.texi: Regenerate.
	* doc/sed.1: Regenerate.
	* po/sed.pot: Regenerate.
2012-12-22 15:12:27 +01:00
Paolo Bonzini fc99910ed5 document difference between "e" and "r" commands
2012-07-25  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed-in.texi: Document difference between "e" and "r"
	commands.
2012-07-25 12:32:54 +02:00
Jim Hill ecf69e8b54 Remove bootstrap.sh from Makefile.am
* Makefile.am (noinst_DATA, dist-hook): build failed after git clean -dfx
finish bootstrap.sh removal.
2012-04-30 09:04:29 +02:00
Paolo Bonzini 0f968ceb7b fix \x26 on RHS of s command
2012-04-13  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (convert_number): Remove default_char argument,
	expect buf to point to it.  Remove maxdigits argument and compute
	it on the fly.
	(normalize_text): Unify calls to convert_number under the convert
	label.  For TEXT_REPLACEMENT add a backslash to the output if
	convert_number returns ch == '&'.
2012-04-13 10:42:10 +02:00
Paolo Bonzini 2e41f70b49 regenerate testsuite/version.gin
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* testsuite/version.gin: Regenerate.
2012-03-16 09:43:05 +01:00
Paolo Bonzini 14bfbb5fa9 switch to the wonderful world of function prototypes
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* basicdefs.h (P_): Remove.
	* sed/compile.c: Adjust.
	* sed/execute.c: Likewise.
	* sed/fmt.c: Likewise.
	* sed/sed.c: Likewise.
	* sed/sed.h: Likewise.
	* sed/utils.c: Likewise.
	* sed/utils.h: Likewise.
2012-03-16 09:43:05 +01:00
Paolo Bonzini 9b1f7c3285 remove ck_free
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* basicdefs.h (FREE): Remove.
	* sed/compile.c: Adjust.
	* sed/execute.c: Adjust.
	* sed/regexp.c: Adjust.
	* sed/utils.c: Adjust, remove ck_free.
	* sed/utils.h: Adjust, remove ck_free.
2012-03-16 09:43:04 +01:00
Paolo Bonzini 40c84e138a rip out old macros
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* basicdefs.h (CAST, VCAST, VOID, MEMCPY, MEMMOVE): Rip out.
	* sed/compile.c: Adjust.
	* sed/execute.c: Adjust.
	* sed/regexp.c: Adjust.
	* sed/utils.c: Adjust.
	* sed/utils.h: Adjust.
2012-03-16 09:43:02 +01:00
Paolo Bonzini 32d990dd60 unconditionally compile for MBCS
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* sed/execute.c: Unconditionally compile for MBCS.
	* sed/mbcs.c: Unconditionally compile for MBCS.
	* sed/sed.h: Unconditionally compile for MBCS.
2012-03-16 09:43:01 +01:00
Paolo Bonzini 9ea38da9fb clean up header inclusions
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* basicdefs.h: Enjoy gnulib's headers.
	* sed/compile.c: Likewise.
	* sed/execute.c: Likewise.
	* sed/regexp.c: Likewise.
	* sed/sed.c: Likewise.
	* sed/sed.h: Likewise.
	* sed/utils.c: Likewise.
2012-03-16 09:43:01 +01:00
Paolo Bonzini 944747af30 remove bootstrap script
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* bootstrap.sh.in: Remove.
	* bootstrap.sh: Remove.
	* configure.ac: Do not create bootstrap.sh.
	* basicdefs.h [BOOTSTRAP]: Remove guards.
	* sed/execute.c [BOOTSTRAP]: Remove guards.
	* sed/sed.c [BOOTSTRAP]: Remove guards.
	* sed/sed.h [BOOTSTRAP]: Remove guards.
2012-03-16 09:43:00 +01:00
Paolo Bonzini 1e0501c438 update gnulib to latest
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* gnulib: Update.
2012-03-16 09:42:52 +01:00
Mike Frysinger 955d831f69 sed(1): document address behavior across input files
2012-03-16  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed.x: Document address behavior across input files.
	* doc/sed.1: Regenerate.
2012-03-16 09:42:11 +01:00
Mike Frysinger b28bc112a4 ignore compiled object files
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-16 08:32:25 +01:00
Paolo Bonzini e8066f09db do not open input files with "rt" mode, do not assume "rt" is supported
2012-02-13  Paolo Bonzini  <bonzini@gnu.org>

	* configure.ac: Test whether fopen("foo", "rt") works.
	* sed/compile.c: Do not open scripts with "rt" mode if it doesn't.
	* sed/sed.c: Never open input files with "rt" mode.
2012-02-13 15:46:14 +01:00
Paolo Bonzini a085906489 add -z/--null-data
2012-02-05  Paolo Bonzini  <bonzini@gnu.org>
            Jim Hill  <gjthill@gmail.com>

	* autoboot.conf: Change getline to getdelim.
	* doc/sed-in.texi: Document -z/--null-data.
	* doc/sed.texi: Regenerate.
	* sed/execute.c: Change '\n' to buffer_delimiter.
	* sed/sed.c: Add support for -z/--null-data.
	* sed/sed.h: Add buffer_delimiter.
	* sed/utils.c: Change ck_getline to ck_getdelim.
	* sed/utils.h: Change ck_getline to ck_getdelim.
	* NEWS: Document new option.
2012-02-05 12:08:57 +01:00
Paolo Bonzini 727d6fa860 document that . does not match newline in multi-line mode
2011-11-23  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed-in.texi: Document how multiline mode affects matching
	newlines against period.  Reported by Dmitry Bolshakov.
2011-11-23 14:58:14 +01:00
Paolo Bonzini 90b2d54032 update .gitignore files 2011-08-29 10:29:31 +02:00
Paolo Bonzini dd275ee12a fix help text for -i
2011-08-29  Paolo Bonzini  <bonzini@gnu.org>

	* sed/sed.c (usage): Fix documentation for -i.  Reported by
	Dennis Bartlett.
2011-08-29 10:29:16 +02:00
Paolo Bonzini fd37964ef7 fix NEWS entry for the previous change (231 -> 2^31) 2011-07-25 09:05:41 +02:00
Jim Meyering bed0c78aa7 avoid silent data loss when an input line is 231 bytes or longer
If one line in a file has length (including newline) of 231, then
applying sed -i to that file truncates it to size 0.  I first
noticed it like this: Create a file with line of length 231-1
  $ perl -le 'print "v"x(2**31-1)' > k
Then prepend a byte to that line:
  $ sed -i 's/^/v/' k
Surprise!  The file is empty.
* sed/utils.c (ck_getline): Declare "result" to be of type ssize_t,
rather than int, to match the return type of getline.
2011-07-11 18:37:21 +02:00
Pádraig Brady 629ef76a75 avoid reopening stdin
This adjusts the change made in 3a8e165a,
to not reopen stdin on platforms where there
is no separate "binary mode".

That added some overhead and also precludes the
use of tools like `stdbuf -i...`.

* execute.c (open_next_file): Only reopen stdin on windos.
2011-07-04 12:45:19 +02:00
Paolo Bonzini 607d56e084 document corner case of \l and \u, and simplify the code handling it
2011-05-27  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed-in.texi: Explain behavior of \l and \u at the end
	of the replacement text.
	* doc/sed.texi: Regenerate.
	* sed/execute.c (append_replacement, do_subst): Further
	simplification.
2011-05-27 09:37:25 +02:00
Paolo Bonzini b63b148631 fix incorrect comments in the "Increment a number" example.
2011-05-27  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed-in.texi: Fix incorrect comment in the "Increment a
	number" example.  Reported by Wu Liang and Micah Cowan.
        * doc/sed.texi: Regenerate.
2011-05-27 09:26:56 +02:00
Paolo Bonzini ad08a50484 clang analyzer cleanups
2011-03-11  Paolo Bonzini  <bonzini@gnu.org>

	* sed/compile.c (normalize_text): Clang analyzer cleanup.
	* sed/execute.c (append_replacement, do_subst): Same.
	* sed/utils.c (ck_getline): Same.
2011-03-11 13:25:11 +01:00
Jari Aalto 5b1925c3c9 order command alphabetically in man page
2010-11-13  Jari Aalto  <jari.aalto@cante.net>

	* doc/sed.x: Order commands alphabetically.
2010-12-13 14:05:34 +01:00
Paolo Bonzini 3ce4f9f423 small fixes to "rename files" example
2010-11-10  Paolo Bonzini  <bonzini@gnu.org>

	* doc/sed-in.texi: Fix double negation in comment, escape
	file names.
2010-12-10 08:58:24 +01:00
Eric Blake 5c350ae11f avoid compiler warnings regarding ctype functions
* basicdefs.h (ISDIGIT): Avoid compiler warning on cygwin.
* sed/compile.c (normalize_text): Avoid undefined behavior.
2010-11-03 17:13:59 +01:00
Eric Blake c25e88a930 avoid compiler warning
* sed/sed.c (includes): Supply missing header.
2010-11-03 17:13:49 +01:00
Eric Blake d7b21d511a avoid compiler warning
* sed/sed.c (includes): Supply missing header.
2010-11-03 17:13:12 +01:00
Paolo Bonzini ddf5e28afb downgrade minimum requested version of gettext to 0.17.
2010-11-01  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf: Replace gettext with gettext-h.  Suggested by
	Gerald Pfeifer and Eric Blake.
	* configure.ac: Downgrade minimum requested version of gettext
	to 0.17.
2010-11-01 15:34:18 +01:00
Paolo Bonzini 699fd06fad Commit regenerated doc/sed.texi 2010-11-01 15:33:53 +01:00
Paolo Bonzini 971249a020 update .gitignore files 2010-10-31 22:56:22 +01:00
Paolo Bonzini 8eee8cbf0e 2010-10-31 Gerald Pfeifer <gerald@pfeifer.com>
* doc/sed-in.texi (Extended regexps): Add '|' to the list of
	differences.  Note that "\|" is a GNU extension to begin with.
2010-10-31 22:56:15 +01:00
Paolo Bonzini deb6f38c21 fix previous commit 2010-10-20 20:00:21 +02:00
Paolo Bonzini 30b44d95a2 fix lseek errors from flushing input pipes on interix
2010-10-20  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf: Add fwriting.
	* sed/utils.c: Use it.
2010-10-20 19:57:31 +02:00
Paolo Bonzini 1c3de3387c change bug reporting address to bug-sed@gnu.org
2010-09-20  Paolo Bonzini  <bonzini@gnu.org>

	* doc/configure.ac: Mention bug-sed@gnu.org.
	* doc/sed.x: Mention bug-sed@gnu.org.
	* doc/sed-in.texi: Mention bug-sed@gnu.org.
2010-10-20 19:57:09 +02:00
Paolo Bonzini c6d32f0e91 bump minimal gettext version 2010-08-30 12:19:33 +02:00
Paolo Bonzini a9bf076c0b use version-etc-fsf
2010-08-30  Paolo Bonzini  <bonzini@gnu.org>

	* Makefile.am (dist-hook): Remove COPYRIGHT_YEAR check.
	* autoboot.conf (gnulib_modules): Add version-etc-fsf.
	* configure.ac (COPYRIGHT_YEAR): Remove.  Change package name to
	"GNU sed".
	* doc/sed.1: Regenerate.
	* sed/sed.c (AUTHORS): New.
	(main): Use version_etc.
2010-08-30 12:18:50 +02:00
Paolo Bonzini 7355d316a5 use "w" or "wb" modes for sed -i, s///w, w' and W' depending on --binary
2010-07-18  Paolo Bonzini  <bonzini@gnu.org>

	* sed.c (write_mode): New.
	(main): Initialize it to "wb" if --binary is passed.
	* sed.h (write_mode): New.
	* compile.c (mark_subst_opts, compile_program): Use it instead
	of "w".
	* execute.c (open_next_file): Pass write_mode to ck_mkstemp.
	* utils.c (ck_mkstemp): Accept mode, pass it to fdopen.  Constify.
	* utils.h (ck_mkstemp): Adjust prototype.
2010-08-17 01:56:55 +02:00
Paolo Bonzini e1c76b0344 fix imprecision in the documentation of `D'
2010-08-17  Paolo Bonzini  <bonzini@gnu.org>

	Fix imprecision in the documentation of `D'.
	* doc/sed-in.texi (D command): Fix documentation of behavior for
	pattern space ending with \n and with no other newline.
	Reported by Randall Cotton.
	* doc/sed.x (D command): Fix documentation of behavior for
	pattern space ending with \n and with no other newline.
	* doc/sed.texi: Regenerate.
	* doc/sed.1: Regenerate.

2010-07-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2010-08-17 01:56:36 +02:00
Ralf Wildenhues fbf10902f7 Let --posix turn off nonportable scripts ending in backslash.
* sed/compile.c (errors, INCOMPLETE_CMD): New error string.
(compile_program): In strict posix mode, complain about incomplete
command.
* NEWS: Update.
Report by Bruno Haible.
2010-08-17 01:56:36 +02:00
Paolo Bonzini a85e83d0db use mkostemp(template, 0) instead of mkstemp to work around Cygwin oddity
2010-07-16  Paolo Bonzini  <bonzini@gnu.org>

	* autoboot.conf (gnulib_modules): Replace mkstemp with mkostemp.
	* bootstrap.sh.in: Compile mkostemp.c instead of mkstemp.c.
        * gnulib: Update.
        * NEWS: Mention change.
	* sed/utils.c (ck_mkstemp): Use mkostemp to work around Cygwin
	oddity.  Reported by Stepan Kasal.
2010-07-16 22:01:35 +02:00