cl-rw

Layered streams for Common Lisp
git clone https://logand.com/git/cl-rw.git/
Log | Files | Refs

commit 7ce693b97ef86509dd6014ed7920d4fd21b809df
parent 53c86fc6436925699a59d165936c83f980f5b53e
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sun,  3 Aug 2014 21:07:13 +0200

rw:next-u24 added

Diffstat:
Mrw.lisp | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/rw.lisp b/rw.lisp @@ -33,6 +33,7 @@ :next :next-octets :next-u16 + :next-u24 :next-u32 :next-u8 :next-z0 @@ -235,6 +236,12 @@ (let? y (next-u8 reader) (logior (ash x 8) y)))) +(defun next-u24 (reader) ;; TODO little endian + (let? x (next-u8 reader) + (let? y (next-u8 reader) + (let? z (next-u8 reader) + (logior (ash x 16) (ash y 8) z))))) + (defun next-u32 (reader) ;; TODO little endian (let? x (next-u16 reader) (let? y (next-u16 reader)