rEFIt_UEFI/libeg/lodepng.cpp
/* load file into buffer that already has the correct allocated size. Returns error code.*/
load file into buffer that already has the correct allocated size. Returns error code.
load file into buffer that already has the correct allocated size . Returns error code .
static unsigned lodepng_buffer_file(unsigned char* out, size_t size, const char* filename) {
  FILE* file;
  size_t readsize;
  file = fopen(filename, "rb");
  if(!file) return 78;
  readsize = fread(out, 1, size, file);
  fclose(file);
  if(readsize != size) return 78;
  return 0;
}
static unsigned lodepng_buffer_file ( unsigned char * out , size_t size , const char * filename ) { FILE * file ; size_t readsize ; file = fopen ( filename , " " ) ; if ( ! file ) return 78 ; readsize = fread ( out , 1 , size , file ) ; fclose ( file ) ; if ( readsize != size ) return 78 ; return 0 ; }
load file into buffer that already has the correct allocated size.
load file into buffer that already has the correct allocated size .