Lines Matching refs:bytes_read
191 size_t bytes_read;
241 while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)
243 if (bytes_read == SAFE_READ_ERROR)
249 bytes += bytes_read;
257 while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)
261 if (bytes_read == SAFE_READ_ERROR)
268 while ((p = memchr (p, '\n', (buf + bytes_read) - p)))
273 bytes += bytes_read;
297 while ((bytes_read = safe_read (fd, buf + prev, BUFFER_SIZE - prev)) > 0)
303 if (bytes_read == SAFE_READ_ERROR)
310 bytes += bytes_read;
312 bytes_read += prev;
331 n = mbrtowc (&wide_char, p, bytes_read, &state);
346 bytes_read--;
358 bytes_read -= n;
395 while (bytes_read > 0);
398 if (bytes_read > 0)
400 if (bytes_read == BUFFER_SIZE)
404 bytes_read--;
406 memmove (buf, p, bytes_read);
408 prev = bytes_read;
421 while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)
424 if (bytes_read == SAFE_READ_ERROR)
431 bytes += bytes_read;
467 while (--bytes_read);