| 4 | { |
| 5 | |
| 6 | void FileRead( std::FILE* const file, void* buffer, const unsigned int size ) |
| 7 | { |
| 8 | unsigned int read_total= 0u; |
| 9 | |
| 10 | do |
| 11 | { |
| 12 | const int read= std::fread( static_cast<char*>(buffer) + read_total, 1, size - read_total, file ); |
| 13 | if( read <= 0 ) |
| 14 | break; |
| 15 | |
| 16 | read_total+= read; |
| 17 | } while( read_total < size ); |
| 18 | } |
| 19 | |
| 20 | void FileWrite( std::FILE* const file, const void* buffer, const unsigned int size ) |
| 21 | { |
no outgoing calls
no test coverage detected