Lines Matching refs:fd
250 wc_lines (int fd) in wc_lines() argument
257 return wc_lines_avx2 (fd); in wc_lines()
266 ssize_t bytes_read = read (fd, buf, BUFFER_SIZE); in wc_lines()
304 wc (int fd, char const *file_x, struct fstatus *fstatus, off_t current_pos) in wc() argument
330 fdadvise (fd, 0, 0, FADVISE_SEQUENTIAL); in wc()
347 fstatus->failed = fstat (fd, &fstatus->st); in wc()
357 current_pos = lseek (fd, 0, SEEK_CUR); in wc()
370 if (bytes && 0 <= lseek (fd, bytes, SEEK_CUR)) in wc()
380 && 0 <= lseek (fd, hi_pos, SEEK_CUR)) in wc()
387 fdadvise (fd, 0, 0, FADVISE_SEQUENTIAL); in wc()
389 (bytes_read = read (fd, buf, BUFFER_SIZE)); in wc()
402 struct wc_lines w = wc_lines (fd); in wc()
416 ((bytes_read = read (fd, buf + prev, BUFFER_SIZE - prev)) in wc()
555 for (ssize_t bytes_read; (bytes_read = read (fd, buf, BUFFER_SIZE)); ) in wc()
637 int fd = open (file, O_RDONLY | O_BINARY); in wc_file() local
638 if (fd == -1) in wc_file()
645 bool ok = wc (fd, file, fstatus, 0); in wc_file()
646 if (close (fd) != 0) in wc_file()