From e2939a45b48ad8f890ac05709f230aa9e5ae1dbc Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Thu, 4 Oct 2018 23:20:08 +0200 Subject: [PATCH] Adding coder headers with coder.xml will no longer be supported. --- ChangeLog | 1 + MagickCore/coder.c | 239 +----------------------------------------- MagickCore/coder.h | 4 +- Make.com | 1 - Makefile.in | 2 - QuickStart.txt | 2 +- config/ImageMagick.rc | 19 ++-- config/Makefile.am | 2 - 8 files changed, 17 insertions(+), 253 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0b451cb5f..1b742279e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,6 @@ 2018-10-04 7.0.8-13 Dirk Lemstra * Adding coder headers with magic.xml will no longer be supported. + * Adding coder aliases with coder.xml will no longer be supported. 2018-09-16 7.0.8-12 Cristy * Release ImageMagick version 7.0.8-12, GIT revision 14843:cb5cf1959:20180923 diff --git a/MagickCore/coder.c b/MagickCore/coder.c index d798e9382..e190b422e 100644 --- a/MagickCore/coder.c +++ b/MagickCore/coder.c @@ -62,11 +62,6 @@ #include "MagickCore/xml-tree.h" #include "MagickCore/xml-tree-private.h" -/* - Define declarations. -*/ -#define MagickCoderFilename "coder.xml" - /* Typedef declarations. */ @@ -270,9 +265,7 @@ static SplayTreeInfo Forward declarations. */ static MagickBooleanType - IsCoderTreeInstantiated(ExceptionInfo *), - LoadCoderCache(SplayTreeInfo *,const char *,const char *,const size_t, - ExceptionInfo *); + IsCoderTreeInstantiated(ExceptionInfo *); /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -319,8 +312,7 @@ static void *DestroyCoderNode(void *coder_info) return(RelinquishMagickMemory(p)); } -static SplayTreeInfo *AcquireCoderCache(const char *filename, - ExceptionInfo *exception) +static SplayTreeInfo *AcquireCoderCache(ExceptionInfo *exception) { MagickStatusType status; @@ -332,33 +324,11 @@ static SplayTreeInfo *AcquireCoderCache(const char *filename, *cache; /* - Load external coder map. + Load built-in coder map. */ cache=NewSplayTree(CompareSplayTreeString,RelinquishMagickMemory, DestroyCoderNode); status=MagickTrue; -#if !defined(MAGICKCORE_ZERO_CONFIGURATION_SUPPORT) - { - 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); - } -#endif - /* - Load built-in coder map. - */ for (i=0; i < (ssize_t) (sizeof(CoderMap)/sizeof(*CoderMap)); i++) { CoderInfo @@ -682,7 +652,7 @@ static MagickBooleanType IsCoderTreeInstantiated(ExceptionInfo *exception) ActivateSemaphoreInfo(&coder_semaphore); LockSemaphoreInfo(coder_semaphore); if (coder_cache == (SplayTreeInfo *) NULL) - coder_cache=AcquireCoderCache(MagickCoderFilename,exception); + coder_cache=AcquireCoderCache(exception); UnlockSemaphoreInfo(coder_semaphore); } return(coder_cache != (SplayTreeInfo *) NULL ? MagickTrue : MagickFalse); @@ -762,204 +732,3 @@ MagickExport MagickBooleanType ListCoderInfo(FILE *file, (void) fflush(file); return(MagickTrue); } - -/* -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% % -% % -% % -+ L o a d C o d e r C a c h e % -% % -% % -% % -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -% -% LoadCoderCache() loads the coder configurations which provides a -% mapping between coder attributes and a coder name. -% -% The format of the LoadCoderCache coder is: -% -% MagickBooleanType LoadCoderCache(SplayTreeInfo *cache,const char *xml, -% const char *filename,const size_t depth,ExceptionInfo *exception) -% -% A description of each parameter follows: -% -% o xml: The coder list in XML format. -% -% o filename: The coder list filename. -% -% o depth: depth of statements. -% -% o exception: return any errors or warnings in this structure. -% -*/ -static MagickBooleanType LoadCoderCache(SplayTreeInfo *cache,const char *xml, - const char *filename,const size_t depth,ExceptionInfo *exception) -{ - char - keyword[MagickPathExtent], - *token; - - const char - *q; - - CoderInfo - *coder_info; - - MagickStatusType - status; - - size_t - extent; - - /* - Load the coder map file. - */ - (void) LogMagickEvent(ConfigureEvent,GetMagickModule(), - "Loading coder configuration file \"%s\" ...",filename); - if (xml == (const char *) NULL) - return(MagickFalse); - status=MagickTrue; - coder_info=(CoderInfo *) NULL; - token=AcquireString(xml); - extent=strlen(token)+MagickPathExtent; - for (q=(char *) xml; *q != '\0'; ) - { - /* - Interpret XML. - */ - GetNextToken(q,&q,extent,token); - if (*token == '\0') - break; - (void) CopyMagickString(keyword,token,MagickPathExtent); - if (LocaleNCompare(keyword,"",2) != 0) && (*q != '\0')) - GetNextToken(q,&q,extent,token); - continue; - } - if (LocaleNCompare(keyword,"