| 114 | } |
| 115 | |
| 116 | void FormatErrorsToFile(const Errors& errors, |
| 117 | Location::Type location_type, |
| 118 | LexerSourceLineFinder* line_finder, |
| 119 | FILE* file, |
| 120 | const std::string& header, |
| 121 | PrintHeader print_header, |
| 122 | int source_line_max_length) { |
| 123 | Color color(file); |
| 124 | std::string s = |
| 125 | FormatErrorsToString(errors, location_type, line_finder, color, header, |
| 126 | print_header, source_line_max_length); |
| 127 | fwrite(s.data(), 1, s.size(), file); |
| 128 | } |
| 129 | |
| 130 | } // namespace wabt |