[gimp/gimp-2-6] Applied patch from Saul Goode which mostly fixes bug #604587



commit 1def8e273477425791c6ec6f7e0a8c397834e93b
Author: Kevin Cozens <kcozens cvs gnome org>
Date:   Sun Jan 31 17:54:21 2010 -0500

    Applied patch from Saul Goode which mostly fixes bug #604587
    
    Fixes delq when using numeric values. Fixes two bad let block declarations.
    (cherry picked from commit cc6427e5d5ee11340820e4151bd3936c7b5e9a38)

 plug-ins/script-fu/scripts/script-fu-compat.init |   21 ++++++++-------------
 1 files changed, 8 insertions(+), 13 deletions(-)
---
diff --git a/plug-ins/script-fu/scripts/script-fu-compat.init b/plug-ins/script-fu/scripts/script-fu-compat.init
index d9ac202..708ba8c 100644
--- a/plug-ins/script-fu/scripts/script-fu-compat.init
+++ b/plug-ins/script-fu/scripts/script-fu-compat.init
@@ -129,18 +129,13 @@
 ;may be useful enough to keep around
 
 (define (delq item lis)
-  (let ((l))
-    (if (null? lis)
-      (set! l '())
-      (begin
-        (set! l (car lis))
-        (set! lis (cdr lis))
-        (while (not (null? lis))
-          (if (not (= item (car lis)))
-            (set! l (append l (list (car lis))))
-          )
-          (set! lis (cdr lis))
+  (let ((l '()))
+    (unless (null? lis)
+      (while (pair? lis)
+        (if (<> item (car lis))
+          (set! l (append l (list (car lis))))
         )
+        (set! lis (cdr lis))
       )
     )
 
@@ -158,7 +153,7 @@
         (start 0)
         (end (string-length str))
         (i start)
-        (l)
+        (l '())
         )
 
     (if (= seplen 0)
@@ -290,7 +285,7 @@
   (define (fread-get-chars count file)
     (let (
          (str "")
-         (c)
+         (c 0)
          )
 
       (while (> count 0)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]