| 4002 | common cases. */ |
| 4003 | |
| 4004 | static void |
| 4005 | check_inputs (char *const *files, size_t nfiles) |
| 4006 | { |
| 4007 | for (size_t i = 0; i < nfiles; i++) |
| 4008 | { |
| 4009 | if (streq (files[i], "-")) |
| 4010 | continue; |
| 4011 | |
| 4012 | if (euidaccess (files[i], R_OK) != 0) |
| 4013 | sort_die (_("cannot read"), files[i]); |
| 4014 | } |
| 4015 | } |
| 4016 | |
| 4017 | /* Ensure a specified output file can be created or written to, |
| 4018 | and point stdout to it. Do not truncate the file. |