systemMessage(MSG_ERROR_OPENING_IMAGE, "Error opening image %s", file);
systemMessage(MSG_ERROR_OPENING_IMAGE, N_("Error opening image %s"), file);
static u8 *utilLoadGzipFile(const char *file,                            bool (*accept)(const char *),                            u8 *data,                            int &size){  FILE *f = fopen(file, "rb");  if(f == NULL) {    systemMessage(MSG_ERROR_OPENING_IMAGE, "Error opening image %s", file);    return NULL;  }  fseek(f, -4, SEEK_END);  int fileSize = fgetc(f) | (fgetc(f) << 8) | (fgetc(f) << 16) | (fgetc(f) << 24);  fclose(f);  if(size == 0)    size = fileSize;  gzFile gz = gzopen(file, "rb");  if(gz == NULL) {    // should not happen, but who knows?    systemMessage(MSG_ERROR_OPENING_IMAGE, "Error opening image %s", file);    return NULL;  }  u8 *image = data;  if(image == NULL) {    image = (u8 *)malloc(utilGetSize(size));    if(image == NULL) {      systemMessage(MSG_OUT_OF_MEMORY, "Failed to allocate memory for %s",                    "data");      fclose(f);      return NULL;    }    size = fileSize;  }  int read = fileSize <= size ? fileSize : size;  int r = gzread(gz, image, read);  gzclose(gz);  if(r != (int)read) {    systemMessage(MSG_ERROR_READING_IMAGE,                  "Error reading image %s", file);    if(data == NULL)      free(image);    return NULL;  }      size = fileSize;  return image;  }