do a comparison by line of two (text) files, ignoring CRLF differences
| 112 | |
| 113 | // do a comparison by line of two (text) files, ignoring CRLF differences |
| 114 | uint32_t diff_text_files(const std::string& file1, const std::string& file2, int32_t ignoreLine1) |
| 115 | { |
| 116 | if (!Utils::fileExists(file1) || !Utils::fileExists(file2)) |
| 117 | return (std::numeric_limits<uint32_t>::max)(); |
| 118 | |
| 119 | std::istream* str1 = Utils::openFile(file1, false); |
| 120 | std::istream* str2 = Utils::openFile(file2, false); |
| 121 | |
| 122 | int32_t diffs = diff_text_files(*str1, *str2, ignoreLine1); |
| 123 | |
| 124 | Utils::closeFile(str1); |
| 125 | Utils::closeFile(str2); |
| 126 | return diffs; |
| 127 | } |
| 128 | |
| 129 | uint32_t diff_text_files(std::istream& str1, std::istream& str2, int32_t ignoreLine1) |
| 130 | { |