cl-olefs

OLE File System tools for Common Lisp
git clone https://logand.com/git/cl-olefs.git/
Log | Files | Refs

commit a6cb3a29e41b31c21bf647e7474a8684c7dd55d2
parent 2e148acc3a79f4881a3bc098189e8432d542cd9a
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun, 24 Mar 2013 23:26:03 +0100

BIFF-RkNumber understands double floats

Diffstat:
Molefs.lisp | 16+++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/olefs.lisp b/olefs.lisp @@ -1506,15 +1506,13 @@ (define-structure BIFF-RkNumber () (%dummy dword) - (percent t :compute (not (zerop (logand #x80000000 %dummy)))) - (signed t :compute (not (zerop (logand #x40000000 %dummy)))) - (value t :compute (if signed - (let* ((x (logand #x1fffffff)) - (y (if (zerop (logand #x20000000)) - x - x #+nil (- (1+ (lognot x)))))) ;; TODO!!! - (if percent (/ y 100) y)) - %dummy #+nil(error "TODO partial double")))) ;; TODO!!! + (percent t :compute (not (zerop (logand 1 %dummy)))) + (signed t :compute (not (zerop (logand 2 %dummy)))) + (value t :compute (let ((y (if signed + (error "TODO") ;;(ash x -2) + (ccl::double-float-from-bits ;; TODO not ccl specific + (logand #xfffffffc %dummy) 0)))) + (if percent (/ y 100) y)))) (define-structure BIFF-RkRec () (ixfe ushort)