| 1016 | message and return false. */ |
| 1017 | |
| 1018 | static bool |
| 1019 | open_next_file (void) |
| 1020 | { |
| 1021 | bool ok = true; |
| 1022 | |
| 1023 | do |
| 1024 | { |
| 1025 | input_filename = *file_list; |
| 1026 | if (input_filename == NULL) |
| 1027 | return ok; |
| 1028 | ++file_list; |
| 1029 | |
| 1030 | if (streq (input_filename, "-")) |
| 1031 | { |
| 1032 | input_filename = _("standard input"); |
| 1033 | in_stream = stdin; |
| 1034 | have_read_stdin = true; |
| 1035 | xset_binary_mode (STDIN_FILENO, O_BINARY); |
| 1036 | } |
| 1037 | else |
| 1038 | { |
| 1039 | in_stream = fopen (input_filename, (O_BINARY ? "rb" : "r")); |
| 1040 | if (in_stream == NULL) |
| 1041 | { |
| 1042 | error (0, errno, "%s", quotef (input_filename)); |
| 1043 | ok = false; |
| 1044 | } |
| 1045 | } |
| 1046 | } |
| 1047 | while (in_stream == NULL); |
| 1048 | |
| 1049 | if (0 <= end_offset && !flag_dump_strings) |
| 1050 | setvbuf (in_stream, NULL, _IONBF, 0); |
| 1051 | |
| 1052 | return ok; |
| 1053 | } |
| 1054 | |
| 1055 | /* Test whether there have been errors on in_stream, and close it if |
| 1056 | it is not standard input. Return false if there has been an error |
no outgoing calls
no test coverage detected