Пример #1
0
jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
                         long total_bytes_needed)
{
    /* Try extended memory, then expanded memory, then regular file. */
#if XMS_SUPPORTED
    if (open_xms_store(cinfo, info, total_bytes_needed))
        return;
#endif
#if EMS_SUPPORTED
    if (open_ems_store(cinfo, info, total_bytes_needed))
        return;
#endif
    if (open_file_store(cinfo, info, total_bytes_needed))
        return;
    ERREXITS(cinfo, JERR_TFILE_CREATE, "");
}
GLOBAL void
jopen_backing_store (backing_store_ptr info, long total_bytes_needed)
{
  /* Try extended memory, then expanded memory, then regular file. */
#if XMS_SUPPORTED
  if (open_xms_store(info, total_bytes_needed))
    return;
#endif
#if EMS_SUPPORTED
  if (open_ems_store(info, total_bytes_needed))
    return;
#endif
  if (open_file_store(info, total_bytes_needed))
    return;
  ERREXIT(methods, "Failed to create temporary file");
}