% September 2002 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
% dedicated to making software imaging solutions freely available. %
% %
% You may not use this file except in compliance with the License. You may %
#include "MagickCore/thread-private.h"
#include "MagickCore/token.h"
#include "MagickCore/utility.h"
+#include "MagickCore/utility-private.h"
\f
/*
Typedef declarations.
MagickULLConstant(0),
MagickULLConstant(0),
MagickULLConstant(0),
- MagickULLConstant(3072)*1024*1024/sizeof(PixelPacket),
+ MagickULLConstant(3072)*1024*1024,
MagickULLConstant(1536)*1024*1024,
MagickULLConstant(3072)*1024*1024,
MagickResourceInfinity,
path=(const char *) GetNextKeyInSplayTree(temporary_resources);
while (path != (const char *) NULL)
{
- (void) remove(path);
+ (void) remove_utf8(path);
path=(const char *) GetNextKeyInSplayTree(temporary_resources);
}
}
static void *DestroyTemporaryResources(void *temporary_resource)
{
- (void) remove((char *) temporary_resource);
+ (void) remove_utf8((char *) temporary_resource);
temporary_resource=DestroyString((char *) temporary_resource);
return((void *) NULL);
}
*p++=portable_filename[c];
}
key=DestroyStringInfo(key);
- file=open(path,O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_NOFOLLOW,S_MODE);
+ file=open_utf8(path,O_RDWR | O_CREAT | O_EXCL | O_BINARY | O_NOFOLLOW,S_MODE);
if ((file >= 0) || (errno != EEXIST))
break;
}
}
(void) CopyMagickString(cache_path,path,MaxTextExtent);
AppendImageFormat("cache",cache_path);
- (void) remove(cache_path);
- return(remove(path) == 0 ? MagickTrue : MagickFalse);
+ (void) remove_utf8(cache_path);
+ return(remove_utf8(path) == 0 ? MagickTrue : MagickFalse);
}
\f
/*
double
value;
- value=SiPrefixToDouble(string,interval);
+ value=SiPrefixToDoubleInterval(string,interval);
if (value >= (double) MagickULLConstant(~0))
return(MagickULLConstant(~0));
return((MagickSizeType) value);
}
-MagickExport MagickBooleanType ResourceComponentGenesis(void)
+MagickPrivate MagickBooleanType ResourceComponentGenesis(void)
{
char
*limit;
#if defined(PixelCacheThreshold)
memory=PixelCacheThreshold;
#endif
- (void) SetMagickResourceLimit(AreaResource,2*memory/sizeof(PixelPacket));
+ (void) SetMagickResourceLimit(AreaResource,2*memory);
(void) SetMagickResourceLimit(MemoryResource,memory);
(void) SetMagickResourceLimit(MapResource,2*memory);
limit=GetEnvironmentValue("MAGICK_AREA_LIMIT");
limit=GetPolicyValue("file");
if (limit != (char *) NULL)
{
- (void) SetMagickResourceLimit(FileResource,StringToSizeType(limit,100.0));
+ (void) SetMagickResourceLimit(FileResource,StringToSizeType(limit,
+ 100.0));
limit=DestroyString(limit);
}
(void) SetMagickResourceLimit(ThreadResource,GetOpenMPMaximumThreads());
% ResourceComponentTerminus(void)
%
*/
-MagickExport void ResourceComponentTerminus(void)
+MagickPrivate void ResourceComponentTerminus(void)
{
if (resource_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&resource_semaphore);
if (resource_semaphore == (SemaphoreInfo *) NULL)
AcquireSemaphoreInfo(&resource_semaphore);
LockSemaphoreInfo(resource_semaphore);
+ value=(char *) NULL;
switch (type)
{
case AreaResource:
default:
break;
}
+ if (value != (char *) NULL)
+ value=DestroyString(value);
UnlockSemaphoreInfo(resource_semaphore);
return(MagickTrue);
}