Lines Matching defs:pos

249 		unsigned int pos, unsigned int count, bool viewed)
258 pos /= 4;
259 row = pos / maxcol;
260 col = pos % maxcol;
277 unsigned int pos, unsigned int count, bool viewed)
282 org = screen_pos(vc, pos, viewed);
283 col = pos % maxcol;
284 pos += maxcol - col;
289 org = screen_pos(vc, pos, viewed);
291 pos += maxcol;
297 unsigned int pos, unsigned int count, bool viewed,
304 if (pos < HEADER_SIZE) {
310 *skip += pos;
311 count += pos;
314 filled = count - pos;
319 pos = HEADER_SIZE;
321 /* If count >= 0, then pos is even... */
322 } else if (pos & 1) {
337 pos -= HEADER_SIZE;
338 pos /= 2;
339 col = pos % maxcol;
341 org = screen_pos(vc, pos, viewed);
342 pos += maxcol - col;
355 org = screen_pos(vc, pos, viewed);
357 pos += maxcol;
373 loff_t pos;
380 pos = *ppos;
391 if (pos < 0)
393 /* we enforce 32-bit alignment for pos and count in unicode mode */
394 if (uni_mode && (pos | count) & 3)
421 if (pos >= size)
423 if (count > size - pos)
424 count = size - pos;
436 ret = vcs_read_buf_uni(vc, con_buf, pos, this_round,
441 vcs_read_buf_noattr(vc, con_buf, pos, this_round,
444 this_round = vcs_read_buf(vc, con_buf, pos, this_round,
465 pos += this_round;
479 unsigned int pos, unsigned int count, bool viewed, u16 **org0)
484 *org0 = org = screen_pos(vc, pos, viewed);
485 col = pos % maxcol;
486 pos += maxcol - col;
496 org = screen_pos(vc, pos, viewed);
498 pos += maxcol;
519 unsigned int pos, unsigned int count, bool viewed, u16 **org0)
526 if (pos < HEADER_SIZE) {
530 while (pos < HEADER_SIZE && count > 0) {
532 header[pos++] = *con_buf++;
541 pos -= HEADER_SIZE;
542 col = (pos/2) % maxcol;
544 *org0 = org = screen_pos(vc, pos/2, viewed);
546 /* odd pos -- the first single character */
547 if (pos & 1) {
553 pos++;
555 org = screen_pos(vc, pos/2, viewed);
560 pos /= 2;
561 pos += maxcol - col;
563 /* even pos -- handle attr+character pairs */
572 org = screen_pos(vc, pos, viewed);
574 pos += maxcol;
581 /* odd pos -- the remaining character */
599 loff_t pos;
609 pos = *ppos;
628 if (pos < 0 || pos > size)
630 if (count > size - pos)
631 count = size - pos;
677 if (pos >= size)
679 if (this_round > size - pos)
680 this_round = size - pos;
687 org = vcs_write_buf(vc, con_buf, pos, this_round,
690 org = vcs_write_buf_noattr(vc, con_buf, pos, this_round,
696 pos += this_round;