summaryrefslogtreecommitdiff
path: root/lib/diffseq.h
Commit message (Collapse)AuthorAgeFilesLines
* diffseq: port to GCC 7 with --enable-gcc-warningsPaul Eggert2017-06-171-2/+6
| | | | | | * 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.
* version-etc: new yearPaul Eggert2017-01-011-1/+1
| | | | | | | | | | * 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'.
* diffseq: restore TOO_EXPENSIVE heuristicPaul Eggert2016-10-251-9/+109
| | | | | | | | | | | | | | | | * 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.
* Use GCC_LINT, not lintPaul Eggert2016-05-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* version-etc: new yearPaul Eggert2016-01-011-1/+1
| | | | | | | | | | * 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'.
* diffseq: prefer ptrdiff_t to ssize_tPaul Eggert2015-02-071-2/+2
| | | | | | * 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.
* version-etc: new yearPaul Eggert2014-12-311-1/+1
| | | | | | * doc/gnulib.texi: * lib/version-etc.c (COPYRIGHT_YEAR): Update copyright date. * all files: Run 'make update-copyright'.
* diffseq: remove TOO_EXPENSIVE heuristicPaul Eggert2014-02-231-116/+18
| | | | | | | | | | | | | | | | | | | | | | 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.
* maint: update copyrightEric Blake2014-01-011-1/+1
| | | | | | I ran 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: update all copyright year number rangesEric Blake2013-01-011-1/+1
| | | | | | Run "make update-copyright". Compare to commit 1602f0a from last year. Signed-off-by: Eric Blake <eblake@redhat.com>
* In commentary, do not use ` to quote.Paul Eggert2012-01-051-2/+2
|
* maint: update all copyright year number rangesJim Meyering2012-01-011-1/+1
| | | | Run "make update-copyright".
* maint: update almost all copyright ranges to include 2011Jim Meyering2011-01-011-1/+1
| | | | Run the new "make update-copyright" rule.
* Fix typo in comment.Bruno Haible2010-04-201-1/+1
|
* diffseq: Accommodate use-case with abstract arrays.Bruno Haible2010-04-191-6/+29
|
* update nearly all FSF copyright year lists to include 2010Jim Meyering2010-01-011-2/+2
| | | | | Use the same procedure as for 2009, outlined in http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/20081
* Use spaces for indentation, not tabs.Bruno Haible2009-12-101-222/+222
|
* Add comment.Bruno Haible2009-11-221-1/+2
|
* diffseq: avoid spurious gcc warningsJim Meyering2009-11-221-1/+10
| | | | | | * lib/diffseq.h (IF_LINT2): Define. (compareseq): Use it to initialize two members of "part". This avoids two used-uninitialized warnings.
* diffseq: reduce scope of variable 'best'.Bruno Haible2009-11-211-72/+78
|
* diffseq: remove useless assignment to "best"Jim Meyering2009-11-211-1/+0
| | | | | * lib/diffseq.h (diag) [USE_HEURISTIC]: Remove useless "best = 0" assignment. At that point "best" is already guaranteed to be zero.
* Add an "early abort" facility to diffseq.Ralf Wildenhues2008-09-141-4/+23
|
* Avoid gcc warnings due to misplaced 'const'.Bruno Haible2008-02-101-4/+4
|
* Add comments about required includes.Bruno Haible2008-02-031-2/+7
|
* Change copyright notice from GPLv2+ to GPLv3+.Bruno Haible2007-10-071-5/+4
|
* - Comment style.Bruno Haible2007-08-181-14/+16
| | | | | | | | | | | | | | | - 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.
* * MODULES.html.sh: Add diffseq.Paul Eggert2007-08-171-0/+460
| | | | | | * 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.
* Live on the diff-merge branch, not on HEAD.Bruno Haible2006-10-071-0/+0
|
* Difference of two sequences.Bruno Haible2006-10-071-0/+0