| 1060 | corresponding to the most recent action for IN_STREAM. */ |
| 1061 | |
| 1062 | static bool |
| 1063 | check_and_close (int in_errno) |
| 1064 | { |
| 1065 | bool ok = true; |
| 1066 | |
| 1067 | if (in_stream != NULL) |
| 1068 | { |
| 1069 | if (!ferror (in_stream)) |
| 1070 | in_errno = 0; |
| 1071 | if (streq (file_list[-1], "-")) |
| 1072 | clearerr (in_stream); |
| 1073 | else if (fclose (in_stream) != 0 && !in_errno) |
| 1074 | in_errno = errno; |
| 1075 | if (in_errno) |
| 1076 | { |
| 1077 | error (0, in_errno, "%s", quotef (input_filename)); |
| 1078 | ok = false; |
| 1079 | } |
| 1080 | |
| 1081 | in_stream = NULL; |
| 1082 | } |
| 1083 | |
| 1084 | if (ferror (stdout)) |
| 1085 | { |
| 1086 | error (0, 0, _("write error")); |
| 1087 | ok = false; |
| 1088 | } |
| 1089 | |
| 1090 | return ok; |
| 1091 | } |
| 1092 | |
| 1093 | /* Decode the modern od format string S. Append the decoded |
| 1094 | representation to the global array SPEC, reallocating SPEC if |
no outgoing calls
no test coverage detected