Skip to content
Snippets Groups Projects
Commit 7a201bb1 authored by Kevin M. Rosenberg's avatar Kevin M. Rosenberg
Browse files

r3727: *** empty log message ***

parent 4b686492
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
;;;; Copyright 2002-2003 Kevin M. Rosenberg ;;;; Copyright 2002-2003 Kevin M. Rosenberg
;;;; Permission to use with BSD-style license included in the COPYING file ;;;; Permission to use with BSD-style license included in the COPYING file
;;;; ;;;;
;;;; $Id: src.lisp,v 1.4 2003/01/04 08:27:41 kevin Exp $ ;;;; $Id: src.lisp,v 1.5 2003/01/04 08:33:13 kevin Exp $
(defpackage #:base64 (defpackage #:base64
(:use #:cl) (:use #:cl)
...@@ -156,43 +156,38 @@ with a #\Newline." ...@@ -156,43 +156,38 @@ with a #\Newline."
(logand #x3f svalue)))) (logand #x3f svalue))))
(output-char pad)))) (output-char pad))))
(do ((igroup 0 (1+ igroup)) (do ((igroup 0 (1+ igroup))
(isource 0 (+ isource 3)) (isource 0 (+ isource 3)))
(svalue 0))
((= igroup complete-group-count) ((= igroup complete-group-count)
(case remainder (case remainder
(2 (2
(setq svalue (output-group
(the fixnum (the fixnum
(+ (+
(the fixnum (the fixnum
(ash (char-code (the character (ash (char-code (the character
(char string isource))) 16)) (char string isource))) 16))
(the fixnum (the fixnum
(ash (char-code (the character (ash (char-code (the character
(char string (1+ isource)))) 8))))) (char string (1+ isource)))) 8))))
(output-group svalue 3)) 3))
(1 (1
(setq svalue (output-group
(the fixnum (the fixnum
(char-code (the character (char-code (the character (char string isource))))
(char string isource))))) 2)))
(output-group svalue 2)))
result) result)
(declare (fixnum igroup isource svalue)) (declare (fixnum igroup isource))
(setq svalue (output-group
(the fixnum (the fixnum
(+ (+
(the fixnum (the fixnum
(ash (char-code (the character (ash (char-code (the character
(char string isource))) 16)) (char string isource))) 16))
(the fixnum (the fixnum
(ash (char-code (the character (ash (char-code (the character (char string (1+ isource)))) 8))
(char string (1+ isource)))) 8)) (the fixnum
(the fixnum (char-code (the character (char string (+ 2 isource)))))))
(char-code (the character 4))))))
(char string (+ 2 isource))))))))
(output-group svalue 4))))))
(defun integer-to-base64 (input &key (uri nil) (columns 0) (stream nil)) (defun integer-to-base64 (input &key (uri nil) (columns 0) (stream nil))
(if stream (if stream
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment