/* Backing store (temporary file) management. Backing store objects are only used when the value returned by jpeg_mem_available is less than the total space needed. You can dispense with these routines if you have plenty of virtual memory; see jmemnobs.c.  */
read_backing_store(j_common_ptr cinfo, backing_store_ptr info, void FAR *buffer_address, long file_offset, long byte_count)
/* Backing store (temporary file) management. Backing store objects are only used when the value returned by jpeg_mem_available is less than the total space needed. You can dispense with these routines if you have plenty of virtual memory; see jmemnobs.c.  */
read_backing_store(j_common_ptr cinfo, backing_store_ptr info, void FAR *buffer_address, long file_offset, long byte_count)
{
  long bytes = byte_count;
  long retVal;
  if ( SetFPos ( info->temp_file, fsFromStart, file_offset ) != noErr )
    ERREXIT(cinfo, JERR_TFILE_SEEK);
  retVal = FSRead ( info->temp_file, &bytes,
		    (unsigned char *) buffer_address );
  if ( retVal != noErr || bytes != byte_count )
    ERREXIT(cinfo, JERR_TFILE_READ);
}