Commit Graph
279 Commits
Author SHA1 Message Date
Jim Meyering a5d187ada0 maint: fix "make distcheck" failure
* Makefile.am (EXTRA_DIST): List THANKS.in, not THANKS.
Add .mailmap, too.
2014-12-20 16:03:50 -08:00
Jim Meyering 6783c9f367 build: build-aux/texi2dvi: remove file
* build-aux/texi2dvi: Remove file. It was out of date and could
no longer parse our .texi files.
* Makefile.am (EXTRA_DIST): Don't list it here.
* cfg.mk: Remove an exemption for that file.
* doc/Makefile.am (TEXI2DVI): Remove definition.
2014-12-20 16:03:40 -08:00
Jim Meyering be2d5c0d33 remove support for the 'L' (fmt/flow-paragraph) command
* sed/Makefile.am (sed_SOURCES): Remove fmt.c.
* sed/execute.c (execute_program):
* sed/fmt.c: Remove file.
* sed/sed.h (fmt): Remove declaration.
* doc/sed.texi: Remove documentation for 'L' command.
* doc/sed-in.texi: Likewise.
* NEWS (Feature removal): Document it.
Prompted by the report from Jodie Cunningham that using this
command with a large number could cause sed to segfault:
https://bugs.launchpad.net/ubuntu/+source/sed/+bug/1400575
2014-12-16 15:40:57 -08:00
Jim Meyering 38800587a9 doc: NEWS: mention the gzip->xz release tarball switch
* NEWS (Build-related): Mention that we are now distributing
only .tar.xz archives; no more gzip-compressed tarballs.
2014-12-01 21:59:02 -08:00
Jim Meyering 383efa5436 build: avoid warning about unused fchown result
* sed/execute.c: Include "ignore-value.h".
(closedown): Explicitly ignore fchown return value.
* bootstrap.conf (gnulib_modules): Add ignore-value.
* lib/.gitignore: Ignore the new .h file.
* .gitignore: Ignore all **~ backup files.
2014-12-01 11:07:16 -08:00
Jim Meyering 671770af8b build: use gnulib's manywarnings module
bootstrap.conf: Add the module name.
configure.ac: Copy boilerplate and exclusions from coreutils.
sed/Makefile.am (AM_CFLAGS): Define in terms of the two new
variables, $(WARN_CFLAGS) and $(WERROR_CFLAGS).
m4/.gitignore: Add the two new .m4 files.
2014-11-30 21:08:33 -08:00
Jim Meyering 263c26e4d1 maint: add three casts-in-initialization to avoid warnings
* sed/compile.c (special_files): When initializing, cast string
literals to (char *) to avoid warnings.
2014-11-30 21:08:33 -08:00
Jim Meyering 2fae6cb1e3 maint: avoid a gcc "const discard" warning
* sed/compile.c (compile_program): Make a local "const" to avoid
discarding "const" attribute in assignment.
2014-11-30 21:08:32 -08:00
Jim Meyering 157626b785 maint: avoid more gcc warnings: apply _GL_ATTRIBUTE_PURE
* sed/utils.h (get_buffer, size_buffer): Make each functions
sole parameter "const" and declare the function itself with the
"pure" attribute.
* sed/utils.c (get_buffer, size_buffer): Adjust definitions to match.
2014-11-30 21:08:32 -08:00
Jim Meyering e09428778d maint: add _Noreturn attribute to two functions
This avoids two gcc may-be-noreturn warnings:
* sed/sed.h (bad_prog): Add _Noreturn attribute.
* sed/utils.h (panic): Likewise.
2014-11-30 21:07:57 -08:00
Jim Meyering 366b04cabd maint: manually convert K&R to ANSI style decls; and add "static"
Convert many function definitions from K&R to ANSI style.
When possible, make a function static and remove the immediately-
preceding declaration of that same function.
Also, add the const to a few declarations.
* sed/compile.c: As above.
(special_files): Likewise.
* sed/execute.c: Likewise.
* sed/fmt.c: Likewise.
* sed/mbcs.c: Likewise.
* sed/regexp.c: Likewise.
* sed/sed.c: Likewise.
* sed/sed.h: Likewise.
* sed/utils.c: Likewise.
2014-11-30 20:47:09 -08:00
Jim Meyering 1743b7f3cb maint: declare several "int" locals to be of type size_t
* sed/compile.c (compile_program): Using "int" was wrong: not only
too narrow, but would also evoke warnings from gcc when comparing
with variables of unsigned type.
2014-11-30 18:59:35 -08:00
Jim Meyering c750cb5fd1 maint: avoid gcc warning about unused macro
* sed/regexp.c (END_ERRORS): Remove definition of unused macro.
2014-11-30 18:59:35 -08:00
Jim Meyering 3e28ea356a maint: avoid false-positive used-uninit. warning from gcc
* sed/sed.h (IF_LINT): Define.
* sed/compile.c (snarf_char_class) [lint]: Use it to initialize DELIM,
so that gcc doesn't report it is used uninitialized.
2014-11-30 18:59:35 -08:00
Jim Meyering 4916618496 maint: enable sc_prohibit_empty_lines_at_EOF check
* cfg.mk (exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF):
* cfg.mk (local-checks-to-skip): Remove its exemption.
Adjust many files to end in a single newline, but exempt a few
test suite input and output files.
* testsuite/fasts.sed: Remove three empty lines at EOF.
* BUGS: Remove empty line at EOF.
* sed/mbcs.c: Likewise.
* sed/sed.h: Likewise.
* testsuite/BOOST.tests: Likewise.
* testsuite/dc.inp: Add a newline at EOF; there was none.
* testsuite/flipcase.sed: Likewise.
* testsuite/utf8-1.good: Likewise.
* testsuite/utf8-1.inp: Likewise.
* testsuite/utf8-2.good: Likewise.
* testsuite/utf8-2.inp: Likewise.
* testsuite/utf8-3.good: Likewise.
* testsuite/utf8-3.inp: Likewise.
* testsuite/utf8-4.good: Likewise.
* testsuite/utf8-4.inp: Likewise.
* testsuite/xbxcx.good: Likewise.
* testsuite/xbxcx.inp: Likewise.
* testsuite/xemacs.good: Likewise.
* testsuite/xemacs.inp: Likewise.
2014-11-30 18:59:35 -08:00
Jim Meyering e48ca0d39c maint: enable sc_prohibit_tab_based_indentation syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
Exempt all files under testsuite/, for now, and a few others.
* .gitmodules: Change each leading TAB to 8 spaces spaces.
* BUGS: Likewise.
* NEWS: Likewise.
* configure.ac: Likewise.
* sed/compile.c: Likewise.
* sed/execute.c: Likewise.
* sed/fmt.c: Likewise.
* sed/regexp.c: Likewise.
* sed/sed.c: Likewise.
* sed/sed.h: Likewise.
* sed/utils.c: Likewise.
* sed/utils.h: Likewise.
* COPYING: Update from coreutils.
2014-11-30 18:59:35 -08:00
Jim Meyering 8d5fa64778 maint: enable sc_m4_quote_check syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* configure.ac: Fix the under-quoting problems thus exposed.
2014-11-30 18:59:34 -08:00
Jim Meyering ba5e0dbcc9 maint: enable sc_cast_of_argument_to_free syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* testsuite/tst-rxspencer.c (mb_test): Remove a cast.
2014-11-30 18:59:34 -08:00
Jim Meyering 10a322910c maint: enable sc_cast_of_alloca_return_value syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* sed/regexp.c (match_regex): Do not cast return value of alloca.
2014-11-30 18:59:34 -08:00
Jim Meyering c0babfb931 maint: enable sc_po_check syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* po/POTFILES.in: Adjust to reflect added/removed file names.
2014-11-30 18:59:34 -08:00
Jim Meyering a9a32621e8 maint: enable sc_prohibit_always_true_header_tests syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
Exempt configure.ac.
2014-11-30 18:59:34 -08:00
Jim Meyering bf954de99d maint: enable sc_makefile_at_at_check syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* testsuite/Makefile.am (LDADD, TESTS_ENVIRONMENT): Use $(...)
rather than obsolescent @...@ notation.
2014-11-30 18:59:34 -08:00
Jim Meyering 79c126b38e maint: enable sc_space_tab syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* doc/groupify.sed: Reverse SP-TAB sequences.
* sed/compile.c (compile_program): Remove spaces before TAB.
* sed/execute.c (append_replacement): Likewise.
2014-11-30 18:59:34 -08:00
Jim Meyering 8ad1b31305 maint: enable sc_program_name syntax check
* cfg.mk (local-checks-to-skip): Remove its exemption.
* sed/sed.c: Include progname.h".
(program_name): Remove now-unnecessary declaration.
(main): Call set_program_name.
* bootstrap.conf (gnulib_modules): Add progname.
* lib/.gitignore: Append the two new names.
2014-11-30 18:59:34 -08:00
Jim Meyering 72834d8d89 maint: enable more checks
* cfg.mk (local-checks-to-skip): Remove exemptions
for immutable NEWS as well as the two config.h checks.
Also accept "sed.h", since the first thing it does is
to include <config.h>.
* sed/sed.h: Change "config.h" to <config.h>, for consistency
with other GNU tools.
* sed/utils.c: Likewise, here and for each of the following.
* testsuite/bug-regex10.c:
* testsuite/bug-regex11.c:
* testsuite/bug-regex12.c:
* testsuite/bug-regex13.c:
* testsuite/bug-regex14.c:
* testsuite/bug-regex15.c:
* testsuite/bug-regex16.c:
* testsuite/bug-regex21.c:
* testsuite/bug-regex7.c:
* testsuite/bug-regex8.c:
* testsuite/bug-regex9.c:
* testsuite/runptests.c:
* testsuite/runtests.c:
* testsuite/tst-boost.c:
* testsuite/tst-pcre.c:
* testsuite/tst-regex.c:
* testsuite/tst-regex2.c:
* testsuite/tst-rxspencer.c:
2014-11-30 18:59:34 -08:00
Jim Meyering 9cb9a43653 maint: enable sc_const_long_option syntax check
* sed/sed.c (main): Add "const" to decl of longopts.
* cfg.mk (local-checks-to-skip): Remove its exemption.
2014-11-30 18:59:34 -08:00
Jim Meyering fcd48d1a8f maint: enable double-word prohibition
* cfg.mk (local-checks-to-skip): Remove exemption for
sc_prohibit_doubled_word.
Exempt 4 files under testsuite/.
2014-11-30 18:59:34 -08:00
Jim Meyering 5e695354a7 doc: remove doubled word
* doc/sed-in.texi: Remove doubled "the".
* doc/sed.texi: Likewise.
2014-11-30 18:59:33 -08:00
Jim Meyering 11f501095a maint: add .prev-version
* .prev-version: New file.
2014-11-30 18:59:33 -08:00
Jim Meyering 7a9323516d maint: turn on the test that prohibits use of HAVE_CONFIG_H
* cfg.mk (local-checks-to-skip): Remove the exemption here.
* testsuite/bug-regex10.c: Remove the use of the offending macro.
* testsuite/bug-regex11.c: Likewise.
* testsuite/bug-regex12.c: Likewise.
* testsuite/bug-regex13.c: Likewise.
* testsuite/bug-regex14.c: Likewise.
* testsuite/bug-regex15.c: Likewise.
* testsuite/bug-regex16.c: Likewise.
* testsuite/bug-regex21.c: Likewise.
* testsuite/bug-regex7.c: Likewise.
* testsuite/bug-regex8.c: Likewise.
* testsuite/bug-regex9.c: Likewise.
* testsuite/runptests.c: Likewise.
* testsuite/runtests.c: Likewise.
* testsuite/tst-boost.c: Likewise.
* testsuite/tst-pcre.c: Likewise.
* testsuite/tst-regex.c: Likewise.
* testsuite/tst-regex2.c: Likewise.
* testsuite/tst-rxspencer.c: Likewise.
2014-11-30 18:59:33 -08:00
Jim Meyering 32782c26e7 maint: generate THANKS from THANKS.in
* THANKS.in: Renamed from THANKS, adjusted formatting
and added header.  Also remove from this list of names those
that are now generated automatically.
* THANKS: Removed, now that it's generated.
* thanks-gen: New file.
* Makefile.am (EXTRA_DIST): Add thanks-gen
(THANKS): New rule.
* .mailmap: New file.
2014-11-30 18:59:33 -08:00
Jim Meyering 5b9c447bb8 maint: add cfg.mk, derived from grep's
* cfg.mk (local-checks-to-skip): Exempt many failing tests.
(old_NEWS_hash): Define.
* NEWS: Tweak wording to avoid semblance of doubled word: in in-place.
2014-11-30 18:59:33 -08:00
Jim Meyering e9a211194e tests: hook up gnulib-tests
* Makefile.am (SUBDIRS): Add gnulib-tests.
* gnulib-tests/Makefile.am: New file.
* configure.ac (AC_CONFIG_FILES): Add gnulib-tests/Makefile.
* .gitignore: Ignore all but Makefile.am.
2014-11-30 18:59:33 -08:00
Jim Meyering d5526d4ad8 maint: .gitignore: ignore more 2014-11-30 18:59:33 -08:00
Jim Meyering 2f5510153e maint: remove ACLOCAL_AMFLAGS in favor of AC_CONFIG_MACRO_DIRS
* Makefile.am (ACLOCAL_AMFLAGS): Remove this assignment.
* configure.ac: Use this macro instead.
2014-11-30 18:59:33 -08:00
Jim Meyering b741f318d0 maint: do not version-control generated files.
* doc/sed.1: Remove.
* po/sed.pot: Likewise.
* po/Makevars: Likewise.
* .gitignore: Add their names.
2014-11-30 18:59:33 -08:00
Jim Meyering 57b535656c maint: begin to modernize configure.ac
* configure.ac: Turn on silent rules, by default.
Use git-derived versions all the time. Required a new, signed
v4.2.2 tag, which I've pushed.
Distribute .tar.xz tarballs, not .bzip2 or .gz.
* Makefile.am (AUTOMAKE_OPTIONS): Remove.
* bootstrap.conf (gnulib_modules): Add git-version-gen.
2014-11-30 18:59:33 -08:00
Jim Meyering 7a1a80603c maint: convert obsolescent @VAR@ notation to $(VAR)
* sed/Makefile.am (sed_LDADD): Use $(VAR), no @VAR@.
2014-11-30 18:59:33 -08:00
Jim Meyering d15bafd704 maint: update copyright dates; use gnulib's update-copyright module
* bootstrap.conf (gnulib_modules): Add update-copyright.
Then, run "make update-copyright".
* Makefile.am: Add copyright header.
2014-11-30 18:59:32 -08:00
Jim Meyering d0c7a7dc82 maint: remove all trailing white space
First, run this command:
  git grep -l '	 $'|xargs perl -pi -e 's/[ \t]+$//'
