(defun read-int64 (ptr)
(let ((v (read-uint64 ptr)))
(if (logbitp 63 v)
(- v #.(ash 1 64))
v)))
But this looks inelegant to me, requiring the storage of a constant #.(ash 1 64) used in a subtraction operation.
Been racking my brain on the BOOLE operations and the LOGNOT et al, looking for a more elegant solution to this. Not a high-value item, just curious.
Dr. David McClain
Chief Technical Officer
Refined Audiometrics Laboratory
4391 N. Camino Ferreo
Tucson, AZ 85750
phone: 1.520.390.3995