Lines Matching refs:cnt
157 let mut cnt = 0; in read_stdin() localVariable
158 while cnt < buf.len() { in read_stdin()
167 return Ok(cnt); in read_stdin()
174 buf[cnt] = x; in read_stdin()
175 cnt += 1; in read_stdin()
178 return Ok(cnt); in read_stdin()
182 return Ok(cnt); in read_stdin()
200 let mut cnt = 0; in write_stdin() localVariable
201 while cnt < buf.len() { in write_stdin()
210 return Err(TtyError::BufferFull(cnt)); in write_stdin()
216 *r.unwrap() = buf[cnt]; in write_stdin()
217 cnt += 1; in write_stdin()
221 return Ok(cnt); in write_stdin()
232 let mut cnt = 0; in read_output() localVariable
233 while cnt < buf.len() { in read_output()
242 return Ok(cnt); in read_output()
248 buf[cnt] = *val.unwrap(); in read_output()
249 cnt += 1; in read_output()
252 return Ok(cnt); in read_output()
265 let mut cnt = 0; in write_output() localVariable
266 while cnt < buf.len() { in write_output()
275 return Err(TtyError::BufferFull(cnt)); in write_output()
281 *r.unwrap() = buf[cnt]; in write_output()
282 cnt += 1; in write_output()
286 return Ok(cnt); in write_output()