~ chicken-core (chicken-5) 06d7571f83412c80bca73fef6defd4013a81cd87


commit 06d7571f83412c80bca73fef6defd4013a81cd87
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Fri Mar 3 17:29:35 2017 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Mar 3 17:29:35 2017 +0100

    ##sys#split-path must handle an #f path (reported by Kooda)

diff --git a/eval.scm b/eval.scm
index 2998393e..f813bd0d 100644
--- a/eval.scm
+++ b/eval.scm
@@ -1213,23 +1213,25 @@
 (define ##sys#split-path
   (let ((cache '(#f)))
     (lambda (path)
-      (if (equal? path (car cache))
-          (cdr cache)
-          (let* ((len (string-length path))
-                 (lst (let loop ((start 0) (pos 0))
-                        (cond ((fx>= pos len)
-                               (if (fx= pos start)
-                                   '()
-                                   (list (substring path start pos))))
-                              ((char=? (string-ref path pos) 
-                                       path-list-separator)
-                               (cons (substring path start pos)
-                                     (loop (fx+ pos 1)
-                                           (fx+ pos 1))))
-                              (else 
-                                (loop start (fx+ pos 1)))))))
-            (set! cache (cons path lst))
-            lst)))))
+      (cond ((not path) '())
+            ((equal? path (car cache))
+             (cdr cache))
+            (else
+              (let* ((len (string-length path))
+                     (lst (let loop ((start 0) (pos 0))
+                            (cond ((fx>= pos len)
+                                   (if (fx= pos start)
+                                       '()
+                                       (list (substring path start pos))))
+                                  ((char=? (string-ref path pos) 
+                                           path-list-separator)
+                                   (cons (substring path start pos)
+                                         (loop (fx+ pos 1)
+                                               (fx+ pos 1))))
+                                  (else 
+                                    (loop start (fx+ pos 1)))))))
+                (set! cache (cons path lst))
+                lst))))))
 
 (define ##sys#find-extension
   (let ((file-exists? file-exists?)
diff --git a/setup.defaults b/setup.defaults
index e80322ff..5f176bc0 100644
--- a/setup.defaults
+++ b/setup.defaults
@@ -7,11 +7,20 @@
 (version 2)
 
 
+;; list of locations (eggs stored in the local fileystem)
+;
+; (location DIRECTORY ...)
+;
+; Note that these override eggs from servers.
+
+(location "/home/felix/chicken/c5-eggs"); XXX
+
+
 ;; list of servers in the order in which they will be processed
 ;
-; (server URL)
+; (server URL ...)
 ;
-; URL may be an alias (see below) or a real URL
+; URL may be an alias (see below) or a real URL.
 
 (server "kitten-technologies")
 (server "call-cc")
@@ -28,7 +37,7 @@
   ->) )
 
 
-;; aliases for locations
+;; aliases for servers
 ;
 ; (alias (NAME REALNAME) ...)
 
Trap