Lines Matching refs:bufCur
72 uintptr_t bufCur; //! current position, could be outside of valid range member
84 buf->bufStart = buf->bufCur = (uintptr_t)data - offset; in sbuf_init()
90 buf->bufCur += len; in sbuf_advance()
98 return buf->bufCur - buf->bufStart; in sbuf_needed()
105 return buf->bufEnd - buf->bufCur; in sbuf_left()
110 return (void*)buf->bufCur; in sbuf_head()
115 return buf->bufCur >= buf->buf && buf->bufCur < buf->bufEnd; in sbuf_valid()
133 if(buf->bufCur + srcLen > buf->buf) { in sbuf_write()
135 if(buf->bufCur < buf->buf) { in sbuf_write()
136 int len = buf->buf - buf->bufCur; in sbuf_write()
143 std_memsmove((void*)buf->bufCur, buf->bufEnd - buf->bufCur, (void*)src, writeLen); in sbuf_write()
159 if(buf->bufCur + dstLen > buf->buf) { in sbuf_read()
161 if(buf->bufCur < buf->buf) { in sbuf_read()
162 int len = buf->buf - buf->bufCur; in sbuf_read()
169 std_memsmove((void*)dst, dstLen, (void*)buf->bufCur, readLen); in sbuf_read()