51#include <AppleEvents.h>
52#include <AERegistry.h>
54#include <AEPackObject.h>
57#include <QDOffscreen.h>
59#include <ImageCompression.h>
64#define ColorInfo KolorInfo
65#include "magick/studio.h"
66#include "magick/blob.h"
67#include "magick/client.h"
68#include "magick/exception.h"
69#include "magick/exception-private.h"
70#include "magick/image-private.h"
71#include "magick/list.h"
72#include "magick/magick.h"
73#include "magick/monitor.h"
74#include "magick/monitor-private.h"
75#include "magick/pixel-accessor.h"
76#include "magick/quantum.h"
77#include "magick/string_.h"
78#include "magick/utility.h"
79#include "magick/mac.h"
85 image_description = nil;
91 SearchForFile(OSType,OSType,FSSpec *,
short);
94 ArcMethod(GrafVerb,Rect *,
short,
short),
95 BitsMethod(BitMap *,Rect *,Rect *,
short,RgnHandle),
96 FilenameToFSSpec(
const char *filename,FSSpec *fsspec),
98 OvalMethod(GrafVerb,Rect *),
99 PolyMethod(GrafVerb,PolyHandle),
100 RRectMethod(GrafVerb,Rect *,
short,
short),
101 RectMethod(GrafVerb,Rect *),
102 RegionMethod(GrafVerb,RgnHandle),
103 StandardPixmap(PixMapPtr,Rect *,MatrixRecordPtr,
short,RgnHandle,PixMapPtr,
105 TextMethod(
short,Ptr,Point,Point);
110#if defined(DISABLE_SIOUX)
111static MACEventHookPtr
114static MACErrorHookPtr
115 exception.hook = nil;
148static pascal
void ArcMethod(GrafVerb verb,Rect *r,
short startAngle,
151#pragma unused (verb,r,startAngle,arcAngle)
154static pascal
void BitsMethod(BitMap *bitPtr,Rect *source_rectangle,
155 Rect *dstRect,
short mode,RgnHandle maskRgn)
157#pragma unused (bitPtr,source_rectangle,dstRect,mode,maskRgn)
160static pascal
void LineMethod(Point newPt)
162#pragma unused (newPt)
165static pascal
void OvalMethod(GrafVerb verb,Rect *r)
167#pragma unused (verb,r)
170static pascal
void PolyMethod(GrafVerb verb,PolyHandle poly)
172#pragma unused (verb,poly)
175static pascal
void RectMethod(GrafVerb verb,Rect *r)
177#pragma unused (verb,r)
180static pascal
void RegionMethod(GrafVerb verb,RgnHandle rgn)
182#pragma unused (verb,rgn)
185static pascal
void RRectMethod(GrafVerb verb,Rect *r,
short ovalWidth,
188#pragma unused (verb,r,ovalWidth,ovalHeight)
191static pascal
void StandardPixmap(PixMapPtr source,Rect *source_rectangle,
192 MatrixRecordPtr matrix,
short mode,RgnHandle mask,PixMapPtr matte,
193 Rect *matte_rectangle,
short flags)
195#pragma unused (source_rectangle,matrix,mode,mask,matte,matte_rectangle,flags)
203 GetCompressedPixMapInfo(source,&image_description,&data,&size,nil,nil);
206static pascal
void TextMethod(
short byteCount,Ptr textBuf,Point numer,
209#pragma unused (byteCount,textBuf,numer,denom)
212#if !defined(DISABLE_QUICKTIME)
213static short BottleneckTest(PicHandle picture,CodecType *codec,
int *depth,
228 status=Gestalt(gestaltQuickTime,&version);
231 ParamText(
"\pQuickTime not installed. Please install, then try again.",
239 SetStdCProcs(&bottlenecks);
240 bottlenecks.textProc=NewQDTextUPP(&TextMethod);
241 bottlenecks.lineProc=NewQDLineUPP(&LineMethod);
242 bottlenecks.rectProc=NewQDRectUPP(&RectMethod);
243 bottlenecks.rRectProc=NewQDRRectUPP(&RRectMethod);
244 bottlenecks.ovalProc=NewQDOvalUPP(&OvalMethod);
245 bottlenecks.arcProc=NewQDArcUPP(&ArcMethod);
246 bottlenecks.polyProc=NewQDPolyUPP(&PolyMethod);
247 bottlenecks.rgnProc=NewQDRgnUPP(&RegionMethod);
248 bottlenecks.bitsProc=NewQDBitsUPP(&BitsMethod);
249 bottlenecks.newProc1=(UniversalProcPtr) NewStdPixUPP(&StandardPixmap);
253 (*(qd.thePort)).grafProcs=(QDProcs *) &bottlenecks;
254 DrawPicture(picture,&((**picture).picFrame));
255 PaintRect(&rectangle);
256 (*(qd.thePort)).grafProcs=0L;
263 if (image_description != nil)
265 *codec=(**image_description).cType;
266 *depth=(**image_description).depth;
267 *colormap_id=(**image_description).clutID;
269 DisposeQDTextUPP(bottlenecks.textProc);
270 DisposeQDLineUPP(bottlenecks.lineProc);
271 DisposeQDRectUPP(bottlenecks.rectProc);
272 DisposeQDRRectUPP(bottlenecks.rRectProc);
273 DisposeQDOvalUPP(bottlenecks.ovalProc);
274 DisposeQDArcUPP(bottlenecks.arcProc);
275 DisposeQDPolyUPP(bottlenecks.polyProc);
276 DisposeQDRgnUPP(bottlenecks.rgnProc);
277 DisposeQDBitsUPP(bottlenecks.bitsProc);
278 DisposeStdPixUPP(bottlenecks.newProc1);
283#if !defined(MAGICKCORE_POSIX_SUPPORT_VERSION)
307MagickExport
void closedir(
DIR *entry)
309 if (IsEventLogging() != MagickFalse)
310 (void) LogMagickEvent(TraceEvent,GetMagickModule(),
"...");
311 assert(entry != (
DIR *) NULL);
312 RelinquishMagickMemory(entry);
340MagickExport
int Exit(
int status)
342#if !defined(DISABLE_SIOUX)
343 (void) FormatLocaleFile(stdout,
"Select File->Quit to exit.\n");
374MagickExport
void pascal FilenameToFSSpec(
const char *filename,FSSpec *fsspec)
379 assert(filename != (
char *) NULL);
380 c2pstrcpy(name,filename);
381 FSMakeFSSpec(0,0,name,fsspec);
411static OSErr HGetVInfo(
short volume_index,StringPtr volume_name,
short *volume,
412 size_t *free_bytes,
size_t *total_bytes)
430 pb.volumeParam.ioVRefNum=0;
431 pb.volumeParam.ioNamePtr=volume_name;
432 pb.volumeParam.ioVolIndex=volume_index;
433 result=PBHGetVInfoSync(&pb);
436 *volume=pb.volumeParam.ioVRefNum;
437 blocksize=(size_t) pb.volumeParam.ioVAlBlkSiz;
438 allocation_blocks=(
unsigned short) pb.volumeParam.ioVNmAlBlks;
439 free_blocks=(
unsigned short) pb.volumeParam.ioVFrBlk;
440 *free_bytes=free_blocks*blocksize;
441 *total_bytes=allocation_blocks*blocksize;
445MagickExport MagickBooleanType MACIsMagickConflict(
const char *magick)
460 assert(magick != (
char *) NULL);
461 if (IsEventLogging() != MagickFalse)
462 (void) LogMagickEvent(TraceEvent,GetMagickModule(),
"%s",magick);
463 (void) CopyMagickString((
char *) volume_name,magick,MaxTextExtent);
464 c2pstr((
char *) volume_name);
465 if (volume_name[volume_name[0]] !=
':')
466 volume_name[++volume_name[0]]=
':';
467 status=HGetVInfo(-1,volume_name,&volume,&free_bytes,&number_bytes);
468 return(status != 0 ? MagickFalse : MagickTrue);
500MagickExport
void MACErrorHandler(
const ExceptionType error,
const char *reason,
501 const char *description)
504 buffer[3*MaxTextExtent];
506 if (reason == (
char *) NULL)
508 if (description == (
char *) NULL)
509 (void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s.\n",GetClientName(),
512 (
void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s (%s).\n",
513 GetClientName(),reason,description);
514#if defined(DISABLE_SIOUX)
515 if(exception.hook != (MACErrorHookPtr) NULL)
516 exception.hook(error,buffer);
519 MagickCoreTerminus();
524 MagickCoreTerminus();
529#if defined(DISABLE_SIOUX)
559static void MACFatalErrorHandler(
const ExceptionType severity,
560 const char *reason,
const char *description)
563 buffer[3*MaxTextExtent];
565 if (reason == (
char *) NULL)
567 if (description == (
char *) NULL)
568 (void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s.\n",GetClientName(),
571 (
void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s (%s).\n",
572 GetClientName(),reason,description);
573 if(exception.hook != (MACErrorHookPtr) NULL)
574 exception.hook(severity, buffer);
577 MagickCoreTerminus();
598static OSErr MacGSExecuteCommand(
const char *command,ssize_t length)
604 reply = {typeNull, NULL};
607 event = {typeNull, NULL};
624 (void) AECreateDesc(typeApplSignature,&
id,
sizeof(
id),&event_descriptor);
625 (void) AECreateAppleEvent(
id,
'exec',&event_descriptor,-1,kAnyTransactionID,
627 (void) AEPutParamPtr(&event,keyDirectObject,typeChar,command,length);
628 (void) AESend(&event,&reply,kAEWaitReply+kAENeverInteract,kAENormalPriority,
629 kNoTimeOut,NULL,NULL);
633 (void) AEGetParamPtr(&reply,keyDirectObject,typeInteger,&descriptor_type,
634 &error,
sizeof(error),&actualSize);
635 (void) AEDisposeDesc(&event_descriptor);
636 (void) AEDisposeDesc(&event);
637 if (reply.descriptorType != NULL)
638 AEDisposeDesc(&reply);
639 return((OSErr) error);
657static OSErr MacGSLaunchApplicationCore(ssize_t flags)
668 if (!SearchForFile(
'gsVR',
'APPL',&file_info,1))
670 launch_info.launchBlockID=extendedBlock;
671 launch_info.launchEPBLength=extendedBlockLen;
672 launch_info.launchFileFlags=0;
673 launch_info.launchControlFlags=launchContinue+launchNoFileFlags+flags;
674 launch_info.launchAppSpec=(&file_info);
675 launch_info.launchAppParameters=nil;
676 error=LaunchApplication(&launch_info);
695static OSErr MacGSLaunchApplication(
void)
697 return(MacGSLaunchApplicationCore(launchDontSwitch));
715static OSErr MacGSLaunchApplicationToFront(
void)
717 return(MacGSLaunchApplicationCore(0));
735static void MacGSQuitApplication(
void)
741 reply = {typeNull, NULL};
744 event = {typeNull, NULL};
752 (void) AECreateDesc(typeApplSignature,&
id,
sizeof(
id),&event_descriptor);
753 (void) AECreateAppleEvent(typeAppleEvent,kAEQuitApplication,
754 &event_descriptor,-1,kAnyTransactionID,&event);
755 (void) AESend(&event,&reply,kAENoReply,kAENormalPriority,kNoTimeOut,NULL,
760 (void) AEDisposeDesc(&event_descriptor);
761 (void) AEDisposeDesc(&event);
762 if (reply.descriptorType != NULL)
763 AEDisposeDesc(&reply);
781static OSErr MacGSSetWorkingFolder(
char *directory)
784 application_descriptor,
795 folder_type =
'wfdr';
806 AECreateDesc(typeNull,NULL,0,&application_descriptor);
807 AECreateDesc(typeChar,directory,strlen(directory),&path_descriptor);
808 (void) AECreateDesc(typeType,&folder_type,
sizeof(DescType),&type_descriptor);
809 CreateObjSpecifier(cProperty,&application_descriptor,formPropertyID,
810 &type_descriptor,0,&
object);
811 (void) AECreateDesc(typeApplSignature,&
id,
sizeof(
id),&event_descriptor);
812 (void) AECreateAppleEvent(kAECoreSuite,kAESetData,&event_descriptor,-1,
813 kAnyTransactionID,&event);
814 (void) AEPutParamDesc(&event,keyDirectObject,&
object);
815 (void) AEPutParamDesc(&event,keyAEData,&path_descriptor);
816 error=AESend(&event,&reply,kAENoReply+kAENeverInteract,kAENormalPriority,
817 kNoTimeOut,NULL,NULL);
818 (void) AEDisposeDesc(&event);
819 (void) AEDisposeDesc(&event_descriptor);
820 (void) AEDisposeDesc(&
object);
821 (void) AEDisposeDesc(&type_descriptor);
822 (void) AEDisposeDesc(&path_descriptor);
823 (void) AEDisposeDesc(&application_descriptor);
851MagickExport
void MACSetErrorHook(MACErrorHookPtr hook)
883MagickExport
void MACSetEventHook(MACEventHookPtr hook)
914MagickExport
int MACSystemCommand(
const char * command)
919 if (MacGSLaunchApplicationToFront())
921 return(MacGSExecuteCommand(command,strlen(command)));
953MagickExport
void MACWarningHandler(
const ExceptionType warning,
954 const char *reason,
const char *description)
959 if (reason == (
char *) NULL)
961 if (description == (
char *) NULL)
962 (void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s.\n",GetClientName(),
965 (
void) FormatLocaleString(buffer,MaxTextExtent,
"%s: %s (%s).\n",
966 GetClientName(),reason,description);
967#if defined(DISABLE_SIOUX)
968 if(exception.hook != (MACErrorHookPtr) NULL)
969 exception.hook(warning, buffer);
976#if !defined(MAGICKCORE_POSIX_SUPPORT_VERSION)
1001MagickExport
DIR *opendir(
const char *path)
1014 search_info.hFileInfo.ioNamePtr=0;
1015 if ((path != (
char *) NULL) || (*path !=
'\0'))
1016 if ((path[0] !=
'.') || (path[1] !=
'\0'))
1018 c2pstrcpy(pathname,path);
1019 search_info.hFileInfo.ioNamePtr=pathname;
1021 search_info.hFileInfo.ioCompletion=0;
1022 search_info.hFileInfo.ioVRefNum=0;
1023 search_info.hFileInfo.ioFDirIndex=0;
1024 search_info.hFileInfo.ioDirID=0;
1025 error=PBGetCatInfoSync(&search_info);
1029 return((
DIR *) NULL);
1031 entry=(
DIR *) AcquireMagickMemory(
sizeof(
DIR));
1032 if (entry == (
DIR *) NULL)
1033 return((
DIR *) NULL);
1034 entry->d_VRefNum=search_info.hFileInfo.ioVRefNum;
1035 entry->d_DirID=search_info.hFileInfo.ioDirID;
1065MagickExport
void ProcessPendingEvents(
const char *text)
1067#if defined(DISABLE_SIOUX)
1068 if (event_hook != (MACEventHookPtr) NULL)
1072 *mark = (
char *) NULL;
1077 while (WaitNextEvent(everyEvent,&event,0L,nil))
1078 SIOUXHandleOneEvent(&event);
1079 if (isatty(STDIN_FILENO) && (text != mark))
1087#if !defined(MAGICKCORE_POSIX_SUPPORT_VERSION)
1112MagickExport
struct dirent *readdir(
DIR *entry)
1123 static unsigned char
1124 pathname[MaxTextExtent];
1126 if (entry == (
DIR *) NULL)
1127 return((
struct dirent *) NULL);
1128 search_info.hFileInfo.ioCompletion=0;
1129 search_info.hFileInfo.ioNamePtr=pathname;
1130 search_info.hFileInfo.ioVRefNum=0;
1131 search_info.hFileInfo.ioFDirIndex=entry->d_index;
1132 search_info.hFileInfo.ioDirID=entry->d_DirID;
1133 error=PBGetCatInfoSync(&search_info);
1137 return((
struct dirent *) NULL);
1140 p2cstrcpy(dir_entry.d_name,search_info.hFileInfo.ioNamePtr);
1141 dir_entry.d_namlen=strlen(dir_entry.d_name);
1181static inline size_t MagickMax(
const size_t x,
const size_t y)
1191#define PICTHeaderSize 512
1238 image=AcquireImage(image_info);
1239 status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception);
1240 if (status == MagickFalse)
1242 picture_handle=(PicHandle) NewHandle(MagickMax(GetBlobSize(image)-
1243 PICTHeaderSize,PICTHeaderSize));
1244 if (picture_handle == nil)
1245 ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
1246 HLock((Handle) picture_handle);
1247 (void) ReadBlob(image,PICTHeaderSize,*(
unsigned char **) picture_handle);
1248 status=ReadBlob(image,GetBlobSize(image)-PICTHeaderSize,*(
unsigned char **)
1250 if (status == MagickFalse)
1252 DisposeHandle((Handle) picture_handle);
1253 ThrowReaderException(CorruptImageError,
"UnableToReadImageData");
1255 GetGWorld(&port,&device);
1256 theErr=NewGWorld(&graphic_world,0,&(**picture_handle).picFrame,nil,nil,
1257 useTempMem | keepLocal);
1258 if ((theErr != noErr) && (graphic_world == nil))
1260 DisposeHandle((Handle) picture_handle);
1261 ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
1263 HUnlock((Handle) picture_handle);
1264 SetGWorld(graphic_world,nil);
1265 theErr=GetPictInfo(picture_handle,&picture_info,0,1,systemMethod,0);
1266 if (theErr != noErr)
1268 DisposeGWorld(graphic_world);
1269 DisposeHandle((Handle) picture_handle);
1270 ThrowReaderException(CorruptImageError,
"UnableToReadImageData");
1272#if defined(DISABLE_QUICKTIME)
1275 depth=picture_info.depth;
1277 BottleneckTest(picture_handle,&codec,&depth,&colormap_id);
1290 picture_info.theColorTable=GetCTable(colormap_id);
1296 depth=picture_info.depth;
1298 (void) GetPictInfo(picture_handle,&picture_info,returnColorTable,
1299 (
short) (1 << picture_info.depth),systemMethod,0);
1303 image->x_resolution=(picture_info.hRes) >> 16;
1304 image->y_resolution=(picture_info.vRes) >> 16;
1305 image->units=PixelsPerInchResolution;
1306 image->columns=picture_info.sourceRect.right-picture_info.sourceRect.left;
1307 image->rows=picture_info.sourceRect.bottom-picture_info.sourceRect.top;
1308 if ((depth <= 8) && ((*(picture_info.theColorTable))->ctSize != 0))
1316 number_colors=(*(picture_info.theColorTable))->ctSize;
1317 if (!AcquireImageColormap(image,number_colors))
1319 if (picture_info.theColorTable != nil)
1320 DisposeHandle((Handle) picture_info.theColorTable);
1321 DisposeGWorld(graphic_world);
1322 DisposeHandle((Handle) picture_handle);
1323 ThrowReaderException(ResourceLimitError,
"MemoryAllocationFailed");
1325 for (x=0; x < image->colors; x++)
1327 image->colormap[x].red=
1328 (*(picture_info.theColorTable))->ctTable[x].rgb.red;
1329 image->colormap[x].green=
1330 (*(picture_info.theColorTable))->ctTable[x].rgb.green;
1331 image->colormap[x].blue=
1332 (*(picture_info.theColorTable))->ctTable[x].rgb.blue;
1335 SetRect(&rectangle,0,0,image->columns,image->rows);
1336 (void) UpdateGWorld(&graphic_world,depth,&rectangle,
1337 picture_info.theColorTable,nil,0);
1338 LockPixels(GetGWorldPixMap(graphic_world));
1339 EraseRect(&rectangle);
1340 DrawPicture(picture_handle,&rectangle);
1341 if ((depth <= 8) && (colormap_id == -1))
1343 DisposeHandle((Handle) picture_info.theColorTable);
1344 picture_info.theColorTable=nil;
1346 DisposeHandle((Handle) picture_handle);
1350 for (y=0; y < image->rows; y++)
1361 q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
1364 indexes=GetAuthenticIndexQueue(image);
1365 for (x=0; x < image->columns; x++)
1367 GetCPixel(x,y,&Pixel);
1368 SetPixelRed(q,ScaleCharToQuantum(Pixel.red & 0xff));
1369 SetPixelGreen(q,ScaleCharToQuantum(Pixel.green & 0xff));
1370 SetPixelBlue(q,ScaleCharToQuantum(Pixel.blue & 0xff));
1371 if (image->storage_class == PseudoClass)
1372 SetPixelIndex(indexes+x,Color2Index(&Pixel));
1375 if (SyncAuthenticPixels(image,exception) == MagickFalse)
1377 proceed=SetImageProgress(image,LoadImageTag,y,image->rows);
1378 if (proceed == MagickFalse)
1381 UnlockPixels(GetGWorldPixMap(graphic_world));
1382 SetGWorld(port,device);
1383 if (picture_info.theColorTable != nil)
1384 DisposeHandle((Handle) picture_info.theColorTable);
1385 DisposeGWorld(graphic_world);
1386 (void) CloseBlob(image);
1405static Boolean SearchForFile(OSType creator_type,OSType file_type,FSSpec *file,
1431 buffer_size = MagickMinBufferExtent;
1433 serial_number.lowLongOfPSN=kCurrentProcess;
1434 serial_number.highLongOfPSN=0;
1435 application_info.processInfoLength=
sizeof(ProcessInfoRec);
1436 application_info.processName=NULL;
1437 application_info.processAppSpec=(&application);
1438 GetProcessInformation(&serial_number,&application_info);
1439 buffer=NewPtr(buffer_size);
1440 if (buffer == (
char *) NULL)
1442 parameter_info.csParam.ioCompletion=NULL;
1443 parameter_info.csParam.ioNamePtr=NULL;
1444 parameter_info.csParam.ioVRefNum=application.vRefNum;
1445 parameter_info.csParam.ioMatchPtr=file;
1446 parameter_info.csParam.ioReqMatchCount=count;
1447 parameter_info.csParam.ioSearchBits=fsSBFlFndrInfo;
1448 parameter_info.csParam.ioSearchInfo1=&search1_info;
1449 parameter_info.csParam.ioSearchInfo2=&search2_info;
1450 parameter_info.csParam.ioSearchTime=0;
1451 parameter_info.csParam.ioCatPosition.initialize=0;
1452 parameter_info.csParam.ioOptBuffer=buffer;
1453 parameter_info.csParam.ioOptBufSize=buffer_size;
1454 search1_info.hFileInfo.ioNamePtr=NULL;
1455 search1_info.hFileInfo.ioFlFndrInfo.fdType=file_type;
1456 search1_info.hFileInfo.ioFlFndrInfo.fdCreator=creator_type;
1457 search1_info.hFileInfo.ioFlAttrib=0;
1458 search1_info.hFileInfo.ioFlParID=0;
1459 search2_info=search1_info;
1460 search2_info.hFileInfo.ioFlAttrib=0x10;
1461 search2_info.hFileInfo.ioFlFndrInfo.fdCreator=creator_type;
1462 search2_info.hFileInfo.ioFlFndrInfo.fdType=(-1);
1463 search2_info.hFileInfo.ioFlFndrInfo.fdFlags=0;
1464 search2_info.hFileInfo.ioFlFndrInfo.fdLocation.h=0;
1465 search2_info.hFileInfo.ioFlFndrInfo.fdLocation.v=0;
1466 search2_info.hFileInfo.ioFlFndrInfo.fdFldr=0;
1467 search2_info.hFileInfo.ioFlParID=0;
1468 error=PBCatSearchSync((CSParamPtr) ¶meter_info);
1470 if (parameter_info.csParam.ioReqMatchCount ==
1471 parameter_info.csParam.ioActMatchCount)
1473 if (parameter_info.csParam.ioActMatchCount == 0)
1475 return(error == eofErr);
1478#if !defined(MAGICKCORE_POSIX_SUPPORT_VERSION)
1507MagickExport
void seekdir(
DIR *entry,ssize_t position)
1509 assert(entry != (
DIR *) NULL);
1510 entry->d_index=position;
1542static inline size_t MagickMin(
const size_t x,
const size_t y)
1549MagickExport
void SetApplicationType(
const char *filename,
const char *magick,
1561 assert(filename != (
char *) NULL);
1562 assert(magick != (
const char *) NULL);
1563 if (IsEventLogging() != MagickFalse)
1564 (void) LogMagickEvent(TraceEvent,GetMagickModule(),
"%s",filename);
1566 (void) CopyMagickString((
char *) &filetype,magick,MagickMin(strlen(magick),
1568 if (LocaleCompare(magick,
"JPG") == 0)
1569 (void) CopyMagickString((
char *) &filetype,
"JPEG",MaxTextExtent);
1570 c2pstrcpy(name,filename);
1571 FSMakeFSSpec(0,0,name,&file_specification);
1572 FSpCreate(&file_specification,application,filetype,smSystemScript);
1575#if !defined(MAGICKCORE_POSIX_SUPPORT_VERSION)
1600MagickExport ssize_t telldir(
DIR *entry)
1602 return(entry->d_index);