We don't generally load in ways that allow stdio text mode conversions, so this function emulates them at best effort.
| 290 | // We don't generally load in ways that allow stdio text mode conversions, so this function |
| 291 | // emulates them at best effort. |
| 292 | void TextModeConvert(string &s, bool binary) { |
| 293 | if (binary) return; |
| 294 | #ifdef _WIN32 |
| 295 | s.erase(remove(s.begin(), s.end(), '\r'), s.end()); |
| 296 | #endif |
| 297 | } |
| 298 | |
| 299 | int64_t LoadFile(string_view relfilename, string *dest, int64_t start, int64_t len, bool binary) { |
| 300 | assert(cur_loader); |