1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 14:43:36 +00:00

29 Commits

Author SHA1 Message Date
Paul Eggert
002ac8b180 diffseq: port to GCC 7 with --enable-gcc-warnings
* lib/diffseq.h (diag): Use an if, not an ifdef, for most of the
heuristic check.  This way, GCC 7 with --enable-gcc-warnings does
not complain about big_snake being defined but not used.
2017-06-17 12:17:00 -07:00
Paul Eggert
a3fd683de3 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2017-01-01 02:59:23 +00:00
Paul Eggert
d55ed0636e diffseq: restore TOO_EXPENSIVE heuristic
* lib/diffseq.h: Problem with diffutils reported by Andreas Schwab
(Bug#24715).  The simplest solution is to restore the
TOO_EXPENSIVE heuristic that I added to GNU diff in 1993, while
using a higher threshold to avoid Bug#16848 on smaller files.
* lib/diffseq.h (struct context): Restore member too_expensive.
(struct partition): Restore members lo_minimal, hi_minimal.
(diag, compareseq): Restore arg find_minimal.  All uses changed.
(diag): Restore the TOO_EXPENSIVE heuristic that I added back in
1993 to make 'diff' run faster (but not as well) on large inputs,
but use a threshold of 4096 instead of the old 256.
* lib/fstrcmp.c (strcmp_bounded):
* lib/git-merge-changelog.c (compute_differences):
Adjust to diffseq.h changes.
2016-10-25 15:23:38 -07:00
Paul Eggert
96609bb2f7 Use GCC_LINT, not lint
FreeBSD and Cygwin #define _Noreturn to empty if 'lint' is defined.
Problem reported by Ken Brown in: http://bugs.gnu.org/23640
* doc/posix-headers/stdnoreturn.texi (stdnoreturn.h):
Document problem with lint and _Noreturn.
* lib/diffseq.h (IF_LINT, IF_LINT2):
* lib/fts.c (sccsid):
* lib/getndelim2.c (IF_LINT):
* lib/gl_anylinked_list2.h (gl_linked_iterator)
(gl_linked_iterator_from_to):
* lib/gl_anytree_list2.h (gl_tree_iterator)
(gl_tree_iterator_from_to):
* lib/gl_anytree_oset.h (gl_tree_iterator):
* lib/gl_array_list.c (gl_array_iterator)
(gl_array_iterator_from_to):
* lib/gl_array_oset.c (gl_array_iterator):
* lib/gl_carray_list.c (gl_carray_iterator)
(gl_carray_iterator_from_to):
* lib/idcache.c:
* lib/inet_ntop.c (IF_LINT):
* lib/regcomp.c (build_charclass_op, create_tree):
* lib/regex_internal.c (re_acquire_state)
(re_acquire_state_context):
* lib/trigl.c (rcsid):
* lib/trim.c (IF_LINT):
* lib/vasnprintf.c (IF_LINT):
* lib/verify.h (assume):
Treat GCC_LINT like lint.
2016-05-30 16:04:23 -07:00
Paul Eggert
71090a2a31 version-etc: new year
* build-aux/gendocs.sh (version):
* doc/gendocs_template:
* doc/gendocs_template_min:
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR):
Update copyright dates by hand in templates and the like.
* all files: Run 'make update-copyright'.
2016-01-01 00:57:21 -08:00
Paul Eggert
59ebba1d81 diffseq: prefer ptrdiff_t to ssize_t
* lib/diffseq.h: In commentary, prefer ptrdiff_t to ssize_t.
ptrdiff_t is the natural type for signed indexes.
On a few older platforms, ssize_t is narrower than size_t.
2015-02-07 18:09:52 -08:00
Paul Eggert
b9bfe78424 version-etc: new year
* doc/gnulib.texi:
* lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date.
* all files: Run 'make update-copyright'.
2014-12-31 17:47:54 -08:00
Paul Eggert
67b00f9a6c diffseq: remove TOO_EXPENSIVE heuristic
Problem with diffutils reported by Vincent Lefevre in
<http://bugs.gnu.org/16848>.  The simplest solution is to remove
the TOO_EXPENSIVE heuristic that I added to GNU diff in 1993.
Although appropriate for circa-1993 hardware, these days the heuristic
seems to be more trouble than it's worth.
* lib/diffseq.h: Modernize citations.
(struct context): Remove member too_expensive.
All uses changed.
(struct partition): Remove members lo_minimal, hi_minimal.
All uses changed.
(diag, compareseq): Remove arg find_minimal.  All uses changed.
(diag): Remove the TOO_EXPENSIVE heuristic that I added back in
1993 to make 'diff' run faster (but not as well) on large inputs.
These days, computers are fast enough that it's typically better
to run slower but more accurately.
* lib/fstrcmp.c: Remove duplicate comment.
* lib/fstrcmp.c (strcmp_bounded):
* lib/git-merge-changelog.c (compute_differences):
Adjust to diffseq.h changes.
2014-02-23 16:17:09 -08:00
Eric Blake
1276a2c5f2 maint: update copyright
I ran 'make update-copyright'.

