Lines Matching refs:buf_pos
292 int buf_pos, len; in write_header() local
305 buf_pos = 4; in write_header()
307 buf[buf_pos++] = s->flags; in write_header()
310 len = write_palette(s, buf + buf_pos, buf_size - buf_pos); in write_header()
313 buf_pos += len; in write_header()
316 return buf_pos; in write_header()
321 int buf_pos = 0; in write_block() local
333 buf[buf_pos++] = block_size >> 8; in write_block()
334 buf[buf_pos++] = block_size; in write_block()
337 return buf_pos; in write_block()
339 buf[buf_pos++] = b->flags; in write_block()
342 buf[buf_pos++] = (b->start); in write_block()
343 buf[buf_pos++] = (b->len); in write_block()
348 buf[buf_pos++] = (b->col); in write_block()
349 buf[buf_pos++] = (b->row); in write_block()
352 memcpy(buf + buf_pos, b->data, b->data_size); in write_block()
354 buf_pos += b->data_size; in write_block()
356 return buf_pos; in write_block()
679 int row, col, buf_pos = 0, len; in write_all_blocks() local
684 len = write_block(b, buf + buf_pos, buf_size - buf_pos); in write_all_blocks()
688 buf_pos += len; in write_all_blocks()
691 return buf_pos; in write_all_blocks()
697 int buf_pos, res; in write_bitstream() local
710 buf_pos = res; in write_bitstream()
712 res = write_all_blocks(s, buf + buf_pos, buf_size - buf_pos); in write_bitstream()
715 buf_pos += res; in write_bitstream()
717 s->total_bits += ((double) buf_pos) * 8.0; in write_bitstream()
720 return buf_pos; in write_bitstream()