From 904e591bcf6bce4c0086cc200d0efe7fdd3834ae Mon Sep 17 00:00:00 2001 From: cristy Date: Sat, 15 Mar 2014 19:53:14 +0000 Subject: [PATCH] --- MagickCore/coder.c | 18 +++++++++--------- MagickCore/color.c | 15 ++++++++------- MagickCore/configure.c | 19 +++++++++---------- MagickCore/delegate.c | 15 ++++++++------- MagickCore/locale.c | 18 +++++++++--------- MagickCore/log.c | 18 +++++++++--------- MagickCore/magic.c | 18 +++++++++--------- MagickCore/magick.c | 18 +++++++++--------- MagickCore/mime.c | 18 +++++++++--------- MagickCore/module.c | 20 ++++++++++---------- MagickCore/policy.c | 18 +++++++++--------- MagickCore/type.c | 18 +++++++++--------- 12 files changed, 107 insertions(+), 106 deletions(-) diff --git a/MagickCore/coder.c b/MagickCore/coder.c index 6736d8105..f4def8f17 100644 --- a/MagickCore/coder.c +++ b/MagickCore/coder.c @@ -240,7 +240,7 @@ static SplayTreeInfo Forward declarations. */ static MagickBooleanType - InitializeCoderList(ExceptionInfo *), + IsCoderTreeInstantiated(ExceptionInfo *), LoadCoderLists(const char *,ExceptionInfo *); /* @@ -325,9 +325,8 @@ MagickExport const CoderInfo *GetCoderInfo(const char *name, ExceptionInfo *exception) { assert(exception != (ExceptionInfo *) NULL); - if (coder_list == (SplayTreeInfo *) NULL) - if (InitializeCoderList(exception) == MagickFalse) - return((const CoderInfo *) NULL); + if (IsCoderTreeInstantiated(exception) == MagickFalse) + return((const CoderInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) { ResetSplayTreeIterator(coder_list); @@ -512,24 +511,25 @@ MagickExport char **GetCoderList(const char *pattern, % % % % % % -+ I n i t i a l i z e C o d e r L i s t % ++ I s C o d e r T r e e I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeCoderList() initializes the coder list. +% IsCoderTreeInstantiated() determines if the coder tree is instantiated. +% If not, it instantiates the tree and returns it. % -% The format of the InitializeCoderList method is: +% The format of the IsCoderInstantiated method is: % -% MagickBooleanType InitializeCoderList(ExceptionInfo *exception) +% MagickBooleanType IsCoderTreeInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeCoderList(ExceptionInfo *exception) +static MagickBooleanType IsCoderTreeInstantiated(ExceptionInfo *exception) { if (coder_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&coder_semaphore); diff --git a/MagickCore/color.c b/MagickCore/color.c index 80eb10ac4..ddf673aab 100644 --- a/MagickCore/color.c +++ b/MagickCore/color.c @@ -794,7 +794,7 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - InitializeColorList(ExceptionInfo *), + IsColorListInstantiated(ExceptionInfo *), LoadColorLists(const char *,ExceptionInfo *); /* @@ -910,7 +910,7 @@ MagickExport const ColorInfo *GetColorCompliance(const char *name, assert(exception != (ExceptionInfo *) NULL); if (color_list == (LinkedListInfo *) NULL) - if (IfMagickFalse(InitializeColorList(exception))) + if (IfMagickFalse(IsColorListInstantiated(exception))) return((const ColorInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) return((const ColorInfo *) GetValueFromLinkedList(color_list,0)); @@ -1488,24 +1488,25 @@ MagickExport void GetColorTuple(const PixelInfo *pixel, % % % % % % -+ I n i t i a l i z e C o l o r L i s t % ++ I s C o l o r L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeColorList() initializes the color list. +% IsColorListInstantiated() determines if the color list is instantiated. If +% not, it instantiates the list and returns it. % -% The format of the InitializeColorList method is: +% The format of the IsColorInstantiated method is: % -% MagickBooleanType InitializeColorList(ExceptionInfo *exception) +% MagickBooleanType IsColorListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeColorList(ExceptionInfo *exception) +static MagickBooleanType IsColorListInstantiated(ExceptionInfo *exception) { if (color_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&color_semaphore); diff --git a/MagickCore/configure.c b/MagickCore/configure.c index 0a74ab529..b102d2cbd 100644 --- a/MagickCore/configure.c +++ b/MagickCore/configure.c @@ -116,7 +116,7 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - InitializeConfigureList(ExceptionInfo *), + IsConfigureListInstantiated(ExceptionInfo *), LoadConfigureLists(const char *,ExceptionInfo *); /* @@ -225,7 +225,6 @@ static void *DestroyOptions(void *option) MagickExport LinkedListInfo *DestroyConfigureOptions(LinkedListInfo *options) { assert(options != (LinkedListInfo *) NULL); - (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); return(DestroyLinkedList(options,DestroyOptions)); } @@ -265,9 +264,8 @@ MagickExport const ConfigureInfo *GetConfigureInfo(const char *name, *p; assert(exception != (ExceptionInfo *) NULL); - if (configure_list == (LinkedListInfo *) NULL) - if (InitializeConfigureList(exception) == MagickFalse) - return((const ConfigureInfo *) NULL); + if (IsConfigureListInstantiated(exception) == MagickFalse) + return((const ConfigureInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) return((const ConfigureInfo *) GetValueFromLinkedList(configure_list,0)); /* @@ -875,24 +873,25 @@ MagickExport const char *GetConfigureValue(const ConfigureInfo *configure_info) % % % % % % -+ I n i t i a l i z e C o n f i g u r e L i s t % ++ I s C o n f i g u r e L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeConfigureList() initializes the configure list. +% IsConfigureListInstantiated() determines if the configure list is +% instantiated. If not, it instantiates the list and returns it. % -% The format of the InitializeConfigureList method is: +% The format of the IsConfigureInstantiated method is: % -% MagickBooleanType InitializeConfigureList(ExceptionInfo *exception) +% MagickBooleanType IsConfigureListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeConfigureList(ExceptionInfo *exception) +static MagickBooleanType IsConfigureListInstantiated(ExceptionInfo *exception) { if (configure_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&configure_semaphore); diff --git a/MagickCore/delegate.c b/MagickCore/delegate.c index 14067c900..581698a46 100644 --- a/MagickCore/delegate.c +++ b/MagickCore/delegate.c @@ -138,7 +138,7 @@ static SemaphoreInfo Forward declaractions. */ static MagickBooleanType - InitializeDelegateList(ExceptionInfo *), + IsDelegateListInstantiated(ExceptionInfo *), LoadDelegateLists(const char *,ExceptionInfo *); /* @@ -367,7 +367,7 @@ MagickExport const DelegateInfo *GetDelegateInfo(const char *decode, assert(exception != (ExceptionInfo *) NULL); if (delegate_list == (LinkedListInfo *) NULL) - if( IfMagickFalse(InitializeDelegateList(exception)) ) + if( IfMagickFalse(IsDelegateListInstantiated(exception)) ) return((const DelegateInfo *) NULL); if ((LocaleCompare(decode,"*") == 0) && (LocaleCompare(encode,"*") == 0)) return((const DelegateInfo *) GetValueFromLinkedList(delegate_list,0)); @@ -683,24 +683,25 @@ MagickExport MagickBooleanType GetDelegateThreadSupport( % % % % % % -+ I n i t i a l i z e D e l e g a t e L i s t % ++ I s D e l e g a t e L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeDelegateList() initializes the delegate list. +% IsDelegateListInstantiated() determines if the delegate list is instantiated. +% If not, it instantiates the list and returns it. % -% The format of the InitializeDelegateList method is: +% The format of the IsDelegateInstantiated method is: % -% MagickBooleanType InitializeDelegateList(ExceptionInfo *exception) +% MagickBooleanType IsDelegateListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeDelegateList(ExceptionInfo *exception) +static MagickBooleanType IsDelegateListInstantiated(ExceptionInfo *exception) { if (delegate_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&delegate_semaphore); diff --git a/MagickCore/locale.c b/MagickCore/locale.c index ba70de648..e336f4519 100644 --- a/MagickCore/locale.c +++ b/MagickCore/locale.c @@ -104,7 +104,7 @@ static volatile locale_t Forward declarations. */ static MagickBooleanType - InitializeLocaleList(ExceptionInfo *), + IsLocaleTreeInstantiated(ExceptionInfo *), LoadLocaleLists(const char *,const char *,ExceptionInfo *); #if defined(MAGICKCORE_HAVE_STRTOD_L) @@ -421,9 +421,8 @@ MagickExport const LocaleInfo *GetLocaleInfo_(const char *tag, ExceptionInfo *exception) { assert(exception != (ExceptionInfo *) NULL); - if (locale_list == (SplayTreeInfo *) NULL) - if (InitializeLocaleList(exception) == MagickFalse) - return((const LocaleInfo *) NULL); + if (IsLocaleTreeInstantiated(exception) == MagickFalse) + return((const LocaleInfo *) NULL); if ((tag == (const char *) NULL) || (LocaleCompare(tag,"*") == 0)) { ResetSplayTreeIterator(locale_list); @@ -787,24 +786,25 @@ MagickExport const char *GetLocaleValue(const LocaleInfo *locale_info) % % % % % % -+ I n i t i a l i z e L o c a l e L i s t % ++ I s L o c a l e T r e e I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeLocaleList() initializes the locale list. +% IsLocaleTreeInstantiated() determines if the locale tree is instantiated. +% If not, it instantiates the tree and returns it. % -% The format of the InitializeLocaleList method is: +% The format of the IsLocaleInstantiated method is: % -% MagickBooleanType InitializeLocaleList(ExceptionInfo *exception) +% MagickBooleanType IsLocaleTreeInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeLocaleList(ExceptionInfo *exception) +static MagickBooleanType IsLocaleTreeInstantiated(ExceptionInfo *exception) { if (locale_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&locale_semaphore); diff --git a/MagickCore/log.c b/MagickCore/log.c index c2f19cd2f..e71cc6392 100644 --- a/MagickCore/log.c +++ b/MagickCore/log.c @@ -196,7 +196,7 @@ static LogInfo *GetLogInfo(const char *,ExceptionInfo *); static MagickBooleanType - InitializeLogList(ExceptionInfo *), + IsLogListInstantiated(ExceptionInfo *), LoadLogLists(const char *,ExceptionInfo *); /* @@ -271,9 +271,8 @@ static LogInfo *GetLogInfo(const char *name,ExceptionInfo *exception) *p; assert(exception != (ExceptionInfo *) NULL); - if (log_list == (LinkedListInfo *) NULL) - if (InitializeLogList(exception) == MagickFalse) - return((LogInfo *) NULL); + if (IsLogListInstantiated(exception) == MagickFalse) + return((LogInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) return((LogInfo *) GetValueFromLinkedList(log_list,0)); /* @@ -510,24 +509,25 @@ MagickExport const char *GetLogName(void) % % % % % % -+ I n i t i a l i z e L o g L i s t % ++ I s L o g L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeLogList() initialize the log list. +% IsLogListInstantiated() determines if the log list is instantiated. If not, +% it instantiates the list and returns it. % -% The format of the InitializeLogList method is: +% The format of the IsLogInstantiated method is: % -% MagickBooleanType InitializeLogList(ExceptionInfo *exception) +% MagickBooleanType IsLogListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeLogList(ExceptionInfo *exception) +static MagickBooleanType IsLogListInstantiated(ExceptionInfo *exception) { if (log_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&log_semaphore); diff --git a/MagickCore/magic.c b/MagickCore/magic.c index 242a4085f..77864e958 100644 --- a/MagickCore/magic.c +++ b/MagickCore/magic.c @@ -213,7 +213,7 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - InitializeMagicList(ExceptionInfo *), + IsMagicListInstantiated(ExceptionInfo *), LoadMagicLists(const char *,ExceptionInfo *); /* @@ -252,9 +252,8 @@ MagickExport const MagicInfo *GetMagicInfo(const unsigned char *magic, *p; assert(exception != (ExceptionInfo *) NULL); - if (magic_list == (LinkedListInfo *) NULL) - if (InitializeMagicList(exception) == MagickFalse) - return((const MagicInfo *) NULL); + if (IsMagicListInstantiated(exception) == MagickFalse) + return((const MagicInfo *) NULL); if (magic == (const unsigned char *) NULL) return((const MagicInfo *) GetValueFromLinkedList(magic_list,0)); if (length == 0) @@ -503,24 +502,25 @@ MagickExport const char *GetMagicName(const MagicInfo *magic_info) % % % % % % -+ I n i t i a l i z e M a g i c L i s t % ++ I s M a g i c L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeMagicList() initializes the magic list. +% IsMagicListInstantiated() determines if the magic list is instantiated. +% If not, it instantiates the list and returns it. % -% The format of the InitializeMagicList method is: +% The format of the IsMagicInstantiated method is: % -% MagickBooleanType InitializeMagicList(ExceptionInfo *exception) +% MagickBooleanType IsMagicListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeMagicList(ExceptionInfo *exception) +static MagickBooleanType IsMagicListInstantiated(ExceptionInfo *exception) { if (magic_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&magic_semaphore); diff --git a/MagickCore/magick.c b/MagickCore/magick.c index e59d6e92f..9d1ef3c86 100644 --- a/MagickCore/magick.c +++ b/MagickCore/magick.c @@ -127,7 +127,7 @@ static volatile MagickBooleanType Forward declarations. */ static MagickBooleanType - InitializeMagickList(ExceptionInfo *); + IsMagickTreeInstantiated(ExceptionInfo *); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -412,9 +412,8 @@ MagickExport const MagickInfo *GetMagickInfo(const char *name, *p; assert(exception != (ExceptionInfo *) NULL); - if (magick_list == (SplayTreeInfo *) NULL) - if (InitializeMagickList(exception) == MagickFalse) - return((const MagickInfo *) NULL); + if (IsMagickTreeInstantiated(exception) == MagickFalse) + return((const MagickInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) { #if defined(MAGICKCORE_MODULES_SUPPORT) @@ -796,17 +795,18 @@ MagickExport MagickStatusType GetMagickThreadSupport( % % % % % % -+ I n i t i a l i z e M a g i c k L i s t % ++ I s M a g i c k T r e e I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeMagickList() initializes the magick list. +% IsMagickTreeInstantiated() determines if the magick tree is instantiated. +% If not, it instantiates the tree and returns it. % -% The format of the InitializeMagickList() method is: +% The format of the IsMagickTreeInstantiated() method is: % -% InitializeMagickList(Exceptioninfo *exception) +% IsMagickTreeInstantiated(Exceptioninfo *exception) % % A description of each parameter follows. % @@ -835,7 +835,7 @@ static void *DestroyMagickNode(void *magick_info) return(RelinquishMagickMemory(p)); } -static MagickBooleanType InitializeMagickList(ExceptionInfo *exception) +static MagickBooleanType IsMagickTreeInstantiated(ExceptionInfo *exception) { (void) exception; if (magick_semaphore == (SemaphoreInfo *) NULL) diff --git a/MagickCore/mime.c b/MagickCore/mime.c index 778402041..414e8f2ae 100644 --- a/MagickCore/mime.c +++ b/MagickCore/mime.c @@ -124,7 +124,7 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - InitializeMimeList(ExceptionInfo *); + IsMimeListInstantiated(ExceptionInfo *); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -184,9 +184,8 @@ MagickExport const MimeInfo *GetMimeInfo(const char *filename, value; assert(exception != (ExceptionInfo *) NULL); - if (mime_list == (LinkedListInfo *) NULL) - if (InitializeMimeList(exception) == MagickFalse) - return((const MimeInfo *) NULL); + if (IsMimeListInstantiated(exception) == MagickFalse) + return((const MimeInfo *) NULL); if ((magic == (const unsigned char *) NULL) || (length == 0)) return((const MimeInfo *) GetValueFromLinkedList(mime_list,0)); if (length == 0) @@ -578,24 +577,25 @@ MagickExport const char *GetMimeType(const MimeInfo *mime_info) % % % % % % -+ I n i t i a l i z e M i m e L i s t % ++ I s M i m e L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeMimeList() initializes the mime list. +% IsMimeListInstantiated() determines if the mime list is instantiated. If +% not, it instantiates the list and returns it. % -% The format of the InitializeMimeList method is: +% The format of the IsMimeInstantiated method is: % -% MagickBooleanType InitializeMimeList(ExceptionInfo *exception) +% MagickBooleanType IsMimeListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializeMimeList(ExceptionInfo *exception) +static MagickBooleanType IsMimeListInstantiated(ExceptionInfo *exception) { if (mime_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&mime_semaphore); diff --git a/MagickCore/module.c b/MagickCore/module.c index c4364b21e..611d2d626 100644 --- a/MagickCore/module.c +++ b/MagickCore/module.c @@ -102,7 +102,7 @@ static const ModuleInfo static MagickBooleanType GetMagickModulePath(const char *,MagickModuleType,char *,ExceptionInfo *), - InitializeModuleList(ExceptionInfo *), + IsModuleTreeInstantiated(ExceptionInfo *), UnregisterModule(const ModuleInfo *,ExceptionInfo *); static void @@ -215,9 +215,8 @@ MagickExport void DestroyModuleList(void) */ MagickExport ModuleInfo *GetModuleInfo(const char *tag,ExceptionInfo *exception) { - if (module_list == (SplayTreeInfo *) NULL) - if (InitializeModuleList(exception) == MagickFalse) - return((ModuleInfo *) NULL); + if (IsModuleTreeInstantiated(exception) == MagickFalse) + return((ModuleInfo *) NULL); if ((tag == (const char *) NULL) || (LocaleCompare(tag,"*") == 0)) { ModuleInfo @@ -810,17 +809,18 @@ static MagickBooleanType GetMagickModulePath(const char *filename, % % % % % % -% I n i t i a l i z e M o d u l e L i s t % +% I s M o d u l e T r e e I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeModuleList() initializes the module loader. +% IsModuleTreeInstantiated() determines if the module tree is instantiated. +% If not, it instantiates the tree and returns it. % -% The format of the InitializeModuleList() method is: +% The format of the IsModuleTreeInstantiated() method is: % -% InitializeModuleList(Exceptioninfo *exception) +% IsModuleTreeInstantiated(Exceptioninfo *exception) % % A description of each parameter follows. % @@ -848,7 +848,7 @@ static void *DestroyModuleNode(void *module_info) return(RelinquishMagickMemory(p)); } -static MagickBooleanType InitializeModuleList( +static MagickBooleanType IsModuleTreeInstantiated( ExceptionInfo *magick_unused(exception)) { if (module_semaphore == (SemaphoreInfo *) NULL) @@ -1143,7 +1143,7 @@ MagickPrivate MagickBooleanType ModuleComponentGenesis(void) module_semaphore=AcquireSemaphoreInfo(); exception=AcquireExceptionInfo(); - status=InitializeModuleList(exception); + status=IsModuleTreeInstantiated(exception); exception=DestroyExceptionInfo(exception); return(status); } diff --git a/MagickCore/policy.c b/MagickCore/policy.c index e05907701..201050585 100644 --- a/MagickCore/policy.c +++ b/MagickCore/policy.c @@ -129,7 +129,7 @@ static SemaphoreInfo Forward declarations. */ static MagickBooleanType - InitializePolicyList(ExceptionInfo *), + IsPolicyListInstantiated(ExceptionInfo *), LoadPolicyLists(const char *,ExceptionInfo *); /* @@ -169,9 +169,8 @@ static PolicyInfo *GetPolicyInfo(const char *name,ExceptionInfo *exception) *q; assert(exception != (ExceptionInfo *) NULL); - if (policy_list == (LinkedListInfo *) NULL) - if (InitializePolicyList(exception) == MagickFalse) - return((PolicyInfo *) NULL); + if (IsPolicyListInstantiated(exception) == MagickFalse) + return((PolicyInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) return((PolicyInfo *) GetValueFromLinkedList(policy_list,0)); /* @@ -399,24 +398,25 @@ MagickExport char *GetPolicyValue(const char *name) % % % % % % -+ I n i t i a l i z e P o l i c y L i s t % ++ I s P o l i c y L i s t I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializePolicyList() initializes the policy list. +% IsPolicyListInstantiated() determines if the policy list is instantiated. +% If not, it instantiates the list and returns it. % -% The format of the InitializePolicyList method is: +% The format of the IsPolicyInstantiated method is: % -% MagickBooleanType InitializePolicyList(ExceptionInfo *exception) +% MagickBooleanType IsPolicyListInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % % o exception: return any errors or warnings in this structure. % */ -static MagickBooleanType InitializePolicyList(ExceptionInfo *exception) +static MagickBooleanType IsPolicyListInstantiated(ExceptionInfo *exception) { if (policy_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&policy_semaphore); diff --git a/MagickCore/type.c b/MagickCore/type.c index cffd6738c..59e5eb9c8 100644 --- a/MagickCore/type.c +++ b/MagickCore/type.c @@ -124,7 +124,7 @@ static SplayTreeInfo Forward declarations. */ static MagickBooleanType - InitializeTypeList(ExceptionInfo *), + IsTypeTreeInstantiated(ExceptionInfo *), LoadTypeLists(const char *,ExceptionInfo *); /* @@ -156,9 +156,8 @@ MagickExport const TypeInfo *GetTypeInfo(const char *name, ExceptionInfo *exception) { assert(exception != (ExceptionInfo *) NULL); - if (type_list == (SplayTreeInfo *) NULL) - if (InitializeTypeList(exception) == MagickFalse) - return((const TypeInfo *) NULL); + if (IsTypeTreeInstantiated(exception) == MagickFalse) + return((const TypeInfo *) NULL); if ((name == (const char *) NULL) || (LocaleCompare(name,"*") == 0)) { ResetSplayTreeIterator(type_list); @@ -593,17 +592,18 @@ MagickExport char **GetTypeList(const char *pattern,size_t *number_fonts, % % % % % % -+ I n i t i a l i z e T y p e L i s t % ++ I s T y p e T r e e I n s t a n t i a t e d % % % % % % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % -% InitializeTypeList() initializes the type list. +% IsTypeTreeInstantiated() etermines if the type tree is instantiated. If +% not, it instantiates the tree and returns it. % -% The format of the InitializeTypeList method is: +% The format of the IsTypeInstantiated method is: % -% MagickBooleanType InitializeTypeList(ExceptionInfo *exception) +% MagickBooleanType IsTypeTreeInstantiated(ExceptionInfo *exception) % % A description of each parameter follows. % @@ -773,7 +773,7 @@ MagickExport MagickBooleanType LoadFontConfigFonts(SplayTreeInfo *type_list, } #endif -static MagickBooleanType InitializeTypeList(ExceptionInfo *exception) +static MagickBooleanType IsTypeTreeInstantiated(ExceptionInfo *exception) { if (type_semaphore == (SemaphoreInfo *) NULL) ActivateSemaphoreInfo(&type_semaphore); -- 2.40.0