Signed-off-by: Eric Blake <eblake@redhat.com>
2014-01-01 00:07:10 -07:00
Eric Blake
9fc81090f6 maint: update all copyright year number ranges
Run "make update-copyright".  Compare to commit 1602f0a from last year.

Signed-off-by: Eric Blake <eblake@redhat.com>
2013-01-01 00:50:58 +00:00
Paul Eggert
51e801f2f2 In commentary, do not use ` to quote. 2012-01-05 23:55:42 -08:00
Jim Meyering
1602f0afed maint: update all copyright year number ranges
Run "make update-copyright".
2012-01-01 10:04:58 +01:00
Jim Meyering
d60f3b0c6b maint: update almost all copyright ranges to include 2011
Run the new "make update-copyright" rule.
2011-01-01 22:12:59 +01:00
Bruno Haible
fc4b90fafd Fix typo in comment. 2010-04-20 00:02:14 +02:00
Bruno Haible
e768d427cc diffseq: Accommodate use-case with abstract arrays. 2010-04-19 00:01:18 +02:00
Jim Meyering
b2e2010c7c update nearly all FSF copyright year lists to include 2010
Use the same procedure as for 2009, outlined in
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
2010-01-01 10:42:00 +01:00
Bruno Haible
441aa3044f Use spaces for indentation, not tabs. 2009-12-10 20:28:30 +01:00
Bruno Haible
4e765f32d6 Add comment. 2009-11-22 19:07:34 +01:00
Jim Meyering
32be9f3469 diffseq: avoid spurious gcc warnings
* lib/diffseq.h (IF_LINT2): Define.
(compareseq): Use it to initialize two members of "part".
This avoids two used-uninitialized warnings.
2009-11-22 09:02:37 +01:00
Bruno Haible
833e6a3eb2 diffseq: reduce scope of variable 'best'. 2009-11-21 14:37:46 +01:00
Jim Meyering
a823652ce2 diffseq: remove useless assignment to "best"
* lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0"
assignment.  At that point "best" is already guaranteed to be zero.
2009-11-21 13:49:54 +01:00
Ralf Wildenhues
044cf1cc45 Add an "early abort" facility to diffseq. 2008-09-14 18:36:19 +02:00
Bruno Haible
506bbd4259 Avoid gcc warnings due to misplaced 'const'. 2008-02-10 19:22:48 +01:00
Bruno Haible
1fe8736cb9 Add comments about required includes. 2008-02-03 21:06:40 +01:00
Bruno Haible
57fdfd3f8e Change copyright notice from GPLv2+ to GPLv3+. 2007-10-07 19:14:58 +02:00
Bruno Haible
0023b19311 - Comment style.
- Change 'heuristic' from 'int' to 'bool'.
- Remove the 'const' from the context parameter. Needed because in the
  fstrcmp case, the NOTE_INSERT and NOTE_DELETE macros modify fields
  in the context, and an extra indirection would only cost performance:
    #define EXTRA_CONTEXT_FIELDS \
      /* The number of elements inserted or deleted. */ \
      int xvec_edit_count; \
      int yvec_edit_count;
    #define NOTE_DELETE(ctxt, xoff) ctxt->xvec_edit_count++
    #define NOTE_INSERT(ctxt, yoff) ctxt->yvec_edit_count++
- In 'diag', keep two blocks of code in sync (lines 191 and 224).
- Undefine the macro USE_HEURISTIC after use.
2007-08-18 10:53:41 +00:00
Paul Eggert
a29749fa30 * MODULES.html.sh: Add diffseq.
* modules/diffseq: New file.
* lib/diffseq.h: New file, from GNU gettext with a few minor changes,
extracted from GNU gettext's fstrcmp.c and GNU diff's analyze.c.
2007-08-17 23:29:23 +00:00
Bruno Haible
12e0487381 Live on the diff-merge branch, not on HEAD. 2006-10-07 15:21:52 +00:00
Bruno Haible
bc45ccc251 Difference of two sequences. 2006-10-07 15:20:20 +00:00