Lines Matching refs:r_index
75 chdr->r_index = 0; in cbuf_init()
98 size_t until_end = chdr->size - chdr->r_index; in cbuf_get_w_index()
100 return chdr->r_index + chdr->used; in cbuf_get_w_index()
129 size_t bytes_to_end = chdr->size - chdr->r_index; in cbuf_read_unsafe()
131 copy_into(data, data_offset, buf_data, chdr->r_index, numbytes); in cbuf_read_unsafe()
133 chdr->r_index += numbytes; in cbuf_read_unsafe()
137 copy_into(data, data_offset, buf_data, chdr->r_index, bytes_to_end); in cbuf_read_unsafe()
140 chdr->r_index = numbytes - bytes_to_end; in cbuf_read_unsafe()
163 oldpos = chdr->r_index; in cbuf_read_offset()
164 chdr->r_index = (chdr->r_index + offset) % chdr->size; in cbuf_read_offset()
166 chdr->r_index = oldpos; in cbuf_read_offset()
175 chdr->r_index = (chdr->r_index + numbytes) % chdr->size; in cbuf_pop()
248 size_t move_to_start_idx = chdr->r_index; in cbuf_contiguify()
266 chdr->r_index = 0; in cbuf_contiguify()
270 size_t until_end = chdr->size - chdr->r_index; in cbuf_reference()
273 first->mData = &chdr->buf[chdr->r_index]; in cbuf_reference()
277 first->mData = &chdr->buf[chdr->r_index]; in cbuf_reference()