2D_Engine_C/asset_builder/utils.c

17 lines
329 B
C

#include "utils.h"
#include <stdio.h>
#include <stdlib.h>
#include "errors.h"
int file_write(const void *ptr, size_t size, size_t nb, FILE *file)
{
if(fwrite(ptr, size, nb, file) != nb)
{
error_printf("Failed to write to output file : %d", errno);
return EXIT_FAILURE;
}
return EXIT_SUCCESS;
}