Changeset 63 for branches/home/psmith


Ignore:
Timestamp:
02/03/07 03:16:10 (18 years ago)
Author:
psmith
Message:

Corrected compact

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified branches/home/psmith/restructure/src/buffer/buffer.lisp

    r56 r63  
    8989                      (if (>= address (+ start-address length))
    9090                          (progn
    91                             (format str "--")
    92                             (format readable "--"))
     91                            (format str (if (eql column-index 7) "   " ".. "))
     92                            (format readable "."))
    9393                          (progn
    9494                            (format str (if (eql column-index 7) "~A   " "~A ") (hex-dump-byte address))
     
    154154(defmethod compact((byte-buffer byte-buffer))
    155155  :documentation "copy remaining bytes to the beginning of this buffer and set position to number of bytes copied (ready for a new put"
    156   (with-slots (buf position limit) byte-buffer
     156  (with-slots (buf position limit capacity) byte-buffer
    157157    (let ((remaining (remaining byte-buffer)))
    158158      (%memcpy buf (cffi:make-pointer (+ (cffi:pointer-address buf) position)) remaining)
    159       (setf position remaining))))
     159      (setf position remaining)
     160      (setf limit capacity))))
    160161
    161162;reads bytes from byte-buffer and returns a vector (unsigned-byte 8)
Note: See TracChangeset for help on using the changeset viewer.