Lines Matching refs:filename

151 diagnose_copy_fd_failure (enum Copy_fd_status err, char const *filename)  in diagnose_copy_fd_failure()  argument
156 error (0, errno, _("error reading %s"), quoteaf (filename)); in diagnose_copy_fd_failure()
159 error (0, errno, _("%s: file has shrunk too much"), quotef (filename)); in diagnose_copy_fd_failure()
167 write_header (char const *filename) in write_header() argument
171 printf ("%s==> %s <==\n", (first_file ? "" : "\n"), filename); in write_header()
224 elseek (int fd, off_t offset, int whence, char const *filename) in elseek() argument
234 quotef (filename), in elseek()
248 elide_tail_bytes_pipe (char const *filename, int fd, uintmax_t n_elide_0, in elide_tail_bytes_pipe() argument
308 error (0, errno, _("error reading %s"), quoteaf (filename)); in elide_tail_bytes_pipe()
390 error (0, errno, _("error reading %s"), quoteaf (filename)); in elide_tail_bytes_pipe()
451 if (0 <= current_pos && elseek (fd, desired_pos, SEEK_SET, filename) < 0) in elide_tail_bytes_pipe()
465 elide_tail_bytes_file (char const *filename, int fd, uintmax_t n_elide, in elide_tail_bytes_file() argument
470 return elide_tail_bytes_pipe (filename, fd, n_elide, current_pos); in elide_tail_bytes_file()
485 diagnose_copy_fd_failure (err, filename); in elide_tail_bytes_file()
498 elide_tail_lines_pipe (char const *filename, int fd, uintmax_t n_elide, in elide_tail_lines_pipe() argument
587 error (0, errno, _("error reading %s"), quoteaf (filename)); in elide_tail_lines_pipe()
631 if (0 <= current_pos && elseek (fd, desired_pos, SEEK_SET, filename) < 0) in elide_tail_lines_pipe()
755 elide_tail_lines_file (char const *filename, int fd, uintmax_t n_elide, in elide_tail_lines_file() argument
760 return elide_tail_lines_pipe (filename, fd, n_elide, current_pos); in elide_tail_lines_file()
769 || elide_tail_lines_seekable (filename, fd, n_elide, in elide_tail_lines_file()
775 head_bytes (char const *filename, int fd, uintmax_t bytes_to_write) in head_bytes() argument
788 error (0, errno, _("error reading %s"), quoteaf (filename)); in head_bytes()
800 head_lines (char const *filename, int fd, uintmax_t lines_to_write) in head_lines() argument
811 error (0, errno, _("error reading %s"), quoteaf (filename)); in head_lines()
827 elseek (fd, -n_bytes_past_EOL, SEEK_CUR, filename); in head_lines()
837 head (char const *filename, int fd, uintmax_t n_units, bool count_lines, in head() argument
841 write_header (filename); in head()
850 quoteaf (filename)); in head()
855 current_pos = elseek (fd, 0, SEEK_CUR, filename); in head()
860 return elide_tail_lines_file (filename, fd, n_units, &st, current_pos); in head()
862 return elide_tail_bytes_file (filename, fd, n_units, &st, current_pos); in head()
865 return head_lines (filename, fd, n_units); in head()
867 return head_bytes (filename, fd, n_units); in head()
871 head_file (char const *filename, uintmax_t n_units, bool count_lines, in head_file() argument
876 bool is_stdin = STREQ (filename, "-"); in head_file()
882 filename = _("standard input"); in head_file()
887 fd = open (filename, O_RDONLY | O_BINARY); in head_file()
890 error (0, errno, _("cannot open %s for reading"), quoteaf (filename)); in head_file()
895 ok = head (filename, fd, n_units, count_lines, elide_from_end); in head_file()
898 error (0, errno, _("failed to close %s"), quoteaf (filename)); in head_file()