X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-rotate-byte%2Frotate-byte.lisp;fp=contrib%2Fsb-rotate-byte%2Frotate-byte.lisp;h=2861359f029ab4afce3d70e56c63f0d4720f1e55;hb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;hp=9e947fd595d64a12bfacc1b04bbefc092e45dc63;hpb=79cc569a97e444389350ea3f5b1017374fe16bec;p=sbcl.git diff --git a/contrib/sb-rotate-byte/rotate-byte.lisp b/contrib/sb-rotate-byte/rotate-byte.lisp index 9e947fd..2861359 100644 --- a/contrib/sb-rotate-byte/rotate-byte.lisp +++ b/contrib/sb-rotate-byte/rotate-byte.lisp @@ -9,15 +9,15 @@ contains the bits of INTEGER." (defun %rotate-byte (count size pos integer) (let ((count (nth-value 1 (round count size))) - (mask (1- (ash 1 size)))) + (mask (1- (ash 1 size)))) (logior (logand integer (lognot (ash mask pos))) - (let ((field (logand (ash mask pos) integer))) - (logand (ash mask pos) - (if (> count 0) - (logior (ash field count) - (ash field (- count size))) - (logior (ash field count) - (ash field (+ count size))))))))) + (let ((field (logand (ash mask pos) integer))) + (logand (ash mask pos) + (if (> count 0) + (logior (ash field count) + (ash field (- count size))) + (logior (ash field count) + (ash field (+ count size))))))))) (defun %unsigned-32-rotate-byte (count integer) ;; inhibit transforms