r5293: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 12 Jul 2003 17:54:05 +0000 (17:54 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 12 Jul 2003 17:54:05 +0000 (17:54 +0000)
base.lisp
data.lisp
debian/changelog
debian/copyright
downloads.lisp
files.lisp
package.lisp
read-macro.lisp
stdsite.lisp
tests.lisp
utils.lisp

index 01b3c7666e6b0565b60fd635654a083aef4b9ef3..ee6598eb231bbd57e3a36311f90e788b939f27d7 100644 (file)
--- a/base.lisp
+++ b/base.lisp
@@ -7,28 +7,21 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: base.lisp,v 1.6 2003/06/29 16:21:09 kevin Exp $
+;;;; $Id: base.lisp,v 1.7 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:lml2)
 
 
-(defun reset-indent ()
-  (setq *indent* 0))
-
 (defun lml-format (str &rest args)
   (when (streamp *html-stream*)
-    (when *print-spaces* (indent-spaces *indent* *html-stream*))
     (if args
        (apply #'format *html-stream* str args)
-      (write-string str *html-stream*))
-    (when *print-spaces* (write-char #\newline *html-stream*))))
+       (write-string str *html-stream*))))
 
 (defun lml-princ (s)
   (princ s *html-stream*))
@@ -74,7 +67,6 @@
      (html
       ((:html :xmlns "http://www.w3.org/1999/xhtml")
        ,@body))))
-
                     
 
 (defmacro alink (url desc)
index 9a286ce06bf389048512fc008d1b99ec6bab64f7..3d4c3985322ff3837415e5efe325d5925dbbcc78 100644 (file)
--- a/data.lisp
+++ b/data.lisp
@@ -7,13 +7,11 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: data.lisp,v 1.2 2003/06/23 20:37:43 kevin Exp $
+;;;; $Id: data.lisp,v 1.3 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:lml2)
index 92c18c7cc6a31bb4d9c12f0e23a736145430bd05..5e50b61ec5c7f82584502afaf54435dfaa02f9de 100644 (file)
@@ -1,3 +1,11 @@
+cl-lml2 (1.2.0-1) unstable; urgency=low
+
+  * New upstream: 
+  - use function parameters rather than special variables in downloads.lisp
+  - Remove old gpl copyright statements from files. License in LLGPL
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat, 12 Jul 2003 11:46:47 -0600
+
 cl-lml2 (1.1.4-1) unstable; urgency=low
 
   * Fix readme.lml
index e78a956f38a0d519c4cd423c39a48ae8d00d619f..fd7d2ac0b1103b8ec67853e23530d0b988e6705b 100644 (file)
@@ -9,17 +9,17 @@ Debian Maintainer:  Kevin M. Rosenberg <kmr@debian.org>
 
 Upstream Copyright Statement
 ============================
-LML is written and Copyright (c) 2003 by Kevin M. Rosenberg 
+LML is written and Copyright (c) 2000-2003 by Kevin M. Rosenberg 
 with portions Copyright (c) 1986-2003 by Franz, Inc.
 
 LML is licensed under the terms of the Lisp Lesser GNU Public
 License, known as the LLGPL.  The LLGPL consists of a preamble (see
 below) and the Lessor GNU Public License 2.1 (LGPL-2.1).  Where these
-conflict, the preamble takes precedence.  CLSQL is referenced in the
+conflict, the preamble takes precedence.  LML2 is referenced in the
 preamble as the "LIBRARY."  The LGPL-2.1 is stored on a Debian system
 in the file /usr/share/common-licenses/LGPL-2.1.
 
-LML is distributed in the hope that it will be useful, but WITHOUT
+LML2 is distributed in the hope that it will be useful, but WITHOUT
 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 FITNESS FOR A PARTICULAR PURPOSE.
 
