diff options
author | Thomas Bushnell <tb@debian.org> | 2007-12-28 15:56:00 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2017-02-20 00:05:38 -0800 |
commit | 967ca9f9b4c42630fb0feb1e5b9186266fa4d854 (patch) | |
tree | 8bbb64f76bd25bf5dc59c856167f46f67cfca2e9 /Idiffer.scm | |
parent | 25fbaa7f8700665d5aea046956175a35035f7fd5 (diff) | |
parent | 710a97992705d67c3ded0d4b270c5978ce29b11f (diff) | |
download | scm-967ca9f9b4c42630fb0feb1e5b9186266fa4d854.tar.gz scm-967ca9f9b4c42630fb0feb1e5b9186266fa4d854.zip |
Import Debian changes 5e4-1debian/5e4-1
scm (5e4-1) unstable; urgency=low
* New upstream release.
* debian/control: Require at least version 3a5 of slib.
* debian/postrm: New file to remove /usr/lib/scm/implcat and
/usr/lib/scm/slibcat upon purge. (Closes: #455124). Thanks to Kumar
Appaiah for the fix.
* debian/control (Architecture): Add armel and armeb. (Closes: #408792).
* debian/rules (install): Don't use -s when installing. dh_strip should
be sufficient, and this should make the nostrip build option work.
(Closes: #438004).
* continue.h: Repeat change from 5e1-2.
* xgen.scm: Repeat change from 5e2-4.
* scm.1: Repeat change from 5e2-4.
* build.scm: Repeat change from 5e3-5.
Diffstat (limited to 'Idiffer.scm')
-rw-r--r-- | Idiffer.scm | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/Idiffer.scm b/Idiffer.scm index ee36485..58373f9 100644 --- a/Idiffer.scm +++ b/Idiffer.scm @@ -83,22 +83,21 @@ (define (diff:edits A B . p-lim) (define M (car (array-dimensions A))) (define N (car (array-dimensions B))) - (set! p-lim (if (null? p-lim) -1 (car p-lim))) - (let ((fp (make-array (A:fixZ32b) (if (negative? p-lim) - (+ 3 M N) - (+ 3 (abs (- N M)) p-lim p-lim))))) - (define est (if (< N M) - (diff2editlen fp B A p-lim) - (diff2editlen fp A B p-lim))) - (and est - (let ((edits (make-array (A:fixZ32b) est)) - (CCRR (make-array (A:fixZ32b) (* 2 (+ (max M N) 1))))) - (cond ((< N M) - (diff2edits! edits fp CCRR B A) - (diff:invert-edits! edits)) - (else - (diff2edits! edits fp CCRR A B))) - edits)))) + (define est (diff:edit-length A B (if (null? p-lim) -1 (car p-lim)))) + (and est + (let ((CCRR (make-array (A:fixZ32b) (* 2 (+ (max M N) 1)))) + (edits (make-array (A:fixZ32b) est))) + (define fp (make-array (A:fixZ32b) + (+ (max (- N (quotient M 2)) + (- M (quotient N 2))) + (- est (abs (- N M))) ; 2 * p-lim + 3))) + (cond ((< N M) + (diff2edits! edits fp CCRR B A) + (diff:invert-edits! edits)) + (else + (diff2edits! edits fp CCRR A B))) + edits))) (define (diff:edit-length A B . p-lim) (define M (car (array-dimensions A))) |