Added missing checks for MAGICKCORE_ZERO_CONFIGURATION_SUPPORT.
diff --git a/MagickCore/coder.c b/MagickCore/coder.c
index d8907f0..bb2a3d2 100644
--- a/MagickCore/coder.c
+++ b/MagickCore/coder.c
@@ -322,12 +322,6 @@
static SplayTreeInfo *AcquireCoderCache(const char *filename,
ExceptionInfo *exception)
{
- const StringInfo
- *option;
-
- LinkedListInfo
- *options;
-
MagickStatusType
status;
@@ -335,25 +329,35 @@
i;
SplayTreeInfo
- *coder_cache;
+ *cache;
/*
Load external coder map.
*/
- coder_cache=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,
+ cache=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory,
DestroyCoderNode);
- if (coder_cache == (SplayTreeInfo *) NULL)
+ if (cache == (SplayTreeInfo *) NULL)
ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed");
status=MagickTrue;
- options=GetConfigureOptions(filename,exception);
- option=(const StringInfo *) GetNextValueInLinkedList(options);
- while (option != (const StringInfo *) NULL)
+#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT)
{
- status&=LoadCoderCache(coder_cache,(const char *)
- GetStringInfoDatum(option),GetStringInfoPath(option),0,exception);
+ const StringInfo
+ *option;
+
+ LinkedListInfo
+ *options;
+
+ options=GetConfigureOptions(filename,exception);
option=(const StringInfo *) GetNextValueInLinkedList(options);
+ while (option != (const StringInfo *) NULL)
+ {
+ status&=LoadCoderCache(cache,(const char *) GetStringInfoDatum(option),
+ GetStringInfoPath(option),0,exception);
+ option=(const StringInfo *) GetNextValueInLinkedList(options);
+ }
+ options=DestroyConfigureOptions(options);
}
- options=DestroyConfigureOptions(options);
+#endif
/*
Load built-in coder map.
*/
@@ -379,13 +383,13 @@
coder_info->name=(char *) p->name;
coder_info->exempt=MagickTrue;
coder_info->signature=MagickCoreSignature;
- status&=AddValueToSplayTree(coder_cache,ConstantString(coder_info->magick),
+ status&=AddValueToSplayTree(cache,ConstantString(coder_info->magick),
coder_info);
if (status == MagickFalse)
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",coder_info->name);
}
- return(coder_cache);
+ return(cache);
}
/*
@@ -788,9 +792,8 @@
%
% The format of the LoadCoderCache coder is:
%
-% MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
-% const char *xml,const char *filename,const size_t depth,
-% ExceptionInfo *exception)
+% MagickBooleanType LoadCoderCache(SplayTreeInfo *cache,const char *xml,
+% const char *filename,const size_t depth,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
@@ -803,9 +806,8 @@
% o exception: return any errors or warnings in this structure.
%
*/
-static MagickBooleanType LoadCoderCache(SplayTreeInfo *coder_cache,
- const char *xml,const char *filename,const size_t depth,
- ExceptionInfo *exception)
+static MagickBooleanType LoadCoderCache(SplayTreeInfo *cache,const char *xml,
+ const char *filename,const size_t depth,ExceptionInfo *exception)
{
char
keyword[MagickPathExtent],
@@ -895,7 +897,7 @@
file_xml=FileToXML(path,~0UL);
if (file_xml != (char *) NULL)
{
- status&=LoadCoderCache(coder_cache,file_xml,path,depth+1,
+ status&=LoadCoderCache(cache,file_xml,path,depth+1,
exception);
file_xml=DestroyString(file_xml);
}
@@ -922,8 +924,8 @@
continue;
if (LocaleCompare(keyword,"/>") == 0)
{
- status=AddValueToSplayTree(coder_cache,ConstantString(
- coder_info->magick),coder_info);
+ status=AddValueToSplayTree(cache,ConstantString(coder_info->magick),
+ coder_info);
if (status == MagickFalse)
(void) ThrowMagickException(exception,GetMagickModule(),
ResourceLimitError,"MemoryAllocationFailed","`%s'",