#include "MagickCore/utility.h"
#include "MagickCore/utility-private.h"
\f
+/*
+ Define declarations.
+*/
+#define MagickPathTemplate "XXXXXXXXXXXX"
+\f
/*
Typedef declarations.
*/
struct stat
attributes;
- (void) FormatLocaleString(path,MagickPathExtent,"magick-%.20gXXXXXXXXXXXX",
- (double) getpid());
+ (void) FormatLocaleString(path,MagickPathExtent,"magick-%.20g"
+ MagickPathTemplate,(double) getpid());
exception=AcquireExceptionInfo();
directory=(char *) GetImageRegistry(StringRegistryType,"temporary-path",
exception);
}
if (directory[strlen(directory)-1] == *DirectorySeparator)
(void) FormatLocaleString(path,MagickPathExtent,
- "%smagick-%.20gXXXXXXXXXXXX",directory,(double) getpid());
+ "%smagick-%.20g" MagickPathTemplate,directory,(double) getpid());
else
(void) FormatLocaleString(path,MagickPathExtent,
- "%s%smagick-%.20gXXXXXXXXXXXX",directory,DirectorySeparator,(double)
- getpid());
+ "%s%smagick-%.20g" MagickPathTemplate,directory,DirectorySeparator,
+ (double) getpid());
directory=DestroyString(directory);
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
{
*/
(void) GetPathTemplate(path);
key=GetRandomKey(random_info,6);
- p=path+strlen(path)-12;
+ p=path+strlen(path)-strlen(MagickPathTemplate);
datum=GetStringInfoDatum(key);
for (i=0; i < (ssize_t) GetStringInfoLength(key); i++)
{
break;
}
#endif
- key=GetRandomKey(random_info,12);
- p=path+strlen(path)-12;
+ key=GetRandomKey(random_info,strlen(MagickPathTemplate));
+ p=path+strlen(path)-strlen(MagickPathTemplate);
datum=GetStringInfoDatum(key);
for (i=0; i < (ssize_t) GetStringInfoLength(key); i++)
{