index 2b977c355b8c79ed0baf1aaa6611c022309974e6..f0e16b62ad7ff302a91183feb4f4bd9d0d163e3d 100644 (file)
@@ -7,32 +7,26 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: downloads.lisp,v 1.1 2003/06/20 04:12:29 kevin Exp $
+;;;; $Id: downloads.lisp,v 1.2 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:lml2)
 
 
-(defvar *dl-base*)
-(defvar *dl-url*)
-(defvar *base-name*)
-(defvar *section-indent* 0)
-(defvar *signed* nil)
+(defstruct dl-data base url name indent signed)
 
-(defun list-files (files)
+(defun list-files (files dl-data)
   "List files in a directory for downloading"
   ;;files.sort()
-  (mapcar #'print-file files))
+  (mapcar (lambda (f) (print-file f dl-data)) files))
 
-(defun strip-dl-base (file)
+(defun strip-dl-base (file base-name)
   (let ((fdir (pathname-directory file))
-       (bdir (pathname-directory *dl-base*)))
+       (bdir (pathname-directory base-name)))
     (make-pathname
      :name (pathname-name file)
      :type (pathname-type file)
        (append '(:absolute) 
               (subseq fdir (length bdir) (length fdir)))))))
      
-(defun print-file (file)
+(defun print-file (file dl-data)
   (let ((size 0)
        (modtime (date-string (file-write-date file)))
        (basename (namestring
                   (make-pathname :name (pathname-name file)
                                  :type (pathname-type file))))
-       (dl-name (strip-dl-base file))
+       (dl-name (strip-dl-base file (dl-data-name dl-data)))
        (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-format "<a href=\"~A~A\">~A</a>" *dl-url* dl-name basename)
+      (lml-format "<a href=\"~A~A\">~A</a>"
+                 (dl-data-url dl-data) dl-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-format " [<a href=\"~A~A.asc\">Signature</a>]" *dl-url* dl-name))
+       (setf (dl-data-signed dl-data) t)
+       (lml-format " [<a href=\"~A~A.asc\">Signature</a>]"
+                   (dl-data-url dl-data) dl-name))
       (html :br))))
 
 (defun display-header (name url)
   (lml-format "<h3>Browse ~A Download Site</h3>" name)
   (lml-format "<a style=\"padding-left:20pt;\" href=\"~A\">~A</a>" url url))
 
