207{
208 short tmpRef, vRefNum;
209 long dirID;
210 FInfo finderInfo;
211 FSSpec theSpec;
212 Str255 fName;
213 OSErr osErr;
214 long gestaltResponse = 0;
215
216
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");
221
222
223
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.");
228
229
230 osErr = FindFolder ( kOnSystemDisk, kTemporaryFolderType, kCreateFolder,
231 &vRefNum, &dirID );
232 if ( osErr != noErr )
233 ERREXITS(cinfo, JERR_TFILE_CREATE,
"- temporary items folder unavailable");
234
235
236
237 for (;;) {
239
243 osErr = FSMakeFSSpec ( vRefNum, dirID, fName, &theSpec );
244
245 if ( (osErr = FSpGetFInfo ( &theSpec, &finderInfo ) ) != noErr )
246 break;
247 }
248
249 osErr = FSpCreate ( &theSpec, '????', '????', smSystemScript );
250 if ( osErr != noErr )
252
253 osErr = FSpOpenDF ( &theSpec, fsRdWrPerm, &(
info->temp_file) );
254 if ( osErr != noErr )
256
257 info->tempSpec = theSpec;
258
263}
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#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)
close_backing_store(j_common_ptr cinfo, backing_store_ptr info)
read_backing_store(j_common_ptr cinfo, backing_store_ptr info, void FAR *buffer_address, long file_offset, long byte_count)
#define sprintf(buf, format,...)