58 You forgot to
define USE_MAC_MEMMGR
in jconfig.h.
68#define TEMP_FILE_NAME "JPG%03d.TMP"
90 DisposePtr((
Ptr)
object);
110 DisposePtr((
Ptr)
object);
155 void FAR * buffer_address,
156 long file_offset,
long byte_count)
158 long bytes = byte_count;
161 if ( SetFPos (
info->temp_file, fsFromStart, file_offset ) != noErr )
162 ERREXIT(cinfo, JERR_TFILE_SEEK);
164 retVal = FSRead (
info->temp_file, &
bytes,
165 (
unsigned char *) buffer_address );
166 if ( retVal != noErr ||
bytes != byte_count )
167 ERREXIT(cinfo, JERR_TFILE_READ);
173 void FAR * buffer_address,
174 long file_offset,
long byte_count)
176 long bytes = byte_count;
179 if ( SetFPos (
info->temp_file, fsFromStart, file_offset ) != noErr )
180 ERREXIT(cinfo, JERR_TFILE_SEEK);
182 retVal = FSWrite (
info->temp_file, &
bytes,
183 (
unsigned char *) buffer_address );
184 if ( retVal != noErr ||
bytes != byte_count )
185 ERREXIT(cinfo, JERR_TFILE_WRITE);
192 FSClose (
info->temp_file );
193 FSpDelete ( &(
info->tempSpec) );
208 short tmpRef, vRefNum;
214 long gestaltResponse = 0;
217 osErr = Gestalt( gestaltFSAttr, &gestaltResponse );
218 if ( ( osErr != noErr )
219 || !( gestaltResponse & (1<<gestaltHasFSSpecCalls) ) )
220 ERREXITS(cinfo, JERR_TFILE_CREATE,
"- System 7.0 or later required");
224 osErr = Gestalt( gestaltFindFolderAttr, &gestaltResponse );
225 if ( ( osErr != noErr )
226 || !( gestaltResponse & (1<<gestaltFindFolderPresent) ) )
227 ERREXITS(cinfo, JERR_TFILE_CREATE,
"- System 7.0 or later required.");
230 osErr = FindFolder ( kOnSystemDisk, kTemporaryFolderType, kCreateFolder,
232 if ( osErr != noErr )
233 ERREXITS(cinfo, JERR_TFILE_CREATE,
"- temporary items folder unavailable");
243 osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec );
245 if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr )
249 osErr = FSpCreate ( &theSpec,
'????',
'????', smSystemScript );
250 if ( osErr != noErr )
253 osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(
info->temp_file) );
254 if ( osErr != noErr )
257 info->tempSpec = theSpec;
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
static unsigned char bytes[4]
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
#define ERREXITS(cinfo, code, str)
#define TRACEMSS(cinfo, lvl, code, str)
write_backing_store(j_common_ptr cinfo, backing_store_ptr info, void FAR *buffer_address, long file_offset, long byte_count)
jpeg_free_large(j_common_ptr cinfo, void FAR *object, size_t sizeofobject)
jpeg_get_large(j_common_ptr cinfo, size_t sizeofobject)
jpeg_free_small(j_common_ptr cinfo, void *object, size_t sizeofobject)
close_backing_store(j_common_ptr cinfo, backing_store_ptr info)
jpeg_get_small(j_common_ptr cinfo, size_t sizeofobject)
jpeg_mem_term(j_common_ptr cinfo)
read_backing_store(j_common_ptr cinfo, backing_store_ptr info, void FAR *buffer_address, long file_offset, long byte_count)
jpeg_open_backing_store(j_common_ptr cinfo, backing_store_ptr info, long total_bytes_needed)
jpeg_mem_available(j_common_ptr cinfo, long min_bytes_needed, long max_bytes_needed, long already_allocated)
jpeg_mem_init(j_common_ptr cinfo)
long long max_bytes_needed
long long long already_allocated
backing_store_ptr long total_bytes_needed
#define sprintf(buf, format,...)