X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;ds=sidebyside;f=downloads.lisp;h=8cd2e32ec2f9c0ad6463bdff7836d4d2131041b0;hb=2aba65a90adb2811a06ba3bbb5151b9f47a35252;hp=68362f76b4be0160b974004cc0cb42db404e91c4;hpb=ff389889ddc01f16206b043f1f6eb42b766b4f6f;p=lml.git diff --git a/downloads.lisp b/downloads.lisp index 68362f7..8cd2e32 100644 --- a/downloads.lisp +++ b/downloads.lisp @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: downloads.lisp,v 1.3 2002/10/14 03:27:38 kevin Exp $ +;;;; $Id: downloads.lisp,v 1.8 2003/02/03 00:43:36 kevin Exp $ ;;;; ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -20,8 +20,8 @@ (in-package :lml) -(defvar *ftp-base*) -(defvar *ftp-url*) +(defvar *dl-base*) +(defvar *dl-url*) (defvar *base-name*) (defvar *section-indent* 0) (defvar *signed* nil) @@ -31,14 +31,14 @@ ;;files.sort() (mapcar #'print-file files)) -(defun strip-ftp-base (file) +(defun strip-dl-base (file) (let ((fdir (pathname-directory file)) - (bdir (pathname-directory *ftp-base*))) + (bdir (pathname-directory *dl-base*))) (make-pathname :name (pathname-name file) :type (pathname-type file) :directory - (when (> (length bdir) (length fdir)) + (when (> (length fdir) (length bdir)) (append '(:absolute) (subseq fdir (length bdir) (length fdir))))))) @@ -48,33 +48,33 @@ (basename (namestring (make-pathname :name (pathname-name file) :type (pathname-type file)))) - (ftp-name (strip-ftp-base file)) + (dl-name (strip-dl-base file)) (sig-path (concatenate 'string (namestring file) ".asc"))) (when (plusp (length basename)) (with-open-file (strm file :direction :input) (setq size (round (/ (file-length strm) 1024)))) - (lml-print "~A" *ftp-url* ftp-name basename) - (lml-print "") - (lml-print " (~A, ~:D KB)" modtime size) + (lml-format "~A" *dl-url* dl-name basename) + (lml-princ "") + (lml-format " (~A, ~:D KB)" modtime size) (when (probe-file sig-path) (setq *signed* t) - (lml-print " [Signature]" *ftp-url* ftp-name)) + (lml-format " [Signature]" *dl-url* dl-name)) (br)))) (defun display-header (name url) - (lml-print "