Then some minor fix-up to make the two newly-failing tests
pass once again:
* testsuite/mac-mf.sed: Append this, s/ $//,
to eliminate trailing spaces in the actual output.
* testsuite/y-newline.good: Manually remove a trailing
space between two concatenated prompts.
2014-11-30 18:59:32 -08:00
Jim Meyering f147efc9ef maint: update autogenerated .gitignore files 2014-11-30 18:59:32 -08:00
Jim Meyering f6756292cf maint: update build/gnulib infrastructure; generate ChangeLog
* ChangeLog-2014: Renamed from ChangeLog.
* po/ChangeLog-2014: Renamed from po/ChangeLog.
* Makefile.am (EXTRA_DIST): Add the two new file names.
(dist-hook): Generate ChangeLog at tarball-creation time.
(gen-ChangeLog): New rule.  Just like the one in coreutils and grep.
* bootstrap.conf (gnulib_modules): Add the modules, readme-release
and gitlog-to-changelog, and revamp to be much more like grep and
coreutils.
* lib/Makefile.am: Update.
2014-11-30 18:59:32 -08:00
Jim Meyering c9c328d5fc maint: update bootstrap from gnulib 2014-11-30 18:59:32 -08:00
Jim Meyering ef7eab74e3 fixup: add the properly-named new test files
* testsuite/Makefile.am (EXTRA_DIST): Add y-zero.*,
not y-NUL.* here.
2014-09-06 19:46:30 -07:00
Jim Meyering be11175d49 maint: correct failing "version" test
* configure.ac (COPYRIGHT_YEAR): Update to 2014, so
the "version" test passes once again.
* doc/sed.1: Also commit this auto-generated-yet-VC'd file.
2014-09-06 09:26:09 -07:00
Jim Meyering 643f692bc7 fix "y" to work with NUL in the RHS
* sed/execute.c (do_list) [case 'y']: Handle NUL bytes
in the RHS of a y/LHS/RHS/ transliteration.
* testsuite/y-zero.good: New test-related files.
* testsuite/y-zero.inp:
* testsuite/y-zero.sed:
* testsuite/Makefile.am (SEDTESTS): Add y-zero here.
* testsuite/Makefile.tests: And here.
* NEWS (Bug fixes): Describe it.
The bug was reported by table@inventati.org,
with the execute.c change mostly by Paolo Bonzini.
2014-09-06 09:21:05 -07:00
Jose E. Marchesi e146d2a52d gnulib submodule updated.
2014-07-24  Jose E. Marchesi  <jemarch@gnu.org>

	* gnulib: Update.
