qbuf_peek   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/contrib/stream.xtm

Implementation

(bind-func qbuf_peek:[!a,QBuffer*,i64]*
  (lambda (buf idx)
    (if (>= (+ (tref buf 0) idx) (tref buf 1))
        (begin
    (printout "Peeking past write! p(" (+ (tref buf 0) idx) ") w(" (tref buf 1) ")")
    (println)))
    (pref (tref buf 3)
    (% (+ (tref buf 0) idx)
       (tref buf 2)))))


Back to Index

Similar Entries