| 30 | #include "external/cute_files.h" |
| 31 | |
| 32 | static void ReadFileToString(const std::string& path, std::string& str) |
| 33 | { |
| 34 | str.resize(0); |
| 35 | FILE* f = fopen(path.c_str(), "rb"); |
| 36 | if (!f) |
| 37 | return; |
| 38 | fseek(f, 0, SEEK_END); |
| 39 | size_t fsize = ftello64(f); |
| 40 | fseek(f, 0, SEEK_SET); |
| 41 | str.resize(fsize); |
| 42 | fread(&str[0], 1, fsize, f); |
| 43 | fclose(f); |
| 44 | } |
| 45 | |
| 46 | static bool CompareIgnoreNewlines(const std::string& a, const std::string& b) |
| 47 | { |