r3726: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 4 Jan 2003 08:27:41 +0000 (08:27 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 4 Jan 2003 08:27:41 +0000 (08:27 +0000)
debian/control
src.lisp

index 2da249a29d40b75100db8490b254cb5f243a1748..1ba4cac269e5be74ce1f38c3bd174b9911188e6d 100644 (file)
@@ -9,10 +9,10 @@ Package: cl-base64
 Architecture: all
 Depends: ${shlibs:Depends}, common-lisp-controller (>= 3.47)
 Description: Common Lisp package to encode and decode base64 with URI support
-  This package provides highly optimized base64 encoding and decoding.
-  Besides conversion to and from strings, integer conversions are supported.
-  Encoding with Uniform Resource Indentifiers is supported by using
-  a modified encoding table that uses only URI-compatible characters.
+ This package provides highly optimized base64 encoding and decoding.
+ Besides conversion to and from strings, integer conversions are supported.
+ Encoding with Uniform Resource Indentifiers is supported by using
+ a modified encoding table that uses only URI-compatible characters.
 
 
 
index 35746ec71c7e8170a93220c63f2bdc82ddfab3bd..017783b47cb4d703c52f749f94090286a6f85076 100644 (file)
--- a/src.lisp
+++ b/src.lisp
@@ -14,7 +14,7 @@
 ;;;; Copyright 2002-2003 Kevin M. Rosenberg
 ;;;; Permission to use with BSD-style license included in the COPYING file
 ;;;;
-;;;; $Id: src.lisp,v 1.3 2003/01/04 06:13:53 kevin Exp $
+;;;; $Id: src.lisp,v 1.4 2003/01/04 08:27:41 kevin Exp $
 
 (defpackage #:base64
   (:use #:cl)
@@ -106,9 +106,10 @@ with a #\Newline."
           (num-breaks (if (plusp num-lines)
                           (1- num-lines)
                           0))
-          (strlen (+ padded-length num-breaks))
-          (result (unless stream
-                    (make-string strlen)))
+          (strlen (if stream
+                      0
+                      (+ padded-length num-breaks)))
+          (result (make-string strlen))
           (col (if (plusp columns)
                    0
                    (1+ padded-length)))
@@ -118,18 +119,19 @@ with a #\Newline."
       (labels ((output-char (ch)
                 (when (= col columns)
                   (if stream
-                      (write #\Newline stream)
+                      (write-char #\Newline stream)
                       (progn
                         (setf (schar result ioutput) #\Newline)
                         (incf ioutput)))
                   (setq col 0))
                 (incf col)
                 (if stream
-                    (write ch stream)
+                    (write-char ch stream)
                     (progn
                       (setf (schar result ioutput) ch)
                       (incf ioutput))))
             (output-group (svalue chars)
+              (declare (fixnum svalue chars))
               (output-char
                (schar encode-table
                       (the fixnum
@@ -155,7 +157,7 @@ with a #\Newline."
                   (output-char pad))))
        (do ((igroup 0 (1+ igroup))
             (isource 0 (+ isource 3))
-            svalue)
+            (svalue 0))
            ((= igroup complete-group-count)
             (case remainder
               (2