Lines Matching refs:bytes_to_end

110     size_t bytes_to_end;  in cbuf_write()  local
116 bytes_to_end = chdr->size - w_index; in cbuf_write()
117 if (data_len <= bytes_to_end) { in cbuf_write()
120 copy_from(buf_data, w_index, data, data_offset, bytes_to_end); in cbuf_write()
121 copy_from(buf_data, 0, data, data_offset + bytes_to_end, data_len - bytes_to_end); in cbuf_write()
129 size_t bytes_to_end = chdr->size - chdr->r_index; in cbuf_read_unsafe() local
130 if (numbytes < bytes_to_end) { in cbuf_read_unsafe()
137 copy_into(data, data_offset, buf_data, chdr->r_index, bytes_to_end); in cbuf_read_unsafe()
138 copy_into(data, data_offset + bytes_to_end, buf_data, 0, numbytes - bytes_to_end); in cbuf_read_unsafe()
140 chdr->r_index = numbytes - bytes_to_end; in cbuf_read_unsafe()
291 size_t bytes_to_end; in cbuf_reass_write() local
305 bytes_to_end = chdr->size - start_index; in cbuf_reass_write()
306 copy_from(buf_data, start_index, data, data_offset, bytes_to_end); in cbuf_reass_write()
307 copy_from(buf_data, 0, data, data_offset + bytes_to_end, numbytes - bytes_to_end); in cbuf_reass_write()
309 bmp_setrange(bitmap, start_index, bytes_to_end); in cbuf_reass_write()
310 bmp_setrange(bitmap, 0, numbytes - bytes_to_end); in cbuf_reass_write()
322 size_t bytes_to_end; in cbuf_reass_merge() local
327 bytes_to_end = chdr->size - old_w; in cbuf_reass_merge()
328 if (numbytes <= bytes_to_end) { in cbuf_reass_merge()
331 bmp_clrrange(bitmap, old_w, bytes_to_end); in cbuf_reass_merge()
332 bmp_clrrange(bitmap, 0, numbytes - bytes_to_end); in cbuf_reass_merge()