diff --git a/magick/cache.c b/magick/cache.c
index 89fdcad..48b2071 100644
--- a/magick/cache.c
+++ b/magick/cache.c
@@ -1579,20 +1579,20 @@
% %
% %
% %
-+ D e s t r o y P i x e l C a c h e R e s o u r c e s %
++ D e s t r o y C a c h e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyPixelCacheResources() destroys the cache resources.
+% DestroyCacheFaclity() destroys the cache facility.
%
-% The format of the DestroyPixelCacheResources() method is:
+% The format of the DestroyCacheFaclity() method is:
%
-% DestroyPixelCacheResources(void)
+% DestroyCacheFaclity(void)
%
*/
-MagickExport void DestroyPixelCacheResources(void)
+MagickExport void DestroyCacheFaclity(void)
{
AcquireSemaphoreInfo(&cache_semaphore);
if (cache_resources != (SplayTreeInfo *) NULL)
@@ -3674,6 +3674,31 @@
% %
% %
% %
++ I n s t a n t i a t e C a c h e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateCacheFacility() instantiates the cache facility.
+%
+% The format of the InstantiateCacheFacility method is:
+%
+% MagickBooleanType InstantiateCacheFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateCacheFacility(void)
+{
+ AcquireSemaphoreInfo(&cache_semaphore);
+ RelinquishSemaphoreInfo(cache_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ M a s k P i x e l C a c h e N e x u s %
% %
% %
diff --git a/magick/cache.h b/magick/cache.h
index 1fa119a..69d6355 100644
--- a/magick/cache.h
+++ b/magick/cache.h
@@ -44,6 +44,7 @@
const long,PixelPacket *,ExceptionInfo *),
GetOneAuthenticPixel(Image *,const long,const long,PixelPacket *,
ExceptionInfo *),
+ InstantiateCacheFacility(void),
PersistPixelCache(Image *,const char *,const MagickBooleanType,
MagickOffsetType *,ExceptionInfo *),
SyncAuthenticPixels(Image *,ExceptionInfo *);
@@ -63,7 +64,7 @@
SetPixelCacheVirtualMethod(const Image *,const VirtualPixelMethod);
extern MagickExport void
- DestroyPixelCacheResources(void);
+ DestroyCacheFaclity(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/coder.c b/magick/coder.c
index 584fed5..436b7f7 100644
--- a/magick/coder.c
+++ b/magick/coder.c
@@ -238,20 +238,20 @@
% %
% %
% %
-+ D e s t r o y C o d e r L i s t %
++ D e s t r o y C o d e r F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyCoderList() deallocates memory associated with the font list.
+% DestroyCoderFacility() destroys the coder facility.
%
-% The format of the DestroyCoderList method is:
+% The format of the DestroyCoderFacility method is:
%
-% DestroyCoderList(void)
+% DestroyCoderFacility(void)
%
*/
-MagickExport void DestroyCoderList(void)
+MagickExport void DestroyCoderFacility(void)
{
AcquireSemaphoreInfo(&coder_semaphore);
if (coder_list != (SplayTreeInfo *) NULL)
@@ -520,6 +520,31 @@
% %
% %
% %
++ I n s t a n t i a t e C o d e r F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateCoderFacility() instantiates the coder facility.
+%
+% The format of the InstantiateCoderFacility method is:
+%
+% MagickBooleanType InstantiateCoderFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateCoderFacility(void)
+{
+ AcquireSemaphoreInfo(&coder_semaphore);
+ RelinquishSemaphoreInfo(coder_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t C o d e r I n f o %
% %
% %
diff --git a/magick/coder.h b/magick/coder.h
index aba1684..6f35e21 100644
--- a/magick/coder.h
+++ b/magick/coder.h
@@ -49,10 +49,11 @@
**GetCoderInfoList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateCoderFacility(void),
ListCoderInfo(FILE *,ExceptionInfo *);
MagickExport void
- DestroyCoderList(void);
+ DestroyCoderFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/color.c b/magick/color.c
index 78680a5..8678dd9 100644
--- a/magick/color.c
+++ b/magick/color.c
@@ -908,17 +908,17 @@
% %
% %
% %
-+ D e s t r o y C o l o r L i s t %
++ D e s t r o y C o l o r F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyColorList() deallocates memory associated with the color list.
+% DestroyColorFacility() destroys the color facility.
%
-% The format of the DestroyColorList method is:
+% The format of the DestroyColorFacility method is:
%
-% DestroyColorList(void)
+% DestroyColorFacility(void)
%
*/
@@ -939,7 +939,7 @@
return((void *) NULL);
}
-MagickExport void DestroyColorList(void)
+MagickExport void DestroyColorFacility(void)
{
AcquireSemaphoreInfo(&color_semaphore);
if (color_list != (LinkedListInfo *) NULL)
@@ -1436,6 +1436,31 @@
% %
% %
% %
++ I n s t a n t i a t e C o l o r F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateColorFacility() instantiates the color facility.
+%
+% The format of the InstantiateColorFacility method is:
+%
+% MagickBooleanType InstantiateColorFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateColorFacility(void)
+{
+ AcquireSemaphoreInfo(&color_semaphore);
+ RelinquishSemaphoreInfo(color_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ I s C o l o r S i m i l a r %
% %
% %
diff --git a/magick/color.h b/magick/color.h
index de8a005..1c5191f 100644
--- a/magick/color.h
+++ b/magick/color.h
@@ -75,6 +75,7 @@
**GetColorInfoList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateColorFacility(void),
IsColorSimilar(const Image *,const PixelPacket *,const PixelPacket *),
IsGrayImage(const Image *,ExceptionInfo *),
IsImageSimilar(const Image *,const Image *,long *x,long *y,ExceptionInfo *),
@@ -93,7 +94,7 @@
extern MagickExport void
ConcatenateColorComponent(const MagickPixelPacket *,const ChannelType,
const ComplianceType,char *),
- DestroyColorList(void),
+ DestroyColorFacility(void),
GetColorTuple(const MagickPixelPacket *,const MagickBooleanType,char *);
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/magick/configure.c b/magick/configure.c
index 610c597..e2e0f30 100644
--- a/magick/configure.c
+++ b/magick/configure.c
@@ -90,17 +90,17 @@
% %
% %
% %
-+ D e s t r o y C o n f i g u r e L i s t %
++ D e s t r o y C o n f i g u r e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyConfigureList() deallocates memory associated with the configure list.
+% DestroyConfigureFacility() destroys the configure facility.
%
-% The format of the DestroyConfigureList method is:
+% The format of the DestroyConfigureFacility method is:
%
-% DestroyConfigureList(void)
+% DestroyConfigureFacility(void)
%
*/
@@ -120,7 +120,7 @@
return((void *) NULL);
}
-MagickExport void DestroyConfigureList(void)
+MagickExport void DestroyConfigureFacility(void)
{
AcquireSemaphoreInfo(&configure_semaphore);
if (configure_list != (LinkedListInfo *) NULL)
@@ -848,6 +848,31 @@
% %
% %
% %
++ I n s t a n t i a t e C o n f i g u r e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateConfigureFacility() instantiates the configure facility.
+%
+% The format of the InstantiateConfigureFacility method is:
+%
+% MagickBooleanType InstantiateConfigureFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateConfigureFacility(void)
+{
+ AcquireSemaphoreInfo(&configure_semaphore);
+ RelinquishSemaphoreInfo(configure_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t C o n f i g u r e I n f o %
% %
% %
diff --git a/magick/configure.h b/magick/configure.h
index 68e2356..f98a7d5 100644
--- a/magick/configure.h
+++ b/magick/configure.h
@@ -59,10 +59,11 @@
*GetConfigureOptions(const char *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateConfigureFacility(void),
ListConfigureInfo(FILE *,ExceptionInfo *);
extern MagickExport void
- DestroyConfigureList(void);
+ DestroyConfigureFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/constitute.c b/magick/constitute.c
index 3ddfc51..6ac2a4a 100644
--- a/magick/constitute.c
+++ b/magick/constitute.c
@@ -163,20 +163,20 @@
% %
% %
% %
-+ D e s t r o y C o n s t i t u t e %
++ D e s t r o y C o n s t i t u t e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyConstitute() destroys the constitute environment.
+% DestroyConstituteFacility() destroys the constitute facility.
%
-% The format of the DestroyConstitute method is:
+% The format of the DestroyConstituteFacility method is:
%
-% DestroyConstitute(void)
+% DestroyConstituteFacility(void)
%
*/
-MagickExport void DestroyConstitute(void)
+MagickExport void DestroyConstituteFacility(void)
{
if (constitute_semaphore != (SemaphoreInfo *) NULL)
DestroySemaphoreInfo(&constitute_semaphore);
@@ -187,6 +187,31 @@
% %
% %
% %
++ I n s t a n t i a t e C o n s t i t u t e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateConstituteFacility() instantiates the constitute facility.
+%
+% The format of the InstantiateConstituteFacility method is:
+%
+% MagickBooleanType InstantiateConstituteFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateConstituteFacility(void)
+{
+ AcquireSemaphoreInfo(&constitute_semaphore);
+ RelinquishSemaphoreInfo(constitute_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% P i n g I m a g e %
% %
% %
diff --git a/magick/constitute.h b/magick/constitute.h
index 7058f9f..5b8dc06 100644
--- a/magick/constitute.h
+++ b/magick/constitute.h
@@ -44,11 +44,12 @@
*ReadInlineImage(const ImageInfo *,const char *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateConstituteFacility(void),
WriteImage(const ImageInfo *,Image *),
WriteImages(const ImageInfo *,Image *,const char *,ExceptionInfo *);
extern MagickExport void
- DestroyConstitute(void);
+ DestroyConstituteFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/delegate.c b/magick/delegate.c
index 416d244..79a2ed8 100644
--- a/magick/delegate.c
+++ b/magick/delegate.c
@@ -149,17 +149,17 @@
% %
% %
% %
-% D e s t r o y D e l e g a t e L i s t %
+% D e s t r o y D e l e g a t e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyDelegateList() deallocates memory associated with the delegates list.
+% DestroyDelegateFacility() destroys the delegate facility.
%
-% The format of the DestroyDelegateList method is:
+% The format of the DestroyDelegateFacility method is:
%
-% DestroyDelegateList(void)
+% DestroyDelegateFacility(void)
%
*/
@@ -182,7 +182,7 @@
}
-MagickExport void DestroyDelegateList(void)
+MagickExport void DestroyDelegateFacility(void)
{
AcquireSemaphoreInfo(&delegate_semaphore);
if (delegate_list != (LinkedListInfo *) NULL)
@@ -698,6 +698,31 @@
% %
% %
% %
++ I n s t a n t i a t e D e l e g a t e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateDelegateFacility() instantiates the delegate facility.
+%
+% The format of the InstantiateDelegateFacility method is:
+%
+% MagickBooleanType InstantiateDelegateFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateDelegateFacility(void)
+{
+ AcquireSemaphoreInfo(&delegate_semaphore);
+ RelinquishSemaphoreInfo(delegate_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% I n v o k e D e l e g a t e %
% %
% %
diff --git a/magick/delegate.h b/magick/delegate.h
index 16061fb..9dbd221 100644
--- a/magick/delegate.h
+++ b/magick/delegate.h
@@ -63,11 +63,12 @@
extern MagickExport MagickBooleanType
GetDelegateThreadSupport(const DelegateInfo *),
+ InstantiateDelegateFacility(void),
InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *),
ListDelegateInfo(FILE *,ExceptionInfo *);
extern MagickExport void
- DestroyDelegateList(void);
+ DestroyDelegateFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/deprecate.c b/magick/deprecate.c
index 7134be4..2e09cca 100644
--- a/magick/deprecate.c
+++ b/magick/deprecate.c
@@ -1383,7 +1383,7 @@
*/
MagickExport void DestroyMagickRegistry(void)
{
- DestroyImageRegistry();
+ DestroyRegistryFacility();
}
/*
diff --git a/magick/locale.c b/magick/locale.c
index cacf4e7..291431a 100644
--- a/magick/locale.c
+++ b/magick/locale.c
@@ -98,20 +98,20 @@
% %
% %
% %
-+ D e s t r o y L o c a l e L i s t %
++ D e s t r o y L o c a l e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyLocaleList() deallocates memory associated with the locale list.
+% DestroyLocaleFacility() destroys the locale facility.
%
-% The format of the DestroyLocaleList method is:
+% The format of the DestroyLocaleFacility method is:
%
-% DestroyLocaleList(void)
+% DestroyLocaleFacility(void)
%
*/
-MagickExport void DestroyLocaleList(void)
+MagickExport void DestroyLocaleFacility(void)
{
AcquireSemaphoreInfo(&locale_semaphore);
if (locale_list != (SplayTreeInfo *) NULL)
@@ -617,6 +617,31 @@
% %
% %
% %
++ I n s t a n t i a t e L o c a l e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateLocaleFacility() instantiates the locale facility.
+%
+% The format of the InstantiateLocaleFacility method is:
+%
+% MagickBooleanType InstantiateLocaleFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateLocaleFacility(void)
+{
+ AcquireSemaphoreInfo(&locale_semaphore);
+ RelinquishSemaphoreInfo(locale_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t L o c a l e I n f o %
% %
% %
diff --git a/magick/locale_.h b/magick/locale_.h
index d1919cb..0aff85b 100644
--- a/magick/locale_.h
+++ b/magick/locale_.h
@@ -57,10 +57,11 @@
*GetLocaleOptions(const char *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateLocaleFacility(void),
ListLocaleInfo(FILE *,ExceptionInfo *);
extern MagickExport void
- DestroyLocaleList(void);
+ DestroyLocaleFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/log.c b/magick/log.c
index c7b5c1b..4c3a8fe 100644
--- a/magick/log.c
+++ b/magick/log.c
@@ -233,17 +233,17 @@
% %
% %
% %
-+ D e s t r o y L o g L i s t %
++ D e s t r o y L o g F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyLogList() deallocates memory associated with the log list.
+% DestroyLogFacility() destroys the logging facility.
%
-% The format of the DestroyLogList method is:
+% The format of the DestroyLogFacility method is:
%
-% DestroyLogList(void)
+% DestroyLogFacility(void)
%
*/
@@ -270,7 +270,7 @@
return((void *) NULL);
}
-MagickExport void DestroyLogList(void)
+MagickExport void DestroyLogFacility(void)
{
AcquireSemaphoreInfo(&log_semaphore);
if (log_list != (LinkedListInfo *) NULL)
@@ -591,6 +591,31 @@
% %
% %
% %
++ I n s t a n t i a t e L o g F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateLogFacility() instantiates the log facility.
+%
+% The format of the InstantiateLogFacility method is:
+%
+% MagickBooleanType InstantiateLogFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateLogFacility(void)
+{
+ AcquireSemaphoreInfo(&log_semaphore);
+ RelinquishSemaphoreInfo(log_semaphore);
+ return(MagickFalse);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% I s E v e n t L o g g i n g %
% %
% %
diff --git a/magick/log.h b/magick/log.h
index 87705ee..a30d475 100644
--- a/magick/log.h
+++ b/magick/log.h
@@ -72,6 +72,7 @@
SetLogEventMask(const char *);
extern MagickExport MagickBooleanType
+ InstantiateLogFacility(void),
IsEventLogging(void),
ListLogInfo(FILE *,ExceptionInfo *),
LogMagickEvent(const LogEventType,const char *,const char *,
@@ -83,7 +84,7 @@
extern MagickExport void
CloseMagickLog(void),
- DestroyLogList(void),
+ DestroyLogFacility(void),
SetLogFormat(const char *);
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/magick/magic.c b/magick/magic.c
index c521ff0..434f96e 100644
--- a/magick/magic.c
+++ b/magick/magic.c
@@ -213,17 +213,17 @@
% %
% %
% %
-+ D e s t r o y M a g i c L i s t %
++ D e s t r o y M a g i c F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyMagicList() deallocates memory associated with the magic list.
+% DestroyMagicFacility() destroys the magic facility.
%
-% The format of the DestroyMagicList method is:
+% The format of the DestroyMagicFacility method is:
%
-% DestroyMagicList(void)
+% DestroyMagicFacility(void)
%
*/
@@ -248,7 +248,7 @@
return((void *) NULL);
}
-MagickExport void DestroyMagicList(void)
+MagickExport void DestroyMagicFacility(void)
{
AcquireSemaphoreInfo(&magic_semaphore);
if (magic_list != (LinkedListInfo *) NULL)
@@ -588,6 +588,31 @@
% %
% %
% %
++ I n s t a n t i a t e M a g i c F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateMagicFacility() instantiates the magic facility.
+%
+% The format of the InstantiateMagicFacility method is:
+%
+% MagickBooleanType InstantiateMagicFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateMagicFacility(void)
+{
+ AcquireSemaphoreInfo(&magic_semaphore);
+ RelinquishSemaphoreInfo(magic_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t M a g i c I n f o %
% %
% %
diff --git a/magick/magic.h b/magick/magic.h
index fc56ecd..53e6796 100644
--- a/magick/magic.h
+++ b/magick/magic.h
@@ -57,6 +57,7 @@
*GetMagicName(const MagicInfo *);
extern MagickExport MagickBooleanType
+ InstantiateMagicFacility(void),
ListMagicInfo(FILE *,ExceptionInfo *);
extern MagickExport const MagicInfo
@@ -64,7 +65,7 @@
**GetMagicInfoList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport void
- DestroyMagicList(void);
+ DestroyMagicFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/magick.c b/magick/magick.c
index 3b03176..23376be 100644
--- a/magick/magick.c
+++ b/magick/magick.c
@@ -124,20 +124,20 @@
% %
% %
% %
-+ D e s t r o y M a g i c k L i s t %
++ D e s t r o y M a g i c k F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyMagickList() deallocates memory associated with the MagickInfo list.
+% DestroyMagickFacility() destroys the magick facility.
%
-% The format of the DestroyMagickList method is:
+% The format of the DestroyMagickFacility method is:
%
-% void DestroyMagickList(void)
+% void DestroyMagickFacility(void)
%
*/
-MagickExport void DestroyMagickList(void)
+MagickExport void DestroyMagickFacility(void)
{
AcquireSemaphoreInfo(&magick_semaphore);
if (magick_list != (SplayTreeInfo *) NULL)
@@ -861,6 +861,31 @@
% %
% %
% %
++ I n s t a n t i a t e M a g i c k F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateMagickFacility() instantiates the magick facility.
+%
+% The format of the InstantiateMagickFacility method is:
+%
+% MagickBooleanType InstantiateMagickFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateMagickFacility(void)
+{
+ AcquireSemaphoreInfo(&magick_semaphore);
+ RelinquishSemaphoreInfo(magick_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ I s M a g i c k C o n f l i c t %
% %
% %
@@ -1108,7 +1133,7 @@
#if !defined(MAGICKCORE_HAVE_SIGACTION)
(void) signal(signal_number,SIG_IGN);
#endif
- AsynchronousDestroyMagickResources();
+ AsynchronousDestroyResourceFacility();
instantiate_magick=MagickFalse;
(void) SetMagickSignalHandler(signal_number,signal_handlers[signal_number]);
#if defined(MAGICKCORE_HAVE_RAISE)
@@ -1169,7 +1194,10 @@
*/
(void) setlocale(LC_ALL,"");
(void) setlocale(LC_NUMERIC,"C");
- InitializeSemaphore();
+ (void) InstantiateSemaphoreFacility();
+ (void) InstantiateLogFacility();
+ (void) InstantiateLocaleFacility();
+ (void) InstantiateRandomFacility();
seconds=time((time_t *) NULL);
events=GetEnvironmentValue("MAGICK_DEBUG");
if (events != (char *) NULL)
@@ -1246,12 +1274,26 @@
/*
Initialize magick resources.
*/
- InitializeMagickResources();
+ (void) InstantiatePolicyFacility();
+ (void) InstantiateCacheFacility();
+ (void) InstantiateRegistryFacility();
+ (void) InstantiateResourcesFacility();
+ (void) InstantiateCoderFacility();
+ (void) InstantiateMagickFacility();
+ (void) InstantiateModuleFacility();
+ (void) InstantiateDelegateFacility();
+ (void) InstantiateMagicFacility();
+ (void) InstantiateColorFacility();
+ (void) InstantiateTypeFacility();
+ (void) InstantiateConfigureFacility();
+ (void) InstantiateMimeFacility();
+ (void) InstantiateConstituteFacility();
exception=AcquireExceptionInfo();
#if defined(MAGICKCORE_MODULES_SUPPORT)
InitializeModuleList(exception);
#endif
exception=DestroyExceptionInfo(exception);
+ (void) InstantiateLogFacility();
}
/*
@@ -1277,25 +1319,26 @@
#if defined(MAGICKCORE_X11_DELEGATE)
DestroyXResources();
#endif
- DestroyConstitute();
- DestroyMimeList();
- DestroyConfigureList();
- DestroyTypeList();
- DestroyColorList();
+ DestroyConstituteFacility();
+ DestroyMimeFacility();
+ DestroyConfigureFacility();
+ DestroyTypeFacility();
+ DestroyColorFacility();
#if defined(__WINDOWS__)
NTGhostscriptUnLoadDLL();
#endif
- DestroyMagicList();
- DestroyDelegateList();
- DestroyMagickList();
- DestroyCoderList();
- DestroyMagickResources();
- DestroyImageRegistry();
- DestroyPixelCacheResources();
- DestroyPolicyList();
- DestroyRandomReservoir();
- DestroyLocaleList();
- DestroyLogList();
+ DestroyMagicFacility();
+ DestroyDelegateFacility();
+ DestroyMagickFacility();
+ DestroyCoderFacility();
+ DestroyResourceFacility();
+ DestroyRegistryFacility();
+ DestroyCacheFaclity();
+ DestroyPolicyFacility();
+ DestroyRandomFacility();
+ DestroyLocaleFacility();
+ DestroyLogFacility();
+ DestroySemaphoreFacility();
instantiate_magick=MagickFalse;
}
diff --git a/magick/magick.h b/magick/magick.h
index af44c3a..382b5ef 100644
--- a/magick/magick.h
+++ b/magick/magick.h
@@ -112,6 +112,7 @@
GetMagickEndianSupport(const MagickInfo *),
GetMagickRawSupport(const MagickInfo *),
GetMagickSeekableStream(const MagickInfo *),
+ InstantiateMagickFacility(void),
IsMagickInstantiated(void),
UnregisterMagickInfo(const char *);
@@ -127,7 +128,7 @@
GetMagickThreadSupport(const MagickInfo *);
extern MagickExport void
- DestroyMagickList(void),
+ DestroyMagickFacility(void),
MagickCoreGenesis(const char *,const MagickBooleanType),
MagickCoreTerminus(void);
diff --git a/magick/methods.h b/magick/methods.h
index b9195c0..d26e290 100644
--- a/magick/methods.h
+++ b/magick/methods.h
@@ -107,7 +107,7 @@
#define Ascii85Encode PrependMagickMethod(Ascii85Encode)
#define Ascii85Flush PrependMagickMethod(Ascii85Flush)
#define Ascii85Initialize PrependMagickMethod(Ascii85Initialize)
-#define AsynchronousDestroyMagickResources PrependMagickMethod(AsynchronousDestroyMagickResources)
+#define AsynchronousDestroyResourceFacility PrependMagickMethod(AsynchronousDestroyResourceFacility)
#define AttachBlob PrependMagickMethod(AttachBlob)
#define AverageImages PrependMagickMethod(AverageImages)
#define Base64Decode PrependMagickMethod(Base64Decode)
@@ -223,12 +223,12 @@
#define DespeckleImage PrependMagickMethod(DespeckleImage)
#define DestroyBlob PrependMagickMethod(DestroyBlob)
#define DestroyCacheView PrependMagickMethod(DestroyCacheView)
-#define DestroyCoderList PrependMagickMethod(DestroyCoderList)
-#define DestroyColorList PrependMagickMethod(DestroyColorList)
-#define DestroyConfigureList PrependMagickMethod(DestroyConfigureList)
+#define DestroyCoderFacility PrependMagickMethod(DestroyCoderFacility)
+#define DestroyColorFacility PrependMagickMethod(DestroyColorFacility)
+#define DestroyConfigureFacility PrependMagickMethod(DestroyConfigureFacility)
#define DestroyConfigureOptions PrependMagickMethod(DestroyConfigureOptions)
-#define DestroyConstitute PrependMagickMethod(DestroyConstitute)
-#define DestroyDelegateList PrependMagickMethod(DestroyDelegateList)
+#define DestroyConstituteFacility PrependMagickMethod(DestroyConstituteFacility)
+#define DestroyDelegateFacility PrependMagickMethod(DestroyDelegateFacility)
#define DestroyDrawInfo PrependMagickMethod(DestroyDrawInfo)
#define DestroyExceptionInfo PrependMagickMethod(DestroyExceptionInfo)
#define DestroyFxInfo PrependMagickMethod(DestroyFxInfo)
@@ -242,28 +242,28 @@
#define DestroyImage PrependMagickMethod(DestroyImage)
#define DestroyImageProfiles PrependMagickMethod(DestroyImageProfiles)
#define DestroyImageProperties PrependMagickMethod(DestroyImageProperties)
-#define DestroyImageRegistry PrependMagickMethod(DestroyImageRegistry)
+#define DestroyRegistryFacility PrependMagickMethod(DestroyRegistryFacility)
#define DestroyImages PrependMagickMethod(DestroyImages)
#define DestroyLinkedList PrependMagickMethod(DestroyLinkedList)
-#define DestroyLocaleList PrependMagickMethod(DestroyLocaleList)
+#define DestroyLocaleFacility PrependMagickMethod(DestroyLocaleFacility)
#define DestroyLocaleOptions PrependMagickMethod(DestroyLocaleOptions)
-#define DestroyLogList PrependMagickMethod(DestroyLogList)
-#define DestroyMagickList PrependMagickMethod(DestroyMagickList)
+#define DestroyLogFacility PrependMagickMethod(DestroyLogFacility)
+#define DestroyMagickFacility PrependMagickMethod(DestroyMagickFacility)
#define DestroyMagickMemory PrependMagickMethod(DestroyMagickMemory)
#define DestroyMagick PrependMagickMethod(DestroyMagick)
#define DestroyMagickRegistry PrependMagickMethod(DestroyMagickRegistry)
-#define DestroyMagickResources PrependMagickMethod(DestroyMagickResources)
-#define DestroyMagicList PrependMagickMethod(DestroyMagicList)
-#define DestroyMimeList PrependMagickMethod(DestroyMimeList)
+#define DestroyResourceFacility PrependMagickMethod(DestroyResourceFacility)
+#define DestroyMagicFacility PrependMagickMethod(DestroyMagicFacility)
+#define DestroyMimeFacility PrependMagickMethod(DestroyMimeFacility)
#define DestroyMontageInfo PrependMagickMethod(DestroyMontageInfo)
#define DestroyPixelCache PrependMagickMethod(DestroyPixelCache)
#define DestroyPixelCacheNexus PrependMagickMethod(DestroyPixelCacheNexus)
-#define DestroyPixelCacheResources PrependMagickMethod(DestroyPixelCacheResources)
-#define DestroyPolicyList PrependMagickMethod(DestroyPolicyList)
+#define DestroyCacheFaclity PrependMagickMethod(DestroyCacheFaclity)
+#define DestroyPolicyFacility PrependMagickMethod(DestroyPolicyFacility)
#define DestroyQuantizeInfo PrependMagickMethod(DestroyQuantizeInfo)
#define DestroyQuantumInfo PrependMagickMethod(DestroyQuantumInfo)
#define DestroyRandomInfo PrependMagickMethod(DestroyRandomInfo)
-#define DestroyRandomReservoir PrependMagickMethod(DestroyRandomReservoir)
+#define DestroyRandomFacility PrependMagickMethod(DestroyRandomFacility)
#define DestroyResampleFilter PrependMagickMethod(DestroyResampleFilter)
#define DestroyResizeFilter PrependMagickMethod(DestroyResizeFilter)
#define DestroySemaphoreInfo PrependMagickMethod(DestroySemaphoreInfo)
@@ -277,7 +277,7 @@
#define DestroyThresholdMap PrependMagickMethod(DestroyThresholdMap)
#define DestroyTimerInfo PrependMagickMethod(DestroyTimerInfo)
#define DestroyTokenInfo PrependMagickMethod(DestroyTokenInfo)
-#define DestroyTypeList PrependMagickMethod(DestroyTypeList)
+#define DestroyTypeFacility PrependMagickMethod(DestroyTypeFacility)
#define DestroyXMLTree PrependMagickMethod(DestroyXMLTree)
#define DestroyXResources PrependMagickMethod(DestroyXResources)
#define DestroyXWidget PrependMagickMethod(DestroyXWidget)
@@ -622,7 +622,7 @@
#define InheritException PrependMagickMethod(InheritException)
#define InitializeMagick PrependMagickMethod(InitializeMagick)
#define InitializeMagickResources PrependMagickMethod(InitializeMagickResources)
-#define InitializeSemaphore PrependMagickMethod(InitializeSemaphore)
+#define InstantiateSemaphoreFacility PrependMagickMethod(InstantiateSemaphoreFacility)
#define InitializeSignature PrependMagickMethod(InitializeSignature)
#define InjectImageBlob PrependMagickMethod(InjectImageBlob)
#define InsertImageInList PrependMagickMethod(InsertImageInList)
diff --git a/magick/mime.c b/magick/mime.c
index eea6e84..90e1c50 100644
--- a/magick/mime.c
+++ b/magick/mime.c
@@ -131,17 +131,17 @@
% %
% %
% %
-+ D e s t r o y M i m e L i s t %
++ D e s t r o y M i m e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyMimeList() deallocates memory associated with the mime list.
+% DestroyMimeFacility() destroys the mime facility.
%
-% The format of the DestroyMimeList method is:
+% The format of the DestroyMimeFacility method is:
%
-% DestroyMimeList(void)
+% DestroyMimeFacility(void)
%
*/
@@ -165,7 +165,7 @@
return((void *) NULL);
}
-MagickExport void DestroyMimeList(void)
+MagickExport void DestroyMimeFacility(void)
{
AcquireSemaphoreInfo(&mime_semaphore);
if (mime_list != (LinkedListInfo *) NULL)
@@ -670,6 +670,31 @@
% %
% %
% %
++ I n s t a n t i a t e M i m e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateMimeFacility() instantiates the mime facility.
+%
+% The format of the InstantiateMimeFacility method is:
+%
+% MagickBooleanType InstantiateMimeFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateMimeFacility(void)
+{
+ AcquireSemaphoreInfo(&mime_semaphore);
+ RelinquishSemaphoreInfo(mime_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t M i m e I n f o %
% %
% %
diff --git a/magick/mime.h b/magick/mime.h
index 81ec707..1c6ae62 100644
--- a/magick/mime.h
+++ b/magick/mime.h
@@ -34,6 +34,7 @@
*GetMimeType(const MimeInfo *);
extern MagickExport MagickBooleanType
+ InstantiateMimeFacility(void),
ListMimeInfo(FILE *,ExceptionInfo *),
LoadMimeLists(const char *,ExceptionInfo *);
@@ -42,7 +43,7 @@
**GetMimeInfoList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport void
- DestroyMimeList(void);
+ DestroyMimeFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/module.c b/magick/module.c
index 934bdbf..259c777 100644
--- a/magick/module.c
+++ b/magick/module.c
@@ -884,6 +884,31 @@
% %
% %
% %
++ I n s t a n t i a t e M o d u l e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateModuleFacility() instantiates the module facility.
+%
+% The format of the InstantiateModuleFacility method is:
+%
+% MagickBooleanType InstantiateModuleFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateModuleFacility(void)
+{
+ AcquireSemaphoreInfo(&module_semaphore);
+ RelinquishSemaphoreInfo(module_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% I n v o k e D y n a m i c I m a g e F i l t e r %
% %
% %
diff --git a/magick/module.h b/magick/module.h
index fbbfb99..c781e2f 100644
--- a/magick/module.h
+++ b/magick/module.h
@@ -74,6 +74,7 @@
extern MagickExport MagickBooleanType
InitializeModuleList(ExceptionInfo *),
+ InstantiateModuleFacility(void),
InvokeDynamicImageFilter(const char *,Image **,const int,const char **,
ExceptionInfo *),
ListModuleInfo(FILE *,ExceptionInfo *),
diff --git a/magick/nt-base.c b/magick/nt-base.c
index 071a2cd..a6b8487 100644
--- a/magick/nt-base.c
+++ b/magick/nt-base.c
@@ -350,7 +350,7 @@
static BOOL ControlHandler(DWORD type)
{
(void) type;
- AsynchronousDestroyMagickResources();
+ AsynchronousDestroyResourceFacility();
return(FALSE);
}
diff --git a/magick/policy.c b/magick/policy.c
index e4cc4d8..a6701e1 100644
--- a/magick/policy.c
+++ b/magick/policy.c
@@ -124,17 +124,17 @@
% %
% %
% %
-+ D e s t r o y P o l i c y L i s t %
++ D e s t r o y P o l i c y F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyPolicyList() deallocates memory associated with the policy list.
+% DestroyPolicyFacility() destroys the policy facility.
%
-% The format of the DestroyPolicyList method is:
+% The format of the DestroyPolicyFacility method is:
%
-% DestroyPolicyList(void)
+% DestroyPolicyFacility(void)
%
*/
@@ -156,7 +156,7 @@
return((void *) NULL);
}
-MagickExport void DestroyPolicyList(void)
+MagickExport void DestroyPolicyFacility(void)
{
AcquireSemaphoreInfo(&policy_semaphore);
if (policy_list != (LinkedListInfo *) NULL)
@@ -479,6 +479,31 @@
% %
% %
% %
++ I n s t a n t i a t e P o l i c y F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiatePolicyFacility() instantiates the policy facility.
+%
+% The format of the InstantiatePolicyFacility method is:
+%
+% MagickBooleanType InstantiatePolicyFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiatePolicyFacility(void)
+{
+ AcquireSemaphoreInfo(&policy_semaphore);
+ RelinquishSemaphoreInfo(policy_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% I s R i g h t s A u t h o r i z e d %
% %
% %
diff --git a/magick/policy.h b/magick/policy.h
index d8ad7bd..17a3ab1 100644
--- a/magick/policy.h
+++ b/magick/policy.h
@@ -55,11 +55,12 @@
**GetPolicyInfoList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiatePolicyFacility(void),
IsRightsAuthorized(const PolicyDomain,const PolicyRights,const char *),
ListPolicyInfo(FILE *,ExceptionInfo *);
extern MagickExport void
- DestroyPolicyList(void);
+ DestroyPolicyFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/random.c b/magick/random.c
index fe0c784..aa3876d 100644
--- a/magick/random.c
+++ b/magick/random.c
@@ -252,6 +252,31 @@
% %
% %
% %
++ D e s t r o y R a n d o m F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% DestroyRandomFacility() destroys the random facility.
+%
+% The format of the DestroyRandomFacility method is:
+%
+% DestroyRandomFacility(void)
+%
+*/
+MagickExport void DestroyRandomFacility(void)
+{
+ AcquireSemaphoreInfo(&random_semaphore);
+ (void) UnlockSemaphoreInfo(random_semaphore);
+ DestroySemaphoreInfo(&random_semaphore);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
+ D e s t r o y R a n d o m I n f o %
% %
% %
@@ -296,32 +321,6 @@
% %
% %
% %
-+ D e s t r o y R a n d o m R e s e r v i o r %
-% %
-% %
-% %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-% DestroyRandomReservoir() deallocates memory associated with the random
-% reservoir.
-%
-% The format of the DestroyRandomReservoir method is:
-%
-% DestroyRandomReservoir(void)
-%
-*/
-MagickExport void DestroyRandomReservoir(void)
-{
- AcquireSemaphoreInfo(&random_semaphore);
- (void) UnlockSemaphoreInfo(random_semaphore);
- DestroySemaphoreInfo(&random_semaphore);
-}
-
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% %
-% %
-% %
+ G e n e r a t e E n t r o p i c C h a o s %
% %
% %
@@ -715,6 +714,31 @@
% %
% %
% %
++ I n s t a n t i a t e R a n d o m F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateRandomFacility() instantiates the random facility.
+%
+% The format of the InstantiateRandomFacility method is:
+%
+% MagickBooleanType InstantiateRandomFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateRandomFacility(void)
+{
+ AcquireSemaphoreInfo(&random_semaphore);
+ RelinquishSemaphoreInfo(random_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% S e e d P s e u d o R a n d o m G e n e r a t o r %
% %
% %
diff --git a/magick/random_.h b/magick/random_.h
index 867d5e9..35db5ad 100644
--- a/magick/random_.h
+++ b/magick/random_.h
@@ -37,6 +37,9 @@
GetRandomValue(RandomInfo *),
GetPseudoRandomValue(RandomInfo *);
+extern MagickExport MagickBooleanType
+ InstantiateRandomFacility(void);
+
extern MagickExport RandomInfo
*AcquireRandomInfo(void),
*DestroyRandomInfo(RandomInfo *);
@@ -45,7 +48,7 @@
*GetRandomKey(RandomInfo *,const size_t);
extern MagickExport void
- DestroyRandomReservoir(void),
+ DestroyRandomFacility(void),
SeedPseudoRandomGenerator(const unsigned long),
SetRandomKey(RandomInfo *,const size_t,unsigned char *),
SetRandomTrueRandom(const MagickBooleanType);
diff --git a/magick/registry.c b/magick/registry.c
index 4ba56c3..71b2e87 100644
--- a/magick/registry.c
+++ b/magick/registry.c
@@ -71,6 +71,12 @@
*/
static SplayTreeInfo
*registry = (SplayTreeInfo *) NULL;
+
+static SemaphoreInfo
+ *registry_semaphore = (SemaphoreInfo *) NULL;
+
+static volatile MagickBooleanType
+ instantiate_registry = MagickFalse;
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -157,25 +163,29 @@
% %
% %
% %
-% D e s t r o y I m a g e R e g i s t r y %
+% D e s t r o y R e g i s t r y F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyImageRegistry() releases memory associated with the image registry.
+% DestroyRegistryFacility() destroys the registry facility.
%
% The format of the DestroyDefines method is:
%
-% void DestroyImageRegistry(void)
+% void DestroyRegistryFacility(void)
%
*/
-MagickExport void DestroyImageRegistry(void)
+MagickExport void DestroyRegistryFacility(void)
{
+ AcquireSemaphoreInfo(®istry_semaphore);
if (IsEventLogging() != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"...");
if (registry != (void *) NULL)
registry=DestroySplayTree(registry);
+ instantiate_registry=MagickFalse;
+ RelinquishSemaphoreInfo(registry_semaphore);
+ DestroySemaphoreInfo(®istry_semaphore);
}
/*
@@ -304,6 +314,31 @@
% %
% %
% %
++ I n s t a n t i a t e R e g i s t r y F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateRegistryFacility() instantiates the registry facility.
+%
+% The format of the InstantiateRegistryFacility method is:
+%
+% MagickBooleanType InstantiateRegistryFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateRegistryFacility(void)
+{
+ AcquireSemaphoreInfo(®istry_semaphore);
+ RelinquishSemaphoreInfo(registry_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% R e m o v e I m a g e R e g i s t r y %
% %
% %
@@ -485,9 +520,19 @@
registry_info->type=type;
registry_info->value=clone_value;
registry_info->signature=MagickSignature;
- if (registry == (void *) NULL)
- registry=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,
- DestroyRegistryNode);
+ if ((registry == (SplayTreeInfo *) NULL) &&
+ (instantiate_registry == MagickFalse))
+ {
+ AcquireSemaphoreInfo(®istry_semaphore);
+ if ((registry == (SplayTreeInfo *) NULL) &&
+ (instantiate_registry == MagickFalse))
+ {
+ registry=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,
+ DestroyRegistryNode);
+ instantiate_registry=MagickTrue;
+ }
+ RelinquishSemaphoreInfo(registry_semaphore);
+ }
status=AddValueToSplayTree(registry,ConstantString(key),registry_info);
return(status);
}
diff --git a/magick/registry.h b/magick/registry.h
index cf2876c..d525be6 100644
--- a/magick/registry.h
+++ b/magick/registry.h
@@ -36,11 +36,12 @@
extern MagickExport MagickBooleanType
DefineImageRegistry(const RegistryType,const char *,ExceptionInfo *),
DeleteImageRegistry(const char *),
+ InstantiateRegistryFacility(void),
SetImageRegistry(const RegistryType,const char *,const void *,
ExceptionInfo *);
extern MagickExport void
- DestroyImageRegistry(void),
+ DestroyRegistryFacility(void),
*GetImageRegistry(const RegistryType,const char *,ExceptionInfo *),
*RemoveImageRegistry(const char *),
ResetImageRegistryIterator(void);
diff --git a/magick/resource.c b/magick/resource.c
index 1d25b5b..e701f38 100644
--- a/magick/resource.c
+++ b/magick/resource.c
@@ -265,22 +265,22 @@
% %
% %
% %
-+ A s y n c h r o n o u s D e s t r o y M a g i c k R e s o u r c e s %
++ A s y n c h r o n o u s D e s t r o y R e s o u r c e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% AsynchronousDestroyMagickResources() destroys the resource environment.
-% It differs from DestroyMagickResources() in that it can be called from a
+% AsynchronousDestroyResourceFacility() destroys the resource environment.
+% It differs from DestroyResourceFacility() in that it can be called from a
% asynchronous signal handler.
%
-% The format of the DestroyMagickResources() method is:
+% The format of the DestroyResourceFacility() method is:
%
-% DestroyMagickResources(void)
+% DestroyResourceFacility(void)
%
*/
-MagickExport void AsynchronousDestroyMagickResources(void)
+MagickExport void AsynchronousDestroyResourceFacility(void)
{
const char
*path;
@@ -482,20 +482,20 @@
% %
% %
% %
-+ D e s t r o y M a g i c k R e s o u r c e s %
++ D e s t r o y R e s o u r c e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyMagickResources() destroys the resource environment.
+% DestroyResourceFacility() destroys the resource facility.
%
-% The format of the DestroyMagickResources() method is:
+% The format of the DestroyResourceFacility() method is:
%
-% DestroyMagickResources(void)
+% DestroyResourceFacility(void)
%
*/
-MagickExport void DestroyMagickResources(void)
+MagickExport void DestroyResourceFacility(void)
{
AcquireSemaphoreInfo(&resource_semaphore);
if (temporary_resources != (SplayTreeInfo *) NULL)
@@ -657,17 +657,17 @@
% %
% %
% %
-+ I n i t i a l i z e M a g i c k R e s o u r c e s %
++ I n s t a n t i a t e R e s o u r c e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% InitializeMagickResources() initializes the resource environment.
+% InstantiateResourcesFacility() instantiates the resource facility.
%
-% The format of the InitializeMagickResources() method is:
+% The format of the InstantiateResourcesFacility method is:
%
-% InitializeMagickResources(void)
+% MagickBooleanType InstantiateResourcesFacility(void)
%
*/
@@ -691,7 +691,7 @@
return((MagickSizeType) value);
}
-MagickExport void InitializeMagickResources(void)
+MagickExport MagickBooleanType InstantiateResourcesFacility(void)
{
char
*limit;
@@ -707,6 +707,7 @@
/*
Set Magick resource limits.
*/
+ AcquireSemaphoreInfo(&resource_semaphore);
pagesize=GetMagickPageSize();
pages=(-1);
#if defined(MAGICKCORE_HAVE_SYSCONF) && defined(_SC_PHYS_PAGES)
@@ -803,6 +804,8 @@
(void) SetMagickResourceLimit(TimeResource,StringToSizeType(limit,100.0));
limit=DestroyString(limit);
}
+ RelinquishSemaphoreInfo(resource_semaphore);
+ return(MagickTrue);
}
/*
diff --git a/magick/resource_.h b/magick/resource_.h
index 7bac7e9..a65204f 100644
--- a/magick/resource_.h
+++ b/magick/resource_.h
@@ -41,8 +41,9 @@
extern MagickExport MagickBooleanType
AcquireMagickResource(const ResourceType,const MagickSizeType),
- RelinquishUniqueFileResource(const char *),
+ InstantiateResourcesFacility(void),
ListMagickResourceInfo(FILE *,ExceptionInfo *),
+ RelinquishUniqueFileResource(const char *),
SetMagickResourceLimit(const ResourceType,const MagickSizeType);
extern MagickExport MagickSizeType
@@ -50,9 +51,8 @@
GetMagickResourceLimit(const ResourceType);
extern MagickExport void
- AsynchronousDestroyMagickResources(void),
- DestroyMagickResources(void),
- InitializeMagickResources(void),
+ AsynchronousDestroyResourceFacility(void),
+ DestroyResourceFacility(void),
RelinquishMagickResource(const ResourceType,const MagickSizeType);
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/magick/semaphore.c b/magick/semaphore.c
index 39834b5..a98f78c 100644
--- a/magick/semaphore.c
+++ b/magick/semaphore.c
@@ -81,6 +81,9 @@
static long
semaphore_mutex = 0;
#endif
+
+static MagickBooleanType
+ instantiate_semaphore = MagickFalse;
/*
Forward declaractions.
@@ -169,7 +172,7 @@
semaphore_info=(SemaphoreInfo *) RelinquishAlignedMemory(
semaphore_info);
ThrowFatalException(ResourceLimitFatalError,
- "UnableToInitializeSemaphore");
+ "UnableToInstantiateSemaphoreFacility");
}
status=pthread_mutex_init(&semaphore_info->mutex,&mutex_info);
(void) pthread_mutexattr_destroy(&mutex_info);
@@ -178,7 +181,7 @@
semaphore_info=(SemaphoreInfo *) RelinquishAlignedMemory(
semaphore_info);
ThrowFatalException(ResourceLimitFatalError,
- "UnableToInitializeSemaphore");
+ "UnableToInstantiateSemaphoreFacility");
}
}
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
@@ -195,26 +198,30 @@
% %
% %
% %
-% D e s t r o y S e m a p h o r e %
+% D e s t r o y S e m a p h o r e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroySemaphore() destroys the semaphore environment.
+% DestroySemaphoreFacility() destroys the semaphore facility.
%
-% The format of the DestroySemaphore method is:
+% The format of the DestroySemaphoreFacility method is:
%
-% DestroySemaphore(void)
+% DestroySemaphoreFacility(void)
%
*/
-MagickExport void DestroySemaphore(void)
+MagickExport void DestroySemaphoreFacility(void)
{
#if defined(MAGICKCORE_HAVE_PTHREAD)
if (pthread_mutex_destroy(&semaphore_mutex) != 0)
(void) fprintf(stderr,"pthread_mutex_destroy failed %s\n",
GetExceptionMessage(errno));
+#elif defined(MAGICKCORE_HAVE_WINTHREADS)
+ if (instantiate_semaphore == MagickFalse)
+ DeleteCriticalSection(&semaphore_mutex);
#endif
+ instantiate_semaphore=MagickFalse;
}
/*
@@ -260,21 +267,24 @@
% %
% %
% %
-% I n i t i a l i z e S e m a p h o r e %
+% I n s t a n t i a t e S e m a p h o r e %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% InitializeSemaphore() initializes the semaphore environment.
+% InstantiateSemaphoreFacility() instantiates the semaphore environment.
%
-% The format of the InitializeSemaphore method is:
+% The format of the InstantiateSemaphoreFacility method is:
%
-% InitializeSemaphore(void)
+% MagickBooleanType InstantiateSemaphoreFacility(void)
%
*/
-MagickExport void InitializeSemaphore(void)
+MagickExport MagickBooleanType InstantiateSemaphoreFacility(void)
{
+ LockMagickMutex();
+ UnlockMagickMutex();
+ return(MagickTrue);
}
/*
@@ -303,6 +313,9 @@
(void) fprintf(stderr,"pthread_mutex_lock failed %s\n",
GetExceptionMessage(errno));
#elif defined(MAGICKCORE_HAVE_WINTHREADS)
+ if (instantiate_semaphore == MagickFalse)
+ InitializeCriticalSection(&semaphore_mutex);
+ instantiate_semaphore=MagickTrue;
while (InterlockedCompareExchange(&semaphore_mutex,1L,0L) != 0)
Sleep(10);
#endif
diff --git a/magick/semaphore.h b/magick/semaphore.h
index acd4d48..4d09deb 100644
--- a/magick/semaphore.h
+++ b/magick/semaphore.h
@@ -26,6 +26,7 @@
SemaphoreInfo;
extern MagickExport MagickBooleanType
+ InstantiateSemaphoreFacility(void),
LockSemaphoreInfo(SemaphoreInfo *),
UnlockSemaphoreInfo(SemaphoreInfo *);
@@ -34,9 +35,8 @@
extern MagickExport void
AcquireSemaphoreInfo(SemaphoreInfo **),
- DestroySemaphore(void),
+ DestroySemaphoreFacility(void),
DestroySemaphoreInfo(SemaphoreInfo **),
- InitializeSemaphore(void),
RelinquishSemaphoreInfo(SemaphoreInfo *);
#if defined(__cplusplus) || defined(c_plusplus)
diff --git a/magick/type.c b/magick/type.c
index fa7eaf4..1f8e48d 100644
--- a/magick/type.c
+++ b/magick/type.c
@@ -133,20 +133,20 @@
% %
% %
% %
-+ D e s t r o y T y p e L i s t %
++ D e s t r o y T y p e F a c i l i t y %
% %
% %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% DestroyTypeList() deallocates memory associated with the font list.
+% DestroyTypeFacility() destroy type facility.
%
-% The format of the DestroyTypeList method is:
+% The format of the DestroyTypeFacility method is:
%
-% void DestroyTypeList(void)
+% void DestroyTypeFacility(void)
%
*/
-MagickExport void DestroyTypeList(void)
+MagickExport void DestroyTypeFacility(void)
{
AcquireSemaphoreInfo(&type_semaphore);
if (type_list != (SplayTreeInfo *) NULL)
@@ -822,6 +822,31 @@
% %
% %
% %
++ I n s t a n t i a t e T y p e F a c i l i t y %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% InstantiateTypeFacility() instantiates the type facility.
+%
+% The format of the InstantiateTypeFacility method is:
+%
+% MagickBooleanType InstantiateTypeFacility(void)
+%
+*/
+MagickExport MagickBooleanType InstantiateTypeFacility(void)
+{
+ AcquireSemaphoreInfo(&type_semaphore);
+ RelinquishSemaphoreInfo(type_semaphore);
+ return(MagickTrue);
+}
+
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% L i s t T y p e I n f o %
% %
% %
diff --git a/magick/type.h b/magick/type.h
index d4d1db5..35a957d 100644
--- a/magick/type.h
+++ b/magick/type.h
@@ -88,6 +88,7 @@
**GetTypeList(const char *,unsigned long *,ExceptionInfo *);
extern MagickExport MagickBooleanType
+ InstantiateTypeFacility(void),
ListTypeInfo(FILE *,ExceptionInfo *);
extern MagickExport const TypeInfo
@@ -97,7 +98,7 @@
**GetTypeInfoList(const char *,unsigned long *,ExceptionInfo *);
MagickExport void
- DestroyTypeList(void);
+ DestroyTypeFacility(void);
#if defined(__cplusplus) || defined(c_plusplus)
}
diff --git a/magick/version.h b/magick/version.h
index c1e9c1a..2156d65 100644
--- a/magick/version.h
+++ b/magick/version.h
@@ -31,8 +31,8 @@
#define MagickLibVersionText "6.5.7"
#define MagickLibVersionNumber 2,0,0
#define MagickLibSubversion "-1"
-#define MagickReleaseDate "2009-10-17"
-#define MagickChangeDate "20091014"
+#define MagickReleaseDate "2009-10-18"
+#define MagickChangeDate "20091018"
#define MagickAuthoritativeURL "http://www.imagemagick.org"
#define MagickHomeURL "file:///usr/local/share/doc/ImageMagick-6.5.7/index.html"
#if (MAGICKCORE_QUANTUM_DEPTH == 8)