X-Git-Url: https://git.hcoop.net/bpt/guile.git/blobdiff_plain/4ab4e780c61ef8abcc4f123aecfa833fd05902f3..639e56a4edaae413a238e62158503978c18545be:/scripts/api-diff diff --git a/scripts/api-diff b/scripts/api-diff index cee9668ca..0b41eeaaf 100755 --- a/scripts/api-diff +++ b/scripts/api-diff @@ -5,7 +5,7 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" !# ;;; api-diff --- diff guile-api.alist files -;; Copyright (C) 2002 Free Software Foundation, Inc. +;; Copyright (C) 2002, 2006 Free Software Foundation, Inc. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as @@ -19,8 +19,8 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" ;; ;; You should have received a copy of the GNU General Public License ;; along with this software; see the file COPYING. If not, write to -;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330, -;; Boston, MA 02111-1307 USA +;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +;; Boston, MA 02110-1301 USA ;;; Author: Thien-Thi Nguyen @@ -113,11 +113,23 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cdr (command-line)))" "$@" (old-count (and old (length old))) (new-count (and new (length new))) (delta (and old new (- new-count old-count)))) - (format #t " ~5@A ~5@A ~5@A ~A\n" + (format #t " ~5@A ~5@A : " (or old-count "-") - (or new-count "-") - (or delta "-") - group))) + (or new-count "-")) + (cond ((and old new) + (let ((add-count 0) (sub-count 0)) + (diff+note! + old new + (lambda (subs) + (set! sub-count (length subs))) + (lambda (adds) + (set! add-count (length adds))) + (lambda () #t)) + (format #t "~5@D ~5@D : ~5@D" + add-count (- sub-count) delta))) + (else + (format #t "~5@A ~5@A : ~5@A" "-" "-" "-"))) + (format #t " ~A\n" group))) (sort (union g-old-names g-new-names) (lambda (a b) (stringstring a)