r2677: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 16 Sep 2002 03:22:16 +0000 (03:22 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 16 Sep 2002 03:22:16 +0000 (03:22 +0000)
downloads.cl

index 917c87f534912afdabb2157b38d12f5aa507a82b..6538845f7cea1ed931cce22a56623610b5679e56 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: downloads.cl,v 1.3 2002/09/16 03:16:09 kevin Exp $
+;;;; $Id: downloads.cl,v 1.4 2002/09/16 03:22:16 kevin Exp $
 ;;;;
 ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
   
 (defun print-sect-title (title)
   (lml-print "<h~D>~A</h~D>" *section-indent* title *section-indent*))
-  
+
+(defun match-base-name? (name)
+  (let ((len-base-name (length *base-name*)))
+    (when (>= (length name) len-base-name)
+      (dotimes (i len-base-name)
+       (declare (fixnum i))
+       (unless (char= (char *base-name* i)
+                      (char name i))
+         (return-from match-base-name? nil)))))
+  t)
+
 (defun filter-against-base (files)
   (let ((filtered '()))
     (dolist (f files)
       (let ((name (pathname-name f)))
-       (when
-           (block search
-             (dotimes (i (length *base-name*))
-               (declare (fixnum i))
-               (unless (char= (char *base-name* i)
-                              (char name i))
-                 (return-from search nil)))
-             t)
+       (when (match-base-name? name)
          (push f filtered))))
     (when filtered
       (sort filtered #'(lambda (a b) (when (and a b)