r10181: Automated commit for Debian build of md5 upstream-version-1.8.5
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 4 Dec 2004 18:27:59 +0000 (18:27 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 4 Dec 2004 18:27:59 +0000 (18:27 +0000)
debian/changelog
md5.lisp

index 0defa9a010ca32045d2f6acdb72b3837c69314c1..cdca01db9c6aed63afd7f3d2a34f5512809edac9 100644 (file)
@@ -1,3 +1,9 @@
+cl-md5 (1.8.5-1) unstable; urgency=low
+
+  * Patch from John Desoi for Lispworks compatibility
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sat,  4 Dec 2004 11:27:47 -0700
+
 cl-md5 (1.8.4-1) unstable; urgency=medium
 
   * Patch from Andreas Fuchs on sbcl-devel which fixes segfault on sbcl
 cl-md5 (1.8.4-1) unstable; urgency=medium
 
   * Patch from Andreas Fuchs on sbcl-devel which fixes segfault on sbcl
index a7ce4a3c25224a379d1b3e1d55334c73d31f7a2f..46ff79c04d22dd9aa1ffbcc3da7b7bb1362c303d 100644 (file)
--- a/md5.lisp
+++ b/md5.lisp
 
 ;;; Section 2:  Basic Datatypes
 
 
 ;;; Section 2:  Basic Datatypes
 
+#-lispworks
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (deftype ub32 ()
     "Corresponds to the 32bit quantity word of the MD5 Spec"
     `(unsigned-byte 32)))
 
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (deftype ub32 ()
     "Corresponds to the 32bit quantity word of the MD5 Spec"
     `(unsigned-byte 32)))
 
-(defmacro assemble-ub32 (a b c d)
-  "Assemble an ub32 value from the given (unsigned-byte 8) values,
+#+lispworks
+(deftype ub32 ()
+    "Corresponds to the 32bit quantity word of the MD5 Spec"
+    `(unsigned-byte 32))
+
+(eval-when (:compile-toplevel :load-toplevel :execute)
+  (defmacro assemble-ub32 (a b c d)
+    "Assemble an ub32 value from the given (unsigned-byte 8) values,
 where a is the intended low-order byte and d the high-order byte."
 where a is the intended low-order byte and d the high-order byte."
-  `(the ub32 (logior (ash ,d 24) (ash ,c 16) (ash ,b 8) ,a)))
+    `(the ub32 (logior (ash ,d 24) (ash ,c 16) (ash ,b 8) ,a))))
 
 ;;; Section 3.4:  Auxilliary functions
 
 
 ;;; Section 3.4:  Auxilliary functions
 
@@ -244,20 +251,6 @@ accordingly."
 ;;; Section 3.4:  Converting 8bit-vectors into 16-Word Blocks
 
 (declaim (inline fill-block fill-block-ub8 fill-block-char))
 ;;; Section 3.4:  Converting 8bit-vectors into 16-Word Blocks
 
 (declaim (inline fill-block fill-block-ub8 fill-block-char))
-(defun fill-block (block buffer offset)
-  "Convert a complete 64 byte input vector segment into the given 16
-word MD5 block.  This currently works on (unsigned-byte 8) and
-character simple-arrays, via the functions `fill-block-ub8' and
-`fill-block-char' respectively."
-  (declare (type (integer 0 #.(- most-positive-fixnum 64)) offset)
-          (type (simple-array ub32 (16)) block)
-          (type (simple-array * (*)) buffer)
-          (optimize (speed 3) (safety 0) (space 0) (debug 0)))
-  (etypecase buffer
-    ((simple-array (unsigned-byte 8) (*))
-     (fill-block-ub8 block buffer offset))
-    (simple-string
-     (fill-block-char block buffer offset))))
 
 (defun fill-block-ub8 (block buffer offset)
   "Convert a complete 64 (unsigned-byte 8) input vector segment
 
 (defun fill-block-ub8 (block buffer offset)
   "Convert a complete 64 (unsigned-byte 8) input vector segment
@@ -305,6 +298,21 @@ offset into the given 16 word MD5 block."
                             (char-code (schar buffer (+ j 2)))
                             (char-code (schar buffer (+ j 3)))))))
 
                             (char-code (schar buffer (+ j 2)))
                             (char-code (schar buffer (+ j 3)))))))
 
+(defun fill-block (block buffer offset)
+  "Convert a complete 64 byte input vector segment into the given 16
+word MD5 block.  This currently works on (unsigned-byte 8) and
+character simple-arrays, via the functions `fill-block-ub8' and
+`fill-block-char' respectively."
+  (declare (type (integer 0 #.(- most-positive-fixnum 64)) offset)
+          (type (simple-array ub32 (16)) block)
+          (type (simple-array * (*)) buffer)
+          (optimize (speed 3) (safety 0) (space 0) (debug 0)))
+  (etypecase buffer
+    ((simple-array (unsigned-byte 8) (*))
+     (fill-block-ub8 block buffer offset))
+    (simple-string
+     (fill-block-char block buffer offset))))
+
 ;;; Section 3.5:  Message Digest Output
 
 (declaim (inline md5regs-digest))
 ;;; Section 3.5:  Message Digest Output
 
 (declaim (inline md5regs-digest))