write given buffer to the file, overwriting the file, it doesn't append to it.*/
| 388 | |
| 389 | /*write given buffer to the file, overwriting the file, it doesn't append to it.*/ |
| 390 | unsigned lodepng_save_file(const unsigned char* buffer, size_t buffersize, const char* filename) { |
| 391 | FILE* file; |
| 392 | file = fopen(filename, "wb" ); |
| 393 | if(!file) return 79; |
| 394 | fwrite(buffer, 1, buffersize, file); |
| 395 | fclose(file); |
| 396 | return 0; |
| 397 | } |
| 398 | |
| 399 | #endif /*LODEPNG_COMPILE_DISK*/ |
| 400 |
no outgoing calls
no test coverage detected