-(defun display-footer ()
-  (when *signed*
+(defun display-footer (dl-data)
+  (when (dl-data-signed)
     (lml-princ "<h3>GPG Public Key</h3>")
     (lml-princ "Use this <a href=\"https://www.b9.com/kevin.gpg.asc\">key</a> to verify file signtatures"))
   (lml-princ "</div>"))
   
-(defun print-sect-title (title)
-  (lml-format "<h~D>~A</h~D>" *section-indent* title *section-indent*))
+(defun print-sect-title (title dl-data)
+  (lml-format "<h~D>~A</h~D>"
+             (dl-data-indent dl-data) title (dl-data-indent dl-data)))
 
-(defun match-base-name? (name)
-  (let ((len-base-name (length *base-name*)))
+(defun match-base-name? (name base-name)
+  (let ((len-base-name (length base-name)))
     (when (>= (length name) len-base-name)
-      (string= name *base-name* :end1 len-base-name :end2 len-base-name))))
+      (string= name base-name :end1 len-base-name :end2 len-base-name))))
 
-(defun match-base-name-latest? (name)
-  (let* ((latest (concatenate 'string *base-name* "-latest"))
+(defun match-base-name-latest? (name base-name)
+  (let* ((latest (concatenate 'string base-name "-latest"))
         (len-latest (length latest)))
     (when (>= (length name) len-latest)
       (string= name latest :end1 len-latest :end2 len-latest))))
 
-(defun filter-against-base (files)
-  (delete-if-not #'(lambda (f) (match-base-name? (pathname-name f))) files))
+(defun filter-against-base (files base-name)
+  (delete-if-not
+   (lambda (f) (match-base-name? (pathname-name f) base-name))
+   files))
 
-(defun filter-latest (files)
-  (delete-if #'(lambda (f) (match-base-name-latest? (pathname-name f))) files))
+(defun filter-latest (files base-name)
+  (delete-if
+   (lambda (f) (match-base-name-latest? (pathname-name f) base-name))
+   files))
 
 (defun sort-pathnames (list)
-  (sort list #'(lambda (a b) (string< (namestring a) (namestring b)))))
+  (sort list (lambda (a b) (string< (namestring a) (namestring b)))))
 
-(defun display-one-section (title pat)
-  (let ((files (sort-pathnames (filter-latest
-                               (filter-against-base (directory pat))))))
+(defun display-one-section (title pat dl-data)
+  (let ((files (sort-pathnames
+               (filter-latest
+                (filter-against-base (directory pat) (dl-data-name dl-data))
+                (dl-data-name dl-data)))))
     (when files
-      (print-sect-title title)
+      (print-sect-title title dl-data)
       (lml-princ "<div style=\"padding-left: 20pt;\">")
-      (list-files files)
+      (list-files files dl-data)
       (lml-princ "</div>"))))
 
-(defun display-sections (sects)
+(defun display-sections (sects dl-data)
   (when sects
     (let ((title (car sects))
          (value (cadr sects)))
       (if (consp title)
-         (dolist (sect sects) (display-sections sect))
+         (dolist (sect sects)
+           (display-sections sect dl-data))
        (if (consp value)
            (progn
              (print-sect-title title)
-             (incf *section-indent*)
-             (display-sections value)
-             (decf *section-indent*))
-         (display-one-section title value))))))
+             (incf (dl-data-indent dl-data))
+             (display-sections value dl-data)
+             (decf (dl-data-indent dl-data)))
+         (display-one-section title value dl-data))))))
       
 (defun display-page (pkg-name pkg-base dl-base dl-url sects)
-  (let ((*section-indent* 3)
-       (*dl-base* dl-base)
-       (*dl-url* dl-url)
-       (*base-name* pkg-base)
-       (*signed* nil))
-    (display-header pkg-name dl-url)
-    (map nil #'display-sections sects)
-    (display-footer)))
+  (let ((dl-data (make-dl-data :indent 3
+                              :base dl-base
+                              :url dl-url
+                              :name pkg-base
+                              :signed nil)))
+    (display-header pkg-name dl-url dl-data)
+    (dolist (sect sects)
+      (display-sections sect dl-data))
+    (display-footer dl-data)))
 
 (defun std-dl-page (pkg-name pkg-base dl-base dl-url)
   (let ((base (parse-namestring dl-base)))
index 9045cb4fc5a87728f124b0149680bae8c3899309..7efb4e64a72db0bd2bcc4571817201c72d1c851c 100644 (file)
@@ -2,16 +2,14 @@
 ;;;; *************************************************************************
 ;;;; FILE IDENTIFICATION
 ;;;;
-;;;; Name:          files.cl
+;;;; Name:          files.lisp
 ;;;; Purpose:       File and directory functions for LML
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:lml2)
index d24686305f595989c977f7fc6d4a4299b7a0a46d..432a059431bd5ef16e263347ed904cdc1e2f5310 100644 (file)
@@ -7,13 +7,11 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  June 2003
 ;;;;
-;;;; $Id: package.lisp,v 1.4 2003/06/29 16:21:09 kevin Exp $
+;;;; $Id: package.lisp,v 1.5 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:cl-user)
   (:export
 
    ;; data.lisp
-   #:*print-spaces*
    #:*html-stream*
    
    ;; base.lisp
-   #:reset-indent
    #:html-file-page
    #:dtd-prologue
    #:lml-format
index 16dc05d177108606514388506208fda94794420d..cea9af9fad10ce4f8b8be485cc5515e929141c56 100644 (file)
@@ -7,13 +7,11 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: read-macro.lisp,v 1.1 2003/06/20 04:12:29 kevin Exp $
+;;;; $Id: read-macro.lisp,v 1.2 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
 (in-package #:lml2)
index 1ee29dbd941c4c10cacc8ada0a26cc8124c28308..259bb80da1d6fbc0b95f02350cd3cd5c3d268ded 100644 (file)
@@ -7,15 +7,14 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Aug 2002
 ;;;;
-;;;; $Id: stdsite.lisp,v 1.6 2003/06/23 23:58:29 kevin Exp $
+;;;; $Id: stdsite.lisp,v 1.7 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file, part of LML2, is Copyright (c) 2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
-;;;; LML2 users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License v2
-;;;; (http://www.gnu.org/licenses/gpl.html)
 ;;;; *************************************************************************
 
+
 ;;; A "standard site" is a format for a certain style of web page.
 ;;; It is based on the LML2 package.
 ;;; A stdsite page expects to include the following files:
index fca7c27aefab9964d4cec3295e26ffc8d9d0dcda..6116688e52899b91d5cde8e96d02b2dbd6fc8ce2 100644 (file)
@@ -7,9 +7,10 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2003
 ;;;;
-;;;; $Id: tests.lisp,v 1.1 2003/06/20 04:12:29 kevin Exp $
+;;;; $Id: tests.lisp,v 1.2 2003/07/12 17:54:05 kevin Exp $
 ;;;;
-;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
+;;;; This file, part of LML2, is Copyright (c) 2000-2003 by Kevin Rosenberg.
+;;;; Rights of modification and redistribution are in the LICENSE file.
 ;;;;
 ;;;; *************************************************************************
 
index a275a3e95eac802a7b0b8ebbff5c2e9504865e8e..a90b32585b765c4a48c16d169fe141bdb55d0c86 100644 (file)
@@ -1,6 +1,18 @@
-;;; $Id: utils.lisp,v 1.2 2003/06/28 08:18:21 kevin Exp $\r
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-\r
+;;;; *************************************************************************\r
+;;;; FILE IDENTIFICATION\r
 ;;;;\r
-;;;; General purpose utilities\r
+;;;; Name:          utils.lisp\r
+;;;; Purpose:       General purpose utilities\r
+;;;; Author:        Kevin M. Rosenberg\r
+;;;; Date Started:  June 2002\r
+;;;;\r
+;;;; $Id: utils.lisp,v 1.3 2003/07/12 17:54:05 kevin Exp $\r
+;;;;\r
+;;;; This file, part of LML2, is copyrighted and open-source software.\r
+;;;; Rights of modification and redistribution are in the LICENSE file.\r
+;;;;\r
+;;;; *************************************************************************\r
 \r
 (in-package #:lml2)\r
 \r
   `(aif ,test-form\r
         (progn ,@body)))\r
 \r
-(defun keyword-symbol? (x)\r
-  "Returns T if object is a symbol in the keyword package"\r
-  (and (symbolp x)\r
-       (string-equal "keyword" (package-name (symbol-package x)))))\r
-\r
-(defun list-to-spaced-string (list)\r
-  (format nil "~{~A~^ ~}" list))\r
-\r
-(defun print-n-chars (char n stream)\r
-  (declare (fixnum n)\r
-          (optimize (speed 3) (safety 0) (space 0)))\r
-  (do ((i 0 (1+ i)))\r
-      ((= i n) char)\r
-    (declare (fixnum i))\r
-    (write-char char stream)))\r
-  \r
-(defun indent-spaces (n &optional (stream *standard-output*))\r
-  "Indent n*2 spaces to output stream"\r
-  (print-n-chars #\space (+ n n) stream))\r
-\r
 (defun print-file-contents (file &optional (strm *standard-output*))\r
   "Opens a reads a file. Returns the contents as a single string"\r
   (when (probe-file file)\r