Lines Matching refs:pos
249 unsigned int pos, unsigned int count, bool viewed) in vcs_read_buf_uni() argument
258 pos /= 4; in vcs_read_buf_uni()
259 row = pos / maxcol; in vcs_read_buf_uni()
260 col = pos % maxcol; in vcs_read_buf_uni()
277 unsigned int pos, unsigned int count, bool viewed) in vcs_read_buf_noattr() argument
282 org = screen_pos(vc, pos, viewed); in vcs_read_buf_noattr()
283 col = pos % maxcol; in vcs_read_buf_noattr()
284 pos += maxcol - col; in vcs_read_buf_noattr()
289 org = screen_pos(vc, pos, viewed); in vcs_read_buf_noattr()
291 pos += maxcol; in vcs_read_buf_noattr()
297 unsigned int pos, unsigned int count, bool viewed, in vcs_read_buf() argument
304 if (pos < HEADER_SIZE) { in vcs_read_buf()
310 *skip += pos; in vcs_read_buf()
311 count += pos; in vcs_read_buf()
314 filled = count - pos; in vcs_read_buf()
319 pos = HEADER_SIZE; in vcs_read_buf()
322 } else if (pos & 1) { in vcs_read_buf()
337 pos -= HEADER_SIZE; in vcs_read_buf()
338 pos /= 2; in vcs_read_buf()
339 col = pos % maxcol; in vcs_read_buf()
341 org = screen_pos(vc, pos, viewed); in vcs_read_buf()
342 pos += maxcol - col; in vcs_read_buf()
355 org = screen_pos(vc, pos, viewed); in vcs_read_buf()
357 pos += maxcol; in vcs_read_buf()
373 loff_t pos; in vcs_read() local
380 pos = *ppos; in vcs_read()
391 if (pos < 0) in vcs_read()
394 if (uni_mode && (pos | count) & 3) in vcs_read()
421 if (pos >= size) in vcs_read()
423 if (count > size - pos) in vcs_read()
424 count = size - pos; in vcs_read()
436 ret = vcs_read_buf_uni(vc, con_buf, pos, this_round, in vcs_read()
441 vcs_read_buf_noattr(vc, con_buf, pos, this_round, in vcs_read()
444 this_round = vcs_read_buf(vc, con_buf, pos, this_round, in vcs_read()
465 pos += this_round; in vcs_read()
479 unsigned int pos, unsigned int count, bool viewed, u16 **org0) in vcs_write_buf_noattr() argument
484 *org0 = org = screen_pos(vc, pos, viewed); in vcs_write_buf_noattr()
485 col = pos % maxcol; in vcs_write_buf_noattr()
486 pos += maxcol - col; in vcs_write_buf_noattr()
496 org = screen_pos(vc, pos, viewed); in vcs_write_buf_noattr()
498 pos += maxcol; in vcs_write_buf_noattr()
519 unsigned int pos, unsigned int count, bool viewed, u16 **org0) in vcs_write_buf() argument
526 if (pos < HEADER_SIZE) { in vcs_write_buf()
530 while (pos < HEADER_SIZE && count > 0) { in vcs_write_buf()
532 header[pos++] = *con_buf++; in vcs_write_buf()
541 pos -= HEADER_SIZE; in vcs_write_buf()
542 col = (pos/2) % maxcol; in vcs_write_buf()
544 *org0 = org = screen_pos(vc, pos/2, viewed); in vcs_write_buf()
547 if (pos & 1) { in vcs_write_buf()
553 pos++; in vcs_write_buf()
555 org = screen_pos(vc, pos/2, viewed); in vcs_write_buf()
560 pos /= 2; in vcs_write_buf()
561 pos += maxcol - col; in vcs_write_buf()
572 org = screen_pos(vc, pos, viewed); in vcs_write_buf()
574 pos += maxcol; in vcs_write_buf()
599 loff_t pos; in vcs_write() local
609 pos = *ppos; in vcs_write()
628 if (pos < 0 || pos > size) in vcs_write()
630 if (count > size - pos) in vcs_write()
631 count = size - pos; in vcs_write()
677 if (pos >= size) in vcs_write()
679 if (this_round > size - pos) in vcs_write()
680 this_round = size - pos; in vcs_write()
687 org = vcs_write_buf(vc, con_buf, pos, this_round, in vcs_write()
690 org = vcs_write_buf_noattr(vc, con_buf, pos, this_round, in vcs_write()
696 pos += this_round; in vcs_write()