]> granicus.if.org Git - imagemagick/blobdiff - MagickCore/locale.c
(no commit message)
[imagemagick] / MagickCore / locale.c
index 8e905909830a536b49b641fde449d9b0e50d77ca..511ea83751b6636d03259082a2c6758ddce20ed7 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 2003                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -50,6 +50,7 @@
 #include "MagickCore/locale-private.h"
 #include "MagickCore/log.h"
 #include "MagickCore/memory_.h"
+#include "MagickCore/nt-base-private.h"
 #include "MagickCore/semaphore.h"
 #include "MagickCore/splay-tree.h"
 #include "MagickCore/string_.h"
@@ -747,7 +748,7 @@ MagickExport LinkedListInfo *GetLocaleOptions(const char *filename,
       {
         xml=AcquireStringInfo(0);
         SetStringInfoLength(xml,strlen(blob)+1);
-        SetStringInfoDatum(xml,blob);
+        SetStringInfoDatum(xml,(unsigned char *) blob);
         SetStringInfoPath(xml,filename);
         (void) AppendValueToLinkedList(messages,xml);
       }
@@ -1167,7 +1168,7 @@ static MagickBooleanType LoadLocaleList(const char *xml,const char *filename,
             {
               if (depth > 200)
                 (void) ThrowMagickException(exception,GetMagickModule(),
-                  ConfigureError,"IncludeElementNestedTooDeeply","`%s'",token);
+                  ConfigureError,"IncludeElementNestedTooDeeply","'%s'",token);
               else
                 {
                   char
@@ -1255,7 +1256,7 @@ static MagickBooleanType LoadLocaleList(const char *xml,const char *filename,
         status=AddValueToSplayTree(locale_list,locale_info->tag,locale_info);
         if (status == MagickFalse)
           (void) ThrowMagickException(exception,GetMagickModule(),
-            ResourceLimitError,"MemoryAllocationFailed","`%s'",
+            ResourceLimitError,"MemoryAllocationFailed","'%s'",
             locale_info->tag);
         (void) ConcatenateMagickString(tag,message,MaxTextExtent);
         (void) ConcatenateMagickString(tag,"\n",MaxTextExtent);
@@ -1417,6 +1418,8 @@ MagickPrivate void LocaleComponentTerminus(void)
   if (locale_semaphore == (SemaphoreInfo *) NULL)
     AcquireSemaphoreInfo(&locale_semaphore);
   LockSemaphoreInfo(locale_semaphore);
+  if (locale_list != (SplayTreeInfo *) NULL)
+    locale_list=DestroySplayTree(locale_list);
 #if defined(MAGICKCORE_HAVE_STRTOD_L)
   DestroyCLocale();
 #endif