Lines Matching refs:offset

183         let mut offset = 0;  in receive_buf_common()  localVariable
213 self.receive_buf(tty.clone(), &buf[offset..], Some(&flags[offset..]), n); in receive_buf_common()
215 self.receive_buf(tty.clone(), &buf[offset..], flags, n); in receive_buf_common()
219 offset += n; in receive_buf_common()
292 let offset = n; in receive_buf_real_raw() localVariable
297 self.read_buf[head..(head + n)].copy_from_slice(&buf[offset..(offset + n)]); in receive_buf_real_raw()
351 let mut offset = 0; in receive_buf_standard() localVariable
353 if offset >= buf.len() { in receive_buf_standard()
356 let mut c = buf[offset]; in receive_buf_standard()
357 offset += 1; in receive_buf_standard()
904 pub fn zero_buffer(&mut self, offset: usize, size: usize) { in zero_buffer()
905 let offset = offset & (NTTY_BUFSIZE - 1); in zero_buffer() localVariable
907 let n = offset + size; in zero_buffer()
909 for c in &mut self.read_buf[offset..NTTY_BUFSIZE] { in zero_buffer()
917 for c in &mut self.read_buf[offset..n] { in zero_buffer()
1000 offset: &mut usize, in canon_copy_from_read_buf()
1064 self.ntty_copy(&mut dst[*offset..], tail, &mut n)?; in canon_copy_from_read_buf()
1066 *offset += n; in canon_copy_from_read_buf()
1124 offset: &mut usize, in copy_from_read_buf()
1135 self.ntty_copy(&mut dst[*offset..], tail, &mut n)?; in copy_from_read_buf()
1152 *offset += n; in copy_from_read_buf()
1601 let mut offset = 0; in read() localVariable
1610 } else if ldata.canon_copy_from_read_buf(buf, &mut nr, &mut offset)? { in read()
1613 } else if ldata.copy_from_read_buf(termios, buf, &mut nr, &mut offset)? { in read()
1651 if offset != 0 { in read()
1657 buf[offset] = cs.bits(); in read()
1658 offset += 1; in read()
1708 if ldata.canon_copy_from_read_buf(buf, &mut nr, &mut offset)? { in read()
1710 offset += len - nr; in read()
1711 return Ok(offset); in read()
1716 if packet && offset == 0 { in read()
1717 buf[offset] = TtyPacketStatus::TIOCPKT_DATA.bits(); in read()
1718 offset += 1; in read()
1722 if ldata.copy_from_read_buf(core.termios(), buf, &mut nr, &mut offset)? in read()
1723 && offset >= minimum in read()
1726 return Ok(offset); in read()
1730 if offset >= minimum { in read()
1739 if offset > 0 { in read()
1740 return Ok(offset); in read()
1766 let mut offset = 0; in write() localVariable
1778 let ret = ldata.process_output_block(core, core.termios(), &buf[offset..], nr); in write()
1790 offset += num; in write()
1797 let c = buf[offset]; in write()
1801 offset += 1; in write()
1808 let write = tty.write(core, &buf[offset..], nr)?; in write()
1812 offset += write; in write()
1833 Ok(offset) in write()