r3864: Automatic commit for debian_version_2_1_3-1
[lml.git] / downloads.lisp
index 226095eebfa7d3bf0ea21fe208f9f3534498f465..4223820269707f28ab96e37c3de86cdf41c9094c 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: downloads.lisp,v 1.1 2002/09/30 10:26:43 kevin Exp $
+;;;; $Id: downloads.lisp,v 1.7 2003/01/24 08:51:41 kevin Exp $
 ;;;;
 ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -38,9 +38,9 @@
      :name (pathname-name file)
      :type (pathname-type file)
      :directory 
-     (when (> (length bdir) (length fdir))
+     (when (> (length fdir) (length bdir))
        (append '(:absolute) 
-              (subseq (length bdir) (length fdir) fdir))))))
+              (subseq fdir (length bdir) (length fdir)))))))
      
 (defun print-file (file)
   (let ((size 0)
     (when (plusp (length basename))
       (with-open-file (strm file :direction :input)
                      (setq size (round (/ (file-length strm) 1024))))
-      (lml-print "<a href=\"~A~A\">~A</a>" *ftp-url* ftp-name basename)
-      (lml-print "<span class=\"modtime\">")
-      (lml-print " (~A, <b>~:D <span style=\"font-size:90%;\">KB</span></b>)</span>" modtime size)
+      (lml-format "<a href=\"~A~A\">~A</a>" *ftp-url* ftp-name basename)
+      (lml-princ "<span class=\"modtime\">")
+      (lml-format " (~A, <b>~:D <span style=\"font-size:90%;\">KB</span></b>)</span>" modtime size)
       (when (probe-file sig-path)
        (setq *signed* t)
-       (lml-print " [<a href=\"~A~A.asc\">Signature</a>]" *ftp-url* ftp-name))
+       (lml-format " [<a href=\"~A~A.asc\">Signature</a>]" *ftp-url* ftp-name))
       (br))))
 
 (defun display-header (name url)
-  (lml-print "<h1>Download</h1>")
-  (lml-print "<div class=\"mainbody\">")
-  (lml-print "<h3>Browse ~A FTP Site</h3>" name)
-  (lml-print "<a style=\"padding-left:20pt;\" href=\"~A\">~A</a>" url url))
+  (lml-princ "<h1>Download</h1>")
+  (lml-princ "<div class=\"mainbody\">")
+  (lml-format "<h3>Browse ~A FTP Site</h3>" name)
+  (lml-format "<a style=\"padding-left:20pt;\" href=\"~A\">~A</a>" url url))
 
 (defun display-footer ()
   (when *signed*
-    (lml-print "<h3>GPG Public Key</h3>")
-    (lml-print "Use this <a href=\"https://www.b9.com/key.asc\">key</a> to verify file signtatures"))
-  (lml-print "</div>"))
+    (lml-princ "<h3>GPG Public Key</h3>")
+    (lml-princ "Use this <a href=\"https://www.b9.com/key.asc\">key</a> to verify file signtatures"))
+  (lml-princ "</div>"))
   
 (defun print-sect-title (title)
-  (lml-print "<h~D>~A</h~D>" *section-indent* title *section-indent*))
+  (lml-format "<h~D>~A</h~D>" *section-indent* title *section-indent*))
 
 (defun match-base-name? (name)
   (let ((len-base-name (length *base-name*)))
   (let ((files (filter-against-base (directory pat))))
     (when files
       (print-sect-title title)
-      (lml-print "<div style=\"padding-left: 20pt;\">")
+      (lml-princ "<div style=\"padding-left: 20pt;\">")
       (list-files files)
-      (lml-print"</div>"))))
+      (lml-prin"</div>"))))
 
 
 (defun display-sections (sects)
     (let ((title (car sects))
          (value (cadr sects)))
       (if (consp title)
-         (mapcar #'display-sections sects)
-       (if (consp  value)
+         (map nil #'display-sections sects)
+       (if (consp value)
            (progn
              (print-sect-title title)
              (incf *section-indent*)
        (*base-name* pkg-base)
        (*signed* nil))
     (display-header pkg-name ftp-url)
-    (mapcar #'display-sections sects)
+    (map nil #'display-sections sects)
     (display-footer)))
 
 (defun std-dl-page (pkg-name pkg-base ftp-base ftp-url)
                                    :type :wild :name :wild)
                     base))
          (w32-path (merge-pathnames
-                    (make-pathname :directory '(:relative "w32")
+                    (make-pathname :directory '(:relative "win32")
                                    :type :wild :name :wild)
                     base)))
       (display-page pkg-name pkg-base ftp-base ftp-url