~ chicken-core (chicken-5) aff7beadaeb99e421920684d6a7c4454ee530b73


commit aff7beadaeb99e421920684d6a7c4454ee530b73
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Apr 8 14:39:39 2010 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Thu Apr 8 14:39:39 2010 +0200

    modified code in regex.scm to avoid scrutiny warning

diff --git a/regex.scm b/regex.scm
index 95f9819c..17a3d84f 100644
--- a/regex.scm
+++ b/regex.scm
@@ -114,25 +114,25 @@
 
 (define (string-search rx str #!optional (start 0) (range (string-length str)))
   (let ((rx (unregexp rx)))
-    (and-let* ((n (string-length str))
-	       (m (irregex-search rx str start (min n (fx+ start range)))))
-      (let loop ((i (irregex-match-num-submatches m))
-                 (res '()))
-        (if (fx< i 0)
-            res
-            (loop (fx- i 1) (cons (irregex-match-substring m i) res)))))))
+    (let ((n (string-length str)))
+      (and-let* ((m (irregex-search rx str start (min n (fx+ start range)))))
+	(let loop ((i (irregex-match-num-submatches m))
+		   (res '()))
+	  (if (fx< i 0)
+	      res
+	      (loop (fx- i 1) (cons (irregex-match-substring m i) res))))))))
 
 (define (string-search-positions rx str #!optional (start 0) (range (string-length str)))
   (let ((rx (unregexp rx)))
-    (and-let* ((n (string-length str))
-	       (m (irregex-search rx str start (min n (fx+ start range)))))
-      (let loop ((i (irregex-match-num-submatches m))
-                 (res '()))
-        (if (fx< i 0)
-            res
-            (loop (fx- i 1) (cons (list (irregex-match-start-index m i)
-                                        (irregex-match-end-index m i))
-                                  res)))))))
+    (let ((n (string-length str)))
+      (and-let* ((m (irregex-search rx str start (min n (fx+ start range)))))
+	(let loop ((i (irregex-match-num-submatches m))
+		   (res '()))
+	  (if (fx< i 0)
+	      res
+	      (loop (fx- i 1) (cons (list (irregex-match-start-index m i)
+					  (irregex-match-end-index m i))
+				    res))))))))
 
 
 ;;; Split string into fields:
Trap