X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=downloads.lisp;h=d78f776ffcee171a3d52b6804c186a1ba5671f34;hb=58ba71d155d44f6033cc85a377e5d4c1004a99bd;hp=4ad88c1ca95acdf3b6f8ff053646e333c93027ae;hpb=4cb2a48870afc9f2dda44a46881ba8a249566120;p=lml.git diff --git a/downloads.lisp b/downloads.lisp index 4ad88c1..d78f776 100644 --- a/downloads.lisp +++ b/downloads.lisp @@ -2,12 +2,12 @@ ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; -;;;; Name: downloads.cl +;;;; Name: downloads.lisp ;;;; Purpose: Generate downloads page ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Aug 2002 ;;;; -;;;; $Id: downloads.lisp,v 1.4 2002/10/14 03:44:09 kevin Exp $ +;;;; $Id$ ;;;; ;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -16,12 +16,11 @@ ;;;; (http://www.gnu.org/licenses/gpl.html) ;;;; ************************************************************************* -(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) -(in-package :lml) +(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 +30,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,71 +47,69 @@ (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 "