2014-07-24 18:50:03 +02:00
Jose E. Marchesi 274476c861 Avoid a little potential misunderstanding in the Regular Expressions section of the manual.
2014-03-26  Jose E. Marchesi  <jemarch@gnu.org>

	* doc/sed.texi (Regular Expressions): avoid a potential
	misunderstanding in the description of the \| operator.
2014-03-26 20:39:56 +01:00
David A. Wheeler 8b65e07904 Modify documentation to note sed "-E" option, now in POSIX, for EREs.
2013-10-16  David A. Wheeler <dwheeler@dwheeler.com>

	* doc/sed-in.texi: Document "-E" option to use EREs.
	  GNU sed already supported "-E" as an undocumented synonym
	  for "-r", but "-E" is now in POSIX.
	  See: http://austingroupbugs.net/view.php?id=528.
	* doc/sed.1: Likewise.
	* doc/sed.texi: Likewise.
	* doc/sed.x: Likewise.
	* sed/sed.c: Likewise.
2013-10-17 12:46:30 +02:00
Jose E. Marchesi 7bb8d35d03 Set PATH_MAX to some constant in case it is not defined in system
headers.

2013-10-06  Jose E. Marchesi  <jemarch@gnu.org>

	* basicdefs.h (PATH_MAX): Defined to some constant in case it is
	not defined by system headers.
	* sed/utils.c: Do not include pathmax.h anymore.
	* bootstrap.conf (gnulib_modules): Do not use the gnulib module
	pathmax.
2013-10-06 14:43:38 +02:00