| 89 | } |
| 90 | |
| 91 | void file_deinit(struct hc_stream *s) { |
| 92 | struct hc_file_stream *fs = hc_baseof(s, struct hc_file_stream, stream); |
| 93 | |
| 94 | if (fs->opts.close_file) { |
| 95 | assert(fs->file); |
| 96 | |
| 97 | if (fclose(fs->file) == EOF) { |
| 98 | hc_throw("Failed closing file"); |
| 99 | } |
| 100 | |
| 101 | fs->file = NULL; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | struct hc_file_stream *_hc_file_stream_init(struct hc_file_stream *s, |
| 106 | FILE *file, |
nothing calls this directly
no outgoing calls
no test coverage detected