Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 12 of 12) sorted by relevance

/coreutils/src/
Dwc_avx2.c52 ssize_t bytes_read = read (fd, avx_buf, sizeof avx_buf); in wc_lines_avx2() local
53 if (bytes_read <= 0) in wc_lines_avx2()
54 return (struct wc_lines) { bytes_read == 0 ? 0 : errno, lines, bytes }; in wc_lines_avx2()
56 bytes += bytes_read; in wc_lines_avx2()
59 while (bytes_read >= 64) in wc_lines_avx2()
74 bytes_read -= 64; in wc_lines_avx2()
91 char *end = (char *) datap + bytes_read; in wc_lines_avx2()
Dcksum_pclmul.c41 size_t bytes_read; in cksum_pclmul() local
59 while ((bytes_read = fread (buf, 1, BUFLEN, fp)) > 0) in cksum_pclmul()
73 if (length + bytes_read < length) in cksum_pclmul()
78 length += bytes_read; in cksum_pclmul()
83 if (bytes_read >= 16 * 8) in cksum_pclmul()
100 while (bytes_read >= 16 * 8) in cksum_pclmul()
139 bytes_read -= (16 * 4); in cksum_pclmul()
154 if (bytes_read >= 32) in cksum_pclmul()
161 while (bytes_read >= 32) in cksum_pclmul()
171 bytes_read -= 16; in cksum_pclmul()
[all …]
Dhead.c653 size_t bytes_read; in elide_tail_lines_seekable() local
658 bytes_read = (pos - start_pos) % BUFSIZ; in elide_tail_lines_seekable()
659 if (bytes_read == 0) in elide_tail_lines_seekable()
660 bytes_read = BUFSIZ; in elide_tail_lines_seekable()
663 pos -= bytes_read; in elide_tail_lines_seekable()
666 bytes_read = safe_read (fd, buffer, bytes_read); in elide_tail_lines_seekable()
667 if (bytes_read == SAFE_READ_ERROR) in elide_tail_lines_seekable()
677 if (n_lines && bytes_read && buffer[bytes_read - 1] != line_end) in elide_tail_lines_seekable()
684 size_t n = bytes_read; in elide_tail_lines_seekable()
735 bytes_read = safe_read (fd, buffer, BUFSIZ); in elide_tail_lines_seekable()
[all …]
Dwc.c266 ssize_t bytes_read = read (fd, buf, BUFFER_SIZE); in wc_lines() local
267 if (bytes_read <= 0) in wc_lines()
268 return (struct wc_lines) { bytes_read == 0 ? 0 : errno, lines, bytes }; in wc_lines()
270 bytes += bytes_read; in wc_lines()
271 char *end = buf + bytes_read; in wc_lines()
294 long_lines = 15 * buflines <= bytes_read; in wc_lines()
388 for (ssize_t bytes_read; in wc() local
389 (bytes_read = read (fd, buf, BUFFER_SIZE)); in wc()
390 bytes += bytes_read) in wc()
391 if (bytes_read < 0) in wc()
[all …]
Dcksum.c168 size_t bytes_read; in cksum_slice8() local
173 while ((bytes_read = fread (buf, 1, BUFLEN, fp)) > 0) in cksum_slice8()
177 if (length + bytes_read < length) in cksum_slice8()
182 length += bytes_read; in cksum_slice8()
186 while (bytes_read >= 8) in cksum_slice8()
199 bytes_read -= 8; in cksum_slice8()
204 while (bytes_read--) in cksum_slice8()
Dtail.c444 size_t bytes_read = safe_read (fd, buffer, n); in dump_remainder() local
445 if (bytes_read == SAFE_READ_ERROR) in dump_remainder()
452 if (bytes_read == 0) in dump_remainder()
459 xwrite_stdout (buffer, bytes_read); in dump_remainder()
460 n_written += bytes_read; in dump_remainder()
463 n_remaining -= bytes_read; in dump_remainder()
522 size_t bytes_read; in file_lines() local
530 bytes_read = (pos - start_pos) % BUFSIZ; in file_lines()
531 if (bytes_read == 0) in file_lines()
532 bytes_read = BUFSIZ; in file_lines()
[all …]
Dtac-pipe.c62 size_t bytes_read; in buf_init_from_stdin() local
72 bytes_read = full_read (STDIN_FILENO, buf, BUFFER_SIZE); in buf_init_from_stdin()
73 if (bytes_read != buffer_size && errno != 0) in buf_init_from_stdin()
79 bp.one_past_end = buf + bytes_read; in buf_init_from_stdin()
83 if (bytes_read != 0) in buf_init_from_stdin()
84 last_byte_is_eol_byte = (buf[bytes_read - 1] == eol_byte); in buf_init_from_stdin()
86 if (bytes_read < BUFFER_SIZE) in buf_init_from_stdin()
Dtee.c231 ssize_t bytes_read = 0; in tee_files() local
305 bytes_read = read (STDIN_FILENO, buffer, sizeof buffer); in tee_files()
306 if (bytes_read < 0 && errno == EINTR) in tee_files()
308 if (bytes_read <= 0) in tee_files()
315 && ! fwrite_wait (buffer, bytes_read, descriptors[i])) in tee_files()
325 if (bytes_read == -1) in tee_files()
Dtac.c388 size_t bytes_read = safe_read (input_fd, G_buffer, read_size); in copy_to_temp() local
389 if (bytes_read == 0) in copy_to_temp()
391 if (bytes_read == SAFE_READ_ERROR) in copy_to_temp()
397 if (fwrite (G_buffer, 1, bytes_read, fp) != bytes_read) in copy_to_temp()
406 bytes_copied += bytes_read; in copy_to_temp()
Dtr.c1649 size_t bytes_read = plain_read (buf, size); in read_and_xlate() local
1651 for (size_t i = 0; i < bytes_read; i++) in read_and_xlate()
1654 return bytes_read; in read_and_xlate()
1888 size_t bytes_read = read_and_xlate (io_buf, sizeof io_buf); in main() local
1889 if (bytes_read == 0) in main()
1891 if (fwrite (io_buf, 1, bytes_read, stdout) != bytes_read) in main()
Dcsplit.c258 idx_t bytes_read; in read_input() local
263 bytes_read = safe_read (STDIN_FILENO, dest, max_n_bytes); in read_input()
265 if (bytes_read == 0) in read_input()
268 if (bytes_read == SAFE_READ_ERROR) in read_input()
274 return bytes_read; in read_input()
Dsort.c1795 size_t bytes_read = fread (ptr, 1, readsize, fp); in fillbuf() local
1796 char *ptrlim = ptr + bytes_read; in fillbuf()
1798 avail -= bytes_read; in fillbuf()
1800 if (bytes_read != readsize) in fillbuf()