]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 19 May 2011 16:55:47 +0000 (16:55 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 19 May 2011 16:55:47 +0000 (16:55 +0000)
156 files changed:
Magick++/lib/Geometry.cpp
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Include.h
Magick++/lib/Options.cpp
Makefile.in
PerlMagick/Magick.xs
coders/braille.c
coders/cals.c
coders/caption.c
coders/cin.c
coders/cip.c
coders/clip.c
coders/dcm.c
coders/debug.c
coders/dng.c
coders/dot.c
coders/dpx.c
coders/ept.c
coders/fits.c
coders/gif.c
coders/hdr.c
coders/histogram.c
coders/html.c
coders/jbig.c
coders/jp2.c
coders/jpeg.c
coders/label.c
coders/magick.c
coders/mat.c
coders/matte.c
coders/meta.c
coders/miff.c
coders/mpc.c
coders/mpeg.c
coders/msl.c
coders/mtv.c
coders/pcd.c
coders/pcl.c
coders/pdf.c
coders/pes.c
coders/pict.c
coders/plasma.c
coders/png.c
coders/pnm.c
coders/preview.c
coders/ps.c
coders/ps2.c
coders/ps3.c
coders/psd.c
coders/pwp.c
coders/sct.c
coders/svg.c
coders/thumbnail.c
coders/tiff.c
coders/ttf.c
coders/txt.c
coders/uil.c
coders/vicar.c
coders/vid.c
coders/wmf.c
coders/wpg.c
coders/xbm.c
coders/xpm.c
coders/xps.c
config/config.h.in
config/configure.xml
configure
configure.ac
filters/analyze.c
magick/Makefile.am
magick/accelerate.c
magick/animate.c
magick/annotate.c
magick/blob.c
magick/cache.c
magick/coder.c
magick/color.c
magick/colorspace.c
magick/configure.c
magick/delegate.c
magick/deprecate.c
magick/deprecate.h
magick/display.c
magick/distort.c
magick/draw.c
magick/effect.c
magick/enhance.c
magick/exception.c
magick/fx.c
magick/geometry.c
magick/histogram.c
magick/identify.c
magick/image.c
magick/image.h
magick/layer.c
magick/locale-private.h [deleted file]
magick/locale.c
magick/locale_.h
magick/log.c
magick/mac.c
magick/magic.c
magick/magick-config.h
magick/magick.c
magick/methods.h
magick/mime.c
magick/module.c
magick/monitor-private.h
magick/montage.c
magick/morphology.c
magick/nt-base.c
magick/nt-base.h
magick/option.c
magick/policy.c
magick/profile.c
magick/property.c
magick/quantum.c
magick/resample.c
magick/resize.c
magick/resource.c
magick/segment.c
magick/semaphore.c
magick/string-private.h
magick/string.c
magick/string_.h
magick/threshold.c
magick/token.c
magick/type.c
magick/utility.c
magick/version.c
magick/version.h
magick/vms.c
magick/widget.c
magick/xml-tree.c
magick/xwindow.c
tests/validate.c
wand/animate.c
wand/compare.c
wand/composite.c
wand/conjure.c
wand/convert.c
wand/deprecate.c
wand/display.c
wand/drawing-wand.c
wand/drawtest.c
wand/identify.c
wand/import.c
wand/magick-image.c
wand/magick-property.c
wand/magick-wand.c
wand/mogrify.c
wand/montage.c
wand/pixel-iterator.c
wand/pixel-wand.c
wand/stream.c
wand/wand-view.c
wand/wandtest.c

index e40615882d8f29d9048e03542f8ac184ee3f3236..23b4a9308f7d3ecca72ae3db1d890e25a420f4e4 100644 (file)
@@ -286,13 +286,13 @@ Magick::Geometry::operator std::string() const
 
   if ( _width )
     {
-      FormatMagickString( buffer, MaxTextExtent, "%.20g", (double) _width );
+      FormatLocaleString( buffer, MaxTextExtent, "%.20g", (double) _width );
       geometry += buffer;
     }
 
   if ( _height )
     {
-      FormatMagickString( buffer, MaxTextExtent, "%.20g",  (double) _height);
+      FormatLocaleString( buffer, MaxTextExtent, "%.20g",  (double) _height);
       geometry += 'x';
       geometry +=  buffer;
     }
@@ -304,7 +304,7 @@ Magick::Geometry::operator std::string() const
       else
         geometry += '+';
 
-      FormatMagickString( buffer, MaxTextExtent, "%.20g", (double) _xOff);
+      FormatLocaleString( buffer, MaxTextExtent, "%.20g", (double) _xOff);
       geometry += buffer;
 
       if ( _yNegative )
@@ -312,7 +312,7 @@ Magick::Geometry::operator std::string() const
       else
         geometry += '+';
 
-      FormatMagickString( buffer, MaxTextExtent, "%.20g", (double) _yOff);
+      FormatLocaleString( buffer, MaxTextExtent, "%.20g", (double) _yOff);
       geometry += buffer;
     }
 
index d4ccc77245d953a3d0eae648e14a73a3d21ab931..17cec1e0ef7a19cb445bd1e1a6d16138edb3b97d 100644 (file)
@@ -410,7 +410,7 @@ void Magick::Image::annotate ( const std::string &text_,
   if ( boundingArea_.isValid() ){
     if ( boundingArea_.width() == 0 || boundingArea_.height() == 0 )
       {
-        FormatMagickString( boundingArea, MaxTextExtent, "%+.20g%+.20g",
+        FormatLocaleString( boundingArea, MaxTextExtent, "%+.20g%+.20g",
           (double) boundingArea_.xOff(), (double) boundingArea_.yOff() );
       }
     else
@@ -593,7 +593,7 @@ void Magick::Image::colorize ( const unsigned int opacityRed_,
   }
 
   char opacity[MaxTextExtent];
-  FormatMagickString(opacity,MaxTextExtent,"%u/%u/%u",opacityRed_,opacityGreen_,opacityBlue_);
+  FormatLocaleString(opacity,MaxTextExtent,"%u/%u/%u",opacityRed_,opacityGreen_,opacityBlue_);
 
   ExceptionInfo exceptionInfo;
   GetExceptionInfo( &exceptionInfo );
@@ -1137,7 +1137,7 @@ void Magick::Image::fx ( const std::string expression,
 void Magick::Image::gamma ( const double gamma_ )
 {
   char gamma[MaxTextExtent + 1];
-  FormatMagickString( gamma, MaxTextExtent, "%3.6f", gamma_);
+  FormatLocaleString( gamma, MaxTextExtent, "%3.6f", gamma_);
 
   modifyImage();
   GammaImage ( image(), gamma );
@@ -1148,7 +1148,7 @@ void Magick::Image::gamma ( const double gammaRed_,
                            const double gammaBlue_ )
 {
   char gamma[MaxTextExtent + 1];
-  FormatMagickString( gamma, MaxTextExtent, "%3.6f/%3.6f/%3.6f/",
+  FormatLocaleString( gamma, MaxTextExtent, "%3.6f/%3.6f/%3.6f/",
                gammaRed_, gammaGreen_, gammaBlue_);
 
   modifyImage();
@@ -1245,7 +1245,7 @@ void Magick::Image::level ( const double black_point,
 {
   modifyImage();
   char levels[MaxTextExtent];
-  FormatMagickString( levels, MaxTextExtent, "%g,%g,%g",black_point,white_point,gamma);
+  FormatLocaleString( levels, MaxTextExtent, "%g,%g,%g",black_point,white_point,gamma);
   (void) LevelImage( image(), levels );
   throwImageException();
 }
@@ -1343,7 +1343,7 @@ void Magick::Image::modulate ( const double brightness_,
                               const double hue_ )
 {
   char modulate[MaxTextExtent + 1];
-  FormatMagickString( modulate, MaxTextExtent, "%3.6f,%3.6f,%3.6f",
+  FormatLocaleString( modulate, MaxTextExtent, "%3.6f,%3.6f,%3.6f",
                brightness_, saturation_, hue_);
 
   modifyImage();
index f7d2e37797cc50e28b7112190b0fafc00dfc378d..939bd61c5225826da5843beb93b5136a7567c0ad 100644 (file)
@@ -712,7 +712,7 @@ namespace Magick
   using MagickCore::FlipImage;
   using MagickCore::FloodfillPaintImage;
   using MagickCore::FlopImage;
-  using MagickCore::FormatMagickString;
+  using MagickCore::FormatLocaleString;
   using MagickCore::ForwardFourierTransformImage;
   using MagickCore::FrameImage;
   using MagickCore::FrameInfo;
index 1d44072742ae3403891c3c5e26b92d1aa6fd2e3c..04fe1053e160b2a7cd2401d215857cb2e26f36e1 100644 (file)
@@ -357,7 +357,7 @@ void Magick::Options::magick ( const std::string &magick_ )
 {
   ExceptionInfo exception;
 
-  FormatMagickString( _imageInfo->filename, MaxTextExtent, "%.1024s:", magick_.c_str() );
+  FormatLocaleString( _imageInfo->filename, MaxTextExtent, "%.1024s:", magick_.c_str() );
   GetExceptionInfo(&exception);
   SetImageInfo( _imageInfo, 1, &exception);
   if ( *_imageInfo->magick == '\0' )
index 9940bb1ebed4c3941d1025f29e6f4030112c9264..d5612f95ac8a373d052cafeff331f25fa811cf9a 100644 (file)
@@ -1390,14 +1390,14 @@ am__magick_libMagickCore_la_SOURCES_DIST = magick/ImageMagick.h \
        magick/image.h magick/image-private.h magick/image-view.c \
        magick/image-view.h magick/layer.c magick/layer.h \
        magick/list.c magick/list.h magick/locale.c magick/locale_.h \
-       magick/locale-private.h magick/log.c magick/log.h magick/mac.h \
-       magick/magic.c magick/magic.h magick/magick.c \
-       magick/magick-config.h magick/magick-type.h magick/magick.h \
-       magick/matrix.c magick/matrix.h magick/memory.c \
-       magick/memory_.h magick/methods.h magick/mime.c magick/mime.h \
-       magick/module.c magick/module.h magick/monitor.c \
-       magick/monitor.h magick/monitor-private.h magick/montage.c \
-       magick/montage.h magick/morphology.c magick/morphology.h \
+       magick/log.c magick/log.h magick/mac.h magick/magic.c \
+       magick/magic.h magick/magick.c magick/magick-config.h \
+       magick/magick-type.h magick/magick.h magick/matrix.c \
+       magick/matrix.h magick/memory.c magick/memory_.h \
+       magick/methods.h magick/mime.c magick/mime.h magick/module.c \
+       magick/module.h magick/monitor.c magick/monitor.h \
+       magick/monitor-private.h magick/montage.c magick/montage.h \
+       magick/morphology.c magick/morphology.h \
        magick/morphology-private.h magick/nt-base.h \
        magick/nt-feature.h magick/option.c magick/option.h \
        magick/paint.c magick/paint.h magick/pixel.c magick/pixel.h \
@@ -3933,7 +3933,6 @@ MAGICK_BASE_SRCS = \
        magick/list.h \
        magick/locale.c \
        magick/locale_.h \
-       magick/locale-private.h \
        magick/log.c \
        magick/log.h \
        magick/mac.h \
@@ -4165,7 +4164,6 @@ MAGICK_NOINST_HDRS = \
        magick/exception-private.h \
        magick/fx-private.h \
        magick/image-private.h \
-       magick/locale-private.h \
        magick/mac.h \
        magick/mime-private.h \
        magick/monitor-private.h \
index 5bd21cbc517a652ed106262b94841a60255a2cf2..c77b181dfce48f9c44909a5723b4b06ae9c2ce9f 100644 (file)
@@ -121,7 +121,7 @@ extern "C" {
  \
   if ((exception)->severity != UndefinedException) \
     { \
-      (void) FormatMagickString(message,MaxTextExtent,"Exception %d: %s%s%s%s",\
+      (void) FormatLocaleString(message,MaxTextExtent,"Exception %d: %s%s%s%s",\
         (exception)->severity, (exception)->reason ? \
         GetLocaleExceptionMessage((exception)->severity,(exception)->reason) : \
         "Unknown", (exception)->description ? " (" : "", \
@@ -980,7 +980,7 @@ static struct PackageInfo *GetPackageInfo(pTHX_ void *reference,
   SV
     *sv;
 
-  (void) FormatMagickString(message,MaxTextExtent,"%s::package%s%p",
+  (void) FormatLocaleString(message,MaxTextExtent,"%s::package%s%p",
     PackageName,XS_VERSION,reference);
   sv=perl_get_sv(message,(TRUE | 0x02));
   if (sv == (SV *) NULL)
@@ -1034,7 +1034,7 @@ static double SiPrefixToDouble(const char *string,const double interval)
     scale,
     value;
 
-  value=StringToDouble(string,&q);
+  value=LocaleToDouble(string,&q);
   scale=1000.0;
   if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))
     scale=1024.0;
@@ -1649,7 +1649,7 @@ static void SetAttribute(pTHX_ struct PackageInfo *info,Image *image,
       if (LocaleCompare(attribute,"magick") == 0)
         {
           if (info)
-            (void) FormatMagickString(info->image_info->filename,MaxTextExtent,
+            (void) FormatLocaleString(info->image_info->filename,MaxTextExtent,
               "%s:",SvPV(sval,na));
           for ( ; image; image=image->next)
             (void) CopyMagickString(image->magick,SvPV(sval,na),MaxTextExtent);
@@ -2681,7 +2681,7 @@ Average(ref)
     av_push(av,sv_bless(rv,hv));
     SvREFCNT_dec(sv);
     info=GetPackageInfo(aTHX_ (void *) av,info,exception);
-    (void) FormatMagickString(info->image_info->filename,MaxTextExtent,
+    (void) FormatLocaleString(info->image_info->filename,MaxTextExtent,
       "average-%.*s",(int) (MaxTextExtent-9),
       ((p=strrchr(image->filename,'/')) ? p+1 : image->filename));
     (void) CopyMagickString(image->filename,info->image_info->filename,
@@ -3459,7 +3459,7 @@ DESTROY(ref)
         /*
           Array (AV *) reference
         */
-        (void) FormatMagickString(message,MaxTextExtent,"package%s%p",
+        (void) FormatLocaleString(message,MaxTextExtent,"package%s%p",
           XS_VERSION,reference);
         hv=gv_stashpv(PackageName, FALSE);
         if (!hv)
@@ -3712,7 +3712,7 @@ EvaluateImages(ref)
     av_push(av,sv_bless(rv,hv));
     SvREFCNT_dec(sv);
     info=GetPackageInfo(aTHX_ (void *) av,info,exception);
-    (void) FormatMagickString(info->image_info->filename,MaxTextExtent,
+    (void) FormatLocaleString(info->image_info->filename,MaxTextExtent,
       "evaluate-%.*s",(int) (MaxTextExtent-9),
       ((p=strrchr(image->filename,'/')) ? p+1 : image->filename));
     (void) CopyMagickString(image->filename,info->image_info->filename,
@@ -3754,46 +3754,46 @@ Features(ref,...)
   {
 #define ChannelFeatures(channel,direction) \
 { \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].angular_second_moment[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].contrast[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].contrast[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].variance_sum_of_squares[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].inverse_difference_moment[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].sum_average[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].sum_variance[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].sum_entropy[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].entropy[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].difference_variance[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].difference_entropy[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].measure_of_correlation_1[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].measure_of_correlation_2[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_features[channel].maximum_correlation_coefficient[direction]); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
 }
@@ -4031,7 +4031,7 @@ Flatten(ref)
     av_push(av,sv_bless(rv,hv));
     SvREFCNT_dec(sv);
     info=GetPackageInfo(aTHX_ (void *) av,info,exception);
-    (void) FormatMagickString(info->image_info->filename,MaxTextExtent,
+    (void) FormatLocaleString(info->image_info->filename,MaxTextExtent,
       "flatten-%.*s",(int) (MaxTextExtent-9),
       ((p=strrchr(image->filename,'/')) ? p+1 : image->filename));
     (void) CopyMagickString(image->filename,info->image_info->filename,
@@ -4332,7 +4332,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,QuantumFormat ","
+              (void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
                 QuantumFormat "," QuantumFormat "," QuantumFormat,
                 image->background_color.red,image->background_color.green,
                 image->background_color.blue,image->background_color.opacity);
@@ -4386,7 +4386,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,"%.15g,%.15g",
+              (void) FormatLocaleString(color,MaxTextExtent,"%.15g,%.15g",
                 image->chromaticity.blue_primary.x,
                 image->chromaticity.blue_primary.y);
               s=newSVpv(color,0);
@@ -4397,7 +4397,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,QuantumFormat ","
+              (void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
                 QuantumFormat "," QuantumFormat "," QuantumFormat,
                 image->border_color.red,image->border_color.green,
                 image->border_color.blue,image->border_color.opacity);
@@ -4416,7 +4416,7 @@ Get(ref,...)
               if (image == (Image *) NULL)
                 break;
               page=GetImageBoundingBox(image,&image->exception);
-              (void) FormatMagickString(geometry,MaxTextExtent,
+              (void) FormatLocaleString(geometry,MaxTextExtent,
                 "%.20gx%.20g%+.20g%+.20g",(double) page.width,(double)
                 page.height,(double) page.x,(double) page.y);
               s=newSVpv(geometry,0);
@@ -4522,7 +4522,7 @@ Get(ref,...)
               items=sscanf(attribute,"%*[^[][%ld",&j);
               if (j > (ssize_t) image->colors)
                 j%=image->colors;
-              (void) FormatMagickString(color,MaxTextExtent,QuantumFormat ","
+              (void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
                 QuantumFormat "," QuantumFormat "," QuantumFormat,
                 image->colormap[j].red,image->colormap[j].green,
                 image->colormap[j].blue,image->colormap[j].opacity);
@@ -4568,7 +4568,7 @@ Get(ref,...)
 
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(geometry,MaxTextExtent,"%.15gx%.15g",
+              (void) FormatLocaleString(geometry,MaxTextExtent,"%.15gx%.15g",
                 image->x_resolution,image->y_resolution);
               s=newSVpv(geometry,0);
               PUSHs(s ? sv_2mortal(s) : &sv_undef);
@@ -4760,7 +4760,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,"%.15g,%.15g",
+              (void) FormatLocaleString(color,MaxTextExtent,"%.15g,%.15g",
                 image->chromaticity.green_primary.x,
                 image->chromaticity.green_primary.y);
               s=newSVpv(color,0);
@@ -4831,7 +4831,7 @@ Get(ref,...)
                   static ssize_t
                     id = 0;
 
-                  (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double)
+                  (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double)
                     id);
                   status=SetImageRegistry(ImageRegistryType,key,image,
                     &image->exception);
@@ -4873,7 +4873,7 @@ Get(ref,...)
               if (p != (const PixelPacket *) NULL)
                 {
                   indexes=GetCacheViewVirtualIndexQueue(image_view);
-                  (void) FormatMagickString(name,MaxTextExtent,QuantumFormat,
+                  (void) FormatLocaleString(name,MaxTextExtent,QuantumFormat,
                     GetIndexPixelComponent(indexes));
                   s=newSVpv(name,0);
                   PUSHs(s ? sv_2mortal(s) : &sv_undef);
@@ -4996,7 +4996,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,QuantumFormat ","
+              (void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
                 QuantumFormat "," QuantumFormat "," QuantumFormat,
                 image->matte_color.red,image->matte_color.green,
                 image->matte_color.blue,image->matte_color.opacity);
@@ -5084,7 +5084,7 @@ Get(ref,...)
                   char
                     geometry[MaxTextExtent];
 
-                  (void) FormatMagickString(geometry,MaxTextExtent,
+                  (void) FormatLocaleString(geometry,MaxTextExtent,
                     "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,
                     (double) image->page.height,(double) image->page.x,(double)
                     image->page.y);
@@ -5133,12 +5133,12 @@ Get(ref,...)
               p=GetVirtualPixels(image,x,y,1,1,exception);
               indexes=GetVirtualIndexQueue(image);
               if (image->colorspace != CMYKColorspace)
-                (void) FormatMagickString(tuple,MaxTextExtent,QuantumFormat ","
+                (void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
                   QuantumFormat "," QuantumFormat "," QuantumFormat,
                   GetRedPixelComponent(p),GetGreenPixelComponent(p),
                   GetBluePixelComponent(p),GetOpacityPixelComponent(p));
               else
-                (void) FormatMagickString(tuple,MaxTextExtent,QuantumFormat ","
+                (void) FormatLocaleString(tuple,MaxTextExtent,QuantumFormat ","
                   QuantumFormat "," QuantumFormat "," QuantumFormat ","
                   QuantumFormat,GetRedPixelComponent(p),
                   GetGreenPixelComponent(p),GetBluePixelComponent(p),
@@ -5206,7 +5206,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,"%.15g,%.15g",
+              (void) FormatLocaleString(color,MaxTextExtent,"%.15g,%.15g",
                 image->chromaticity.red_primary.x,
                 image->chromaticity.red_primary.y);
               s=newSVpv(color,0);
@@ -5330,7 +5330,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,QuantumFormat ","
+              (void) FormatLocaleString(color,MaxTextExtent,QuantumFormat ","
                 QuantumFormat "," QuantumFormat "," QuantumFormat,
                 image->transparent_color.red,image->transparent_color.green,
                 image->transparent_color.blue,image->transparent_color.opacity);
@@ -5430,7 +5430,7 @@ Get(ref,...)
             {
               if (image == (Image *) NULL)
                 break;
-              (void) FormatMagickString(color,MaxTextExtent,"%.15g,%.15g",
+              (void) FormatLocaleString(color,MaxTextExtent,"%.15g,%.15g",
                 image->chromaticity.white_point.x,
                 image->chromaticity.white_point.y);
               s=newSVpv(color,0);
@@ -6053,25 +6053,25 @@ Histogram(ref,...)
       EXTEND(sp,6*count);
       for (i=0; i < (ssize_t) number_colors; i++)
       {
-        (void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
+        (void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
           histogram[i].pixel.red);
         PUSHs(sv_2mortal(newSVpv(message,0)));
-        (void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
+        (void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
           histogram[i].pixel.green);
         PUSHs(sv_2mortal(newSVpv(message,0)));
-        (void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
+        (void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
           histogram[i].pixel.blue);
         PUSHs(sv_2mortal(newSVpv(message,0)));
         if (image->colorspace == CMYKColorspace)
           {
-            (void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
+            (void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
               histogram[i].index);
             PUSHs(sv_2mortal(newSVpv(message,0)));
           }
-        (void) FormatMagickString(message,MaxTextExtent,QuantumFormat,
+        (void) FormatLocaleString(message,MaxTextExtent,QuantumFormat,
           histogram[i].pixel.opacity);
         PUSHs(sv_2mortal(newSVpv(message,0)));
-        (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double)
+        (void) FormatLocaleString(message,MaxTextExtent,"%.20g",(double)
           histogram[i].count);
         PUSHs(sv_2mortal(newSVpv(message,0)));
       }
@@ -7472,7 +7472,7 @@ Mogrify(ref,...)
         {
           if (SvTYPE(sv) != SVt_RV)
             {
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "invalid %.60s value",pp->method);
               ThrowPerlException(exception,OptionError,message,SvPV(sv,na));
               goto continue_outer_loop;
@@ -7532,7 +7532,7 @@ Mogrify(ref,...)
             al->integer_reference=ParseChannelOption(SvPV(sv,na));
           if ((al->integer_reference < 0) && ((al->integer_reference=SvIV(sv)) <= 0))
             {
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "invalid %.60s value",pp->method);
               ThrowPerlException(exception,OptionError,message,SvPV(sv,na));
               goto continue_outer_loop;
@@ -7560,7 +7560,7 @@ Mogrify(ref,...)
       {
         default:
         {
-          (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double) ix);
+          (void) FormatLocaleString(message,MaxTextExtent,"%.20g",(double) ix);
           ThrowPerlException(exception,OptionError,
             "UnrecognizedPerlMagickMethod",message);
           goto PerlException;
@@ -8165,7 +8165,7 @@ Mogrify(ref,...)
               char
                 geometry[MaxTextExtent];
 
-              (void) FormatMagickString(geometry,MaxTextExtent,"%+f%+f",
+              (void) FormatLocaleString(geometry,MaxTextExtent,"%+f%+f",
                 (double) argument_list[9].real_reference+draw_info->affine.tx,
                 (double) argument_list[10].real_reference+draw_info->affine.ty);
               (void) CloneString(&draw_info->geometry,geometry);
@@ -8431,7 +8431,7 @@ Mogrify(ref,...)
           /*
             Composite two images (normal composition).
           */
-          (void) FormatMagickString(composite_geometry,MaxTextExtent,
+          (void) FormatLocaleString(composite_geometry,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,
             (double) composite_image->rows,(double) geometry.x,(double)
             geometry.y);
@@ -8738,7 +8738,7 @@ Mogrify(ref,...)
             argument_list[4].real_reference=1.0;
           if (attribute_flag[0] == 0)
             {
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "%.15g,%.15g,%.15g",(double) argument_list[2].real_reference,
                 (double) argument_list[3].real_reference,
                 (double) argument_list[4].real_reference);
@@ -8748,7 +8748,7 @@ Mogrify(ref,...)
             (void) GammaImage(image,argument_list[0].string_reference);
           else
             (void) GammaImageChannel(image,channel,
-              StringToDouble(argument_list[0].string_reference,(char **) NULL));
+              LocaleToDouble(argument_list[0].string_reference,(char **) NULL));
           break;
         }
         case 41:  /* Map */
@@ -8852,7 +8852,7 @@ Mogrify(ref,...)
               (void) SetImageColorspace(image,HWBColorspace);
               geometry_info.rho=argument_list[6].real_reference;
             }
-          (void) FormatMagickString(modulate,MaxTextExtent,"%.15g,%.15g,%.15g",
+          (void) FormatLocaleString(modulate,MaxTextExtent,"%.15g,%.15g,%.15g",
             geometry_info.rho,geometry_info.sigma,geometry_info.xi);
           (void) ModulateImage(image,modulate);
           (void) SetImageColorspace(image,colorspace);
@@ -11916,7 +11916,7 @@ QueryFont(ref,...)
       else
         PUSHs(sv_2mortal(newSVpv(CommandOptionToMnemonic(MagickStretchOptions,
           type_info->stretch),0)));
-      (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(message,MaxTextExtent,"%.20g",(double)
         type_info->weight);
       PUSHs(sv_2mortal(newSVpv(message,0)));
       if (type_info->encoding == (char *) NULL)
@@ -12325,7 +12325,7 @@ QueryFontMetrics(ref,...)
     if (draw_info->geometry == (char *) NULL)
       {
         draw_info->geometry=AcquireString((char *) NULL);
-        (void) FormatMagickString(draw_info->geometry,MaxTextExtent,
+        (void) FormatLocaleString(draw_info->geometry,MaxTextExtent,
           "%.15g,%.15g",x,y);
       }
     status=GetTypeMetrics(image,draw_info,&metrics);
@@ -12698,7 +12698,7 @@ QueryMultilineFontMetrics(ref,...)
     if (draw_info->geometry == (char *) NULL)
       {
         draw_info->geometry=AcquireString((char *) NULL);
-        (void) FormatMagickString(draw_info->geometry,MaxTextExtent,
+        (void) FormatLocaleString(draw_info->geometry,MaxTextExtent,
           "%.15g,%.15g",x,y);
       }
     status=GetMultilineTypeMetrics(image,draw_info,&metrics);
@@ -13337,7 +13337,7 @@ SetPixel(ref,...)
                   char
                     message[MaxTextExtent];
 
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "invalid %.60s value",attribute);
                   ThrowPerlException(exception,OptionError,message,
                     SvPV(ST(i),na));
@@ -13647,25 +13647,25 @@ Statistics(ref,...)
   {
 #define ChannelStatistics(channel) \
 { \
-  (void) FormatMagickString(message,MaxTextExtent,"%.20g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.20g", \
     (double) channel_statistics[channel].depth); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].minima/scale); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].maxima/scale); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].mean/scale); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].standard_deviation/scale); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].kurtosis); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
-  (void) FormatMagickString(message,MaxTextExtent,"%.15g", \
+  (void) FormatLocaleString(message,MaxTextExtent,"%.15g", \
     channel_statistics[channel].skewness); \
   PUSHs(sv_2mortal(newSVpv(message,0))); \
 }
index 91afa1e3c05c971f11345d4f2a69eb76816d2c5d..7976d2787c28e8ca0f5a5dbd2f2ef66e5cea8323 100644 (file)
@@ -224,25 +224,25 @@ static MagickBooleanType WriteBRAILLEImage(const ImageInfo *image_info,
       value=GetImageProperty(image,"label");
       if (value != (const char *) NULL)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"Title: %s\n", value);
+          (void) FormatLocaleString(buffer,MaxTextExtent,"Title: %s\n", value);
           (void) WriteBlobString(image,buffer);
         }
       if (image->page.x != 0)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"X: %.20g\n",(double) 
+          (void) FormatLocaleString(buffer,MaxTextExtent,"X: %.20g\n",(double) 
             image->page.x);
           (void) WriteBlobString(image,buffer);
         }
       if (image->page.y != 0)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"Y: %.20g\n",(double) 
+          (void) FormatLocaleString(buffer,MaxTextExtent,"Y: %.20g\n",(double) 
             image->page.y);
           (void) WriteBlobString(image,buffer);
         }
-      (void) FormatMagickString(buffer,MaxTextExtent,"Width: %.20g\n",(double)
+      (void) FormatLocaleString(buffer,MaxTextExtent,"Width: %.20g\n",(double)
         (image->columns+(image->columns % 2)));
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,"Height: %.20g\n",(double)
+      (void) FormatLocaleString(buffer,MaxTextExtent,"Height: %.20g\n",(double)
         image->rows);
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"\n");
index bba5409e7e7b5d85f1bdb5f45134509dd53b2bea..2801b1c0e9f05bc7863588c21dc8003aaaa4eb8d 100644 (file)
@@ -262,11 +262,11 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
   image=DestroyImage(image);
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"group4:%s",
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"group4:%s",
     filename);
-  (void) FormatMagickString(message,MaxTextExtent,"%lux%lu",width,height);
+  (void) FormatLocaleString(message,MaxTextExtent,"%lux%lu",width,height);
   read_info->size=ConstantString(message);
-  (void) FormatMagickString(message,MaxTextExtent,"%lu",density);
+  (void) FormatLocaleString(message,MaxTextExtent,"%lu",density);
   read_info->density=ConstantString(message);
   read_info->orientation=(OrientationType) orientation;
   image=ReadImage(read_info,exception);
@@ -530,10 +530,10 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
       orient_y=270;
     }
   }
-  (void) FormatMagickString(header,MaxTextExtent,"rorient: %03ld,%03ld",
+  (void) FormatLocaleString(header,MaxTextExtent,"rorient: %03ld,%03ld",
     (long) orient_x,(long) orient_y);
   count=WriteCALSRecord(image,header);
-  (void) FormatMagickString(header,MaxTextExtent,"rpelcnt: %06lu,%06lu",
+  (void) FormatLocaleString(header,MaxTextExtent,"rpelcnt: %06lu,%06lu",
     (unsigned long) image->columns,(unsigned long) image->rows);
   count=WriteCALSRecord(image,header);  
   density=200;
@@ -545,7 +545,7 @@ static MagickBooleanType WriteCALSImage(const ImageInfo *image_info,
       (void) ParseGeometry(image_info->density,&geometry_info);
       density=(size_t) floor(geometry_info.rho+0.5);
     }
-  (void) FormatMagickString(header,MaxTextExtent,"rdensty: %04lu",
+  (void) FormatLocaleString(header,MaxTextExtent,"rdensty: %04lu",
     (unsigned long) density);
   count=WriteCALSRecord(image,header);
   count=WriteCALSRecord(image,"notes: NONE");
index c8532d7056ba2df4780f178d3f372ce5b70c5ef4..3d2280e0d9fee722e81d1f8efd0d86a7fd5f0ca1 100644 (file)
@@ -157,7 +157,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
         i=FormatMagickCaption(image,draw_info,MagickFalse,&metrics,&text);
         (void) CloneString(&draw_info->text,text);
         text=DestroyString(text);
-        (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",
+        (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
           -metrics.bounds.x1,metrics.ascent);
         if (draw_info->gravity == UndefinedGravity)
           (void) CloneString(&draw_info->geometry,geometry);
@@ -176,7 +176,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
         i=FormatMagickCaption(image,draw_info,MagickFalse,&metrics,&text);
         (void) CloneString(&draw_info->text,text);
         text=DestroyString(text);
-        (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",
+        (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
           -metrics.bounds.x1,metrics.ascent);
         if (draw_info->gravity == UndefinedGravity)
           (void) CloneString(&draw_info->geometry,geometry);
@@ -211,7 +211,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
     image->page.x=(ssize_t) (metrics.bounds.x1-draw_info->stroke_width/2.0);
   else
     {
-      (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",
+      (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
         -metrics.bounds.x1+draw_info->stroke_width/2.0,metrics.ascent+
         draw_info->stroke_width/2.0);
       (void) CloneString(&draw_info->geometry,geometry);
index fd2d4bc1e1c06c07dc271ba71375ab97e77fe146..2d426fa73db75d8cc162d521a5ebb69c9f374a6e 100644 (file)
@@ -1057,12 +1057,12 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image)
   cin.origination.x_pitch=0.0f;
   value=GetCINProperty(image_info,image,"dpx:origination.x_pitch");
   if (value != (const char *) NULL)
-    cin.origination.x_pitch=StringToDouble(value,(char **) NULL);
+    cin.origination.x_pitch=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.origination.x_pitch);
   cin.origination.y_pitch=0.0f;
   value=GetCINProperty(image_info,image,"dpx:origination.y_pitch");
   if (value != (const char *) NULL)
-    cin.origination.y_pitch=StringToDouble(value,(char **) NULL);
+    cin.origination.y_pitch=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.origination.y_pitch);
   cin.origination.gamma=image->gamma;
   offset+=WriteBlobFloat(image,cin.origination.gamma);
@@ -1110,7 +1110,7 @@ static MagickBooleanType WriteCINImage(const ImageInfo *image_info,Image *image)
   cin.film.frame_rate=0.0f;
   value=GetCINProperty(image_info,image,"dpx:film.frame_rate");
   if (value != (const char *) NULL)
-    cin.film.frame_rate=StringToDouble(value,(char **) NULL);
+    cin.film.frame_rate=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,cin.film.frame_rate);
   value=GetCINProperty(image_info,image,"dpx:film.frame_id");
   if (value != (const char *) NULL)
index 4f12719f2fb268f1aa62920871330b7d6f563445..142b958c4eca85adfc6a577dd66e43454225fcbd 100644 (file)
@@ -201,30 +201,30 @@ static MagickBooleanType WriteCIPImage(const ImageInfo *image_info,Image *image)
   (void) WriteBlobString(image,"<CiscoIPPhoneImage>\n");
   value=GetImageProperty(image,"label");
   if (value != (const char *) NULL)
-    (void) FormatMagickString(buffer,MaxTextExtent,"<Title>%s</Title>\n",value);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"<Title>%s</Title>\n",value);
   else
     {
       char
         basename[MaxTextExtent];
 
       GetPathComponent(image->filename,BasePath,basename);
-      (void) FormatMagickString(buffer,MaxTextExtent,"<Title>%s</Title>\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"<Title>%s</Title>\n",
         basename);
     }
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "<LocationX>%.20g</LocationX>\n",(double) image->page.x);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "<LocationY>%.20g</LocationY>\n",(double) image->page.y);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"<Width>%.20g</Width>\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"<Width>%.20g</Width>\n",
     (double) (image->columns+(image->columns % 2)));
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"<Height>%.20g</Height>\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"<Height>%.20g</Height>\n",
     (double) image->rows);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"<Depth>2</Depth>\n");
+  (void) FormatLocaleString(buffer,MaxTextExtent,"<Depth>2</Depth>\n");
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"<Data>");
   if (image->colorspace != RGBColorspace)
@@ -241,7 +241,7 @@ static MagickBooleanType WriteCIPImage(const ImageInfo *image_info,Image *image)
          (((size_t) (4*PixelIntensityToQuantum(p+2)/QuantumRange) & 0x03) << 4) |
          (((size_t) (4*PixelIntensityToQuantum(p+1)/QuantumRange) & 0x03) << 2) |
          (((size_t) (4*PixelIntensityToQuantum(p+0)/QuantumRange) & 0x03) << 0));
-      (void) FormatMagickString(buffer,MaxTextExtent,"%02x",byte);
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%02x",byte);
       (void) WriteBlobString(image,buffer);
       p+=4;
     }
@@ -253,7 +253,7 @@ static MagickBooleanType WriteCIPImage(const ImageInfo *image_info,Image *image)
            (((size_t) (4*PixelIntensityToQuantum(p+MagickMin(i,2))/QuantumRange) & 0x03) << 4) |
            (((size_t) (4*PixelIntensityToQuantum(p+MagickMin(i,1))/QuantumRange) & 0x03) << 2) |
            (((size_t) (4*PixelIntensityToQuantum(p+MagickMin(i,0))/QuantumRange) & 0x03) << 0));
-        (void) FormatMagickString(buffer,MaxTextExtent,"%02x",~byte);
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%02x",~byte);
         (void) WriteBlobString(image,buffer);
       }
     status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
index 8d8ae0dfc762cc1d88e6b4c25d6a99d05486582d..632e90a0432c5e1fe446814d58d9a4364b0d8b23 100644 (file)
@@ -170,7 +170,7 @@ static MagickBooleanType WriteCLIPImage(const ImageInfo *image_info,
   write_info=CloneImageInfo(image_info);
   (void) SetImageInfo(write_info,1,&image->exception);
   if (LocaleCompare(write_info->magick,"CLIP") == 0)
-    (void) FormatMagickString(clip_image->filename,MaxTextExtent,"miff:%s",
+    (void) FormatLocaleString(clip_image->filename,MaxTextExtent,"miff:%s",
       write_info->filename);
   status=WriteImage(write_info,clip_image);
   clip_image=DestroyImage(clip_image);
index 9efaf9b9243bcded7d70938abc33c184e978f8ee..906d818351d8a707e61f2c375e348916e312208c 100644 (file)
@@ -3025,17 +3025,17 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           if ((group == (ssize_t) dicom_info[i].group) &&
               (element == (ssize_t) dicom_info[i].element))
             break;
-        (void) fprintf(stdout,"0x%04lX %4ld %s-%s (0x%04lx,0x%04lx)",
+        (void) FormatLocaleFile(stdout,"0x%04lX %4ld %s-%s (0x%04lx,0x%04lx)",
           (unsigned long) image->offset,(long) length,implicit_vr,
           explicit_vr,(unsigned long) group,(unsigned long) element);
         if (dicom_info[i].description != (char *) NULL)
-          (void) fprintf(stdout," %s",dicom_info[i].description);
-        (void) fprintf(stdout,": ");
+          (void) FormatLocaleFile(stdout," %s",dicom_info[i].description);
+        (void) FormatLocaleFile(stdout,": ");
       }
     if ((group == 0x7FE0) && (element == 0x0010))
       {
         if (image_info->verbose != MagickFalse)
-          (void) fprintf(stdout,"\n");
+          (void) FormatLocaleFile(stdout,"\n");
         break;
       }
     /*
@@ -3063,7 +3063,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               count=ReadBlob(image,(size_t) quantum*length,data);
               if (count != (ssize_t) (quantum*length))
                 {
-                  (void) fprintf(stdout,"count=%d quantum=%d length=%d "
+                  (void) FormatLocaleFile(stdout,"count=%d quantum=%d length=%d "
                     "group=%d\n",(int) count,(int) quantum,(int) length,(int)
                     group);
                    ThrowReaderException(CorruptImageError,
@@ -3092,7 +3092,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 group=0;
                 element=0;
                 if (image_info->verbose != MagickFalse)
-                  (void) fprintf(stdout,
+                  (void) FormatLocaleFile(stdout,
                     "Corrupted image - trying explicit format\n");
                 break;
               }
@@ -3101,7 +3101,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               (void) CopyMagickString(transfer_syntax,(char *) data,
                 MaxTextExtent);
             if (image_info->verbose != MagickFalse)
-              (void) fprintf(stdout,"transfer_syntax=%s\n",(const char*)
+              (void) FormatLocaleFile(stdout,"transfer_syntax=%s\n",(const char*)
                 transfer_syntax);
             if (strncmp(transfer_syntax,"1.2.840.10008.1.2",17) == 0)
               {
@@ -3421,7 +3421,7 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
     if (image_info->verbose != MagickFalse)
       {
         if (data == (unsigned char *) NULL)
-          (void) fprintf(stdout,"%d\n",datum);
+          (void) FormatLocaleFile(stdout,"%d\n",datum);
         else
           {
             /*
@@ -3438,15 +3438,15 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 datum=0;
                 for (j=(ssize_t) length-1; j >= 0; j--)
                   datum=(256*datum+data[j]);
-                (void) fprintf(stdout,"%d",datum);
+                (void) FormatLocaleFile(stdout,"%d",datum);
               }
             else
               for (i=0; i < (ssize_t) length; i++)
                 if (isprint((int) data[i]) != MagickFalse)
-                  (void) fprintf(stdout,"%c",data[i]);
+                  (void) FormatLocaleFile(stdout,"%c",data[i]);
                 else
-                  (void) fprintf(stdout,"%c",'.');
-            (void) fprintf(stdout,"\n");
+                  (void) FormatLocaleFile(stdout,"%c",'.');
+            (void) FormatLocaleFile(stdout,"\n");
           }
       }
     if (data != (unsigned char *) NULL)
@@ -3557,10 +3557,10 @@ static Image *ReadDCMImage(const ImageInfo *image_info,ExceptionInfo *exception)
           (void) fputc(c,file);
         }
         (void) fclose(file);
-        (void) FormatMagickString(read_info->filename,MaxTextExtent,
+        (void) FormatLocaleString(read_info->filename,MaxTextExtent,
           "jpeg:%s",filename);
         if (image->compression == JPEG2000Compression)
-          (void) FormatMagickString(read_info->filename,MaxTextExtent,
+          (void) FormatLocaleString(read_info->filename,MaxTextExtent,
             "jp2:%s",filename);
         jpeg_image=ReadImage(read_info,exception);
         if (jpeg_image != (Image *) NULL)
index 434d1c99863d2cb328b5b191e1cecd5836784996..9fe5a3b866c9cb2df6c8239a34765ec8ae03a46f 100644 (file)
@@ -211,7 +211,7 @@ static MagickBooleanType WriteDEBUGImage(const ImageInfo *image_info,
     image->depth=GetImageQuantumDepth(image,MagickTrue);
     if (image->matte != MagickFalse)
       (void) ConcatenateMagickString(colorspace,"a",MaxTextExtent);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "# ImageMagick pixel debugging: %.20g,%.20g,%.20g,%s\n",(double)
       image->columns,(double) image->rows,(double)
       GetQuantumRange(image->depth),colorspace);
@@ -225,18 +225,18 @@ static MagickBooleanType WriteDEBUGImage(const ImageInfo *image_info,
       indexes=GetVirtualIndexQueue(image);
       for (x=0; x < (ssize_t) image->columns; x++)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
           x,(double) y);
         (void) WriteBlobString(image,buffer);
         SetMagickPixelPacket(image,p,indexes+x,&pixel);
-        (void) FormatMagickString(tuple,MaxTextExtent,"%.20g,%.20g,%.20g ",
+        (void) FormatLocaleString(tuple,MaxTextExtent,"%.20g,%.20g,%.20g ",
           (double) pixel.red,(double) pixel.green,(double) pixel.blue);
         if (pixel.colorspace == CMYKColorspace)
           {
             char
               black[MaxTextExtent];
 
-            (void) FormatMagickString(black,MaxTextExtent,",%.20g ",
+            (void) FormatLocaleString(black,MaxTextExtent,",%.20g ",
               (double) pixel.index);
             (void) ConcatenateMagickString(tuple,black,MaxTextExtent);
           }
@@ -245,7 +245,7 @@ static MagickBooleanType WriteDEBUGImage(const ImageInfo *image_info,
             char
               alpha[MaxTextExtent];
 
-            (void) FormatMagickString(alpha,MaxTextExtent,",%.20g ",
+            (void) FormatLocaleString(alpha,MaxTextExtent,",%.20g ",
               (double) (QuantumRange-pixel.opacity));
             (void) ConcatenateMagickString(tuple,alpha,MaxTextExtent);
           }
index a5664baedbf076540c05cd35d810cab467030be3..8937a367880e46a323f3648608de512b4f83f3f0 100644 (file)
@@ -130,14 +130,14 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
   SetImageInfoBlob(read_info,(void *) NULL,0);
   (void) InvokeDelegate(read_info,image,"dng:decode",(char *) NULL,exception);
   image=DestroyImage(image);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"%s.png",
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"%s.png",
     read_info->unique);
   sans_exception=AcquireExceptionInfo();
   image=ReadImage(read_info,sans_exception);
   sans_exception=DestroyExceptionInfo(sans_exception);
   if (image == (Image *) NULL)
     {
-      (void) FormatMagickString(read_info->filename,MaxTextExtent,"%s.ppm",
+      (void) FormatLocaleString(read_info->filename,MaxTextExtent,"%s.ppm",
         read_info->unique);
       image=ReadImage(read_info,exception);
     }
@@ -152,7 +152,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
         *sans;
 
       (void) CopyMagickString(image->magick,read_info->magick,MaxTextExtent);
-      (void) FormatMagickString(filename,MaxTextExtent,"%s.ufraw",
+      (void) FormatLocaleString(filename,MaxTextExtent,"%s.ufraw",
         read_info->unique);
       sans=AcquireExceptionInfo();
       xml=FileToString(filename,MaxTextExtent,sans);
@@ -188,7 +188,7 @@ static Image *ReadDNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 tag=GetXMLTreeTag(next);
                 if (tag == (char *) NULL)
                   tag="unknown";
-                (void) FormatMagickString(property,MaxTextExtent,"dng:%s",tag);
+                (void) FormatLocaleString(property,MaxTextExtent,"dng:%s",tag);
                 content=ConstantString(GetXMLTreeContent(next)); 
                 StripString(content);
                 if ((LocaleCompare(tag,"log") != 0) &&
index 54c5e35d527695add8423816ba96b9baa718bbb4..b978112d8f2a584277ca1b2dcd0f4f6c6e7636fc 100644 (file)
@@ -133,7 +133,7 @@ static Image *ReadDOTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   SetImageInfoBlob(read_info,(void *) NULL,0);
   (void) CopyMagickString(read_info->magick,"SVG",MaxTextExtent);
   (void) AcquireUniqueFilename(read_info->filename);
-  (void) FormatMagickString(command,MaxTextExtent,"-Tsvg -o%s %s",
+  (void) FormatLocaleString(command,MaxTextExtent,"-Tsvg -o%s %s",
     read_info->filename,image_info->filename);
   graph=agread(GetBlobFileHandle(image));
   if (graph == (graph_t *) NULL)
index 9a41efd9338b60f726dd2d2cd97481858f01471b..38ec0af07d1530fad160c5873da9df394d721c48 100644 (file)
@@ -527,7 +527,7 @@ static void TimeCodeToString(const size_t timestamp,char *code)
   shift=4*TimeFields;
   for (i=0; i <= TimeFields; i++)
   {
-    (void) FormatMagickString(code,MaxTextExtent-strlen(code),"%x",
+    (void) FormatLocaleString(code,MaxTextExtent-strlen(code),"%x",
       (unsigned int) ((timestamp >> shift) & 0x0fU));
     code++;
     if (((i % 2) != 0) && (i < TimeFields))
@@ -1532,12 +1532,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   dpx.orientation.x_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_center");
   if (value != (const char *) NULL)
-    dpx.orientation.x_center=StringToDouble(value,(char **) NULL);
+    dpx.orientation.x_center=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.orientation.x_center);
   dpx.orientation.y_center=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:orientation.y_center");
   if (value != (const char *) NULL)
-    dpx.orientation.y_center=StringToDouble(value,(char **) NULL);
+    dpx.orientation.y_center=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.orientation.y_center);
   dpx.orientation.x_size=0U;
   value=GetDPXProperty(image_info,image,"dpx:orientation.x_size");
@@ -1653,12 +1653,12 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   dpx.film.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.frame_rate");
   if (value != (const char *) NULL)
-    dpx.film.frame_rate=StringToDouble(value,(char **) NULL);
+    dpx.film.frame_rate=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.film.frame_rate);
   dpx.film.shutter_angle=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:film.shutter_angle");
   if (value != (const char *) NULL)
-    dpx.film.shutter_angle=StringToDouble(value,(char **) NULL);
+    dpx.film.shutter_angle=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.film.shutter_angle);
   *dpx.film.frame_id='\0';
   value=GetDPXProperty(image_info,image,"dpx:film.frame_id");
@@ -1706,52 +1706,52 @@ static MagickBooleanType WriteDPXImage(const ImageInfo *image_info,Image *image)
   value=GetDPXProperty(image_info,image,
     "dpx:television.horizontal_sample_rate");
   if (value != (const char *) NULL)
-    dpx.television.horizontal_sample_rate=StringToDouble(value,(char **) NULL);
+    dpx.television.horizontal_sample_rate=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.horizontal_sample_rate);
   dpx.television.vertical_sample_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.vertical_sample_rate");
   if (value != (const char *) NULL)
-    dpx.television.vertical_sample_rate=StringToDouble(value,(char **) NULL);
+    dpx.television.vertical_sample_rate=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.vertical_sample_rate);
   dpx.television.frame_rate=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.frame_rate");
   if (value != (const char *) NULL)
-    dpx.television.frame_rate=StringToDouble(value,(char **) NULL);
+    dpx.television.frame_rate=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.frame_rate);
   dpx.television.time_offset=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.time_offset");
   if (value != (const char *) NULL)
-    dpx.television.time_offset=StringToDouble(value,(char **) NULL);
+    dpx.television.time_offset=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.time_offset);
   dpx.television.gamma=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.gamma");
   if (value != (const char *) NULL)
-    dpx.television.gamma=StringToDouble(value,(char **) NULL);
+    dpx.television.gamma=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.gamma);
   dpx.television.black_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_level");
   if (value != (const char *) NULL)
-    dpx.television.black_level=StringToDouble(value,(char **) NULL);
+    dpx.television.black_level=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.black_level);
   dpx.television.black_gain=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.black_gain");
   if (value != (const char *) NULL)
-    dpx.television.black_gain=StringToDouble(value,(char **) NULL);
+    dpx.television.black_gain=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.black_gain);
   dpx.television.break_point=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.break_point");
   if (value != (const char *) NULL)
-    dpx.television.break_point=StringToDouble(value,(char **) NULL);
+    dpx.television.break_point=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.break_point);
   dpx.television.white_level=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.white_level");
   if (value != (const char *) NULL)
-    dpx.television.white_level=StringToDouble(value,(char **) NULL);
+    dpx.television.white_level=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.white_level);
   dpx.television.integration_times=0.0f;
   value=GetDPXProperty(image_info,image,"dpx:television.integration_times");
   if (value != (const char *) NULL)
-    dpx.television.integration_times=StringToDouble(value,(char **) NULL);
+    dpx.television.integration_times=LocaleToDouble(value,(char **) NULL);
   offset+=WriteBlobFloat(image,dpx.television.integration_times);
   offset+=WriteBlob(image,sizeof(dpx.television.reserve),(unsigned char *)
     dpx.television.reserve);
index 72e4003407be78c228d40f487bc8559ca28951fa..572f38dbe6760cfca10644ed898ffeaca3249727 100644 (file)
@@ -410,7 +410,7 @@ static MagickBooleanType WriteEPTImage(const ImageInfo *image_info,Image *image)
     return(MagickFalse);
   write_info=CloneImageInfo(image_info);
   (void) CopyMagickString(write_info->magick,"TIFF",MaxTextExtent);
-  (void) FormatMagickString(filename,MaxTextExtent,"tiff:%s",
+  (void) FormatLocaleString(filename,MaxTextExtent,"tiff:%s",
     write_info->filename); 
   (void) CopyMagickString(write_info->filename,filename,MaxTextExtent);
   (void) TransformImage(&write_image,(char *) NULL,"512x512>");
index 294c2b2e6f7c18222fe0ce430d7e4d6c02d0afd6..4ea3a15f308f3f0d8eca245a7d00bd66a8aa9325 100644 (file)
@@ -358,13 +358,13 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
       if (LocaleCompare(keyword,"naxis3") == 0)
         fits_info.number_planes=StringToLong(p);
       if (LocaleCompare(keyword,"datamax") == 0)
-        fits_info.max_data=StringToDouble(p,(char **) NULL);
+        fits_info.max_data=LocaleToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"datamin") == 0)
-        fits_info.min_data=StringToDouble(p,(char **) NULL);
+        fits_info.min_data=LocaleToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"bzero") == 0)
-        fits_info.zero=StringToDouble(p,(char **) NULL);
+        fits_info.zero=LocaleToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"bscale") == 0)
-        fits_info.scale=StringToDouble(p,(char **) NULL);
+        fits_info.scale=LocaleToDouble(p,(char **) NULL);
       if (LocaleCompare(keyword,"comment") == 0)
         {
           if (comment == (char *) NULL)
@@ -379,7 +379,7 @@ static Image *ReadFITSImage(const ImageInfo *image_info,
           else
             fits_info.endian=LSBEndian;
         }
-      (void) FormatMagickString(property,MaxTextExtent,"fits:%s",keyword);
+      (void) FormatLocaleString(property,MaxTextExtent,"fits:%s",keyword);
       (void) SetImageProperty(image,property,p);
     }
     c=0;
@@ -649,55 +649,55 @@ static MagickBooleanType WriteFITSImage(const ImageInfo *image_info,
   if (quantum_info == (QuantumInfo *) NULL)
     ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
   offset=0;
-  (void) FormatMagickString(header,FITSBlocksize,
+  (void) FormatLocaleString(header,FITSBlocksize,
     "SIMPLE  =                    T");
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"BITPIX  =           %10ld",
+  (void) FormatLocaleString(header,FITSBlocksize,"BITPIX  =           %10ld",
     (long) (quantum_info->format == FloatingPointQuantumFormat ? -1 : 1)*
     image->depth);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"NAXIS   =           %10lu",
+  (void) FormatLocaleString(header,FITSBlocksize,"NAXIS   =           %10lu",
     IsGrayImage(image,&image->exception) != MagickFalse ? 2UL : 3UL);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"NAXIS1  =           %10lu",
+  (void) FormatLocaleString(header,FITSBlocksize,"NAXIS1  =           %10lu",
     (unsigned long) image->columns);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"NAXIS2  =           %10lu",
+  (void) FormatLocaleString(header,FITSBlocksize,"NAXIS2  =           %10lu",
     (unsigned long) image->rows);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
   if (IsGrayImage(image,&image->exception) == MagickFalse)
     {
-      (void) FormatMagickString(header,FITSBlocksize,
+      (void) FormatLocaleString(header,FITSBlocksize,
         "NAXIS3  =           %10lu",3UL);
       (void) strncpy(fits_info+offset,header,strlen(header));
       offset+=80;
     }
-  (void) FormatMagickString(header,FITSBlocksize,"BSCALE  =         %E",1.0);
+  (void) FormatLocaleString(header,FITSBlocksize,"BSCALE  =         %E",1.0);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"BZERO   =         %E",
+  (void) FormatLocaleString(header,FITSBlocksize,"BZERO   =         %E",
     image->depth > 8 ? GetFITSPixelRange(image->depth) : 0.0);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"DATAMAX =         %E",
+  (void) FormatLocaleString(header,FITSBlocksize,"DATAMAX =         %E",
     1.0*((MagickOffsetType) GetQuantumRange(image->depth)));
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
-  (void) FormatMagickString(header,FITSBlocksize,"DATAMIN =         %E",0.0);
+  (void) FormatLocaleString(header,FITSBlocksize,"DATAMIN =         %E",0.0);
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
   if (image->endian == LSBEndian)
     {
-      (void) FormatMagickString(header,FITSBlocksize,"XENDIAN = 'SMALL'");
+      (void) FormatLocaleString(header,FITSBlocksize,"XENDIAN = 'SMALL'");
       (void) strncpy(fits_info+offset,header,strlen(header));
       offset+=80;
     }
-  (void) FormatMagickString(header,FITSBlocksize,"HISTORY %.72s",
+  (void) FormatLocaleString(header,FITSBlocksize,"HISTORY %.72s",
     GetMagickVersion((size_t *) NULL));
   (void) strncpy(fits_info+offset,header,strlen(header));
   offset+=80;
index b820443eaa9eda10a240994dae3c078c3f3c588a..9442ef869836e20a22d04d0838d4bd741db06513 100644 (file)
@@ -1181,7 +1181,7 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 else if (iptc == MagickTrue)
                   (void) CopyMagickString(name,"iptc",sizeof(name));
                 else
-                  (void) FormatMagickString(name,sizeof(name),"gif:%.11s",
+                  (void) FormatLocaleString(name,sizeof(name),"gif:%.11s",
                     header);
                 (void) SetImageProfile(image,name,profile);
                 info=(unsigned char *) RelinquishMagickMemory(info);
index 1461fc41a7e53e3f570d75ed99242aed9d4b58b9..15ee82b4d36ac5e9a906dc4114151f04ade9b083 100644 (file)
@@ -292,7 +292,7 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   (void) CopyMagickString(format,value,MaxTextExtent);
                   break;
                 }
-              (void) FormatMagickString(tag,MaxTextExtent,"hdr:%s",keyword);
+              (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
               (void) SetImageProperty(image,tag,value);
               break;
             }
@@ -301,10 +301,10 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
             {
               if (LocaleCompare(keyword,"gamma") == 0)
                 {
-                  image->gamma=StringToDouble(value,(char **) NULL);
+                  image->gamma=LocaleToDouble(value,(char **) NULL);
                   break;
                 }
-              (void) FormatMagickString(tag,MaxTextExtent,"hdr:%s",keyword);
+              (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
               (void) SetImageProperty(image,tag,value);
               break;
             }
@@ -331,7 +331,7 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   image->chromaticity.white_point.y=white_point[1];
                   break;
                 }
-              (void) FormatMagickString(tag,MaxTextExtent,"hdr:%s",keyword);
+              (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
               (void) SetImageProperty(image,tag,value);
               break;
             }
@@ -349,13 +349,13 @@ static Image *ReadHDRImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   image->rows=(size_t) height;
                   break;
                 }
-              (void) FormatMagickString(tag,MaxTextExtent,"hdr:%s",keyword);
+              (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
               (void) SetImageProperty(image,tag,value);
               break;
             }
             default:
             {
-              (void) FormatMagickString(tag,MaxTextExtent,"hdr:%s",keyword);
+              (void) FormatLocaleString(tag,MaxTextExtent,"hdr:%s",keyword);
               (void) SetImageProperty(image,tag,value);
               break;
             }
@@ -693,22 +693,22 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image)
   if ((property != (const char *) NULL) &&
       (strchr(property,'\n') == (char *) NULL))
     {
-      count=FormatMagickString(header,MaxTextExtent,"#%s\n",property);
+      count=FormatLocaleString(header,MaxTextExtent,"#%s\n",property);
       (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
     }
   property=GetImageProperty(image,"hdr:exposure");
   if (property != (const char *) NULL)
     {
-      count=FormatMagickString(header,MaxTextExtent,"EXPOSURE=%g\n",
+      count=FormatLocaleString(header,MaxTextExtent,"EXPOSURE=%g\n",
         atof(property));
       (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
     }
   if (image->gamma != 0.0)
     {
-      count=FormatMagickString(header,MaxTextExtent,"GAMMA=%g\n",image->gamma);
+      count=FormatLocaleString(header,MaxTextExtent,"GAMMA=%g\n",image->gamma);
       (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
     }
-  count=FormatMagickString(header,MaxTextExtent,
+  count=FormatLocaleString(header,MaxTextExtent,
     "PRIMARIES=%g %g %g %g %g %g %g %g\n",
     image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
     image->chromaticity.green_primary.x,image->chromaticity.green_primary.y,
@@ -717,7 +717,7 @@ static MagickBooleanType WriteHDRImage(const ImageInfo *image_info,Image *image)
   (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
   length=CopyMagickString(header,"FORMAT=32-bit_rle_rgbe\n\n",MaxTextExtent);
   (void) WriteBlob(image,length,(unsigned char *) header);
-  count=FormatMagickString(header,MaxTextExtent,"-Y %.20g +X %.20g\n",
+  count=FormatLocaleString(header,MaxTextExtent,"-Y %.20g +X %.20g\n",
     (double) image->rows,(double) image->columns);
   (void) WriteBlob(image,(size_t) count,(unsigned char *) header);
   /*
index d04df57fb637f25f084e52d0d2c47dfdab4af033..95ad0a3c416c7e561189be0058d95d237f1d2260 100644 (file)
@@ -382,7 +382,7 @@ static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
   write_info=CloneImageInfo(image_info);
   (void) SetImageInfo(write_info,1,&image->exception);
   if (LocaleCompare(write_info->magick,"HISTOGRAM") == 0)
-    (void) FormatMagickString(histogram_image->filename,MaxTextExtent,
+    (void) FormatLocaleString(histogram_image->filename,MaxTextExtent,
       "miff:%s",write_info->filename);
   status=WriteImage(write_info,histogram_image);
   histogram_image=DestroyImage(histogram_image);
index 73939a562043eef0b5b25eef38234912bf37aa46..3bf0706d474ca309bf551290e881e835889bc81e 100644 (file)
@@ -301,24 +301,24 @@ static MagickBooleanType WriteHTMLImage(const ImageInfo *image_info,
       (void) WriteBlobString(image,"<head>\n");
       value=GetImageProperty(image,"label");
       if (value != (const char *) NULL)
-        (void) FormatMagickString(buffer,MaxTextExtent,"<title>%s</title>\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"<title>%s</title>\n",
           value);
       else
         {
           GetPathComponent(filename,BasePath,basename);
-          (void) FormatMagickString(buffer,MaxTextExtent,
+          (void) FormatLocaleString(buffer,MaxTextExtent,
             "<title>%s</title>\n",basename);
         }
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"</head>\n");
       (void) WriteBlobString(image,"<body style=\"text-align: center;\">\n");
-      (void) FormatMagickString(buffer,MaxTextExtent,"<h1>%s</h1>\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"<h1>%s</h1>\n",
         image->filename);
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"<div>\n");
       (void) CopyMagickString(filename,image->filename,MaxTextExtent);
       AppendImageFormat("png",filename);
-      (void) FormatMagickString(buffer,MaxTextExtent,"<img usemap=\"#%s\" "
+      (void) FormatLocaleString(buffer,MaxTextExtent,"<img usemap=\"#%s\" "
         "src=\"%s\" style=\"border: 0;\" alt=\"Image map\" />\n",mapname,
         filename);
       (void) WriteBlobString(image,buffer);
@@ -331,15 +331,15 @@ static MagickBooleanType WriteHTMLImage(const ImageInfo *image_info,
       /*
         Write an image map.
       */
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "<map id=\"%s\" name=\"%s\">\n",mapname,mapname);
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,"  <area href=\"%s",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"  <area href=\"%s",
         url);
       (void) WriteBlobString(image,buffer);
       if (image->directory == (char *) NULL)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,
+          (void) FormatLocaleString(buffer,MaxTextExtent,
             "%s\" shape=\"rect\" coords=\"0,0,%.20g,%.20g\" alt=\"\" />\n",
             image->filename,(double) geometry.width-1,(double) geometry.height-
             1);
@@ -351,14 +351,14 @@ static MagickBooleanType WriteHTMLImage(const ImageInfo *image_info,
             (void) WriteBlobByte(image,(unsigned char) *p);
           else
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,"\" shape="
+              (void) FormatLocaleString(buffer,MaxTextExtent,"\" shape="
                 "\"rect\" coords=\"%.20g,%.20g,%.20g,%.20g\" alt=\"\" />\n",
                 (double) geometry.x,(double) geometry.y,(double) (geometry.x+
                 geometry.width-1),(double) (geometry.y+geometry.height-1));
               (void) WriteBlobString(image,buffer);
               if (*(p+1) != '\0')
                 {
-                  (void) FormatMagickString(buffer,MaxTextExtent,
+                  (void) FormatLocaleString(buffer,MaxTextExtent,
                     "  <area href=%s\"",url);
                   (void) WriteBlobString(image,buffer);
                 }
@@ -408,14 +408,14 @@ static MagickBooleanType WriteHTMLImage(const ImageInfo *image_info,
   /*
     Write an image map.
   */
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "<map id=\"%s\" name=\"%s\">\n",mapname,mapname);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"  <area href=\"%s",url);
+  (void) FormatLocaleString(buffer,MaxTextExtent,"  <area href=\"%s",url);
   (void) WriteBlobString(image,buffer);
   if (image->directory == (char *) NULL)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%s\" shape=\"rect\" coords=\"0,0,%.20g,%.20g\" alt=\"\" />\n",
         image->filename,(double) geometry.width-1,(double) geometry.height-1);
       (void) WriteBlobString(image,buffer);
@@ -426,14 +426,14 @@ static MagickBooleanType WriteHTMLImage(const ImageInfo *image_info,
         (void) WriteBlobByte(image,(unsigned char) *p);
       else
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"\" shape=\"rect\""
+          (void) FormatLocaleString(buffer,MaxTextExtent,"\" shape=\"rect\""
             " coords=\"%.20g,%.20g,%.20g,%.20g\" alt=\"\" />\n",
             (double) geometry.x,(double) geometry.y,geometry.x+(double)
             geometry.width-1,geometry.y+(double) geometry.height-1);
           (void) WriteBlobString(image,buffer);
           if (*(p+1) != '\0')
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "  <area href=%s\"",url);
               (void) WriteBlobString(image,buffer);
             }
index da1e447ec3eded2d62d34d301c3c2405ec32d454..db4339a939d38cb2a21c9ba6309513fefe8113fd 100644 (file)
@@ -443,7 +443,7 @@ static MagickBooleanType WriteJBIGImage(const ImageInfo *image_info,
   status=OpenBlob(image_info,image,WriteBinaryBlobMode,&image->exception);
   if (status == MagickFalse)
     return(status);
-  version=StringToDouble(JBG_VERSION,(char **) NULL);
+  version=LocaleToDouble(JBG_VERSION,(char **) NULL);
   scene=0;
   do
   {
index c566d6fd6713225fac8ad2ee2db5d8ef52b16231..5585cff96ebd8563f0216160056af2a86a3ffde9 100644 (file)
@@ -1004,7 +1004,7 @@ static MagickBooleanType WriteJP2Image(const ImageInfo *image_info,Image *image)
         (GetImageQuantumDepth(image,MagickTrue)/8);
       target_size=(number_pixels*rate)+header_size;
       rate=target_size/number_pixels;
-      (void) FormatMagickString(option,MaxTextExtent,"rate=%g",rate);
+      (void) FormatLocaleString(option,MaxTextExtent,"rate=%g",rate);
       (void) ConcatenateString(&options,option);
     }
   status=jas_image_encode(jp2_image,jp2_stream,format,options) != 0 ?
index 8ae19e7327cf57d93087c1595ae90b7e8cf4b336..4ab629cfd7311a00926f8951c4f6ff8adfa121db 100644 (file)
@@ -606,7 +606,7 @@ static boolean ReadProfile(j_decompress_ptr jpeg_info)
     return(MagickTrue);
   length-=2;
   marker=jpeg_info->unread_marker-JPEG_APP0;
-  (void) FormatMagickString(name,MaxTextExtent,"APP%d",marker);
+  (void) FormatLocaleString(name,MaxTextExtent,"APP%d",marker);
   error_manager=(ErrorManager *) jpeg_info->client_data;
   image=error_manager->image;
   profile=AcquireStringInfo(length);
@@ -840,7 +840,7 @@ static void JPEGSetImageSamplingFactor(struct jpeg_decompress_struct *jpeg_info,
     case JCS_CMYK:
     {
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Colorspace: CMYK");
-      (void) FormatMagickString(sampling_factor,MaxTextExtent,
+      (void) FormatLocaleString(sampling_factor,MaxTextExtent,
         "%dx%d,%dx%d,%dx%d,%dx%d",jpeg_info->comp_info[0].h_samp_factor,
         jpeg_info->comp_info[0].v_samp_factor,
         jpeg_info->comp_info[1].h_samp_factor,
@@ -855,7 +855,7 @@ static void JPEGSetImageSamplingFactor(struct jpeg_decompress_struct *jpeg_info,
     {
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),
         "Colorspace: GRAYSCALE");
-      (void) FormatMagickString(sampling_factor,MaxTextExtent,"%dx%d",
+      (void) FormatLocaleString(sampling_factor,MaxTextExtent,"%dx%d",
         jpeg_info->comp_info[0].h_samp_factor,
         jpeg_info->comp_info[0].v_samp_factor);
       break;
@@ -863,7 +863,7 @@ static void JPEGSetImageSamplingFactor(struct jpeg_decompress_struct *jpeg_info,
     case JCS_RGB:
     {
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Colorspace: RGB");
-      (void) FormatMagickString(sampling_factor,MaxTextExtent,
+      (void) FormatLocaleString(sampling_factor,MaxTextExtent,
         "%dx%d,%dx%d,%dx%d",jpeg_info->comp_info[0].h_samp_factor,
         jpeg_info->comp_info[0].v_samp_factor,
         jpeg_info->comp_info[1].h_samp_factor,
@@ -876,7 +876,7 @@ static void JPEGSetImageSamplingFactor(struct jpeg_decompress_struct *jpeg_info,
     {
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),"Colorspace: %d",
         jpeg_info->out_color_space);
-      (void) FormatMagickString(sampling_factor,MaxTextExtent,
+      (void) FormatLocaleString(sampling_factor,MaxTextExtent,
         "%dx%d,%dx%d,%dx%d,%dx%d",jpeg_info->comp_info[0].h_samp_factor,
         jpeg_info->comp_info[0].v_samp_factor,
         jpeg_info->comp_info[1].h_samp_factor,
@@ -1165,7 +1165,7 @@ static Image *ReadJPEGImage(const ImageInfo *image_info,
     }
   JPEGSetImageQuality(&jpeg_info,image);
   JPEGSetImageSamplingFactor(&jpeg_info,image);
-  (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
     jpeg_info.out_color_space);
   (void) SetImageProperty(image,"jpeg:colorspace",value);
   if (image_info->ping != MagickFalse)
@@ -1384,7 +1384,7 @@ ModuleExport size_t RegisterJPEGImage(void)
 
   *version='\0';
 #if defined(JPEG_LIB_VERSION)
-  (void) FormatMagickString(version,MaxTextExtent,"%d",JPEG_LIB_VERSION);
+  (void) FormatLocaleString(version,MaxTextExtent,"%d",JPEG_LIB_VERSION);
 #endif
   entry=SetMagickInfo("JPEG");
   entry->thread_support=NoThreadSupport;
index 4a26c65efc68e39bcffaa2061e9ee344bdc027c0..55886aeb65260787b6c362a0d43d420170671084 100644 (file)
@@ -174,7 +174,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
       draw_info->stroke_width+1.5);
   if (draw_info->gravity == UndefinedGravity)
     {
-      (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",
+      (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",
         -metrics.bounds.x1+draw_info->stroke_width/2.0,metrics.ascent+
         draw_info->stroke_width/2.0);
       draw_info->geometry=AcquireString(geometry);
@@ -196,7 +196,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
       char
         pointsize[MaxTextExtent];
 
-      (void) FormatMagickString(pointsize,MaxTextExtent,"%.20g",
+      (void) FormatLocaleString(pointsize,MaxTextExtent,"%.20g",
         draw_info->pointsize);
       (void) SetImageProperty(image,"label:pointsize",pointsize);
     }
index bd7b1e4fd0100317393041f1ecaf2b6cfdffc501..14deb370def4d8f339d83cd4cd00b4dbf4b1b111 100644 (file)
@@ -13536,7 +13536,7 @@ static MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info,
   if (status == MagickFalse)
     return(status);
   (void) WriteBlobString(image,"/*\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"  %s (%s).\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"  %s (%s).\n",
     image->filename,image->storage_class == DirectClass ? "PNM" : "GIF");
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"*/\n");
@@ -13547,7 +13547,7 @@ static MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info,
   p=(char *) blob;
   for (i=0; i < (ssize_t) length ; i++)
   {
-    (void) FormatMagickString(buffer,MaxTextExtent,"0x%02X, ",*p & 0xff);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"0x%02X, ",*p & 0xff);
     (void) WriteBlobString(image,buffer);
     if (((i+1) % 12) == 0)
       {
index 21002ad2a8be8811e7bc07980dfa7908cd23c0dc..b48d32d1659ad68217c10bfb1d1f959293ac2345 100644 (file)
@@ -1198,7 +1198,7 @@ static MagickBooleanType WriteMATImage(const ImageInfo *image_info,Image *image)
   (void) memcpy(&local_time,localtime(&current_time),sizeof(local_time));
 #endif
   (void) memset(MATLAB_HDR,' ',MagickMin(sizeof(MATLAB_HDR),124));
-  FormatMagickString(MATLAB_HDR,MaxTextExtent,"MATLAB 5.0 MAT-file, Platform: %s, Created on: %s %s %2d %2d:%2d:%2d %d",
+  FormatLocaleString(MATLAB_HDR,MaxTextExtent,"MATLAB 5.0 MAT-file, Platform: %s, Created on: %s %s %2d %2d:%2d:%2d %d",
     OsDesc,DayOfWTab[local_time.tm_wday],MonthsTab[local_time.tm_mon],
     local_time.tm_mday,local_time.tm_hour,local_time.tm_min,
     local_time.tm_sec,local_time.tm_year+1900);
index 4f9ddb1b355983f446ee48a9f83bb2befef1ab04..a415208c483c623da63cd9ef7533327dde68b32f 100644 (file)
@@ -208,7 +208,7 @@ static MagickBooleanType WriteMATTEImage(const ImageInfo *image_info,
     if (status == MagickFalse)
       break;
   }
-  (void) FormatMagickString(matte_image->filename,MaxTextExtent,
+  (void) FormatLocaleString(matte_image->filename,MaxTextExtent,
     "MIFF:%s",image->filename);
   status=WriteImage(image_info,matte_image);
   matte_image=DestroyImage(matte_image);
index 2785d1486682dc38dc527dbd4bc6b9c2b65b778b..b918eb07825f99fc2cad75e0f046f1bef974d594 100644 (file)
@@ -1161,7 +1161,7 @@ static Image *ReadMETAImage(const ImageInfo *image_info,
       char
         name[MaxTextExtent];
 
-      (void) FormatMagickString(name,MaxTextExtent,"APP%d",1);
+      (void) FormatLocaleString(name,MaxTextExtent,"APP%d",1);
       buff=AcquireImage((ImageInfo *) NULL);
       if (buff == (Image *) NULL)
         ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
@@ -1768,7 +1768,7 @@ static void formatString(Image *ofile, const char *s, int len)
         (void) WriteBlobByte(ofile,(unsigned char) *s);
       else
         {
-          (void) FormatMagickString(temp,MaxTextExtent,"&#%d;", c & 255);
+          (void) FormatLocaleString(temp,MaxTextExtent,"&#%d;", c & 255);
           (void) WriteBlobString(ofile,temp);
         }
       break;
@@ -1946,10 +1946,10 @@ static int formatIPTC(Image *ifile, Image *ofile)
 
     /* now finish up by formatting this binary data into ASCII equivalent */
     if (strlen((char *)readable) > 0)
-      (void) FormatMagickString(temp,MaxTextExtent,"%d#%d#%s=",
+      (void) FormatLocaleString(temp,MaxTextExtent,"%d#%d#%s=",
         (unsigned int) dataset, (unsigned int) recnum, readable);
     else
-      (void) FormatMagickString(temp,MaxTextExtent,"%d#%d=",
+      (void) FormatLocaleString(temp,MaxTextExtent,"%d#%d=",
         (unsigned int) dataset,(unsigned int) recnum);
     (void) WriteBlobString(ofile,temp);
     formatString( ofile, (char *)str, taglen );
@@ -2077,10 +2077,10 @@ static int formatIPTCfromBuffer(Image *ofile, char *s, ssize_t len)
 
     /* now finish up by formatting this binary data into ASCII equivalent */
     if (strlen((char *)readable) > 0)
-      (void) FormatMagickString(temp,MaxTextExtent,"%d#%d#%s=",
+      (void) FormatLocaleString(temp,MaxTextExtent,"%d#%d#%s=",
         (unsigned int) dataset,(unsigned int) recnum, readable);
     else
-      (void) FormatMagickString(temp,MaxTextExtent,"%d#%d=",
+      (void) FormatLocaleString(temp,MaxTextExtent,"%d#%d=",
         (unsigned int) dataset,(unsigned int) recnum);
     (void) WriteBlobString(ofile,temp);
     formatString( ofile, (char *)str, taglen );
@@ -2203,10 +2203,10 @@ static int format8BIM(Image *ifile, Image *ofile)
          * ASCII equivalent
          */
         if (strlen((const char *)PString) > 0)
-          (void) FormatMagickString(temp,MaxTextExtent,"8BIM#%d#%s=",ID,
+          (void) FormatLocaleString(temp,MaxTextExtent,"8BIM#%d#%s=",ID,
             PString);
         else
-          (void) FormatMagickString(temp,MaxTextExtent,"8BIM#%d=",ID);
+          (void) FormatLocaleString(temp,MaxTextExtent,"8BIM#%d=",ID);
         (void) WriteBlobString(ofile,temp);
         if (ID == IPTC_ID)
           {
index 661419fe2441b836b72d54d7771124690ad1a6a6..15bcb02d2726b68cdb5b721786446d75a26001af 100644 (file)
@@ -747,7 +747,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=StringToDouble(options,(char **) NULL);
+                    image->gamma=LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"gravity") == 0)
@@ -1014,7 +1014,7 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
               {
                 if (LocaleCompare(keyword,"version") == 0)
                   {
-                    version=StringToDouble(options,(char **) NULL);
+                    version=LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -1952,49 +1952,49 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
       Write MIFF header.
     */
     (void) WriteBlobString(image,"id=ImageMagick  version=1.0\n");
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "class=%s  colors=%.20g  matte=%s\n",CommandOptionToMnemonic(
       MagickClassOptions,image->storage_class),(double) image->colors,
       CommandOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"columns=%.20g  rows=%.20g  "
+    (void) FormatLocaleString(buffer,MaxTextExtent,"columns=%.20g  rows=%.20g  "
       "depth=%.20g\n",(double) image->columns,(double) image->rows,(double)
       image->depth);
     (void) WriteBlobString(image,buffer);
     if (image->type != UndefinedType)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"type=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"type=%s\n",
           CommandOptionToMnemonic(MagickTypeOptions,image->type));
         (void) WriteBlobString(image,buffer);
       }
     if (image->colorspace != UndefinedColorspace)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"colorspace=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"colorspace=%s\n",
           CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace));
         (void) WriteBlobString(image,buffer);
       }
     if (compression != UndefinedCompression)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"compression=%s  "
+        (void) FormatLocaleString(buffer,MaxTextExtent,"compression=%s  "
           "quality=%.20g\n",CommandOptionToMnemonic(MagickCompressOptions,
           compression),(double) image->quality);
         (void) WriteBlobString(image,buffer);
       }
     if (image->units != UndefinedResolution)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"units=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"units=%s\n",
           CommandOptionToMnemonic(MagickResolutionOptions,image->units));
         (void) WriteBlobString(image,buffer);
       }
     if ((image->x_resolution != 0) || (image->y_resolution != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
         (void) WriteBlobString(image,buffer);
       }
     if ((image->page.width != 0) || (image->page.height != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double)
           image->page.height,(double) image->page.x,(double) image->page.y);
         (void) WriteBlobString(image,buffer);
@@ -2002,13 +2002,13 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
     else
       if ((image->page.x != 0) || (image->page.y != 0))
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"page=%+ld%+ld\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"page=%+ld%+ld\n",
             (long) image->page.x,(long) image->page.y);
           (void) WriteBlobString(image,buffer);
         }
     if ((image->tile_offset.x != 0) || (image->tile_offset.y != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"tile-offset=%+ld%+ld\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"tile-offset=%+ld%+ld\n",
           (long) image->tile_offset.x,(long) image->tile_offset.y);
         (void) WriteBlobString(image,buffer);
       }
@@ -2016,11 +2016,11 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
         (GetPreviousImageInList(image) != (Image *) NULL))
       {
         if (image->scene == 0)
-          (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g  "
+          (void) FormatLocaleString(buffer,MaxTextExtent,"iterations=%.20g  "
             "delay=%.20g  ticks-per-second=%.20g\n",(double) image->iterations,
             (double) image->delay,(double) image->ticks_per_second);
         else
-          (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g  "
+          (void) FormatLocaleString(buffer,MaxTextExtent,"scene=%.20g  "
             "iterations=%.20g  delay=%.20g  ticks-per-second=%.20g\n",(double)
             image->scene,(double) image->iterations,(double) image->delay,
             (double) image->ticks_per_second);
@@ -2030,51 +2030,51 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
       {
         if (image->scene != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"scene=%.20g\n",
               (double) image->scene);
             (void) WriteBlobString(image,buffer);
           }
         if (image->iterations != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"iterations=%.20g\n",
               (double) image->iterations);
             (void) WriteBlobString(image,buffer);
           }
         if (image->delay != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"delay=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"delay=%.20g\n",
               (double) image->delay);
             (void) WriteBlobString(image,buffer);
           }
         if (image->ticks_per_second != UndefinedTicksPerSecond)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "ticks-per-second=%.20g\n",(double) image->ticks_per_second);
             (void) WriteBlobString(image,buffer);
           }
       }
     if (image->gravity != UndefinedGravity)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"gravity=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"gravity=%s\n",
           CommandOptionToMnemonic(MagickGravityOptions,image->gravity));
         (void) WriteBlobString(image,buffer);
       }
     if (image->dispose != UndefinedDispose)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"dispose=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"dispose=%s\n",
           CommandOptionToMnemonic(MagickDisposeOptions,image->dispose));
         (void) WriteBlobString(image,buffer);
       }
     if (image->rendering_intent != UndefinedIntent)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "rendering-intent=%s\n",
            CommandOptionToMnemonic(MagickIntentOptions,image->rendering_intent));
         (void) WriteBlobString(image,buffer);
       }
     if (image->gamma != 0.0)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"gamma=%g\n",
           image->gamma);
         (void) WriteBlobString(image,buffer);
       }
@@ -2083,7 +2083,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
         /*
           Note chomaticity points.
         */
-        (void) FormatMagickString(buffer,MaxTextExtent,"red-primary=%g,"
+        (void) FormatLocaleString(buffer,MaxTextExtent,"red-primary=%g,"
           "%g  green-primary=%g,%g  blue-primary=%g,%g\n",
           image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
           image->chromaticity.green_primary.x,
@@ -2091,14 +2091,14 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
           image->chromaticity.blue_primary.x,
           image->chromaticity.blue_primary.y);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "white-point=%g,%g\n",image->chromaticity.white_point.x,
           image->chromaticity.white_point.y);
         (void) WriteBlobString(image,buffer);
       }
     if (image->orientation != UndefinedOrientation)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"orientation=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"orientation=%s\n",
           CommandOptionToMnemonic(MagickOrientationOptions,image->orientation));
         (void) WriteBlobString(image,buffer);
       }
@@ -2120,7 +2120,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
           profile=GetImageProfile(image,name);
           if (profile != (StringInfo *) NULL)
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "profile:%s=%.20g\n",name,(double)
                 GetStringInfoLength(profile));
               (void) WriteBlobString(image,buffer);
@@ -2130,7 +2130,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
       }
     if (image->montage != (char *) NULL)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"montage=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"montage=%s\n",
           image->montage);
         (void) WriteBlobString(image,buffer);
       }
@@ -2140,7 +2140,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info,
     property=GetNextImageProperty(image);
     while (property != (const char *) NULL)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,"%s=",property);
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%s=",property);
       (void) WriteBlobString(image,buffer);
       value=GetImageProperty(image,property);
       if (value != (const char *) NULL)
index 645a9e9a8c3fb703987470847eddb1af68d6fca3..1235d3b5e6d22bc0dce5edbb30c799f21a78416f 100644 (file)
@@ -444,7 +444,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                   }
                 if (LocaleCompare(keyword,"error") == 0)
                   {
-                    image->error.mean_error_per_pixel=StringToDouble(options,(char **) NULL);
+                    image->error.mean_error_per_pixel=LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 (void) SetImageProperty(image,keyword,options);
@@ -455,7 +455,7 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
               {
                 if (LocaleCompare(keyword,"gamma") == 0)
                   {
-                    image->gamma=StringToDouble(options,(char **) NULL);
+                    image->gamma=LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"green-primary") == 0)
@@ -511,12 +511,12 @@ static Image *ReadMPCImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 if (LocaleCompare(keyword,"maximum-error") == 0)
                   {
                     image->error.normalized_maximum_error=
-                      StringToDouble(options,(char **) NULL);
+                      LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"mean-error") == 0)
                   {
-                    image->error.normalized_mean_error=StringToDouble(options,(char **) NULL);
+                    image->error.normalized_mean_error=LocaleToDouble(options,(char **) NULL);
                     break;
                   }
                 if (LocaleCompare(keyword,"montage") == 0)
@@ -1073,58 +1073,58 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
         (image->colors > (one << depth)))
       image->storage_class=DirectClass;
     (void) WriteBlobString(image,"id=MagickCache\n");
-    (void) FormatMagickString(buffer,MaxTextExtent,"quantum-depth=%d\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"quantum-depth=%d\n",
       MAGICKCORE_QUANTUM_DEPTH);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "class=%s  colors=%.20g  matte=%s\n",CommandOptionToMnemonic(
       MagickClassOptions,image->storage_class),(double) image->colors,
       CommandOptionToMnemonic(MagickBooleanOptions,(ssize_t) image->matte));
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "columns=%.20g  rows=%.20g depth=%.20g\n",(double) image->columns,
       (double) image->rows,(double) image->depth);
     (void) WriteBlobString(image,buffer);
     if (image->type != UndefinedType)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"type=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"type=%s\n",
           CommandOptionToMnemonic(MagickTypeOptions,image->type));
         (void) WriteBlobString(image,buffer);
       }
     if (image->colorspace != UndefinedColorspace)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"colorspace=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"colorspace=%s\n",
           CommandOptionToMnemonic(MagickColorspaceOptions,image->colorspace));
         (void) WriteBlobString(image,buffer);
       }
     if (image->endian != UndefinedEndian)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"endian=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"endian=%s\n",
           CommandOptionToMnemonic(MagickEndianOptions,image->endian));
         (void) WriteBlobString(image,buffer);
       }
     if (image->compression != UndefinedCompression)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "compression=%s  quality=%.20g\n",CommandOptionToMnemonic(
           MagickCompressOptions,image->compression),(double) image->quality);
         (void) WriteBlobString(image,buffer);
       }
     if (image->units != UndefinedResolution)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"units=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"units=%s\n",
           CommandOptionToMnemonic(MagickResolutionOptions,image->units));
         (void) WriteBlobString(image,buffer);
       }
     if ((image->x_resolution != 0) || (image->y_resolution != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "resolution=%gx%g\n",image->x_resolution,image->y_resolution);
         (void) WriteBlobString(image,buffer);
       }
     if ((image->page.width != 0) || (image->page.height != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "page=%.20gx%.20g%+.20g%+.20g\n",(double) image->page.width,(double)
           image->page.height,(double) image->page.x,(double) image->page.y);
         (void) WriteBlobString(image,buffer);
@@ -1132,13 +1132,13 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
     else
       if ((image->page.x != 0) || (image->page.y != 0))
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"page=%+ld%+ld\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"page=%+ld%+ld\n",
             (long) image->page.x,(long) image->page.y);
           (void) WriteBlobString(image,buffer);
         }
     if ((image->page.x != 0) || (image->page.y != 0))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"tile-offset=%+ld%+ld\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"tile-offset=%+ld%+ld\n",
           (long) image->tile_offset.x,(long) image->tile_offset.y);
         (void) WriteBlobString(image,buffer);
       }
@@ -1146,12 +1146,12 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
         (GetPreviousImageInList(image) != (Image *) NULL))
       {
         if (image->scene == 0)
-          (void) FormatMagickString(buffer,MaxTextExtent,
+          (void) FormatLocaleString(buffer,MaxTextExtent,
             "iterations=%.20g  delay=%.20g  ticks-per-second=%.20g\n",(double)
             image->iterations,(double) image->delay,(double)
             image->ticks_per_second);
         else
-          (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g  "
+          (void) FormatLocaleString(buffer,MaxTextExtent,"scene=%.20g  "
             "iterations=%.20g  delay=%.20g  ticks-per-second=%.20g\n",
             (double) image->scene,(double) image->iterations,(double)
             image->delay,(double) image->ticks_per_second);
@@ -1161,51 +1161,51 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
       {
         if (image->scene != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"scene=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"scene=%.20g\n",
               (double) image->scene);
             (void) WriteBlobString(image,buffer);
           }
         if (image->iterations != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"iterations=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"iterations=%.20g\n",
               (double) image->iterations);
             (void) WriteBlobString(image,buffer);
           }
         if (image->delay != 0)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"delay=%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"delay=%.20g\n",
               (double) image->delay);
             (void) WriteBlobString(image,buffer);
           }
         if (image->ticks_per_second != UndefinedTicksPerSecond)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "ticks-per-second=%.20g\n",(double) image->ticks_per_second);
             (void) WriteBlobString(image,buffer);
           }
       }
     if (image->gravity != UndefinedGravity)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"gravity=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"gravity=%s\n",
           CommandOptionToMnemonic(MagickGravityOptions,image->gravity));
         (void) WriteBlobString(image,buffer);
       }
     if (image->dispose != UndefinedDispose)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"dispose=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"dispose=%s\n",
           CommandOptionToMnemonic(MagickDisposeOptions,image->dispose));
         (void) WriteBlobString(image,buffer);
       }
     if (image->rendering_intent != UndefinedIntent)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "rendering-intent=%s\n",CommandOptionToMnemonic(MagickIntentOptions,
           image->rendering_intent));
         (void) WriteBlobString(image,buffer);
       }
     if (image->gamma != 0.0)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"gamma=%g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"gamma=%g\n",
           image->gamma);
         (void) WriteBlobString(image,buffer);
       }
@@ -1214,7 +1214,7 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
         /*
           Note chomaticity points.
         */
-        (void) FormatMagickString(buffer,MaxTextExtent,"red-primary="
+        (void) FormatLocaleString(buffer,MaxTextExtent,"red-primary="
           "%g,%g  green-primary=%g,%g  blue-primary=%g,%g\n",
           image->chromaticity.red_primary.x,image->chromaticity.red_primary.y,
           image->chromaticity.green_primary.x,
@@ -1222,14 +1222,14 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
           image->chromaticity.blue_primary.x,
           image->chromaticity.blue_primary.y);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "white-point=%g,%g\n",image->chromaticity.white_point.x,
           image->chromaticity.white_point.y);
         (void) WriteBlobString(image,buffer);
       }
     if (image->orientation != UndefinedOrientation)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "orientation=%s\n",CommandOptionToMnemonic(MagickOrientationOptions,
           image->orientation));
         (void) WriteBlobString(image,buffer);
@@ -1251,7 +1251,7 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
           profile=GetImageProfile(image,name);
           if (profile != (StringInfo *) NULL)
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "profile:%s=%.20g\n",name,(double)
                 GetStringInfoLength(profile));
               (void) WriteBlobString(image,buffer);
@@ -1261,7 +1261,7 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
       }
     if (image->montage != (char *) NULL)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"montage=%s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"montage=%s\n",
           image->montage);
         (void) WriteBlobString(image,buffer);
       }
@@ -1269,7 +1269,7 @@ static MagickBooleanType WriteMPCImage(const ImageInfo *image_info,Image *image)
     property=GetNextImageProperty(image);
     while (property != (const char *) NULL)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,"%s=",property);
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%s=",property);
       (void) WriteBlobString(image,buffer);
       value=GetImageProperty(image,property);
       if (value != (const char *) NULL)
index 554b5f2b4a95bc77391fdb429a8663073ced5067..5a72f912e472fa2d3257df112735e2d46a82c5cb 100644 (file)
@@ -203,7 +203,7 @@ static Image *ReadMPEGImage(const ImageInfo *image_info,
   image=AcquireImage(image_info);
   (void) InvokeDelegate(read_info,image,"mpeg:decode",(char *) NULL,exception);
   image=DestroyImage(image);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"%s.%s",
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"%s.%s",
     read_info->unique,ReadMPEGIntermediateFormat);
   images=ReadImage(read_info,exception);
   (void) RelinquishUniqueFileResource(read_info->filename);
@@ -512,7 +512,7 @@ static MagickBooleanType WriteMPEGImage(const ImageInfo *image_info,
   file=AcquireUniqueFileResource(basename);
   if (file != -1)
     file=close(file)-1;
-  (void) FormatMagickString(coalesce_image->filename,MaxTextExtent,"%s",
+  (void) FormatLocaleString(coalesce_image->filename,MaxTextExtent,"%s",
     basename);
   count=0;
   write_info=CloneImageInfo(image_info);
@@ -537,11 +537,11 @@ static MagickBooleanType WriteMPEGImage(const ImageInfo *image_info,
           Image
             *frame;
 
-          (void) FormatMagickString(p->filename,MaxTextExtent,"%s%.20g.%s",
+          (void) FormatLocaleString(p->filename,MaxTextExtent,"%s%.20g.%s",
             basename,(double) p->scene,WriteMPEGIntermediateFormat);
-          (void) FormatMagickString(filename,MaxTextExtent,"%s%.20g.%s",
+          (void) FormatLocaleString(filename,MaxTextExtent,"%s%.20g.%s",
             basename,(double) p->scene,WriteMPEGIntermediateFormat);
-          (void) FormatMagickString(previous_image,MaxTextExtent,
+          (void) FormatLocaleString(previous_image,MaxTextExtent,
             "%s%.20g.%s",basename,(double) p->scene,
             WriteMPEGIntermediateFormat);
           frame=CloneImage(p,0,0,MagickTrue,&p->exception);
@@ -558,7 +558,7 @@ static MagickBooleanType WriteMPEGImage(const ImageInfo *image_info,
         }
         default:
         {
-          (void) FormatMagickString(filename,MaxTextExtent,"%s%.20g.%s",
+          (void) FormatLocaleString(filename,MaxTextExtent,"%s%.20g.%s",
             basename,(double) p->scene,WriteMPEGIntermediateFormat);
           if (length > 0)
             status=BlobToFile(filename,blob,length,&image->exception);
@@ -595,7 +595,7 @@ static MagickBooleanType WriteMPEGImage(const ImageInfo *image_info,
     (void) CopyMagickString(coalesce_image->magick,image->magick,MaxTextExtent);
   status=InvokeDelegate(write_info,coalesce_image,(char *) NULL,"mpeg:encode",
     &image->exception);
-  (void) FormatMagickString(write_info->filename,MaxTextExtent,"%s.%s",
+  (void) FormatLocaleString(write_info->filename,MaxTextExtent,"%s.%s",
     write_info->unique,coalesce_image->magick);
   status=CopyDelegateFile(write_info->filename,image->filename);
   (void) RelinquishUniqueFileResource(write_info->filename);
@@ -609,7 +609,7 @@ static MagickBooleanType WriteMPEGImage(const ImageInfo *image_info,
     delay=100.0*p->delay/MagickMax(1.0*p->ticks_per_second,1.0);
     for (i=0; i < (ssize_t) MagickMax((1.0*delay+1.0)/3.0,1.0); i++)
     {
-      (void) FormatMagickString(p->filename,MaxTextExtent,"%s%.20g.%s",
+      (void) FormatLocaleString(p->filename,MaxTextExtent,"%s%.20g.%s",
         basename,(double) count++,WriteMPEGIntermediateFormat);
       (void) RelinquishUniqueFileResource(p->filename);
     }
index 77cc40d4397aa42301cb306a739e22a31db11fa9..c9806e66f96089d021650e6dd33a4d5a1d465e11 100644 (file)
@@ -210,7 +210,7 @@ static inline Image *GetImageCache(const ImageInfo *image_info,const char *path,
   ImageInfo
     *read_info;
 
-  (void) FormatMagickString(key,MaxTextExtent,"cache:%s",path);
+  (void) FormatLocaleString(key,MaxTextExtent,"cache:%s",path);
   sans_exception=AcquireExceptionInfo();
   image=(Image *) GetImageRegistry(ImageRegistryType,key,sans_exception);
   sans_exception=DestroyExceptionInfo(sans_exception);
@@ -780,22 +780,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=StringToDouble(p,&p);
+                      draw_info->affine.sx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=StringToDouble(p,&p);
+                      draw_info->affine.rx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=StringToDouble(p,&p);
+                      draw_info->affine.ry=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=StringToDouble(p,&p);
+                      draw_info->affine.sy=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=StringToDouble(p,&p);
+                      draw_info->affine.tx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=StringToDouble(p,&p);
+                      draw_info->affine.ty=LocaleToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -900,7 +900,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=StringToDouble(value,(char **) NULL);
+                      draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -912,7 +912,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -937,14 +937,14 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.ry=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.rx=tan(DegreesToRadians(fmod((double) angle,
                         360.0)));
                       break;
@@ -1062,7 +1062,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -1199,7 +1199,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1449,7 +1449,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = StringToDouble(value,(char **) NULL);
+                radius = LocaleToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -1648,7 +1648,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=StringToDouble(value,(char **) NULL);
+                      msl_info->image[n]->fuzz=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -1954,7 +1954,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      rotate_image=RotateImage(composite_image,StringToDouble(value,(char **) NULL),
+                      rotate_image=RotateImage(composite_image,LocaleToDouble(value,(char **) NULL),
                         &exception);
                       break;
                     }
@@ -2041,7 +2041,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           image=msl_info->image[n];
-          (void) FormatMagickString(composite_geometry,MaxTextExtent,
+          (void) FormatLocaleString(composite_geometry,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,
             (double) composite_image->rows,(double) geometry.x,(double)
             geometry.y);
@@ -2368,22 +2368,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=StringToDouble(p,&p);
+                      draw_info->affine.sx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=StringToDouble(p,&p);
+                      draw_info->affine.rx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=StringToDouble(p,&p);
+                      draw_info->affine.ry=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=StringToDouble(p,&p);
+                      draw_info->affine.sy=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=StringToDouble(p,&p);
+                      draw_info->affine.tx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=StringToDouble(p,&p);
+                      draw_info->affine.ty=LocaleToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -2493,7 +2493,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=StringToDouble(value,(char **) NULL);
+                      draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2505,7 +2505,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2530,13 +2530,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -2653,7 +2653,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -2716,7 +2716,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -2781,7 +2781,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3155,7 +3155,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blue") == 0)
                     {
-                      pixel.blue=StringToDouble(value,(char **) NULL);
+                      pixel.blue=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3188,7 +3188,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"green") == 0)
                     {
-                      pixel.green=StringToDouble(value,(char **) NULL);
+                      pixel.green=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3200,7 +3200,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"red") == 0)
                     {
-                      pixel.red=StringToDouble(value,(char **) NULL);
+                      pixel.red=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3216,7 +3216,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               }
             }
           if (*gamma == '\0')
-            (void) FormatMagickString(gamma,MaxTextExtent,"%g,%g,%g",
+            (void) FormatLocaleString(gamma,MaxTextExtent,"%g,%g,%g",
               (double) pixel.red,(double) pixel.green,(double) pixel.blue);
           switch (channel)
           {
@@ -3267,7 +3267,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               {
                 if (LocaleCompare(keyword,"height") == 0)
                   {
-                    (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+                    (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
                       (double) msl_info->image[n]->rows);
                     (void) SetImageProperty(msl_info->attributes[n],key,value);
                     break;
@@ -3279,7 +3279,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               {
                 if (LocaleCompare(keyword,"width") == 0)
                   {
-                    (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+                    (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
                       (double) msl_info->image[n]->columns);
                     (void) SetImageProperty(msl_info->attributes[n],key,value);
                     break;
@@ -3394,7 +3394,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"amount") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3463,7 +3463,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"black") == 0)
               {
-                levelBlack = StringToDouble(value,(char **) NULL);
+                levelBlack = LocaleToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3474,7 +3474,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"gamma") == 0)
               {
-                levelGamma = StringToDouble(value,(char **) NULL);
+                levelGamma = LocaleToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3485,7 +3485,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword,"white") == 0)
               {
-                levelWhite = StringToDouble(value,(char **) NULL);
+                levelWhite = LocaleToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -3502,7 +3502,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
         /* process image */
         {
           char level[MaxTextExtent + 1];
-          (void) FormatMagickString(level,MaxTextExtent,"%3.6f/%3.6f/%3.6f/",
+          (void) FormatLocaleString(level,MaxTextExtent,"%3.6f/%3.6f/%3.6f/",
             levelBlack,levelGamma,levelWhite);
           LevelImage ( msl_info->image[n], level );
           break;
@@ -3677,7 +3677,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=StringToDouble(value,(char **) NULL);
+                      msl_info->image[n]->fuzz=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3706,7 +3706,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"opacity") == 0)
                     {
-                      opacity=StringToDouble(value,(char **) NULL);
+                      opacity=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3800,7 +3800,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3888,12 +3888,12 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"blackness") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   if (LocaleCompare(keyword,"brightness") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3917,7 +3917,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"hue") == 0)
                     {
-                      geometry_info.xi=StringToDouble(value,(char **) NULL);
+                      geometry_info.xi=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3929,7 +3929,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"lightness") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3941,7 +3941,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"saturation") == 0)
                     {
-                      geometry_info.sigma=StringToDouble(value,(char **) NULL);
+                      geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3953,7 +3953,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"whiteness") == 0)
                     {
-                      geometry_info.sigma=StringToDouble(value,(char **) NULL);
+                      geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -3968,7 +3968,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatMagickString(modulate,MaxTextExtent,"%g,%g,%g",
+          (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
             geometry_info.rho,geometry_info.sigma,geometry_info.xi);
           (void) ModulateImage(msl_info->image[n],modulate);
           break;
@@ -4140,7 +4140,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4215,7 +4215,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"fuzz") == 0)
                     {
-                      msl_info->image[n]->fuzz=StringToDouble(value,(char **) NULL);
+                      msl_info->image[n]->fuzz=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4256,7 +4256,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
               {
                 if (LocaleCompare(keyword,"output") == 0)
                   {
-                    (void) fprintf(stdout,"%s",value);
+                    (void) FormatLocaleFile(stdout,"%s",value);
                     break;
                   }
                 ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -4517,22 +4517,22 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                         *p;
 
                       p=value;
-                      draw_info->affine.sx=StringToDouble(p,&p);
+                      draw_info->affine.sx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.rx=StringToDouble(p,&p);
+                      draw_info->affine.rx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ry=StringToDouble(p,&p);
+                      draw_info->affine.ry=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.sy=StringToDouble(p,&p);
+                      draw_info->affine.sy=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.tx=StringToDouble(p,&p);
+                      draw_info->affine.tx=LocaleToDouble(p,&p);
                       if (*p ==',')
                         p++;
-                      draw_info->affine.ty=StringToDouble(p,&p);
+                      draw_info->affine.ty=LocaleToDouble(p,&p);
                       break;
                     }
                   if (LocaleCompare(keyword,"align") == 0)
@@ -4637,7 +4637,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"pointsize") == 0)
                     {
-                      draw_info->pointsize=StringToDouble(value,(char **) NULL);
+                      draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -4649,7 +4649,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"rotate") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                       affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                       affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -4674,13 +4674,13 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                     }
                   if (LocaleCompare(keyword,"skewX") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.ry=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
                   if (LocaleCompare(keyword,"skewY") == 0)
                     {
-                      angle=StringToDouble(value,(char **) NULL);
+                      angle=LocaleToDouble(value,(char **) NULL);
                       affine.rx=cos(DegreesToRadians(fmod(angle,360.0)));
                       break;
                     }
@@ -4797,7 +4797,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 }
               }
             }
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
             geometry.height,(double) geometry.x,(double) geometry.y);
           CloneString(&draw_info->geometry,text);
@@ -5025,7 +5025,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5203,7 +5203,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"blur") == 0)
               {
-                msl_info->image[n]->blur=StringToDouble(value,(char **) NULL);
+                msl_info->image[n]->blur=LocaleToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5232,7 +5232,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"x-resolution") == 0)
               {
-                x_resolution=StringToDouble(value,(char **) NULL);
+                x_resolution=LocaleToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5243,7 +5243,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
             if (LocaleCompare(keyword,"y-resolution") == 0)
               {
-                y_resolution=StringToDouble(value,(char **) NULL);
+                y_resolution=LocaleToDouble(value,(char **) NULL);
                 break;
               }
             ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5363,7 +5363,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"support") == 0)
                     {
-                      blur=StringToDouble(value,(char **) NULL);
+                      blur=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5584,7 +5584,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -5646,7 +5646,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"degrees") == 0)
             {
-            degrees = StringToDouble(value,(char **) NULL);
+            degrees = LocaleToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -5868,7 +5868,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"cluster-threshold") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   if (LocaleCompare(keyword,"colorspace") == 0)
@@ -5904,7 +5904,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"smoothing-threshold") == 0)
                     {
-                      geometry_info.sigma=StringToDouble(value,(char **) NULL);
+                      geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6052,10 +6052,10 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 if (image_option != (const char *) NULL)
                   flags=ParseAbsoluteGeometry(image_option,&geometry);
                 flags=ParseAbsoluteGeometry(value,&geometry);
-                (void) FormatMagickString(page,MaxTextExtent,"%.20gx%.20g",
+                (void) FormatLocaleString(page,MaxTextExtent,"%.20gx%.20g",
                   (double) geometry.width,(double) geometry.height);
                 if (((flags & XValue) != 0) || ((flags & YValue) != 0))
-                  (void) FormatMagickString(page,MaxTextExtent,
+                  (void) FormatLocaleString(page,MaxTextExtent,
                     "%.20gx%.20g%+.20g%+.20g",(double) geometry.width,
                     (double) geometry.height,(double) geometry.x,(double)
                     geometry.y);
@@ -6107,7 +6107,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"azimuth") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6119,7 +6119,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"elevation") == 0)
                     {
-                      geometry_info.sigma=StringToDouble(value,(char **) NULL);
+                      geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6230,7 +6230,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.xi=StringToDouble(value,(char **) NULL);
+                      geometry_info.xi=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6294,7 +6294,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
             {
               if (LocaleCompare(keyword, "radius") == 0)
               {
-                radius = StringToDouble(value,(char **) NULL);
+                radius = LocaleToDouble(value,(char **) NULL);
                 break;
               }
               ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -6477,7 +6477,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"x") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6581,7 +6581,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"threshold") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6641,7 +6641,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"radius") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -6888,7 +6888,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
                 {
                   if (LocaleCompare(keyword,"degrees") == 0)
                     {
-                      geometry_info.rho=StringToDouble(value,(char **) NULL);
+                      geometry_info.rho=LocaleToDouble(value,(char **) NULL);
                       break;
                     }
                   ThrowMSLException(OptionError,"UnrecognizedAttribute",
@@ -7041,7 +7041,7 @@ static void MSLStartElement(void *context,const xmlChar *tag,
           {
           if (LocaleCompare(keyword,"threshold") == 0)
             {
-            threshold = StringToDouble(value,(char **) NULL);
+            threshold = LocaleToDouble(value,(char **) NULL);
             break;
             }
           ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
@@ -7990,8 +7990,8 @@ static MagickBooleanType SetMSLAttributes(MSLInfo *msl_info,const char *keyword,
     {
       if (LocaleCompare(keyword,"pointsize") == 0)
         {
-          image_info->pointsize=StringToDouble(value,(char **) NULL);
-          draw_info->pointsize=StringToDouble(value,(char **) NULL);
+          image_info->pointsize=LocaleToDouble(value,(char **) NULL);
+          draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
           break;
         }
       ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
index a9132fd83ad5a02bab8e96232eda50a78a052ac3..a8476cd92659c405251de554a6b172d85b8a3698 100644 (file)
@@ -367,7 +367,7 @@ static MagickBooleanType WriteMTVImage(const ImageInfo *image_info,Image *image)
     /*
       Initialize raster file header.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n",(double)
       image->columns,(double) image->rows);
     (void) WriteBlobString(image,buffer);
     for (y=0; y < (ssize_t) image->rows; y++)
index 65c5d1e1a43794f942bb0f9d9bfddf234fdcdea0..80134106dd173217d1bea2ac447d7646a0e6c318 100644 (file)
@@ -634,9 +634,9 @@ static Image *ReadPCDImage(const ImageInfo *image_info,ExceptionInfo *exception)
       {
         progress_monitor=SetImageProgressMonitor(image,
           (MagickProgressMonitor) NULL,image->client_data);
-        (void) FormatMagickString(image->filename,MaxTextExtent,
+        (void) FormatLocaleString(image->filename,MaxTextExtent,
           "images/img%04ld.pcd",(long) j);
-        (void) FormatMagickString(image->magick_filename,MaxTextExtent,
+        (void) FormatLocaleString(image->magick_filename,MaxTextExtent,
           "images/img%04ld.pcd",(long) j);
         image->scene=(size_t) j;
         image->columns=width;
index b7d87839d1c91c2d65e47530a82c28d92ddd855e..0607523c3740f9b2198c9b8f0a03973b7706ed37 100644 (file)
@@ -305,7 +305,7 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
     page.width,(double) page.height);
   if (image_info->monochrome != MagickFalse)
     delegate_info=GetDelegateInfo("pcl:mono",(char *) NULL,exception);
@@ -321,12 +321,12 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
     image->x_resolution,image->y_resolution);
   page.width=(size_t) floor(page.width*image->x_resolution/delta.x+0.5);
   page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
     0.5);
-  (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+  (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
      page.width,(double) page.height);
   image=DestroyImage(image);
   read_info=CloneImageInfo(image_info);
@@ -334,10 +334,10 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (read_info->number_scenes != 0)
     {
       if (read_info->number_scenes != 1)
-        (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
+        (void) FormatLocaleString(options,MaxTextExtent,"-dLastPage=%.20g",
           (double) (read_info->scene+read_info->number_scenes));
       else
-        (void) FormatMagickString(options,MaxTextExtent,
+        (void) FormatLocaleString(options,MaxTextExtent,
           "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
           (double) (read_info->scene+read_info->number_scenes));
       read_info->number_scenes=0;
@@ -345,11 +345,11 @@ static Image *ReadPCLImage(const ImageInfo *image_info,ExceptionInfo *exception)
         *read_info->scenes='\0';
     }
   if (read_info->authenticate != (char *) NULL)
-    (void) FormatMagickString(options+strlen(options),MaxTextExtent,
+    (void) FormatLocaleString(options+strlen(options),MaxTextExtent,
       " -sPCLPassword=%s",read_info->authenticate);
   (void) CopyMagickString(filename,read_info->filename,MaxTextExtent);
   (void) AcquireUniqueFilename(read_info->filename);
-  (void) FormatMagickString(command,MaxTextExtent,
+  (void) FormatLocaleString(command,MaxTextExtent,
     GetDelegateCommands(delegate_info),
     read_info->antialias != MagickFalse ? 4 : 1,
     read_info->antialias != MagickFalse ? 4 : 1,density,options,
@@ -710,10 +710,10 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
     */
     (void) WriteBlobString(image,"\033E");  /* printer reset */
     (void) WriteBlobString(image,"\033*r3F");  /* set presentation mode */
-    (void) FormatMagickString(buffer,MaxTextExtent,"\033*r%.20gs%.20gT",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\033*r%.20gs%.20gT",
       (double) image->columns,(double) image->rows);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"\033*t%.20gR",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\033*t%.20gR",(double)
       density);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"\033&l0E");  /* top margin 0 */
@@ -754,7 +754,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
           (void) WriteBlobByte(image,8); /* bits per blue component */
           for (i=0; i < (ssize_t) image->colors; i++)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "\033*v%da%db%dc%.20gI",
               ScaleQuantumToChar(image->colormap[i].red),
               ScaleQuantumToChar(image->colormap[i].green),
@@ -763,7 +763,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
           }
           for (one=1; i < (ssize_t) (one << bits_per_pixel); i++)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"\033*v%.20gI",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"\033*v%.20gI",
               (double) i);
             (void) WriteBlobString(image,buffer);
           }
@@ -786,7 +786,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
     {
       case NoCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"\033*b0M");
+        (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b0M");
         (void) WriteBlobString(image,buffer);
         break;
       }
@@ -801,7 +801,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
           }
         (void) ResetMagickMemory(compress_pixels,0,(length+256)*
           sizeof(*compress_pixels));
-        (void) FormatMagickString(buffer,MaxTextExtent,"\033*b2M");
+        (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b2M");
         (void) WriteBlobString(image,buffer);
         break;
       }
@@ -827,7 +827,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
           }
         (void) ResetMagickMemory(previous_pixels,0,(length+1)*
           sizeof(*previous_pixels));
-        (void) FormatMagickString(buffer,MaxTextExtent,"\033*b3M");
+        (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b3M");
         (void) WriteBlobString(image,buffer);
         break;
       }
@@ -899,7 +899,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
       {
         case NoCompression:
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b%.20gW",
             (double) length);
           (void) WriteBlobString(image,buffer);
           (void) WriteBlob(image,length,pixels);
@@ -908,7 +908,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
         case RLECompression:
         {
           packets=PCLPackbitsCompressImage(length,pixels,compress_pixels);
-          (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b%.20gW",
             (double) packets);
           (void) WriteBlobString(image,buffer);
           (void) WriteBlob(image,packets,compress_pixels);
@@ -921,7 +921,7 @@ static MagickBooleanType WritePCLImage(const ImageInfo *image_info,Image *image)
               previous_pixels[i]=(~pixels[i]);
           packets=PCLDeltaCompressImage(length,previous_pixels,pixels,
             compress_pixels);
-          (void) FormatMagickString(buffer,MaxTextExtent,"\033*b%.20gW",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b%.20gW",
             (double) packets);
           (void) WriteBlobString(image,buffer);
           (void) WriteBlob(image,packets,compress_pixels);
index 8166b5c9db32dbd1cab39fef33e28f5af141f1e5..1326f4da7e44b1e6f52b243e8e6467f756e0c6e2 100644 (file)
@@ -458,7 +458,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Note spot names.
         */
-        (void) FormatMagickString(property,MaxTextExtent,"pdf:SpotColor-%.20g",
+        (void) FormatLocaleString(property,MaxTextExtent,"pdf:SpotColor-%.20g",
           (double) spotcolor++);
         i=0;
         for (c=ReadBlobByte(image); c != EOF; c=ReadBlobByte(image))
@@ -526,7 +526,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Set PDF render geometry.
         */
-        (void) FormatMagickString(geometry,MaxTextExtent,
+        (void) FormatLocaleString(geometry,MaxTextExtent,
           "%gx%g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
            bounds.x1,bounds.y1);
         (void) SetImageProperty(image,"pdf:HiResBoundingBox",geometry);
@@ -586,7 +586,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       if ((flags & SigmaValue) == 0)
         image->y_resolution=image->x_resolution;
     }
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",image->x_resolution,
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",image->x_resolution,
     image->y_resolution);
   if (image_info->page != (char *) NULL)
     {
@@ -595,7 +595,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
         delta.x)+0.5);
       page.height=(size_t) floor((double) (page.height*image->y_resolution/
         delta.y)+0.5);
-      (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+      (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
         page.width,(double) page.height);
     }
   if (cmyk != MagickFalse)
@@ -611,7 +611,7 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
       char
         pages[MaxTextExtent];
 
-      (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%.20g "
+      (void) FormatLocaleString(pages,MaxTextExtent,"-dFirstPage=%.20g "
         "-dLastPage=%.20g",(double) read_info->scene+1,(double)
         (read_info->scene+read_info->number_scenes));
       (void) ConcatenateMagickString(options,pages,MaxTextExtent);
@@ -620,12 +620,12 @@ static Image *ReadPDFImage(const ImageInfo *image_info,ExceptionInfo *exception)
         *read_info->scenes='\0';
     }
   if (read_info->authenticate != (char *) NULL)
-    (void) FormatMagickString(options+strlen(options),MaxTextExtent,
+    (void) FormatLocaleString(options+strlen(options),MaxTextExtent,
       " -sPDFPassword=%s",read_info->authenticate);
   (void) CopyMagickString(filename,read_info->filename,MaxTextExtent);
   (void) AcquireUniqueFilename(filename);
   (void) ConcatenateMagickString(filename,"-%08d",MaxTextExtent);
-  (void) FormatMagickString(command,MaxTextExtent,
+  (void) FormatLocaleString(command,MaxTextExtent,
     GetDelegateCommands(delegate_info),
     read_info->antialias != MagickFalse ? 4 : 1,
     read_info->antialias != MagickFalse ? 4 : 1,density,options,filename,
@@ -1073,7 +1073,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       version=(size_t) MagickMax(version,4);
   if (LocaleCompare(image_info->magick,"PDFA") == 0)
     version=(size_t) MagickMax(version,6);
-  (void) FormatMagickString(buffer,MaxTextExtent,"%%PDF-1.%.20g \n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"%%PDF-1.%.20g \n",
     (double) version);
   (void) WriteBlobString(image,buffer);
   if (LocaleCompare(image_info->magick,"PDFA") == 0)
@@ -1083,19 +1083,19 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
   */
   xref[object++]=TellBlob(image);
   root_id=object;
-  (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
     object);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"<<\n");
   if (LocaleCompare(image_info->magick,"PDFA") != 0)
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
       (double) object+1);
   else
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,"/Metadata %.20g 0 R\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"/Metadata %.20g 0 R\n",
         (double) object+1);
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"/Pages %.20g 0 R\n",
         (double) object+2);
     }
   (void) WriteBlobString(image,buffer);
@@ -1117,7 +1117,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         Write XMP object.
       */
       xref[object++]=TellBlob(image);
-      (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",
         (double) object);
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"<<\n");
@@ -1131,10 +1131,10 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       if (value != (const char *) NULL)
         (void) CopyMagickString(create_date,value,MaxTextExtent);
       (void) FormatMagickTime(time((time_t *) NULL),MaxTextExtent,timestamp);
-      i=FormatMagickString(xmp_profile,MaxTextExtent,XMPProfile,
+      i=FormatLocaleString(xmp_profile,MaxTextExtent,XMPProfile,
         XMPProfileMagick,modify_date,create_date,timestamp,
         GetMagickVersion(&version),GetMagickVersion(&version));
-      (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g\n",
         (double) i);
       (void) WriteBlobString(image,buffer);
       (void) WriteBlobString(image,"/Type /Metadata\n");
@@ -1148,12 +1148,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
   */
   xref[object++]=TellBlob(image);
   pages_id=object;
-  (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
     object);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"<<\n");
   (void) WriteBlobString(image,"/Type /Pages\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Kids [ %.20g 0 R ",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Kids [ %.20g 0 R ",
     (double) object+1);
   (void) WriteBlobString(image,buffer);
   count=(ssize_t) (pages_id+ObjectsPerImage+1);
@@ -1168,7 +1168,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       kid_image=image;
       for ( ; GetNextImageInList(kid_image) != (Image *) NULL; count+=ObjectsPerImage)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 R ",(double)
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 R ",(double)
           count);
         (void) WriteBlobString(image,buffer);
         kid_image=GetNextImageInList(kid_image);
@@ -1179,7 +1179,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed");
     }
   (void) WriteBlobString(image,"]\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Count %.20g\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Count %.20g\n",
     (double) ((count-pages_id)/ObjectsPerImage));
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,">>\n");
@@ -1279,13 +1279,13 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         resolution.y=(double) ((size_t) (100.0*2.54*resolution.y+0.5)/100.0);
       }
     SetGeometry(image,&geometry);
-    (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+    (void) FormatLocaleString(page_geometry,MaxTextExtent,"%.20gx%.20g",
       (double) image->columns,(double) image->rows);
     if (image_info->page != (char *) NULL)
       (void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
     else
       if ((image->page.width != 0) && (image->page.height != 0))
-        (void) FormatMagickString(page_geometry,MaxTextExtent,
+        (void) FormatLocaleString(page_geometry,MaxTextExtent,
           "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,
           (double) image->page.height,(double) image->page.x,(double)
           image->page.y);
@@ -1320,12 +1320,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Page object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
     (void) WriteBlobString(image,"/Type /Page\n");
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Parent %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Parent %.20g 0 R\n",
       (double) pages_id);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"/Resources <<\n");
@@ -1335,30 +1335,30 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       labels=StringToList(value);
     if (labels != (char **) NULL)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "/Font << /F%.20g %.20g 0 R >>\n",(double) image->scene,(double)
           object+4);
         (void) WriteBlobString(image,buffer);
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "/XObject << /Im%.20g %.20g 0 R >>\n",(double) image->scene,(double)
       object+5);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/ProcSet %.20g 0 R >>\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/ProcSet %.20g 0 R >>\n",
       (double) object+3);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "/MediaBox [0 0 %g %g]\n",72.0*media_info.width/resolution.x,
       72.0*media_info.height/resolution.y);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "/CropBox [0 0 %g %g]\n",72.0*media_info.width/resolution.x,
       72.0*media_info.height/resolution.y);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Contents %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Contents %.20g 0 R\n",
       (double) object+1);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Thumb %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Thumb %.20g 0 R\n",
       (double) object+8);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,">>\n");
@@ -1367,11 +1367,11 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Contents object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
       (double) object+1);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,">>\n");
@@ -1382,22 +1382,22 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       for (i=0; labels[i] != (char *) NULL; i++)
       {
         (void) WriteBlobString(image,"BT\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"/F%.20g %g Tf\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/F%.20g %g Tf\n",
           (double) image->scene,pointsize);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g Td\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g Td\n",
           (double) geometry.x,(double) (geometry.y+geometry.height+i*pointsize+
           12));
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"(%s) Tj\n",labels[i]);
+        (void) FormatLocaleString(buffer,MaxTextExtent,"(%s) Tj\n",labels[i]);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"ET\n");
         labels[i]=DestroyString(labels[i]);
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,"%g 0 0 %g %.20g %.20g cm\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%g 0 0 %g %.20g %.20g cm\n",
       scale.x,scale.y,(double) geometry.x,(double) geometry.y);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Im%.20g Do\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Im%.20g Do\n",
       (double) image->scene);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"Q\n");
@@ -1408,17 +1408,17 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Length object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"endobj\n");
     /*
       Write Procset object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",
       (double) object);
     (void) WriteBlobString(image,buffer);
     if ((image->storage_class == DirectClass) || (image->colors > 256))
@@ -1435,7 +1435,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Font object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",
       (double) object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
@@ -1443,7 +1443,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       {
         (void) WriteBlobString(image,"/Type /Font\n");
         (void) WriteBlobString(image,"/Subtype /Type1\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Name /F%.20g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Name /F%.20g\n",
           (double) image->scene);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"/BaseFont /Helvetica\n");
@@ -1456,25 +1456,25 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write XObject object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
     (void) WriteBlobString(image,"/Type /XObject\n");
     (void) WriteBlobString(image,"/Subtype /Image\n");
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Im%.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Name /Im%.20g\n",
       (double) image->scene);
     (void) WriteBlobString(image,buffer);
     switch (compression)
     {
       case NoCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"ASCII85Decode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"ASCII85Decode");
         break;
       }
       case JPEGCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"DCTDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"DCTDecode");
         if (image->colorspace != CMYKColorspace)
           break;
         (void) WriteBlobString(image,buffer);
@@ -1484,7 +1484,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       }
       case JPEG2000Compression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"JPXDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"JPXDecode");
         if (image->colorspace != CMYKColorspace)
           break;
         (void) WriteBlobString(image,buffer);
@@ -1494,12 +1494,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       }
       case LZWCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"LZWDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"LZWDecode");
         break;
       }
       case ZipCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"FlateDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"FlateDecode");
         break;
       }
       case FaxCompression:
@@ -1508,39 +1508,39 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         (void) CopyMagickString(buffer,"/Filter [ /CCITTFaxDecode ]\n",
           MaxTextExtent);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"/DecodeParms [ << "
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/DecodeParms [ << "
           "/K %s /BlackIs1 false /Columns %.20g /Rows %.20g >> ]\n",CCITTParam,
           (double) image->columns,(double) image->rows);
         break;
       }
       default:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,
           "RunLengthDecode");
         break;
       }
     }
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
       image->columns);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
       image->rows);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
       (double) object+2);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
       (compression == FaxCompression) || (compression == Group4Compression) ?
       1 : 8);
     (void) WriteBlobString(image,buffer);
     if (image->matte != MagickFalse)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"/SMask %.20g 0 R\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/SMask %.20g 0 R\n",
           (double) object+7);
         (void) WriteBlobString(image,buffer);
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
       (double) object+1);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,">>\n");
@@ -1870,10 +1870,10 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Length object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",
       (double) offset);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"endobj\n");
@@ -1881,7 +1881,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Colorspace object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     if (image->colorspace == CMYKColorspace)
@@ -1898,7 +1898,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
             (compression == JPEG2000Compression))
           (void) CopyMagickString(buffer,"/DeviceRGB\n",MaxTextExtent);
         else
-          (void) FormatMagickString(buffer,MaxTextExtent,
+          (void) FormatLocaleString(buffer,MaxTextExtent,
             "[ /Indexed /DeviceRGB %.20g %.20g 0 R ]\n",(double) image->colors-
             1,(double) object+3);
     (void) WriteBlobString(image,buffer);
@@ -1914,7 +1914,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
     if (tile_image == (Image *) NULL)
       ThrowWriterException(ResourceLimitError,image->exception.reason);
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
@@ -1922,12 +1922,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
     {
       case NoCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"ASCII85Decode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"ASCII85Decode");
         break;
       }
       case JPEGCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"DCTDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"DCTDecode");
         if (image->colorspace != CMYKColorspace)
           break;
         (void) WriteBlobString(image,buffer);
@@ -1937,7 +1937,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       }
       case JPEG2000Compression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"JPXDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"JPXDecode");
         if (image->colorspace != CMYKColorspace)
           break;
         (void) WriteBlobString(image,buffer);
@@ -1947,12 +1947,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       }
       case LZWCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"LZWDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"LZWDecode");
         break;
       }
       case ZipCompression:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"FlateDecode");
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"FlateDecode");
         break;
       }
       case FaxCompression:
@@ -1961,33 +1961,33 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         (void) CopyMagickString(buffer,"/Filter [ /CCITTFaxDecode ]\n",
           MaxTextExtent);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"/DecodeParms [ << "
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/DecodeParms [ << "
           "/K %s /BlackIs1 false /Columns %.20g /Rows %.20g >> ]\n",CCITTParam,
           (double) tile_image->columns,(double) tile_image->rows);
         break;
       }
       default:
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,CFormat,
+        (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,
           "RunLengthDecode");
         break;
       }
     }
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Width %.20g\n",(double)
       tile_image->columns);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Height %.20g\n",(double)
       tile_image->rows);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/ColorSpace %.20g 0 R\n",
       (double) object-1);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
       (compression == FaxCompression) || (compression == Group4Compression) ?
       1 : 8);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
       (double) object+1);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,">>\n");
@@ -2290,14 +2290,14 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Length object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"endobj\n");
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     if ((image->storage_class != DirectClass) && (image->colors <= 256) &&
@@ -2309,7 +2309,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
         (void) WriteBlobString(image,"<<\n");
         if (compression == NoCompression)
           (void) WriteBlobString(image,"/Filter [ /ASCII85Decode ]\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
           (double) object+1);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,">>\n");
@@ -2343,10 +2343,10 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Length object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
       offset);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"endobj\n");
@@ -2354,7 +2354,7 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write softmask object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"<<\n");
@@ -2364,48 +2364,48 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       {
         (void) WriteBlobString(image,"/Type /XObject\n");
         (void) WriteBlobString(image,"/Subtype /Image\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Name /Ma%.20g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Name /Ma%.20g\n",
           (double) image->scene);
         (void) WriteBlobString(image,buffer);
         switch (compression)
         {
           case NoCompression:
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,CFormat,
+            (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,
               "ASCII85Decode");
             break;
           }
           case LZWCompression:
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"LZWDecode");
+            (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"LZWDecode");
             break;
           }
           case ZipCompression:
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,CFormat,
+            (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,
               "FlateDecode");
             break;
           }
           default:
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,CFormat,
+            (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,
               "RunLengthDecode");
             break;
           }
         }
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Width %.20g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Width %.20g\n",
           (double) image->columns);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Height %.20g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Height %.20g\n",
           (double) image->rows);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"/ColorSpace /DeviceGray\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/BitsPerComponent %d\n",
           (compression == FaxCompression) || (compression == Group4Compression)
           ? 1 : 8);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"/Length %.20g 0 R\n",
           (double) object+1);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,">>\n");
@@ -2491,10 +2491,10 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
       Write Length object.
     */
     xref[object++]=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
       object);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
     (void) WriteBlobString(image,buffer);
     (void) WriteBlobString(image,"endobj\n");
     if (GetNextImageInList(image) == (Image *) NULL)
@@ -2510,12 +2510,12 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
   */
   xref[object++]=TellBlob(image);
   info_id=object;
-  (void) FormatMagickString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g 0 obj\n",(double)
     object);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"<<\n");
   GetPathComponent(image->filename,BasePath,basename);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Title (%s)\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Title (%s)\n",
     EscapeParenthesis(basename));
   (void) WriteBlobString(image,buffer);
   seconds=time((time_t *) NULL);
@@ -2524,14 +2524,14 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
 #else
   (void) memcpy(&local_time,localtime(&seconds),sizeof(local_time));
 #endif
-  (void) FormatMagickString(date,MaxTextExtent,"D:%04d%02d%02d%02d%02d%02d",
+  (void) FormatLocaleString(date,MaxTextExtent,"D:%04d%02d%02d%02d%02d%02d",
     local_time.tm_year+1900,local_time.tm_mon+1,local_time.tm_mday,
     local_time.tm_hour,local_time.tm_min,local_time.tm_sec);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/CreationDate (%s)\n",date);
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/CreationDate (%s)\n",date);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/ModDate (%s)\n",date);
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/ModDate (%s)\n",date);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Producer (%s)\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Producer (%s)\n",
     EscapeParenthesis(GetMagickVersion((size_t *) NULL)));
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,">>\n");
@@ -2541,30 +2541,30 @@ static MagickBooleanType WritePDFImage(const ImageInfo *image_info,Image *image)
   */
   offset=TellBlob(image)-xref[0]+10;
   (void) WriteBlobString(image,"xref\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"0 %.20g\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"0 %.20g\n",(double)
     object+1);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"0000000000 65535 f \n");
   for (i=0; i < (ssize_t) object; i++)
   {
-    (void) FormatMagickString(buffer,MaxTextExtent,"%010lu 00000 n \n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%010lu 00000 n \n",
       (unsigned long) xref[i]);
     (void) WriteBlobString(image,buffer);
   }
   (void) WriteBlobString(image,"trailer\n");
   (void) WriteBlobString(image,"<<\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Size %.20g\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Size %.20g\n",(double)
     object+1);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Info %.20g 0 R\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Info %.20g 0 R\n",(double)
     info_id);
   (void) WriteBlobString(image,buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"/Root %.20g 0 R\n",(double)
+  (void) FormatLocaleString(buffer,MaxTextExtent,"/Root %.20g 0 R\n",(double)
     root_id);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,">>\n");
   (void) WriteBlobString(image,"startxref\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
+  (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double) offset);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"%%EOF\n");
   xref=(MagickOffsetType *) RelinquishMagickMemory(xref);
index 125e0ca1f9cd1e6ba3ce92374122680313c35c06..d62c7aa7cb8ffc60da18d9506f5eba9a585dc37b 100644 (file)
@@ -626,8 +626,8 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception)
     file=fdopen(unique_file,"wb");
   if ((unique_file == -1) || (file == (FILE *) NULL))
     ThrowImageException(FileOpenError,"UnableToCreateTemporaryFile");
-  (void) fprintf(file,"<?xml version=\"1.0\"?>\n");
-  (void) fprintf(file,"<svg xmlns=\"http://www.w3.org/2000/svg\" "
+  (void) FormatLocaleFile(file,"<?xml version=\"1.0\"?>\n");
+  (void) FormatLocaleFile(file,"<svg xmlns=\"http://www.w3.org/2000/svg\" "
     "xlink=\"http://www.w3.org/1999/xlink\" "
     "ev=\"http://www.w3.org/2001/xml-events\" version=\"1.1\" "
     "baseProfile=\"full\" width=\"%g\" height=\"%g\">\n",bounds.x2-bounds.x1,
@@ -635,16 +635,16 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception)
   for (i=0; i < (ssize_t) number_blocks; i++)
   {
     offset=blocks[i].offset;
-    (void) fprintf(file,"  <path stroke=\"#%02x%02x%02x\" fill=\"none\" "
+    (void) FormatLocaleFile(file,"  <path stroke=\"#%02x%02x%02x\" fill=\"none\" "
       "d=\"M %g %g",blocks[i].color->red,blocks[i].color->green,
       blocks[i].color->blue,stitches[offset].x-bounds.x1,
       stitches[offset].y-bounds.y1);
     for (j=1; j < (ssize_t) (blocks[i+1].offset-offset); j++)
-      (void) fprintf(file," L %g %g",stitches[offset+j].x-bounds.x1,
+      (void) FormatLocaleFile(file," L %g %g",stitches[offset+j].x-bounds.x1,
         stitches[offset+j].y-bounds.y1);
-    (void) fprintf(file,"\"/>\n");
+    (void) FormatLocaleFile(file,"\"/>\n");
   }
-  (void) fprintf(file,"</svg>\n");
+  (void) FormatLocaleFile(file,"</svg>\n");
   (void) fclose(file);
   (void) CloseBlob(image);
   image=DestroyImage(image);
@@ -653,7 +653,7 @@ static Image *ReadPESImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"svg:%s",
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"svg:%s",
     filename);
   image=ReadImage(read_info,exception);
   if (image != (Image *) NULL)
index a394e53e923a0e1684079a20ba3fdcb5a29830c6..9ddf918cfc9d6276e8f61307ccd1e07cfccfb18e 100644 (file)
@@ -1381,7 +1381,7 @@ static Image *ReadPICTImage(const ImageInfo *image_info,
         read_info=DestroyImageInfo(read_info);
         if (tile_image == (Image *) NULL)
           continue;
-        (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",
+        (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g",
           (double) MagickMax(image->columns,tile_image->columns),
           (double) MagickMax(image->rows,tile_image->rows));
         (void) SetImageExtent(image,
index 9b4850e5d90667af44fd73d260a6b79ed1e94bac..afecebd21271a6fdb0db715efd6bead1d364b66c 100644 (file)
@@ -159,7 +159,7 @@ static Image *ReadPlasmaImage(const ImageInfo *image_info,
   */
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,
     "gradient:%s",image_info->filename);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
index 189cb4924c4b700789573323ed8758fc414ec684..1779c71af7880a89fdf96fdf2e25ad43bee29cc0 100644 (file)
@@ -1027,7 +1027,7 @@ static void png_get_data(png_structp png_ptr,png_bytep data,png_size_t length)
           char
             msg[MaxTextExtent];
 
-          (void) FormatMagickString(msg,MaxTextExtent,
+          (void) FormatLocaleString(msg,MaxTextExtent,
             "Expected %.20g bytes; found %.20g bytes",(double) length,
             (double) check);
           png_warning(png_ptr,msg);
@@ -2335,17 +2335,17 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
      /* encode ping_width, ping_height, ping_bit_depth, ping_color_type,
         ping_interlace_method in value */
 
-     (void) FormatMagickString(msg,MaxTextExtent,
+     (void) FormatLocaleString(msg,MaxTextExtent,
          "%d, %d",(int) ping_width, (int) ping_height);
      (void) SetImageProperty(image,"PNG:IHDR.width,height    ",msg);
 
-     (void) FormatMagickString(msg,MaxTextExtent,"%d",(int) ping_bit_depth);
+     (void) FormatLocaleString(msg,MaxTextExtent,"%d",(int) ping_bit_depth);
      (void) SetImageProperty(image,"PNG:IHDR.bit_depth       ",msg);
 
-     (void) FormatMagickString(msg,MaxTextExtent,"%d",(int) ping_color_type);
+     (void) FormatLocaleString(msg,MaxTextExtent,"%d",(int) ping_color_type);
      (void) SetImageProperty(image,"PNG:IHDR.color_type      ",msg);
 
-     (void) FormatMagickString(msg,MaxTextExtent,"%d",
+     (void) FormatLocaleString(msg,MaxTextExtent,"%d",
         (int) ping_interlace_method);
      (void) SetImageProperty(image,"PNG:IHDR.interlace_method",msg);
    }
@@ -3092,33 +3092,33 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
      if (num_text_total != 0)
        {
          /* libpng doesn't tell us whether they were tEXt, zTXt, or iTXt */
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "%d tEXt/zTXt/iTXt chunks were found", num_text_total);
          (void) SetImageProperty(image,"PNG:text                 ",msg);
        }
 
      if (num_raw_profiles != 0)
        {
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "%d were found", num_raw_profiles);
          (void) SetImageProperty(image,"PNG:text-encoded profiles",msg);
        }
 
      if (png_get_valid(ping,ping_info,PNG_INFO_cHRM))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,"%s",
+         (void) FormatLocaleString(msg,MaxTextExtent,"%s",
             "chunk was found (see Chromaticity, above)");
          (void) SetImageProperty(image,"PNG:cHRM                 ",msg);
        }
 
      if (png_get_valid(ping,ping_info,PNG_INFO_bKGD))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,"%s",
+         (void) FormatLocaleString(msg,MaxTextExtent,"%s",
             "chunk was found (see Background color, above)");
          (void) SetImageProperty(image,"PNG:bKGD                 ",msg);
        }
 
-     (void) FormatMagickString(msg,MaxTextExtent,"%s",
+     (void) FormatLocaleString(msg,MaxTextExtent,"%s",
         "chunk was found");
 
      if (png_get_valid(ping,ping_info,PNG_INFO_iCCP))
@@ -3130,7 +3130,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 #if defined(PNG_sRGB_SUPPORTED)
      if (png_get_valid(ping,ping_info,PNG_INFO_sRGB))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "intent=%d (See Rendering intent)",
             (int) intent);
          (void) SetImageProperty(image,"PNG:sRGB                 ",msg);
@@ -3139,7 +3139,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 
      if (png_get_valid(ping,ping_info,PNG_INFO_gAMA))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "gamma=%.8g (See Gamma, above)",
             file_gamma);
          (void) SetImageProperty(image,"PNG:gAMA                 ",msg);
@@ -3148,7 +3148,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 #if defined(PNG_pHYs_SUPPORTED)
      if (png_get_valid(ping,ping_info,PNG_INFO_pHYs))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "x_res=%.10g, y_res=%.10g, units=%d",
             (double) x_resolution,(double) y_resolution, unit_type);
          (void) SetImageProperty(image,"PNG:pHYs                 ",msg);
@@ -3158,7 +3158,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 #if defined(PNG_oFFs_SUPPORTED)
      if (png_get_valid(ping,ping_info,PNG_INFO_oFFs))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,"x_off=%.20g, y_off=%.20g",
+         (void) FormatLocaleString(msg,MaxTextExtent,"x_off=%.20g, y_off=%.20g",
             (double) image->page.x,(double) image->page.y);
          (void) SetImageProperty(image,"PNG:oFFs                 ",msg);
        }
@@ -3167,7 +3167,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
      if ((image->page.width != 0 && image->page.width != image->columns) ||
          (image->page.height != 0 && image->page.height != image->rows))
        {
-         (void) FormatMagickString(msg,MaxTextExtent,
+         (void) FormatLocaleString(msg,MaxTextExtent,
             "width=%.20g, height=%.20g",
             (double) image->page.width,(double) image->page.height);
          (void) SetImageProperty(image,"PNG:vpAg                 ",msg);
@@ -3891,7 +3891,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
     (void) LogMagickEvent(CoderEvent,GetMagickModule(),
       "    Reading jng_image from color_blob.");
 
-  (void) FormatMagickString(color_image_info->filename,MaxTextExtent,"%s",
+  (void) FormatLocaleString(color_image_info->filename,MaxTextExtent,"%s",
     color_image->filename);
 
   color_image_info->ping=MagickFalse;   /* To do: avoid this */
@@ -3948,7 +3948,7 @@ static Image *ReadOneJNGImage(MngInfo *mng_info,
            (void) LogMagickEvent(CoderEvent,GetMagickModule(),
              "    Reading opacity from alpha_blob.");
 
-         (void) FormatMagickString(alpha_image_info->filename,MaxTextExtent,
+         (void) FormatLocaleString(alpha_image_info->filename,MaxTextExtent,
            "%s",alpha_image->filename);
 
          jng_image=ReadImage(alpha_image_info,exception);
@@ -4472,7 +4472,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info,ExceptionInfo *exception)
                 (mng_info->mng_height > 65535L))
               ThrowReaderException(ImageError,"WidthOrHeightExceedsLimit");
 
-            (void) FormatMagickString(page_geometry,MaxTextExtent,
+            (void) FormatLocaleString(page_geometry,MaxTextExtent,
               "%.20gx%.20g+0+0",(double) mng_info->mng_width,(double)
               mng_info->mng_height);
 
@@ -6840,7 +6840,7 @@ Magick_png_write_raw_profile(const ImageInfo *image_info,png_struct *ping,
      allocated_length);
    dp+=description_length;
    *dp++='\n';
-   (void) FormatMagickString(dp,allocated_length-
+   (void) FormatLocaleString(dp,allocated_length-
      (png_size_t) (dp-text[0].text),"%8lu ",(unsigned long) length);
    dp+=8;
 
@@ -10798,7 +10798,7 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
       jpeg_image_info->type=GrayscaleType;
       (void) SetImageType(jpeg_image,GrayscaleType);
       (void) AcquireUniqueFilename(jpeg_image->filename);
-      (void) FormatMagickString(jpeg_image_info->filename,MaxTextExtent,
+      (void) FormatLocaleString(jpeg_image_info->filename,MaxTextExtent,
         "%s",jpeg_image->filename);
     }
 
@@ -11171,7 +11171,7 @@ static MagickBooleanType WriteOneJNGImage(MngInfo *mng_info,
   (void) CopyMagickString(jpeg_image->magick,"JPEG",MaxTextExtent);
 
   (void) AcquireUniqueFilename(jpeg_image->filename);
-  (void) FormatMagickString(jpeg_image_info->filename,MaxTextExtent,"%s",
+  (void) FormatLocaleString(jpeg_image_info->filename,MaxTextExtent,"%s",
     jpeg_image->filename);
 
   status=OpenBlob(jpeg_image_info,jpeg_image,WriteBinaryBlobMode,
index 85d6252b88baf327f199dde17a1a5c6bfe74664d..1dc040de628c42cae2e5d6e292a8f1d7aeb68e59 100644 (file)
@@ -304,7 +304,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception)
               scale[MaxTextExtent];
 
             (void) ReadBlobString(image,scale);
-            quantum_scale=StringToDouble(scale,(char **) NULL);
+            quantum_scale=LocaleToDouble(scale,(char **) NULL);
           }
         else
           {
@@ -1533,7 +1533,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
         break;
       }
     }
-    (void) FormatMagickString(buffer,MaxTextExtent,"P%c\n",format);
+    (void) FormatLocaleString(buffer,MaxTextExtent,"P%c\n",format);
     (void) WriteBlobString(image,buffer);
     value=GetImageProperty(image,"comment");
     if (value != (const char *) NULL)
@@ -1559,7 +1559,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
       {
         if (image->colorspace != RGBColorspace)
           (void) TransformImageColorspace(image,RGBColorspace);
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n",
           (double) image->columns,(double) image->rows);
         (void) WriteBlobString(image,buffer);
       }
@@ -1571,7 +1571,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
         /*
           PAM header.
         */
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "WIDTH %.20g\nHEIGHT %.20g\n",(double) image->columns,(double)
           image->rows);
         (void) WriteBlobString(image,buffer);
@@ -1609,11 +1609,11 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
           }
         if (image->depth > 16)
           image->depth=16;
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "DEPTH %.20g\nMAXVAL %.20g\n",(double) packet_size,(double)
           GetQuantumRange(image->depth));
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"TUPLTYPE %s\nENDHDR\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"TUPLTYPE %s\nENDHDR\n",
           type);
         (void) WriteBlobString(image,buffer);
       }
@@ -1699,10 +1699,10 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
           {
             index=PixelIntensityToQuantum(p);
             if (image->depth <= 8)
-              count=(ssize_t) FormatMagickString(buffer,MaxTextExtent,"%u ",
+              count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,"%u ",
                 ScaleQuantumToChar(index));
             else
-              count=(ssize_t) FormatMagickString(buffer,MaxTextExtent,"%u ",
+              count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,"%u ",
                 ScaleQuantumToShort(index));
             extent=(size_t) count;
             (void) strncpy((char *) q,buffer,extent);
@@ -1757,12 +1757,12 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
           for (x=0; x < (ssize_t) image->columns; x++)
           {
             if (image->depth <= 8)
-              count=(ssize_t) FormatMagickString(buffer,MaxTextExtent,
+              count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,
                 "%u %u %u ",ScaleQuantumToChar(GetRedPixelComponent(p)),
                 ScaleQuantumToChar(GetGreenPixelComponent(p)),
                 ScaleQuantumToChar(GetBluePixelComponent(p)));
             else
-              count=(ssize_t) FormatMagickString(buffer,MaxTextExtent,
+              count=(ssize_t) FormatLocaleString(buffer,MaxTextExtent,
                 "%u %u %u ",ScaleQuantumToShort(GetRedPixelComponent(p)),
                 ScaleQuantumToShort(GetGreenPixelComponent(p)),
                 ScaleQuantumToShort(GetBluePixelComponent(p)));
@@ -1837,7 +1837,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
         */
         if (image->depth > 8)
           image->depth=16;
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
           GetQuantumRange(image->depth));
         (void) WriteBlobString(image,buffer);
         quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
@@ -1920,7 +1920,7 @@ static MagickBooleanType WritePNMImage(const ImageInfo *image_info,Image *image)
         */
         if (image->depth > 8)
           image->depth=16;
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
           GetQuantumRange(image->depth));
         (void) WriteBlobString(image,buffer);
         quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
index a7be719174968204f37ee7f1a90ccf1caa79d936..383cb8958a59c66fa4161ca57920e9a60c960372 100644 (file)
@@ -189,7 +189,7 @@ static MagickBooleanType WritePreviewImage(const ImageInfo *image_info,
   write_info=CloneImageInfo(image_info);
   (void) SetImageInfo(write_info,1,&image->exception);
   if (LocaleCompare(write_info->magick,"PREVIEW") == 0)
-    (void) FormatMagickString(preview_image->filename,MaxTextExtent,
+    (void) FormatLocaleString(preview_image->filename,MaxTextExtent,
       "miff:%s",image_info->filename);
   status=WriteImage(write_info,preview_image);
   preview_image=DestroyImage(preview_image);
index c0f47c370736bcb0e59eda7e5b53281828bc27b3..9bd3d58963e1f0ddf2f31e7f5fef91a3b9648257 100644 (file)
@@ -622,7 +622,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Note spot names.
         */
-        (void) FormatMagickString(property,MaxTextExtent,"ps:SpotColor-%.20g",
+        (void) FormatLocaleString(property,MaxTextExtent,"ps:SpotColor-%.20g",
           (double) (spotcolor++));
         for (p=command; *p != '\0'; p++)
           if (isspace((int) (unsigned char) *p) != 0)
@@ -662,7 +662,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
         /*
           Set Postscript render geometry.
         */
-        (void) FormatMagickString(geometry,MaxTextExtent,
+        (void) FormatLocaleString(geometry,MaxTextExtent,
           "%gx%g%+.15g%+.15g",bounds.x2-bounds.x1,bounds.y2-bounds.y1,
           bounds.x1,bounds.y1);
         (void) SetImageProperty(image,"ps:HiResBoundingBox",geometry);
@@ -694,7 +694,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
       char
         translate_geometry[MaxTextExtent];
 
-      (void) FormatMagickString(translate_geometry,MaxTextExtent,
+      (void) FormatLocaleString(translate_geometry,MaxTextExtent,
         "%g %g translate\n",-bounds.x1,-bounds.y1);
       count=write(file,translate_geometry,(unsigned int)
         strlen(translate_geometry));
@@ -727,7 +727,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
       if ((flags & SigmaValue) == 0)
         image->y_resolution=image->x_resolution;
     }
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
     image->x_resolution,image->y_resolution);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
@@ -735,7 +735,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
     0.5);
   page.height=(size_t) floor((double) (page.height*image->y_resolution/delta.y)+
     0.5);
-  (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+  (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
     page.width,(double) page.height);
   read_info=CloneImageInfo(image_info);
   *read_info->magick='\0';
@@ -744,7 +744,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
       char
         pages[MaxTextExtent];
 
-      (void) FormatMagickString(pages,MaxTextExtent,"-dFirstPage=%.20g "
+      (void) FormatLocaleString(pages,MaxTextExtent,"-dFirstPage=%.20g "
         "-dLastPage=%.20g",(double) read_info->scene+1,(double)
         (read_info->scene+read_info->number_scenes));
       (void) ConcatenateMagickString(options,pages,MaxTextExtent);
@@ -758,7 +758,7 @@ static Image *ReadPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   (void) CopyMagickString(filename,read_info->filename,MaxTextExtent);
   (void) AcquireUniqueFilename(filename);
   (void) ConcatenateMagickString(filename,"-%08d",MaxTextExtent);
-  (void) FormatMagickString(command,MaxTextExtent,
+  (void) FormatLocaleString(command,MaxTextExtent,
     GetDelegateCommands(delegate_info),
     read_info->antialias != MagickFalse ? 4 : 1,
     read_info->antialias != MagickFalse ? 4 : 1,density,options,filename,
@@ -1449,13 +1449,13 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
         resolution.y=(double) ((size_t) (100.0*2.54*resolution.y+0.5)/100.0);
       }
     SetGeometry(image,&geometry);
-    (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+    (void) FormatLocaleString(page_geometry,MaxTextExtent,"%.20gx%.20g",
       (double) image->columns,(double) image->rows);
     if (image_info->page != (char *) NULL)
       (void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
     else
       if ((image->page.width != 0) && (image->page.height != 0))
-        (void) FormatMagickString(page_geometry,MaxTextExtent,
+        (void) FormatLocaleString(page_geometry,MaxTextExtent,
           "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double)
           image->page.height,(double) image->page.x,(double) image->page.y);
       else
@@ -1496,12 +1496,12 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             MaxTextExtent);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"%%Creator: (ImageMagick)\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Title: (%s)\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Title: (%s)\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
         timer=time((time_t *) NULL);
         (void) FormatMagickTime(timer,MaxTextExtent,date);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "%%%%CreationDate: (%s)\n",date);
         (void) WriteBlobString(image,buffer);
         bounds.x1=(double) geometry.x;
@@ -1514,11 +1514,11 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             MaxTextExtent);
         else
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
               ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
             (void) WriteBlobString(image,buffer);
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
               bounds.y1,bounds.x2,bounds.y2);
           }
@@ -1529,14 +1529,14 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             /*
               Embed Photoshop profile.
             */
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%BeginPhotoshop: %.20g",(double) GetStringInfoLength(profile));
             (void) WriteBlobString(image,buffer);
             for (i=0; i < (ssize_t) GetStringInfoLength(profile); i++)
             {
               if ((i % 32) == 0)
                 (void) WriteBlobString(image,"\n% ");
-              (void) FormatMagickString(buffer,MaxTextExtent,"%02X",
+              (void) FormatLocaleString(buffer,MaxTextExtent,"%02X",
                 (unsigned int) (GetStringInfoDatum(profile)[i] & 0xff));
               (void) WriteBlobString(image,buffer);
             }
@@ -1549,7 +1549,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
               Embed XML profile.
             */
             (void) WriteBlobString(image,"\n%begin_xml_code\n");
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
                "\n%%begin_xml_packet: %.20g\n",(double)
                GetStringInfoLength(profile));
             (void) WriteBlobString(image,buffer);
@@ -1572,7 +1572,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             */
             (void) WriteBlobString(image,"%%Orientation: Portrait\n");
             (void) WriteBlobString(image,"%%PageOrder: Ascend\n");
-            (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Pages: %.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Pages: %.20g\n",
               image_info->adjoin != MagickFalse ? (double)
               GetImageListLength(image) : 1.0);
             (void) WriteBlobString(image,buffer);
@@ -1605,7 +1605,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             /*
               Dump image as bitmap.
             */
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%BeginPreview: %.20g %.20g %.20g %.20g\n%%  ",(double)
               preview_image->columns,(double) preview_image->rows,1.0,
               (double) ((((preview_image->columns+7) >> 3)*preview_image->rows+
@@ -1668,7 +1668,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
         */
         for (s=PostscriptProlog; *s != (char *) NULL; s++)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%s\n",*s);
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%s\n",*s);
           (void) WriteBlobString(image,buffer);
         }
         value=GetImageProperty(image,"label");
@@ -1677,13 +1677,13 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
           {
             (void) WriteBlobString(image,"  /label 512 string def\n");
             (void) WriteBlobString(image,"  currentfile label readline pop\n");
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "  0 y %g add moveto label show pop\n",j*pointsize+12);
             (void) WriteBlobString(image,buffer);
           }
         for (s=PostscriptEpilog; *s != (char *) NULL; s++)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%s\n",*s);
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%s\n",*s);
           (void) WriteBlobString(image,buffer);
         }
         if (LocaleCompare(image_info->magick,"PS") == 0)
@@ -1691,10 +1691,10 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
         (void) WriteBlobString(image,"} bind def\n");
         (void) WriteBlobString(image,"%%EndProlog\n");
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page:  1 %.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Page:  1 %.20g\n",
       (double) (page++));
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
       (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+(double)
       (geometry.height+text_size));
@@ -1716,7 +1716,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
     /*
       Output image data.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
       (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
     (void) WriteBlobString(image,buffer);
     labels=(char **) NULL;
@@ -1727,7 +1727,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
       {
         for (i=0; labels[i] != (char *) NULL; i++)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%s \n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%s \n",
             labels[i]);
           (void) WriteBlobString(image,buffer);
           labels[i]=DestroyString(labels[i]);
@@ -1749,7 +1749,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             /*
               Dump image as grayscale.
             */
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%.20g %.20g\n1\n1\n1\n8\n",(double) image->columns,(double)
               image->rows);
             (void) WriteBlobString(image,buffer);
@@ -1798,7 +1798,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
             /*
               Dump image as bitmap.
             */
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%.20g %.20g\n1\n1\n1\n1\n",(double) image->columns,(double)
               image->rows);
             (void) WriteBlobString(image,buffer);
@@ -1866,7 +1866,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
           /*
             Dump DirectClass image.
           */
-          (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
             (double) image->columns,(double) image->rows,
             image_info->compression == RLECompression ? 1 : 0);
           (void) WriteBlobString(image,buffer);
@@ -1995,7 +1995,7 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
           /*
             Dump PseudoClass image.
           */
-          (void) FormatMagickString(buffer,MaxTextExtent,
+          (void) FormatLocaleString(buffer,MaxTextExtent,
             "%.20g %.20g\n%d\n%d\n0\n",(double) image->columns,(double)
             image->rows,image->storage_class == PseudoClass ? 1 : 0,
             image_info->compression == RLECompression ? 1 : 0);
@@ -2003,12 +2003,12 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
           /*
             Dump number of colors and colormap.
           */
-          (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
             image->colors);
           (void) WriteBlobString(image,buffer);
           for (i=0; i < (ssize_t) image->colors; i++)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"%02X%02X%02X\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"%02X%02X%02X\n",
               ScaleQuantumToChar(image->colormap[i].red),
               ScaleQuantumToChar(image->colormap[i].green),
               ScaleQuantumToChar(image->colormap[i].blue));
@@ -2136,11 +2136,11 @@ static MagickBooleanType WritePSImage(const ImageInfo *image_info,Image *image)
   (void) WriteBlobString(image,"%%Trailer\n");
   if (page > 2)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
         ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
         bounds.x2,bounds.y2);
       (void) WriteBlobString(image,buffer);
index 9e014fe67b4005ad7d4a7e6d85eee3d74222358e..27471fc12b556a19709104907e72e9b5c00322b8 100644 (file)
@@ -513,13 +513,13 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
         resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
       }
     SetGeometry(image,&geometry);
-    (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+    (void) FormatLocaleString(page_geometry,MaxTextExtent,"%.20gx%.20g",
       (double) image->columns,(double) image->rows);
     if (image_info->page != (char *) NULL)
       (void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
     else
       if ((image->page.width != 0) && (image->page.height != 0))
-        (void) FormatMagickString(page_geometry,MaxTextExtent,
+        (void) FormatLocaleString(page_geometry,MaxTextExtent,
           "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double)
           image->page.height,(double) image->page.x,(double) image->page.y);
       else
@@ -560,12 +560,12 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
             MaxTextExtent);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"%%Creator: (ImageMagick)\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Title: (%s)\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Title: (%s)\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
         timer=time((time_t *) NULL);
         (void) FormatMagickTime(timer,MaxTextExtent,date);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "%%%%CreationDate: (%s)\n",date);
         (void) WriteBlobString(image,buffer);
         bounds.x1=(double) geometry.x;
@@ -578,11 +578,11 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
             MaxTextExtent);
         else
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
               ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
             (void) WriteBlobString(image,buffer);
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
               bounds.y1,bounds.x2,bounds.y2);
           }
@@ -601,7 +601,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
             if (image_info->adjoin == MagickFalse)
               (void) CopyMagickString(buffer,"%%Pages: 1\n",MaxTextExtent);
             else
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "%%%%Pages: %.20g\n",(double) GetImageListLength(image));
             (void) WriteBlobString(image,buffer);
           }
@@ -617,31 +617,31 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
           {
             case NoCompression:
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,*q,
+              (void) FormatLocaleString(buffer,MaxTextExtent,*q,
                 "/ASCII85Decode filter");
               break;
             }
             case JPEGCompression:
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,*q,
+              (void) FormatLocaleString(buffer,MaxTextExtent,*q,
                 "/DCTDecode filter");
               break;
             }
             case LZWCompression:
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,*q,
+              (void) FormatLocaleString(buffer,MaxTextExtent,*q,
                 "/LZWDecode filter");
               break;
             }
             case FaxCompression:
             case Group4Compression:
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,*q," ");
+              (void) FormatLocaleString(buffer,MaxTextExtent,*q," ");
               break;
             }
             default:
             {
-              (void) FormatMagickString(buffer,MaxTextExtent,*q,
+              (void) FormatLocaleString(buffer,MaxTextExtent,*q,
                 "/RunLengthDecode filter");
               break;
             }
@@ -655,13 +655,13 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
           {
             (void) WriteBlobString(image,"  /label 512 string def\n");
             (void) WriteBlobString(image,"  currentfile label readline pop\n");
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "  0 y %g add moveto label show pop\n",j*pointsize+12);
             (void) WriteBlobString(image,buffer);
           }
         for (q=PostscriptEpilog; *q; q++)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%s\n",*q);
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%s\n",*q);
           (void) WriteBlobString(image,buffer);
         }
         if (LocaleCompare(image_info->magick,"PS2") == 0)
@@ -669,10 +669,10 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
         (void) WriteBlobString(image,"} bind def\n");
         (void) WriteBlobString(image,"%%EndProlog\n");
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page:  1 %.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Page:  1 %.20g\n",
       (double) page++);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
       (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+(double)
       (geometry.height+text_size));
@@ -691,7 +691,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
     if (LocaleCompare(image_info->magick,"PS2") != 0)
       (void) WriteBlobString(image,"userdict begin\n");
     start=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%BeginData:%13ld %s Bytes\n",0L,
       compression == NoCompression ? "ASCII" : "Binary");
     (void) WriteBlobString(image,buffer);
@@ -700,7 +700,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
     /*
       Output image data.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
       (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
     (void) WriteBlobString(image,buffer);
     labels=(char **) NULL;
@@ -711,7 +711,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
       {
         for (i=0; labels[i] != (char *) NULL; i++)
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%s \n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%s \n",
             labels[i]);
           (void) WriteBlobString(image,buffer);
           labels[i]=DestroyString(labels[i]);
@@ -725,16 +725,16 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
         ((image_info->type != TrueColorType) &&
          (IsGrayImage(image,&image->exception) != MagickFalse)))
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
           (double) image->columns,(double) image->rows,(int)
           (image->colorspace == CMYKColorspace));
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%d\n",
           (int) ((compression != FaxCompression) &&
            (compression != Group4Compression)));
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"0\n");
-        (void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%d\n",
            (compression == FaxCompression) ||
            (compression == Group4Compression) ? 1 : 8);
         (void) WriteBlobString(image,buffer);
@@ -838,11 +838,11 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
       if ((image->storage_class == DirectClass) || (image->colors > 256) ||
           (compression == JPEGCompression) || (image->matte != MagickFalse))
         {
-          (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n0\n%d\n",
             (double) image->columns,(double) image->rows,(int)
             (image->colorspace == CMYKColorspace));
           (void) WriteBlobString(image,buffer);
-          (void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%d\n",
             (int) (compression == NoCompression));
           (void) WriteBlobString(image,buffer);
           switch (compression)
@@ -988,19 +988,19 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
           /*
             Dump number of colors and colormap.
           */
-          (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n1\n%d\n",
             (double) image->columns,(double) image->rows,(int)
             (image->colorspace == CMYKColorspace));
           (void) WriteBlobString(image,buffer);
-          (void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%d\n",
             (int) (compression == NoCompression));
           (void) WriteBlobString(image,buffer);
-          (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",(double)
+          (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",(double)
             image->colors);
           (void) WriteBlobString(image,buffer);
           for (i=0; i < (ssize_t) image->colors; i++)
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,"%02X%02X%02X\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"%02X%02X%02X\n",
               ScaleQuantumToChar(image->colormap[i].red),
               ScaleQuantumToChar(image->colormap[i].green),
               ScaleQuantumToChar(image->colormap[i].blue));
@@ -1086,7 +1086,7 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
     offset=SeekBlob(image,start,SEEK_SET);
     if (offset < 0)
       ThrowWriterException(CorruptImageError,"ImproperImageHeader");
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%BeginData:%13ld %s Bytes\n",(long) length,
       compression == NoCompression ? "ASCII" : "Binary");
     (void) WriteBlobString(image,buffer);
@@ -1106,11 +1106,11 @@ static MagickBooleanType WritePS2Image(const ImageInfo *image_info,Image *image)
   (void) WriteBlobString(image,"%%Trailer\n");
   if (page > 1)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%BoundingBox: %.20g %.20g %.20g %.20g\n",ceil(bounds.x1-0.5),
         ceil(bounds.y1-0.5),floor(bounds.x2+0.5),floor(bounds.y2+0.5));
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
         bounds.x2,bounds.y2);
       (void) WriteBlobString(image,buffer);
index 521c78f4bd34a0b952eda0cfe328e3e470442188..f8a717be83c675cc3d5508c9a1c340a31bb19ce6 100644 (file)
@@ -465,7 +465,7 @@ static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
     Note BeginData DSC comment for update later.
   */
   start=TellBlob(image);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "%%%%BeginData:%13ld %s Bytes\n",0L,compression == NoCompression ?
     "ASCII" : "BINARY");
   (void) WriteBlobString(image,buffer);
@@ -478,7 +478,7 @@ static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
     case NoCompression:
     default:
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "currentfile %.20g %.20g "PS3_NoCompression" ByteStreamDecodeFilter\n",
         (double) image->columns,(double) image->rows);
       break;
@@ -486,28 +486,28 @@ static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
     case FaxCompression:
     case Group4Compression:
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "currentfile %.20g %.20g "PS3_FaxCompression" ByteStreamDecodeFilter\n",
         (double) image->columns,(double) image->rows);
       break;
     }
     case LZWCompression:
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "currentfile %.20g %.20g "PS3_LZWCompression" ByteStreamDecodeFilter\n",
         (double) image->columns,(double) image->rows);
       break;
     }
     case RLECompression:
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "currentfile %.20g %.20g "PS3_RLECompression" ByteStreamDecodeFilter\n",
         (double) image->columns,(double) image->rows);
       break;
     }
     case ZipCompression:
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "currentfile %.20g %.20g "PS3_ZipCompression" ByteStreamDecodeFilter\n",
         (double) image->columns,(double) image->rows);
       break;
@@ -589,7 +589,7 @@ static MagickBooleanType WritePS3MaskImage(const ImageInfo *image_info,
   offset=SeekBlob(image,start,SEEK_SET);
   if (offset < 0)
     ThrowWriterException(CorruptImageError,"ImproperImageHeader");
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "%%%%BeginData:%13ld %s Bytes\n",(long) length,
     compression == NoCompression ? "ASCII" : "BINARY");
   (void) WriteBlobString(image,buffer);
@@ -938,13 +938,13 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
         resolution.y=(size_t) (100.0*2.54*resolution.y+0.5)/100.0;
       }
     SetGeometry(image,&geometry);
-    (void) FormatMagickString(page_geometry,MaxTextExtent,"%.20gx%.20g",
+    (void) FormatLocaleString(page_geometry,MaxTextExtent,"%.20gx%.20g",
       (double) image->columns,(double) image->rows);
     if (image_info->page != (char *) NULL)
       (void) CopyMagickString(page_geometry,image_info->page,MaxTextExtent);
     else
       if ((image->page.width != 0) && (image->page.height != 0))
-        (void) FormatMagickString(page_geometry,MaxTextExtent,
+        (void) FormatLocaleString(page_geometry,MaxTextExtent,
           "%.20gx%.20g%+.20g%+.20g",(double) image->page.width,(double)
           image->page.height,(double) image->page.x,(double) image->page.y);
       else
@@ -985,15 +985,15 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
           (void) CopyMagickString(buffer,"%!PS-Adobe-3.0 EPSF-3.0\n",
             MaxTextExtent);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "%%%%Creator: ImageMagick %s\n",MagickLibVersionText);
         (void) WriteBlobString(image,buffer);
-        (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Title: %s\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Title: %s\n",
           image->filename);
         (void) WriteBlobString(image,buffer);
         timer=time((time_t *) NULL);
         (void) FormatMagickTime(timer,MaxTextExtent,date);
-        (void) FormatMagickString(buffer,MaxTextExtent,
+        (void) FormatLocaleString(buffer,MaxTextExtent,
           "%%%%CreationDate: %s\n",date);
         (void) WriteBlobString(image,buffer);
         bounds.x1=(double) geometry.x;
@@ -1008,11 +1008,11 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
           }
         else
           {
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%BoundingBox: %g %g %g %g\n",floor(bounds.x1+0.5),
               floor(bounds.y1+0.5),ceil(bounds.x2-0.5),ceil(bounds.y2-0.5));
             (void) WriteBlobString(image,buffer);
-            (void) FormatMagickString(buffer,MaxTextExtent,
+            (void) FormatLocaleString(buffer,MaxTextExtent,
               "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,
               bounds.y1,bounds.x2,bounds.y2);
             (void) WriteBlobString(image,buffer);
@@ -1044,7 +1044,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
             if (image_info->adjoin == MagickFalse)
               (void) CopyMagickString(buffer,"%%Pages: 1\n",MaxTextExtent);
             else
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "%%%%Pages: %.20g\n",(double) GetImageListLength(image));
             (void) WriteBlobString(image,buffer);
           }
@@ -1070,7 +1070,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
             {
               (void) WriteBlobString(image,
                 "  currentfile buffer readline pop token pop\n");
-              (void) FormatMagickString(buffer,MaxTextExtent,
+              (void) FormatLocaleString(buffer,MaxTextExtent,
                 "  0 y %g add moveto show pop\n",i*pointsize+12);
               (void) WriteBlobString(image,buffer);
             }
@@ -1085,13 +1085,13 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
         }
         (void)WriteBlobString(image,"%%EndProlog\n");
       }
-    (void) FormatMagickString(buffer,MaxTextExtent,"%%%%Page: 1 %.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%%%%Page: 1 %.20g\n",
       (double) page);
     (void) WriteBlobString(image,buffer);
     /*
       Page bounding box.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%PageBoundingBox: %.20g %.20g %.20g %.20g\n",(double) geometry.x,
        (double) geometry.y,geometry.x+(double) geometry.width,geometry.y+
        (double) (geometry.height+text_size));
@@ -1157,7 +1157,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
       Remember position of BeginData comment so we can update it.
     */
     start=TellBlob(image);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%BeginData:%13ld %s Bytes\n",0L,
       compression == NoCompression ? "ASCII" : "BINARY");
     (void) WriteBlobString(image,buffer);
@@ -1166,7 +1166,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
     /*
       Translate, scale, and font point size.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n%g %g\n%g\n",
       (double) geometry.x,(double) geometry.y,scale.x,scale.y,pointsize);
     (void) WriteBlobString(image,buffer);
     /*
@@ -1214,7 +1214,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
     /*
       Image columns, rows, and color space.
     */
-    (void) FormatMagickString(buffer,MaxTextExtent,"%.20g %.20g\n%s\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g %.20g\n%s\n",
       (double) image->columns,(double) image->rows,image->colorspace ==
       CMYKColorspace ? PS3_CMYKColorspace : PS3_RGBColorspace);
     (void) WriteBlobString(image,buffer);
@@ -1289,7 +1289,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
         /*
           1 bit or 8 bit components?
         */
-        (void) FormatMagickString(buffer,MaxTextExtent,"%d\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%d\n",
           IsMonochromeImage(image,&image->exception) != MagickFalse ? 1 : 8);
         (void) WriteBlobString(image,buffer);
         /*
@@ -1469,7 +1469,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
             /*
               Number of colors in color map.
             */
-            (void) FormatMagickString(buffer,MaxTextExtent,"%.20g\n",
+            (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g\n",
               (double) image->colors);
             (void) WriteBlobString(image,buffer);
             /*
@@ -1558,7 +1558,7 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
     offset=SeekBlob(image,start,SEEK_SET);
     if (offset < 0)
       ThrowWriterException(CorruptImageError,"ImproperImageHeader");
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "%%%%BeginData:%13ld %s Bytes\n",(long) length,
       compression == NoCompression ? "ASCII" : "BINARY");
     (void) WriteBlobString(image,buffer);
@@ -1581,11 +1581,11 @@ static MagickBooleanType WritePS3Image(const ImageInfo *image_info,Image *image)
   (void) WriteBlobString(image,"%%Trailer\n");
   if (page > 1)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%BoundingBox: %g %g %g %g\n",floor(bounds.x1+0.5),
         floor(bounds.y1+0.5),ceil(bounds.x2-0.5),ceil(bounds.y2-0.5));
       (void) WriteBlobString(image,buffer);
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "%%%%HiResBoundingBox: %g %g %g %g\n",bounds.x1,bounds.y1,
         bounds.x2,bounds.y2);
       (void) WriteBlobString(image,buffer);
index 21adfcb129b6814afd2235a5cc8e0bad77df4f8a..da2b0a7d6fb188ea3cb43a156174ee909a5314cf 100644 (file)
@@ -448,14 +448,14 @@ static MagickBooleanType ParseImageResourceBlocks(Image *image,
         */
         p=PushShortPixel(MSBEndian,p,&resolution);
         image->x_resolution=(double) resolution;
-        (void) FormatMagickString(value,MaxTextExtent,"%g",image->x_resolution);
+        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->x_resolution);
         (void) SetImageProperty(image,"tiff:XResolution",value);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&resolution);
         image->y_resolution=(double) resolution;
-        (void) FormatMagickString(value,MaxTextExtent,"%g",image->y_resolution);
+        (void) FormatLocaleString(value,MaxTextExtent,"%g",image->y_resolution);
         (void) SetImageProperty(image,"tiff:YResolution",value);
         p=PushShortPixel(MSBEndian,p,&short_sans);
         p=PushShortPixel(MSBEndian,p,&short_sans);
@@ -1229,13 +1229,13 @@ static Image *ReadPSDImage(const ImageInfo *image_info,ExceptionInfo *exception)
             /*
               Set up some hidden attributes for folks that need them.
             */
-            (void) FormatMagickString(message,MaxTextExtent,"%.20gld",
+            (void) FormatLocaleString(message,MaxTextExtent,"%.20gld",
               (double) layer_info[i].page.x);
             (void) SetImageArtifact(layer_info[i].image,"psd:layer.x",message);
-            (void) FormatMagickString(message,MaxTextExtent,"%.20g",
+            (void) FormatLocaleString(message,MaxTextExtent,"%.20g",
               (double) layer_info[i].page.y);
             (void) SetImageArtifact(layer_info[i].image,"psd:layer.y",message);
-            (void) FormatMagickString(message,MaxTextExtent,"%.20g",
+            (void) FormatLocaleString(message,MaxTextExtent,"%.20g",
               (double) layer_info[i].opacity);
             (void) SetImageArtifact(layer_info[i].image,"psd:layer.opacity",
               message);
@@ -2340,7 +2340,7 @@ static MagickBooleanType WritePSDImage(const ImageInfo *image_info,Image *image)
             (void) WriteBlobMSBLong(image,16);
             (void) WriteBlobMSBLong(image,0);
             (void) WriteBlobMSBLong(image,0);
-            (void) FormatMagickString((char *) layer_name,MaxTextExtent,
+            (void) FormatLocaleString((char *) layer_name,MaxTextExtent,
               "L%06ld",(long) layer_count++);
             WritePascalString( image, (char*)layer_name, 4 );
           }
index 02f71419b4db10f9bf240a6fbdcd41e6a250d2eb..cba02dcb9e19db0c9436c659168317b14c907db0 100644 (file)
@@ -217,7 +217,7 @@ static Image *ReadPWPImage(const ImageInfo *image_info,ExceptionInfo *exception)
     next_image=ReadImage(read_info,exception);
     if (next_image == (Image *) NULL)
       break;
-    (void) FormatMagickString(next_image->filename,MaxTextExtent,
+    (void) FormatLocaleString(next_image->filename,MaxTextExtent,
       "slide_%02ld.sfw",(long) next_image->scene);
     if (image == (Image *) NULL)
       image=next_image;
index 528dbac390e87c0929c2cae3724c3b45b72a4fc6..0addb62fa9f8b0780d3d06a1436805c503a77eb4 100644 (file)
@@ -204,9 +204,9 @@ static Image *ReadSCTImage(const ImageInfo *image_info,ExceptionInfo *exception)
   separations_mask=ReadBlobMSBShort(image);
   count=ReadBlob(image,14,buffer);
   buffer[14]='\0';
-  height=StringToDouble((char *) buffer,(char **) NULL);
+  height=LocaleToDouble((char *) buffer,(char **) NULL);
   count=ReadBlob(image,14,buffer);
-  width=StringToDouble((char *) buffer,(char **) NULL);
+  width=LocaleToDouble((char *) buffer,(char **) NULL);
   count=ReadBlob(image,12,buffer);
   buffer[12]='\0';
   image->rows=StringToUnsignedLong((char *) buffer);
index 462e04516eb8375d934fda5c53446b7c89ae997e..d0a81b95aefb3bbb3dd905e0b2afdc1f0304f42e 100644 (file)
 #include "librsvg/librsvg-features.h"
 #endif
 \f
-/*
-  Define declarations.
-*/
-#define MVGPrintf  (void) fprintf
-\f
 /*
   Typedef declarations.
 */
@@ -302,7 +297,7 @@ static double GetUserSpaceCoordinateValue(const SVGInfo *svg_info,int type,
   assert(string != (const char *) NULL);
   p=(const char *) string;
   GetMagickToken(p,&p,token);
-  value=StringToDouble(token,(char **) NULL);
+  value=LocaleToDouble(token,(char **) NULL);
   if (strchr(token,'%') != (char *) NULL)
     {
       double
@@ -966,12 +961,12 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"circle") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"clipPath") == 0)
         {
-          MVGPrintf(svg_info->file,"push clip-path '%s'\n",id);
+          (void) FormatLocaleFile(svg_info->file,"push clip-path '%s'\n",id);
           break;
         }
       break;
@@ -981,7 +976,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"defs") == 0)
         {
-          MVGPrintf(svg_info->file,"push defs\n");
+          (void) FormatLocaleFile(svg_info->file,"push defs\n");
           break;
         }
       break;
@@ -991,7 +986,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"ellipse") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1001,7 +996,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"g") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1011,7 +1006,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"image") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1021,12 +1016,12 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"line") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"linearGradient") == 0)
         {
-          MVGPrintf(svg_info->file,
+          (void) FormatLocaleFile(svg_info->file,
             "push gradient '%s' linear %g,%g %g,%g\n",id,
             svg_info->segment.x1,svg_info->segment.y1,svg_info->segment.x2,
             svg_info->segment.y2);
@@ -1039,12 +1034,12 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"path") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"pattern") == 0)
         {
-          MVGPrintf(svg_info->file,
+          (void) FormatLocaleFile(svg_info->file,
             "push pattern '%s' %g,%g %g,%g\n",id,
             svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.width,
             svg_info->bounds.height);
@@ -1052,12 +1047,12 @@ static void SVGStartElement(void *context,const xmlChar *name,
         }
       if (LocaleCompare((const char *) name,"polygon") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"polyline") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1067,7 +1062,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"radialGradient") == 0)
         {
-          MVGPrintf(svg_info->file,
+          (void) FormatLocaleFile(svg_info->file,
             "push gradient '%s' radial %g,%g %g,%g %g\n",
             id,svg_info->element.cx,svg_info->element.cy,
             svg_info->element.major,svg_info->element.minor,
@@ -1076,7 +1071,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
         }
       if (LocaleCompare((const char *) name,"rect") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1086,7 +1081,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"svg") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1096,7 +1091,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
     {
       if (LocaleCompare((const char *) name,"text") == 0)
         {
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"tspan") == 0)
@@ -1113,7 +1108,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
                 *text;
 
               text=EscapeString(svg_info->text,'\'');
-              MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
+              (void) FormatLocaleFile(svg_info->file,"text %g,%g '%s'\n",
                 svg_info->bounds.x-svg_info->center.x,svg_info->bounds.y-
                 svg_info->center.y,text);
               text=DestroyString(text);
@@ -1126,7 +1121,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
               draw_info=DestroyDrawInfo(draw_info);
               *svg_info->text='\0';
             }
-          MVGPrintf(svg_info->file,"push graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"push graphic-context\n");
           break;
         }
       break;
@@ -1148,7 +1143,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
         {
           if (LocaleCompare(keyword,"angle") == 0)
             {
-              MVGPrintf(svg_info->file,"angle %g\n",
+              (void) FormatLocaleFile(svg_info->file,"angle %g\n",
                 GetUserSpaceCoordinateValue(svg_info,0,value));
               break;
             }
@@ -1159,18 +1154,18 @@ static void SVGStartElement(void *context,const xmlChar *name,
         {
           if (LocaleCompare(keyword,"clip-path") == 0)
             {
-              MVGPrintf(svg_info->file,"clip-path '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"clip-path '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"clip-rule") == 0)
             {
-              MVGPrintf(svg_info->file,"clip-rule '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"clip-rule '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"clipPathUnits") == 0)
             {
               (void) CloneString(&units,value);
-              MVGPrintf(svg_info->file,"clip-units '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"clip-units '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"color") == 0)
@@ -1220,51 +1215,56 @@ static void SVGStartElement(void *context,const xmlChar *name,
             {
               if (LocaleCompare(value,"currentColor") == 0)
                 {
-                  MVGPrintf(svg_info->file,"fill '%s'\n",color);
+                  (void) FormatLocaleFile(svg_info->file,"fill '%s'\n",color);
                   break;
                 }
-              MVGPrintf(svg_info->file,"fill '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"fill '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"fillcolor") == 0)
             {
-              MVGPrintf(svg_info->file,"fill '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"fill '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"fill-rule") == 0)
             {
-              MVGPrintf(svg_info->file,"fill-rule '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"fill-rule '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"fill-opacity") == 0)
             {
-              MVGPrintf(svg_info->file,"fill-opacity '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"fill-opacity '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"font-family") == 0)
             {
-              MVGPrintf(svg_info->file,"font-family '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"font-family '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"font-stretch") == 0)
             {
-              MVGPrintf(svg_info->file,"font-stretch '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"font-stretch '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"font-style") == 0)
             {
-              MVGPrintf(svg_info->file,"font-style '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"font-style '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"font-size") == 0)
             {
               svg_info->pointsize=GetUserSpaceCoordinateValue(svg_info,0,value);
-              MVGPrintf(svg_info->file,"font-size %g\n",svg_info->pointsize);
+              (void) FormatLocaleFile(svg_info->file,"font-size %g\n",
+                svg_info->pointsize);
               break;
             }
           if (LocaleCompare(keyword,"font-weight") == 0)
             {
-              MVGPrintf(svg_info->file,"font-weight '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"font-weight '%s'\n",
+                value);
               break;
             }
           break;
@@ -1301,27 +1301,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=StringToDouble(value,(char **) NULL);
+                        affine.sx=LocaleToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=StringToDouble(token,(char **) NULL);
+                        affine.rx=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=StringToDouble(token,(char **) NULL);
+                        affine.ry=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=StringToDouble(token,(char **) NULL);
+                        affine.sy=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=StringToDouble(token,(char **) NULL);
+                        affine.tx=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=StringToDouble(token,(char **) NULL);
+                        affine.ty=LocaleToDouble(token,(char **) NULL);
                         break;
                       }
                     break;
@@ -1410,7 +1410,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
                 transform.ty=affine.rx*current.tx+affine.sy*current.ty+
                   affine.ty;
               }
-              MVGPrintf(svg_info->file,
+              (void) FormatLocaleFile(svg_info->file,
                 "affine %g %g %g %g %g %g\n",transform.sx,
                 transform.rx,transform.ry,transform.sy,transform.tx,
                 transform.ty);
@@ -1422,7 +1422,8 @@ static void SVGStartElement(void *context,const xmlChar *name,
           if (LocaleCompare(keyword,"gradientUnits") == 0)
             {
               (void) CloneString(&units,value);
-              MVGPrintf(svg_info->file,"gradient-units '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"gradient-units '%s'\n",
+                value);
               break;
             }
           break;
@@ -1470,7 +1471,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
             }
           if (LocaleCompare(keyword,"opacity") == 0)
             {
-              MVGPrintf(svg_info->file,"opacity '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"opacity '%s'\n",value);
               break;
             }
           break;
@@ -1507,11 +1508,11 @@ static void SVGStartElement(void *context,const xmlChar *name,
                 angle;
 
               angle=GetUserSpaceCoordinateValue(svg_info,0,value);
-              MVGPrintf(svg_info->file,"translate %g,%g\n",
+              (void) FormatLocaleFile(svg_info->file,"translate %g,%g\n",
                 svg_info->bounds.x,svg_info->bounds.y);
               svg_info->bounds.x=0;
               svg_info->bounds.y=0;
-              MVGPrintf(svg_info->file,"rotate %g\n",angle);
+              (void) FormatLocaleFile(svg_info->file,"rotate %g\n",angle);
               break;
             }
           if (LocaleCompare(keyword,"rx") == 0)
@@ -1548,51 +1549,57 @@ static void SVGStartElement(void *context,const xmlChar *name,
             {
               if (LocaleCompare(value,"currentColor") == 0)
                 {
-                  MVGPrintf(svg_info->file,"stroke '%s'\n",color);
+                  (void) FormatLocaleFile(svg_info->file,"stroke '%s'\n",color);
                   break;
                 }
-              MVGPrintf(svg_info->file,"stroke '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke '%s'\n",value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-antialiasing") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-antialias %d\n",
+              (void) FormatLocaleFile(svg_info->file,"stroke-antialias %d\n",
                 LocaleCompare(value,"true") == 0);
               break;
             }
           if (LocaleCompare(keyword,"stroke-dasharray") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-dasharray %s\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-dasharray %s\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-dashoffset") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-dashoffset %s\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-dashoffset %s\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-linecap") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-linecap '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-linecap '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-linejoin") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-linejoin '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-linejoin '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-miterlimit") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-miterlimit '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-miterlimit '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-opacity") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-opacity '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"stroke-opacity '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"stroke-width") == 0)
             {
-              MVGPrintf(svg_info->file,"stroke-width %g\n",
+              (void) FormatLocaleFile(svg_info->file,"stroke-width %g\n",
                 GetUserSpaceCoordinateValue(svg_info,1,value));
               break;
             }
@@ -1613,18 +1620,21 @@ static void SVGStartElement(void *context,const xmlChar *name,
                   {
                      if (LocaleCompare(keyword,"clip-path") == 0)
                        {
-                         MVGPrintf(svg_info->file,"clip-path '%s'\n",value);
+                         (void) FormatLocaleFile(svg_info->file,
+                           "clip-path '%s'\n",value);
                          break;
                        }
                     if (LocaleCompare(keyword,"clip-rule") == 0)
                       {
-                        MVGPrintf(svg_info->file,"clip-rule '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "clip-rule '%s'\n",value);
                         break;
                       }
                      if (LocaleCompare(keyword,"clipPathUnits") == 0)
                        {
                          (void) CloneString(&units,value);
-                         MVGPrintf(svg_info->file,"clip-units '%s'\n",value);
+                         (void) FormatLocaleFile(svg_info->file,
+                          "clip-units '%s'\n",value);
                          break;
                        }
                     if (LocaleCompare(keyword,"color") == 0)
@@ -1641,56 +1651,66 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                          if (LocaleCompare(value,"currentColor") == 0)
                            {
-                             MVGPrintf(svg_info->file,"fill '%s'\n",color);
+                             (void) FormatLocaleFile(svg_info->file,
+                          "fill '%s'\n",color);
                              break;
                            }
                         if (LocaleCompare(value,"#00000000") == 0)
-                          MVGPrintf(svg_info->file,"fill '#000000'\n");
+                          (void) FormatLocaleFile(svg_info->file,
+                          "fill '#000000'\n");
                         else
-                          MVGPrintf(svg_info->file,"fill '%s'\n",value);
+                          (void) FormatLocaleFile(svg_info->file,"fill '%s'\n",
+                          value);
                         break;
                       }
                     if (LocaleCompare(keyword,"fillcolor") == 0)
                       {
-                        MVGPrintf(svg_info->file,"fill '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,"fill '%s'\n",
+                          value);
                         break;
                       }
                     if (LocaleCompare(keyword,"fill-rule") == 0)
                       {
-                        MVGPrintf(svg_info->file,"fill-rule '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "fill-rule '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"fill-opacity") == 0)
                       {
-                        MVGPrintf(svg_info->file,"fill-opacity '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "fill-opacity '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"font-family") == 0)
                       {
-                        MVGPrintf(svg_info->file,"font-family '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "font-family '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"font-stretch") == 0)
                       {
-                        MVGPrintf(svg_info->file,"font-stretch '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "font-stretch '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"font-style") == 0)
                       {
-                        MVGPrintf(svg_info->file,"font-style '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "font-style '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"font-size") == 0)
                       {
                         svg_info->pointsize=GetUserSpaceCoordinateValue(
                           svg_info,0,value);
-                        MVGPrintf(svg_info->file,"font-size %g\n",
+                        (void) FormatLocaleFile(svg_info->file,"font-size %g\n",
                           svg_info->pointsize);
                         break;
                       }
                     if (LocaleCompare(keyword,"font-weight") == 0)
                       {
-                        MVGPrintf(svg_info->file,"font-weight '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "font-weight '%s'\n",value);
                         break;
                       }
                     break;
@@ -1700,13 +1720,14 @@ static void SVGStartElement(void *context,const xmlChar *name,
                   {
                     if (LocaleCompare(keyword,"offset") == 0)
                       {
-                        MVGPrintf(svg_info->file,"offset %g\n",
+                        (void) FormatLocaleFile(svg_info->file,"offset %g\n",
                           GetUserSpaceCoordinateValue(svg_info,1,value));
                         break;
                       }
                     if (LocaleCompare(keyword,"opacity") == 0)
                       {
-                        MVGPrintf(svg_info->file,"opacity '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "opacity '%s'\n",value);
                         break;
                       }
                     break;
@@ -1723,57 +1744,68 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                          if (LocaleCompare(value,"currentColor") == 0)
                            {
-                             MVGPrintf(svg_info->file,"stroke '%s'\n",color);
+                             (void) FormatLocaleFile(svg_info->file,
+                          "stroke '%s'\n",color);
                              break;
                            }
                         if (LocaleCompare(value,"#00000000") == 0)
-                          MVGPrintf(svg_info->file,"fill '#000000'\n");
+                          (void) FormatLocaleFile(svg_info->file,
+                          "fill '#000000'\n");
                         else
-                          MVGPrintf(svg_info->file,"stroke '%s'\n",value);
+                          (void) FormatLocaleFile(svg_info->file,
+                          "stroke '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-antialiasing") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-antialias %d\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-antialias %d\n",
                           LocaleCompare(value,"true") == 0);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-dasharray") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-dasharray %s\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-dasharray %s\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-dashoffset") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-dashoffset %s\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-dashoffset %s\n",
                           value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-linecap") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-linecap '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-linecap '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-linejoin") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-linejoin '%s'\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-linejoin '%s'\n",
                           value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-miterlimit") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-miterlimit '%s'\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-miterlimit '%s'\n",
                           value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-opacity") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-opacity '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-opacity '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"stroke-width") == 0)
                       {
-                        MVGPrintf(svg_info->file,"stroke-width %g\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "stroke-width %g\n",
                           GetUserSpaceCoordinateValue(svg_info,1,value));
                         break;
                       }
@@ -1784,27 +1816,33 @@ static void SVGStartElement(void *context,const xmlChar *name,
                   {
                     if (LocaleCompare(keyword,"text-align") == 0)
                       {
-                        MVGPrintf(svg_info->file,"text-align '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "text-align '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"text-anchor") == 0)
                       {
-                        MVGPrintf(svg_info->file,"text-anchor '%s'\n",value);
+                        (void) FormatLocaleFile(svg_info->file,
+                          "text-anchor '%s'\n",value);
                         break;
                       }
                     if (LocaleCompare(keyword,"text-decoration") == 0)
                       {
                         if (LocaleCompare(value,"underline") == 0)
-                          MVGPrintf(svg_info->file,"decorate underline\n");
+                          (void) FormatLocaleFile(svg_info->file,
+                          "decorate underline\n");
                         if (LocaleCompare(value,"line-through") == 0)
-                          MVGPrintf(svg_info->file,"decorate line-through\n");
+                          (void) FormatLocaleFile(svg_info->file,
+                          "decorate line-through\n");
                         if (LocaleCompare(value,"overline") == 0)
-                          MVGPrintf(svg_info->file,"decorate overline\n");
+                          (void) FormatLocaleFile(svg_info->file,
+                          "decorate overline\n");
                         break;
                       }
                     if (LocaleCompare(keyword,"text-antialiasing") == 0)
                       {
-                        MVGPrintf(svg_info->file,"text-antialias %d\n",
+                        (void) FormatLocaleFile(svg_info->file,
+                          "text-antialias %d\n",
                           LocaleCompare(value,"true") == 0);
                         break;
                       }
@@ -1826,27 +1864,30 @@ static void SVGStartElement(void *context,const xmlChar *name,
         {
           if (LocaleCompare(keyword,"text-align") == 0)
             {
-              MVGPrintf(svg_info->file,"text-align '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"text-align '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"text-anchor") == 0)
             {
-              MVGPrintf(svg_info->file,"text-anchor '%s'\n",value);
+              (void) FormatLocaleFile(svg_info->file,"text-anchor '%s'\n",
+                value);
               break;
             }
           if (LocaleCompare(keyword,"text-decoration") == 0)
             {
               if (LocaleCompare(value,"underline") == 0)
-                MVGPrintf(svg_info->file,"decorate underline\n");
+                (void) FormatLocaleFile(svg_info->file,"decorate underline\n");
               if (LocaleCompare(value,"line-through") == 0)
-                MVGPrintf(svg_info->file,"decorate line-through\n");
+                (void) FormatLocaleFile(svg_info->file,
+                  "decorate line-through\n");
               if (LocaleCompare(value,"overline") == 0)
-                MVGPrintf(svg_info->file,"decorate overline\n");
+                (void) FormatLocaleFile(svg_info->file,"decorate overline\n");
               break;
             }
           if (LocaleCompare(keyword,"text-antialiasing") == 0)
             {
-              MVGPrintf(svg_info->file,"text-antialias %d\n",
+              (void) FormatLocaleFile(svg_info->file,"text-antialias %d\n",
                 LocaleCompare(value,"true") == 0);
               break;
             }
@@ -1877,27 +1918,27 @@ static void SVGStartElement(void *context,const xmlChar *name,
                       {
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        affine.sx=StringToDouble(value,(char **) NULL);
+                        affine.sx=LocaleToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.rx=StringToDouble(token,(char **) NULL);
+                        affine.rx=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ry=StringToDouble(token,(char **) NULL);
+                        affine.ry=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.sy=StringToDouble(token,(char **) NULL);
+                        affine.sy=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.tx=StringToDouble(token,(char **) NULL);
+                        affine.tx=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        affine.ty=StringToDouble(token,(char **) NULL);
+                        affine.ty=LocaleToDouble(token,(char **) NULL);
                         break;
                       }
                     break;
@@ -1914,15 +1955,15 @@ static void SVGStartElement(void *context,const xmlChar *name,
 
                         p=(const char *) value;
                         GetMagickToken(p,&p,token);
-                        angle=StringToDouble(value,(char **) NULL);
+                        angle=LocaleToDouble(value,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        x=StringToDouble(token,(char **) NULL);
+                        x=LocaleToDouble(token,(char **) NULL);
                         GetMagickToken(p,&p,token);
                         if (*token == ',')
                           GetMagickToken(p,&p,token);
-                        y=StringToDouble(token,(char **) NULL);
+                        y=LocaleToDouble(token,(char **) NULL);
                         affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
                         affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
                         affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -2002,7 +2043,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
                 transform.ty=affine.rx*current.tx+affine.sy*current.ty+
                   affine.ty;
               }
-              MVGPrintf(svg_info->file,
+              (void) FormatLocaleFile(svg_info->file,
                 "affine %g %g %g %g %g %g\n",transform.sx,
                 transform.rx,transform.ry,transform.sy,transform.tx,
                 transform.ty);
@@ -2025,21 +2066,21 @@ static void SVGStartElement(void *context,const xmlChar *name,
             {
               p=(const char *) value;
               GetMagickToken(p,&p,token);
-              svg_info->view_box.x=StringToDouble(token,(char **) NULL);
+              svg_info->view_box.x=LocaleToDouble(token,(char **) NULL);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.y=StringToDouble(token,(char **) NULL);
+              svg_info->view_box.y=LocaleToDouble(token,(char **) NULL);
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.width=StringToDouble(token,(char **) NULL);
+              svg_info->view_box.width=LocaleToDouble(token,(char **) NULL);
               if (svg_info->bounds.width == 0)
                 svg_info->bounds.width=svg_info->view_box.width;
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              svg_info->view_box.height=StringToDouble(token,(char **) NULL);
+              svg_info->view_box.height=LocaleToDouble(token,(char **) NULL);
               if (svg_info->bounds.height == 0)
                 svg_info->bounds.height=svg_info->view_box.height;
               break;
@@ -2113,7 +2154,7 @@ static void SVGStartElement(void *context,const xmlChar *name,
   if (LocaleCompare((const char *) name,"svg") == 0)
     {
       if (svg_info->document->encoding != (const xmlChar *) NULL)
-        MVGPrintf(svg_info->file,"encoding \"%s\"\n",
+        (void) FormatLocaleFile(svg_info->file,"encoding \"%s\"\n",
           (const char *) svg_info->document->encoding);
       if (attributes != (const xmlChar **) NULL)
         {
@@ -2126,11 +2167,12 @@ static void SVGStartElement(void *context,const xmlChar *name,
             svg_info->view_box=svg_info->bounds;
           svg_info->width=(size_t) floor(svg_info->bounds.width+0.5);
           svg_info->height=(size_t) floor(svg_info->bounds.height+0.5);
-          MVGPrintf(svg_info->file,"viewbox 0 0 %.20g %.20g\n",(double)
-            svg_info->width,(double) svg_info->height);
+          (void) FormatLocaleFile(svg_info->file,"viewbox 0 0 %.20g %.20g\n",
+            (double) svg_info->width,(double) svg_info->height);
           sx=(double) svg_info->width/svg_info->view_box.width;
           sy=(double) svg_info->height/svg_info->view_box.height;
-          MVGPrintf(svg_info->file,"affine %g 0 0 %g 0.0 0.0\n",sx,sy);
+          (void) FormatLocaleFile(svg_info->file,"affine %g 0 0 %g 0.0 0.0\n",
+            sx,sy);
         }
     }
   (void) LogMagickEvent(CoderEvent,GetMagickModule(),"  )");
@@ -2165,15 +2207,15 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"circle") == 0)
         {
-          MVGPrintf(svg_info->file,"circle %g,%g %g,%g\n",
+          (void) FormatLocaleFile(svg_info->file,"circle %g,%g %g,%g\n",
             svg_info->element.cx,svg_info->element.cy,svg_info->element.cx,
             svg_info->element.cy+svg_info->element.minor);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"clipPath") == 0)
         {
-          MVGPrintf(svg_info->file,"pop clip-path\n");
+          (void) FormatLocaleFile(svg_info->file,"pop clip-path\n");
           break;
         }
       break;
@@ -2183,7 +2225,7 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"defs") == 0)
         {
-          MVGPrintf(svg_info->file,"pop defs\n");
+          (void) FormatLocaleFile(svg_info->file,"pop defs\n");
           break;
         }
       if (LocaleCompare((const char *) name,"desc") == 0)
@@ -2215,11 +2257,11 @@ static void SVGEndElement(void *context,const xmlChar *name)
             angle;
 
           angle=svg_info->element.angle;
-          MVGPrintf(svg_info->file,"ellipse %g,%g %g,%g 0,360\n",
+          (void) FormatLocaleFile(svg_info->file,"ellipse %g,%g %g,%g 0,360\n",
             svg_info->element.cx,svg_info->element.cy,
             angle == 0.0 ? svg_info->element.major : svg_info->element.minor,
             angle == 0.0 ? svg_info->element.minor : svg_info->element.major);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2229,7 +2271,7 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"g") == 0)
         {
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2239,10 +2281,11 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"image") == 0)
         {
-          MVGPrintf(svg_info->file,"image Over %g,%g %g,%g '%s'\n",
-            svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.width,
-            svg_info->bounds.height,svg_info->url);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,
+            "image Over %g,%g %g,%g '%s'\n",svg_info->bounds.x,
+            svg_info->bounds.y,svg_info->bounds.width,svg_info->bounds.height,
+            svg_info->url);
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2252,15 +2295,15 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"line") == 0)
         {
-          MVGPrintf(svg_info->file,"line %g,%g %g,%g\n",
+          (void) FormatLocaleFile(svg_info->file,"line %g,%g %g,%g\n",
             svg_info->segment.x1,svg_info->segment.y1,svg_info->segment.x2,
             svg_info->segment.y2);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"linearGradient") == 0)
         {
-          MVGPrintf(svg_info->file,"pop gradient\n");
+          (void) FormatLocaleFile(svg_info->file,"pop gradient\n");
           break;
         }
       break;
@@ -2270,25 +2313,28 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"pattern") == 0)
         {
-          MVGPrintf(svg_info->file,"pop pattern\n");
+          (void) FormatLocaleFile(svg_info->file,"pop pattern\n");
           break;
         }
       if (LocaleCompare((const char *) name,"path") == 0)
         {
-          MVGPrintf(svg_info->file,"path '%s'\n",svg_info->vertices);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"path '%s'\n",
+            svg_info->vertices);
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"polygon") == 0)
         {
-          MVGPrintf(svg_info->file,"polygon %s\n",svg_info->vertices);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"polygon %s\n",
+            svg_info->vertices);
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"polyline") == 0)
         {
-          MVGPrintf(svg_info->file,"polyline %s\n",svg_info->vertices);
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"polyline %s\n",
+            svg_info->vertices);
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2298,32 +2344,32 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"radialGradient") == 0)
         {
-          MVGPrintf(svg_info->file,"pop gradient\n");
+          (void) FormatLocaleFile(svg_info->file,"pop gradient\n");
           break;
         }
       if (LocaleCompare((const char *) name,"rect") == 0)
         {
           if ((svg_info->radius.x == 0.0) && (svg_info->radius.y == 0.0))
             {
-              MVGPrintf(svg_info->file,"rectangle %g,%g %g,%g\n",
+              (void) FormatLocaleFile(svg_info->file,"rectangle %g,%g %g,%g\n",
                 svg_info->bounds.x,svg_info->bounds.y,
                 svg_info->bounds.x+svg_info->bounds.width,
                 svg_info->bounds.y+svg_info->bounds.height);
-              MVGPrintf(svg_info->file,"pop graphic-context\n");
+              (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
               break;
             }
           if (svg_info->radius.x == 0.0)
             svg_info->radius.x=svg_info->radius.y;
           if (svg_info->radius.y == 0.0)
             svg_info->radius.y=svg_info->radius.x;
-          MVGPrintf(svg_info->file,
+          (void) FormatLocaleFile(svg_info->file,
             "roundRectangle %g,%g %g,%g %g,%g\n",
             svg_info->bounds.x,svg_info->bounds.y,svg_info->bounds.x+
             svg_info->bounds.width,svg_info->bounds.y+svg_info->bounds.height,
             svg_info->radius.x,svg_info->radius.y);
           svg_info->radius.x=0.0;
           svg_info->radius.y=0.0;
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2333,13 +2379,13 @@ static void SVGEndElement(void *context,const xmlChar *name)
     {
       if (LocaleCompare((const char *) name,"stop") == 0)
         {
-          MVGPrintf(svg_info->file,"stop-color '%s' %s\n",svg_info->stop_color,
-            svg_info->offset);
+          (void) FormatLocaleFile(svg_info->file,"stop-color '%s' %s\n",
+            svg_info->stop_color,svg_info->offset);
           break;
         }
       if (LocaleCompare((const char *) name,"svg") == 0)
         {
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       break;
@@ -2355,13 +2401,13 @@ static void SVGEndElement(void *context,const xmlChar *name)
                 *text;
 
               text=EscapeString(svg_info->text,'\'');
-              MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
+              (void) FormatLocaleFile(svg_info->file,"text %g,%g '%s'\n",
                 svg_info->bounds.x-svg_info->center.x,svg_info->bounds.y-
                 svg_info->center.y,text);
               text=DestroyString(text);
               *svg_info->text='\0';
             }
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"tspan") == 0)
@@ -2378,7 +2424,7 @@ static void SVGEndElement(void *context,const xmlChar *name)
                 *text;
 
               text=EscapeString(svg_info->text,'\'');
-              MVGPrintf(svg_info->file,"text %g,%g '%s'\n",
+              (void) FormatLocaleFile(svg_info->file,"text %g,%g '%s'\n",
                 svg_info->bounds.x,svg_info->bounds.y,text);
               text=DestroyString(text);
               draw_info=CloneDrawInfo(svg_info->image_info,(DrawInfo *) NULL);
@@ -2390,7 +2436,7 @@ static void SVGEndElement(void *context,const xmlChar *name)
               draw_info=DestroyDrawInfo(draw_info);
               *svg_info->text='\0';
             }
-          MVGPrintf(svg_info->file,"pop graphic-context\n");
+          (void) FormatLocaleFile(svg_info->file,"pop graphic-context\n");
           break;
         }
       if (LocaleCompare((const char *) name,"title") == 0)
@@ -3017,7 +3063,7 @@ static Image *ReadSVGImage(const ImageInfo *image_info,ExceptionInfo *exception)
       SetImageInfoBlob(read_info,(void *) NULL,0);
       if (read_info->density != (char *) NULL)
         read_info->density=DestroyString(read_info->density);
-      (void) FormatMagickString(read_info->filename,MaxTextExtent,"mvg:%s",
+      (void) FormatLocaleString(read_info->filename,MaxTextExtent,"mvg:%s",
         filename);
       image=ReadImage(read_info,exception);
       read_info=DestroyImageInfo(read_info);
@@ -3078,7 +3124,7 @@ ModuleExport size_t RegisterSVGImage(void)
 #endif
 #if defined(MAGICKCORE_RSVG_DELEGATE)
   rsvg_init();
-  (void) FormatMagickString(version,MaxTextExtent,"RSVG %d.%d.%d",
+  (void) FormatLocaleString(version,MaxTextExtent,"RSVG %d.%d.%d",
     LIBRSVG_MAJOR_VERSION,LIBRSVG_MINOR_VERSION,LIBRSVG_MICRO_VERSION);
 #endif
   entry=SetMagickInfo("SVG");
@@ -3192,7 +3238,7 @@ static void AffineToTransform(Image *image,AffineMatrix *affine)
               (void) WriteBlobString(image,"\">\n");
               return;
             }
-          (void) FormatMagickString(transform,MaxTextExtent,
+          (void) FormatLocaleString(transform,MaxTextExtent,
             "\" transform=\"scale(%g,%g)\">\n",affine->sx,affine->sy);
           (void) WriteBlobString(image,transform);
           return;
@@ -3208,7 +3254,7 @@ static void AffineToTransform(Image *image,AffineMatrix *affine)
                 theta;
 
               theta=(180.0/MagickPI)*atan2(affine->rx,affine->sx);
-              (void) FormatMagickString(transform,MaxTextExtent,
+              (void) FormatLocaleString(transform,MaxTextExtent,
                 "\" transform=\"rotate(%g)\">\n",theta);
               (void) WriteBlobString(image,transform);
               return;
@@ -3222,13 +3268,13 @@ static void AffineToTransform(Image *image,AffineMatrix *affine)
           (fabs(affine->ry) < MagickEpsilon) &&
           (fabs(affine->sy-1.0) < MagickEpsilon))
         {
-          (void) FormatMagickString(transform,MaxTextExtent,
+          (void) FormatLocaleString(transform,MaxTextExtent,
             "\" transform=\"translate(%g,%g)\">\n",affine->tx,affine->ty);
           (void) WriteBlobString(image,transform);
           return;
         }
     }
-  (void) FormatMagickString(transform,MaxTextExtent,
+  (void) FormatLocaleString(transform,MaxTextExtent,
     "\" transform=\"matrix(%g %g %g %g %g %g)\">\n",
     affine->sx,affine->rx,affine->ry,affine->sy,affine->tx,affine->ty);
   (void) WriteBlobString(image,transform);
@@ -3338,7 +3384,7 @@ static MagickBooleanType TraceSVGImage(Image *image)
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20010904//EN\"\n");
     (void) WriteBlobString(image,
       "  \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n");
-    (void) FormatMagickString(message,MaxTextExtent,
+    (void) FormatLocaleString(message,MaxTextExtent,
       "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) image->columns,
       (double) image->rows);
     (void) WriteBlobString(image,message);
@@ -3354,7 +3400,7 @@ static MagickBooleanType TraceSVGImage(Image *image)
         SetMagickPixelPacket(image,p,indexes+x,&pixel);
         (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,
           &image->exception);
-        (void) FormatMagickString(message,MaxTextExtent,
+        (void) FormatLocaleString(message,MaxTextExtent,
           "  <circle cx=\"%.20g\" cy=\"%.20g\" r=\"1\" fill=\"%s\"/>\n",
           (double) x,(double) y,tuple);
         (void) WriteBlobString(image,message);
@@ -3450,7 +3496,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
     "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 20010904//EN\"\n");
   (void) WriteBlobString(image,
     "  \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n");
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) image->columns,(double)
     image->rows);
   (void) WriteBlobString(image,message);
@@ -3509,34 +3555,34 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("affine",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=StringToDouble(token,(char **) NULL);
+            affine.sx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.rx=StringToDouble(token,(char **) NULL);
+            affine.rx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ry=StringToDouble(token,(char **) NULL);
+            affine.ry=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=StringToDouble(token,(char **) NULL);
+            affine.sy=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.tx=StringToDouble(token,(char **) NULL);
+            affine.tx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=StringToDouble(token,(char **) NULL);
+            affine.ty=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("angle",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.rx=StringToDouble(token,(char **) NULL);
-            affine.ry=StringToDouble(token,(char **) NULL);
+            affine.rx=LocaleToDouble(token,(char **) NULL);
+            affine.ry=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("arc",keyword) == 0)
@@ -3564,7 +3610,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("clip-path",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "clip-path:url(#%s);",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3572,7 +3618,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("clip-rule",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "clip-rule:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3580,7 +3626,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("clip-units",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "clipPathUnits=%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3604,7 +3650,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("decorate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "text-decoration:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3629,7 +3675,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("fill",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"fill:%s;",
+            (void) FormatLocaleString(message,MaxTextExtent,"fill:%s;",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -3637,7 +3683,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("fill-rule",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "fill-rule:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3645,7 +3691,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("fill-opacity",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "fill-opacity:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3653,7 +3699,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("font-family",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "font-family:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3661,7 +3707,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("font-stretch",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "font-stretch:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3669,7 +3715,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("font-style",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "font-style:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3677,7 +3723,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("font-size",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "font-size:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3685,7 +3731,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("font-weight",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "font-weight:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3704,7 +3750,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("text-align",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "text-align %s ",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3712,7 +3758,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("text-anchor",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "text-anchor %s ",token);
             (void) WriteBlobString(image,message);
             break;
@@ -3760,7 +3806,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("opacity",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"opacity %s ",
+            (void) FormatLocaleString(message,MaxTextExtent,"opacity %s ",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -3806,7 +3852,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
               }
             if (LocaleCompare("gradient",token) == 0)
               {
-                (void) FormatMagickString(message,MaxTextExtent,
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "</%sGradient>\n",type);
                 (void) WriteBlobString(image,message);
                 break;
@@ -3834,7 +3880,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             if (LocaleCompare("clip-path",token) == 0)
               {
                 GetMagickToken(q,&q,token);
-                (void) FormatMagickString(message,MaxTextExtent,
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "<clipPath id=\"%s\">\n",token);
                 (void) WriteBlobString(image,message);
                 break;
@@ -3851,24 +3897,24 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(type,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.segment.x1=StringToDouble(token,(char **) NULL);
-                svg_info.element.cx=StringToDouble(token,(char **) NULL);
+                svg_info.segment.x1=LocaleToDouble(token,(char **) NULL);
+                svg_info.element.cx=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y1=StringToDouble(token,(char **) NULL);
-                svg_info.element.cy=StringToDouble(token,(char **) NULL);
+                svg_info.segment.y1=LocaleToDouble(token,(char **) NULL);
+                svg_info.element.cy=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.x2=StringToDouble(token,(char **) NULL);
-                svg_info.element.major=StringToDouble(token,(char **) NULL);
+                svg_info.segment.x2=LocaleToDouble(token,(char **) NULL);
+                svg_info.element.major=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.segment.y2=StringToDouble(token,(char **) NULL);
-                svg_info.element.minor=StringToDouble(token,(char **) NULL);
-                (void) FormatMagickString(message,MaxTextExtent,
+                svg_info.segment.y2=LocaleToDouble(token,(char **) NULL);
+                svg_info.element.minor=LocaleToDouble(token,(char **) NULL);
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "<%sGradient id=\"%s\" x1=\"%g\" y1=\"%g\" x2=\"%g\" "
                   "y2=\"%g\">\n",type,name,svg_info.segment.x1,
                   svg_info.segment.y1,svg_info.segment.x2,svg_info.segment.y2);
@@ -3877,8 +3923,8 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
                     GetMagickToken(q,&q,token);
                     if (*token == ',')
                       GetMagickToken(q,&q,token);
-                    svg_info.element.angle=StringToDouble(token,(char **) NULL);
-                    (void) FormatMagickString(message,MaxTextExtent,
+                    svg_info.element.angle=LocaleToDouble(token,(char **) NULL);
+                    (void) FormatLocaleString(message,MaxTextExtent,
                       "<%sGradient id=\"%s\" cx=\"%g\" cy=\"%g\" r=\"%g\" "
                       "fx=\"%g\" fy=\"%g\">\n",type,name,
                       svg_info.element.cx,svg_info.element.cy,
@@ -3904,20 +3950,20 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(name,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                svg_info.bounds.x=StringToDouble(token,(char **) NULL);
+                svg_info.bounds.x=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.y=StringToDouble(token,(char **) NULL);
+                svg_info.bounds.y=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.width=StringToDouble(token,(char **) NULL);
+                svg_info.bounds.width=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                svg_info.bounds.height=StringToDouble(token,(char **) NULL);
-                (void) FormatMagickString(message,MaxTextExtent,
+                svg_info.bounds.height=LocaleToDouble(token,(char **) NULL);
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "<pattern id=\"%s\" x=\"%g\" y=\"%g\" width=\"%g\" "
                   "height=\"%g\">\n",name,svg_info.bounds.x,
                   svg_info.bounds.y,svg_info.bounds.width,
@@ -3946,7 +3992,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("rotate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"rotate(%s) ",
+            (void) FormatLocaleString(message,MaxTextExtent,"rotate(%s) ",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -3960,17 +4006,17 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("scale",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=StringToDouble(token,(char **) NULL);
+            affine.sx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=StringToDouble(token,(char **) NULL);
+            affine.sy=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("skewX",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"skewX(%s) ",
+            (void) FormatLocaleString(message,MaxTextExtent,"skewX(%s) ",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -3978,7 +4024,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("skewY",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"skewY(%s) ",
+            (void) FormatLocaleString(message,MaxTextExtent,"skewY(%s) ",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -3991,7 +4037,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             GetMagickToken(q,&q,token);
             (void) CopyMagickString(color,token,MaxTextExtent);
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "  <stop offset=\"%s\" stop-color=\"%s\" />\n",token,color);
             (void) WriteBlobString(image,message);
             break;
@@ -3999,7 +4045,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,"stroke:%s;",
+            (void) FormatLocaleString(message,MaxTextExtent,"stroke:%s;",
               token);
             (void) WriteBlobString(image,message);
             break;
@@ -4007,7 +4053,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-antialias",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-antialias:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4027,7 +4073,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
                 for (j=0; j < k; j++)
                 {
                   GetMagickToken(q,&q,token);
-                  (void) FormatMagickString(message,MaxTextExtent,"%s ",
+                  (void) FormatLocaleString(message,MaxTextExtent,"%s ",
                     token);
                   (void) WriteBlobString(image,message);
                 }
@@ -4035,7 +4081,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
                 break;
               }
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-dasharray:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4043,7 +4089,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-dashoffset",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-dashoffset:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4051,7 +4097,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-linecap",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-linecap:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4059,7 +4105,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-linejoin",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-linejoin:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4067,7 +4113,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-miterlimit",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-miterlimit:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4075,7 +4121,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-opacity",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-opacity:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4083,7 +4129,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("stroke-width",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "stroke-width:%s;",token);
             (void) WriteBlobString(image,message);
             continue;
@@ -4102,7 +4148,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("text-antialias",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "text-antialias:%s;",token);
             (void) WriteBlobString(image,message);
             break;
@@ -4115,11 +4161,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         if (LocaleCompare("translate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.tx=StringToDouble(token,(char **) NULL);
+            affine.tx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=StringToDouble(token,(char **) NULL);
+            affine.ty=LocaleToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -4168,11 +4214,11 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
       if (IsPoint(q) == MagickFalse)
         break;
       GetMagickToken(q,&q,token);
-      point.x=StringToDouble(token,(char **) NULL);
+      point.x=LocaleToDouble(token,(char **) NULL);
       GetMagickToken(q,&q,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
-      point.y=StringToDouble(token,(char **) NULL);
+      point.y=LocaleToDouble(token,(char **) NULL);
       GetMagickToken(q,(const char **) NULL,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
@@ -4222,7 +4268,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             status=MagickFalse;
             break;
           }
-          (void) FormatMagickString(message,MaxTextExtent,
+          (void) FormatLocaleString(message,MaxTextExtent,
           "  <line x1=\"%g\" y1=\"%g\" x2=\"%g\" y2=\"%g\"/>\n",
           primitive_info[j].point.x,primitive_info[j].point.y,
           primitive_info[j+1].point.x,primitive_info[j+1].point.y);
@@ -4236,7 +4282,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             status=MagickFalse;
             break;
           }
-          (void) FormatMagickString(message,MaxTextExtent,
+          (void) FormatLocaleString(message,MaxTextExtent,
           "  <rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\"/>\n",
           primitive_info[j].point.x,primitive_info[j].point.y,
           primitive_info[j+1].point.x-primitive_info[j].point.x,
@@ -4251,7 +4297,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             status=MagickFalse;
             break;
           }
-        (void) FormatMagickString(message,MaxTextExtent,
+        (void) FormatLocaleString(message,MaxTextExtent,
           "  <rect x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" rx=\"%g\" "
           "ry=\"%g\"/>\n",primitive_info[j].point.x,
           primitive_info[j].point.y,primitive_info[j+1].point.x-
@@ -4277,7 +4323,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             status=MagickFalse;
             break;
           }
-          (void) FormatMagickString(message,MaxTextExtent,
+          (void) FormatLocaleString(message,MaxTextExtent,
           "  <ellipse cx=\"%g\" cy=\"%g\" rx=\"%g\" ry=\"%g\"/>\n",
           primitive_info[j].point.x,primitive_info[j].point.y,
           primitive_info[j+1].point.x,primitive_info[j+1].point.y);
@@ -4297,7 +4343,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
           }
         alpha=primitive_info[j+1].point.x-primitive_info[j].point.x;
         beta=primitive_info[j+1].point.y-primitive_info[j].point.y;
-        (void) FormatMagickString(message,MaxTextExtent,
+        (void) FormatLocaleString(message,MaxTextExtent,
           "  <circle cx=\"%g\" cy=\"%g\" r=\"%g\"/>\n",
           primitive_info[j].point.x,primitive_info[j].point.y,
           hypot(alpha,beta));
@@ -4316,7 +4362,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         length=strlen(message);
         for ( ; j < i; j++)
         {
-          (void) FormatMagickString(message,MaxTextExtent,"%g,%g ",
+          (void) FormatLocaleString(message,MaxTextExtent,"%g,%g ",
             primitive_info[j].point.x,primitive_info[j].point.y);
           length+=strlen(message);
           if (length >= 80)
@@ -4345,7 +4391,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
         length=strlen(message);
         for ( ; j < i; j++)
         {
-          (void) FormatMagickString(message,MaxTextExtent,"%g,%g ",
+          (void) FormatLocaleString(message,MaxTextExtent,"%g,%g ",
             primitive_info[j].point.x,primitive_info[j].point.y);
           length+=strlen(message);
           if (length >= 80)
@@ -4427,7 +4473,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             break;
           }
         GetMagickToken(q,&q,token);
-        (void) FormatMagickString(message,MaxTextExtent,
+        (void) FormatLocaleString(message,MaxTextExtent,
           "  <text x=\"%g\" y=\"%g\">",primitive_info[j].point.x,
           primitive_info[j].point.y);
         (void) WriteBlobString(image,message);
@@ -4450,7 +4496,7 @@ static MagickBooleanType WriteSVGImage(const ImageInfo *image_info,Image *image)
             break;
           }
         GetMagickToken(q,&q,token);
-        (void) FormatMagickString(message,MaxTextExtent,
+        (void) FormatLocaleString(message,MaxTextExtent,
           "  <image x=\"%g\" y=\"%g\" width=\"%g\" height=\"%g\" "
           "xlink:href=\"%s\"/>\n",primitive_info[j].point.x,
           primitive_info[j].point.y,primitive_info[j+1].point.x,
index 1f1634912509a05b0626a60fcf056e5c27ced83b..7e1a06e888cc42614f38829cf3f755fe095eceab 100644 (file)
@@ -209,7 +209,7 @@ static MagickBooleanType WriteTHUMBNAILImage(const ImageInfo *image_info,
   write_info=CloneImageInfo(image_info);
   (void) SetImageInfo(write_info,1,&image->exception);
   if (LocaleCompare(write_info->magick,"THUMBNAIL") == 0)
-    (void) FormatMagickString(thumbnail_image->filename,MaxTextExtent,
+    (void) FormatLocaleString(thumbnail_image->filename,MaxTextExtent,
       "miff:%s",write_info->filename);
   status=WriteImage(write_info,thumbnail_image);
   thumbnail_image=DestroyImage(thumbnail_image);
index d2d6928f5ee113f00e7bb8ca98d24bd67087fe65..2cf183539c4e6b88d3bf68d0aa570f308107a33c 100644 (file)
@@ -371,7 +371,7 @@ static Image *ReadGROUP4Image(const ImageInfo *image_info,
     Read TIFF image.
   */
   read_info=CloneImageInfo((ImageInfo *) NULL);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"%s",filename);
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"%s",filename);
   image=ReadTIFFImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
   if (image != (Image *) NULL)
@@ -604,7 +604,7 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image)
           shorty;
 
         if (TIFFGetField(tiff,exif_info[i].tag,&shorty) != 0)
-          (void) FormatMagickString(value,MaxTextExtent,"%d",shorty);
+          (void) FormatLocaleString(value,MaxTextExtent,"%d",shorty);
         break;
       }
       case TIFF_LONG:
@@ -613,7 +613,7 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image)
           ssize_ty;
 
         if (TIFFGetField(tiff,exif_info[i].tag,&ssize_ty) != 0)
-          (void) FormatMagickString(value,MaxTextExtent,"%d",ssize_ty);
+          (void) FormatLocaleString(value,MaxTextExtent,"%d",ssize_ty);
         break;
       }
       case TIFF_RATIONAL:
@@ -623,7 +623,7 @@ static void TIFFGetEXIFProperties(TIFF *tiff,Image *image)
           rational;
 
         if (TIFFGetField(tiff,exif_info[i].tag,&rational) != 0)
-          (void) FormatMagickString(value,MaxTextExtent,"%g",rational);
+          (void) FormatLocaleString(value,MaxTextExtent,"%g",rational);
         break;
       }
       default:
@@ -1017,7 +1017,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
 
            (void) TIFFGetFieldDefaulted(tiff,TIFFTAG_YCBCRSUBSAMPLING,
              &horizontal,&vertical);
-           (void) FormatMagickString(sampling_factor,MaxTextExtent,"%dx%d",
+           (void) FormatLocaleString(sampling_factor,MaxTextExtent,"%dx%d",
              horizontal,vertical);
            (void) SetImageProperty(image,"jpeg:sampling-factor",
              sampling_factor);
@@ -1132,7 +1132,7 @@ static Image *ReadTIFFImage(const ImageInfo *image_info,
           value[MaxTextExtent];
 
         method=ReadStripMethod;
-        (void) FormatMagickString(value,MaxTextExtent,"%u",
+        (void) FormatLocaleString(value,MaxTextExtent,"%u",
           (unsigned int) rows_per_strip);
         (void) SetImageProperty(image,"tiff:rows-per-strip",value);
       }
@@ -1710,7 +1710,7 @@ ModuleExport size_t RegisterTIFFImage(void)
   UnlockSemaphoreInfo(tiff_semaphore);
   *version='\0';
 #if defined(TIFF_VERSION)
-  (void) FormatMagickString(version,MaxTextExtent,"%d",TIFF_VERSION);
+  (void) FormatLocaleString(version,MaxTextExtent,"%d",TIFF_VERSION);
 #endif
 #if defined(MAGICKCORE_TIFF_DELEGATE)
   {
@@ -1926,7 +1926,7 @@ static MagickBooleanType WriteGROUP4Image(const ImageInfo *image_info,
         "UnableToCreateTemporaryFile",filename);
       return(MagickFalse);
     }
-  (void) FormatMagickString(huffman_image->filename,MaxTextExtent,"tiff:%s",
+  (void) FormatLocaleString(huffman_image->filename,MaxTextExtent,"tiff:%s",
     filename);
   (void) SetImageType(huffman_image,BilevelType);
   write_info=CloneImageInfo((ImageInfo *) NULL);
@@ -2390,7 +2390,7 @@ static void TIFFSetEXIFProperties(TIFF *tiff,Image *image)
         float
           rational;
 
-        rational=StringToDouble(value,(char **) NULL);
+        rational=LocaleToDouble(value,(char **) NULL);
         (void) TIFFSetField(tiff,exif_info[i].tag,rational);
         break;
       }
index c3f880375aaeef28c5686c352700027cfbcbfc4c..f213df783d0deb965f6997ad2fc44279e208a7dc 100644 (file)
@@ -249,29 +249,29 @@ static Image *ReadTTFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
   draw_info->font=AcquireString(image->filename);
   ConcatenateString(&draw_info->primitive,"push graphic-context\n");
-  (void) FormatMagickString(buffer,MaxTextExtent," viewbox 0 0 %.20g %.20g\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent," viewbox 0 0 %.20g %.20g\n",
     (double) image->columns,(double) image->rows);
   ConcatenateString(&draw_info->primitive,buffer);
   ConcatenateString(&draw_info->primitive," font-size 18\n");
-  (void) FormatMagickString(buffer,MaxTextExtent," text 10,%.20g '",(double) y);
+  (void) FormatLocaleString(buffer,MaxTextExtent," text 10,%.20g '",(double) y);
   ConcatenateString(&draw_info->primitive,buffer);
   text=EscapeString(Text,'"');
   ConcatenateString(&draw_info->primitive,text);
   text=DestroyString(text);
-  (void) FormatMagickString(buffer,MaxTextExtent,"'\n");
+  (void) FormatLocaleString(buffer,MaxTextExtent,"'\n");
   ConcatenateString(&draw_info->primitive,buffer);
   y+=20*(ssize_t) MultilineCensus((char *) Text)+20;
   for (i=12; i <= 72; i+=6)
   {
     y+=i+12;
     ConcatenateString(&draw_info->primitive," font-size 18\n");
-    (void) FormatMagickString(buffer,MaxTextExtent," text 10,%.20g '%.20g'\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent," text 10,%.20g '%.20g'\n",
       (double) y,(double) i);
     ConcatenateString(&draw_info->primitive,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent," font-size %.20g\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent," font-size %.20g\n",
       (double) i);
     ConcatenateString(&draw_info->primitive,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent," text 50,%.20g "
+    (void) FormatLocaleString(buffer,MaxTextExtent," text 50,%.20g "
       "'That which does not destroy me, only makes me stronger.'\n",(double) y);
     ConcatenateString(&draw_info->primitive,buffer);
     if (i >= 24)
@@ -321,7 +321,7 @@ ModuleExport size_t RegisterTTFImage(void)
 
   *version='\0';
 #if defined(FREETYPE_MAJOR) && defined(FREETYPE_MINOR) && defined(FREETYPE_PATCH)
-  (void) FormatMagickString(version,MaxTextExtent,"Freetype %d.%d.%d",
+  (void) FormatLocaleString(version,MaxTextExtent,"Freetype %d.%d.%d",
     FREETYPE_MAJOR,FREETYPE_MINOR,FREETYPE_PATCH);
 #endif
   entry=SetMagickInfo("DFONT");
index baa65d46ad4608f44da668e03fc1757f3b87b522..e14c09c79bfd019b9be57d2176141833d2a2ae2f 100644 (file)
@@ -248,14 +248,14 @@ static Image *ReadTEXTImage(const ImageInfo *image_info,Image *image,
   (void) SetImageBackgroundColor(image);
   draw_info=CloneDrawInfo(image_info,(DrawInfo *) NULL);
   (void) CloneString(&draw_info->text,image_info->filename);
-  (void) FormatMagickString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,
+  (void) FormatLocaleString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,
     (long) page.y);
   (void) CloneString(&draw_info->geometry,geometry);
   status=GetTypeMetrics(image,draw_info,&metrics);
   if (status == MagickFalse)
     ThrowReaderException(TypeError,"UnableToGetTypeMetrics");
   page.y=(ssize_t) ceil((double) page.y+metrics.ascent-0.5);
-  (void) FormatMagickString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,
+  (void) FormatLocaleString(geometry,MaxTextExtent,"0x0%+ld%+ld",(long) page.x,
     (long) page.y);
   (void) CloneString(&draw_info->geometry,geometry);
   (void) CopyMagickString(filename,image_info->filename,MaxTextExtent);
@@ -659,7 +659,7 @@ static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image)
     image->depth=GetImageQuantumDepth(image,MagickTrue);
     if (image->matte != MagickFalse)
       (void) ConcatenateMagickString(colorspace,"a",MaxTextExtent);
-    (void) FormatMagickString(buffer,MaxTextExtent,
+    (void) FormatLocaleString(buffer,MaxTextExtent,
       "# ImageMagick pixel enumeration: %.20g,%.20g,%.20g,%s\n",(double)
       image->columns,(double) image->rows,(double)
       GetQuantumRange(image->depth),colorspace);
@@ -673,7 +673,7 @@ static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image)
       indexes=GetVirtualIndexQueue(image);
       for (x=0; x < (ssize_t) image->columns; x++)
       {
-        (void) FormatMagickString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g,%.20g: ",(double)
           x,(double) y);
         (void) WriteBlobString(image,buffer);
         SetMagickPixelPacket(image,p,indexes+x,&pixel);
@@ -697,7 +697,7 @@ static MagickBooleanType WriteTXTImage(const ImageInfo *image_info,Image *image)
         (void) WriteBlobString(image,tuple);
         (void) WriteBlobString(image,"  ");
         GetColorTuple(&pixel,MagickTrue,tuple);
-        (void) FormatMagickString(buffer,MaxTextExtent,"%s",tuple);
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%s",tuple);
         (void) WriteBlobString(image,buffer);
         (void) WriteBlobString(image,"  ");
         (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,
index 937f9d1990a213afb469d88d4c03af83327a1cd0..bbc64f89259a5a146185b408037a71870a54a370 100644 (file)
@@ -297,7 +297,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
   symbol=AcquireString("");
   (void) WriteBlobString(image,"/* UIL */\n");
   GetPathComponent(image->filename,BasePath,basename);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "value\n  %s_ct : color_table(\n",basename);
   (void) WriteBlobString(image,buffer);
   GetMagickPixelPacket(image,&pixel);
@@ -327,15 +327,15 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
     symbol[j]='\0';
     (void) SubstituteString(&symbol,"'","''");
     if (LocaleCompare(name,"None") == 0)
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "    background color = '%s'",symbol);
     else
-      (void) FormatMagickString(buffer,MaxTextExtent,
+      (void) FormatLocaleString(buffer,MaxTextExtent,
         "    color('%s',%s) = '%s'",name,
         PixelIntensityToQuantum(image->colormap+i) <
         ((Quantum) QuantumRange/2) ? "background" : "foreground",symbol);
     (void) WriteBlobString(image,buffer);
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s",
       (i == (ssize_t) (colors-1) ? ");\n" : ",\n"));
     (void) WriteBlobString(image,buffer);
   }
@@ -343,7 +343,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
     Define UIL pixels.
   */
   GetPathComponent(image->filename,BasePath,basename);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "  %s_icon : icon(color_table = %s_ct,\n",basename,basename);
   (void) WriteBlobString(image,buffer);
   for (y=0; y < (ssize_t) image->rows; y++)
@@ -367,7 +367,7 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image)
       (void) WriteBlobString(image,buffer);
       p++;
     }
-    (void) FormatMagickString(buffer,MaxTextExtent,"\"%s\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\"%s\n",
       (y == (ssize_t) (image->rows-1) ? ");" : ","));
     (void) WriteBlobString(image,buffer);
     status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
index 77ad3aaf08846358fb118d3f2f5c95e338627a7f..cb50c9f39da4f42a94a06762200ca84ee956c6e5 100644 (file)
@@ -458,7 +458,7 @@ static MagickBooleanType WriteVICARImage(const ImageInfo *image_info,
     Write header.
   */
   (void) ResetMagickMemory(header,' ',MaxTextExtent);
-  (void) FormatMagickString(header,MaxTextExtent,
+  (void) FormatLocaleString(header,MaxTextExtent,
     "LBLSIZE=%.20g FORMAT='BYTE' TYPE='IMAGE' BUFSIZE=20000 DIM=2 EOL=0 "
     "RECSIZE=%.20g ORG='BSQ' NL=%.20g NS=%.20g NB=1 N1=0 N2=0 N3=0 N4=0 NBB=0 "
     "NLB=0 TASK='ImageMagick'",(double) MaxTextExtent,(double) image->columns,
index fd7dcc0cd06fbc34958f19e6834ee537afac365b..9c653087181628c4271c0c5e14046ce015456396 100644 (file)
@@ -333,7 +333,7 @@ static MagickBooleanType WriteVIDImage(const ImageInfo *image_info,Image *image)
   write_info=CloneImageInfo(image_info);
   (void) SetImageInfo(write_info,1,&image->exception);
   if (LocaleCompare(write_info->magick,"VID") == 0)
-    (void) FormatMagickString(montage_image->filename,MaxTextExtent,
+    (void) FormatLocaleString(montage_image->filename,MaxTextExtent,
       "miff:%s",write_info->filename);
   status=WriteImage(write_info,montage_image);
   montage_image=DestroyImage(montage_image);
index 1a2f755d05bcc8dec1d7108fab4b9071ea91c776..76e78a423b5bf83bf3b838e122aa2584e8939d61 100644 (file)
@@ -212,7 +212,7 @@ static Image *ReadWMFImage(const ImageInfo *image_info,ExceptionInfo *exception)
   */
   read_info=CloneImageInfo(image_info);
   SetImageInfoBlob(read_info,(void *) NULL,0);
-  (void) FormatMagickString(read_info->filename,MaxTextExtent,"eps:%s",
+  (void) FormatLocaleString(read_info->filename,MaxTextExtent,"eps:%s",
     filename);
   image=ReadImage(read_info,exception);
   read_info=DestroyImageInfo(read_info);
index 995d76213825cee78f431be04bb3c72ca122c844..0d90e3a8b85d6c8697cce156b09d262114f15e60 100644 (file)
@@ -619,7 +619,7 @@ static int UnpackWPG2Raster(Image *image,int bpp)
             return(-2);
           break;
         case 0x7E:
-          (void) fprintf(stderr,"\nUnsupported WPG token XOR, please report!");
+          (void) FormatLocaleFile(stderr,"\nUnsupported WPG token XOR, please report!");
     XorMe=!XorMe;
           break;
         case 0x7F:
@@ -639,7 +639,7 @@ static int UnpackWPG2Raster(Image *image,int bpp)
           RunCount=ReadBlobByte(image);  /* RST */
           if(x!=0)
             {
-              (void) fprintf(stderr,
+              (void) FormatLocaleFile(stderr,
                              "\nUnsupported WPG2 unaligned token RST x=%.20g, please report!\n"
                              ,(double) x);
               return(-3);
@@ -804,7 +804,7 @@ static Image *ExtractPostscript(Image *image,const ImageInfo *image_info,
   
     /* Read nested image */
   /*FormatString(clone_info->filename,"%s:%s",magic_info->name,postscript_file);*/
-  FormatMagickString(clone_info->filename,MaxTextExtent,"%s",postscript_file);
+  FormatLocaleString(clone_info->filename,MaxTextExtent,"%s",postscript_file);
   image2=ReadImage(clone_info,exception);
 
   if (!image2)
index ce8a647c063051e6c12d718923d78bdd5b0f2f7a..b7ef7303b06039bc07c8d59398f9e0877c860b41 100644 (file)
@@ -512,13 +512,13 @@ static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image)
     Write X bitmap header.
   */
   GetPathComponent(image->filename,BasePath,basename);
-  (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_width %.20g\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"#define %s_width %.20g\n",
     basename,(double) image->columns);
   (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,"#define %s_height %.20g\n",
+  (void) FormatLocaleString(buffer,MaxTextExtent,"#define %s_height %.20g\n",
     basename,(double) image->rows);
   (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "static char %s_bits[] = {\n",basename);
   (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
   (void) CopyMagickString(buffer," ",MaxTextExtent);
@@ -550,7 +550,7 @@ static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image)
           /*
             Write a bitmap byte to the image file.
           */
-          (void) FormatMagickString(buffer,MaxTextExtent,"0x%02X, ",
+          (void) FormatLocaleString(buffer,MaxTextExtent,"0x%02X, ",
             (unsigned int) (byte & 0xff));
           (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
           count++;
@@ -571,7 +571,7 @@ static MagickBooleanType WriteXBMImage(const ImageInfo *image_info,Image *image)
           Write a bitmap byte to the image file.
         */
         byte>>=(8-bit);
-        (void) FormatMagickString(buffer,MaxTextExtent,"0x%02X, ",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"0x%02X, ",
           (unsigned int) (byte & 0xff));
         (void) WriteBlob(image,strlen(buffer),(unsigned char *) buffer);
         count++;
index bb94c6c0c0a2f741fc50478478bb93d047e884e2..caad028d738494102bb3dd2c506546b5f299868e 100644 (file)
@@ -734,11 +734,11 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
   */
   (void) WriteBlobString(image,"/* XPM */\n");
   GetPathComponent(picon->filename,BasePath,basename);
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "static char *%s[] = {\n",basename);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"/* columns rows colors chars-per-pixel */\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "\"%.20g %.20g %.20g %.20g\",\n",(double) picon->columns,(double)
     picon->rows,(double) colors,(double) characters_per_pixel);
   (void) WriteBlobString(image,buffer);
@@ -770,7 +770,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
       symbol[j]=Cixel[k];
     }
     symbol[j]='\0';
-    (void) FormatMagickString(buffer,MaxTextExtent,"\"%s c %s\",\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\"%s c %s\",\n",
        symbol,name);
     (void) WriteBlobString(image,buffer);
   }
@@ -798,7 +798,7 @@ static MagickBooleanType WritePICONImage(const ImageInfo *image_info,
       (void) CopyMagickString(buffer,symbol,MaxTextExtent);
       (void) WriteBlobString(image,buffer);
     }
-    (void) FormatMagickString(buffer,MaxTextExtent,"\"%s\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\"%s\n",
       y == (ssize_t) (picon->rows-1) ? "" : ",");
     (void) WriteBlobString(image,buffer);
     status=SetImageProgress(image,SaveImageTag,(MagickOffsetType) y,
@@ -960,7 +960,7 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image)
   GetPathComponent(image->filename,BasePath,basename);
   if (isalnum((int) ((unsigned char) *basename)) == 0)
     {
-      (void) FormatMagickString(buffer,MaxTextExtent,"xpm_%s",basename);
+      (void) FormatLocaleString(buffer,MaxTextExtent,"xpm_%s",basename);
       (void) CopyMagickString(basename,buffer,MaxTextExtent);
     }
   if (isalpha((int) ((unsigned char) basename[0])) == 0)
@@ -968,11 +968,11 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image)
   for (i=1; basename[i] != '\0'; i++)
     if (isalnum((int) ((unsigned char) basename[i])) == 0)
       basename[i]='_';
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "static char *%s[] = {\n",basename);
   (void) WriteBlobString(image,buffer);
   (void) WriteBlobString(image,"/* columns rows colors chars-per-pixel */\n");
-  (void) FormatMagickString(buffer,MaxTextExtent,
+  (void) FormatLocaleString(buffer,MaxTextExtent,
     "\"%.20g %.20g %.20g %.20g \",\n",(double) image->columns,(double)
     image->rows,(double) image->colors,(double) characters_per_pixel);
   (void) WriteBlobString(image,buffer);
@@ -1001,7 +1001,7 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image)
       symbol[j]=Cixel[k];
     }
     symbol[j]='\0';
-    (void) FormatMagickString(buffer,MaxTextExtent,"\"%s c %s\",\n",symbol,
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\"%s c %s\",\n",symbol,
       name);
     (void) WriteBlobString(image,buffer);
   }
@@ -1029,7 +1029,7 @@ static MagickBooleanType WriteXPMImage(const ImageInfo *image_info,Image *image)
       (void) CopyMagickString(buffer,symbol,MaxTextExtent);
       (void) WriteBlobString(image,buffer);
     }
-    (void) FormatMagickString(buffer,MaxTextExtent,"\"%s\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"\"%s\n",
       (y == (ssize_t) (image->rows-1) ? "" : ","));
     (void) WriteBlobString(image,buffer);
     if (image->previous == (Image *) NULL)
index 85c84dca522cd5ae59c6cca8b7c0eaa29dc93036..b64f371f1fbf5be10edd09dcba6b062a3cde64b8 100644 (file)
@@ -191,7 +191,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
       if ((flags & SigmaValue) == 0)
         image->y_resolution=image->x_resolution;
     }
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",
     image->x_resolution,image->y_resolution);
   /*
     Determine page geometry from the XPS media box.
@@ -263,7 +263,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
     (void) ParseAbsoluteGeometry(PSPageGeometry,&page);
   if (image_info->page != (char *) NULL)
     (void) ParseAbsoluteGeometry(image_info->page,&page);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
     page.width,(double) page.height);
   if (image_info->monochrome != MagickFalse)
     delegate_info=GetDelegateInfo("xps:mono",(char *) NULL,exception);
@@ -282,7 +282,7 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   page.width=(size_t) floor(page.width*image->y_resolution/delta.x+0.5);
   page.height=(size_t) floor(page.height*image->y_resolution/delta.y+
     0.5);
-  (void) FormatMagickString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
+  (void) FormatLocaleString(options,MaxTextExtent,"-g%.20gx%.20g ",(double)
     page.width,(double) page.height);
   image=DestroyImage(image);
   read_info=CloneImageInfo(image_info);
@@ -290,10 +290,10 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
   if (read_info->number_scenes != 0)
     {
       if (read_info->number_scenes != 1)
-        (void) FormatMagickString(options,MaxTextExtent,"-dLastPage=%.20g",
+        (void) FormatLocaleString(options,MaxTextExtent,"-dLastPage=%.20g",
           (double) (read_info->scene+read_info->number_scenes));
       else
-        (void) FormatMagickString(options,MaxTextExtent,
+        (void) FormatLocaleString(options,MaxTextExtent,
           "-dFirstPage=%.20g -dLastPage=%.20g",(double) read_info->scene+1,
           (double) (read_info->scene+read_info->number_scenes));
       read_info->number_scenes=0;
@@ -301,11 +301,11 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
         *read_info->scenes='\0';
     }
   if (read_info->authenticate != (char *) NULL)
-    (void) FormatMagickString(options+strlen(options),MaxTextExtent,
+    (void) FormatLocaleString(options+strlen(options),MaxTextExtent,
       " -sXPSPassword=%s",read_info->authenticate);
   (void) CopyMagickString(filename,read_info->filename,MaxTextExtent);
   (void) AcquireUniqueFilename(read_info->filename);
-  (void) FormatMagickString(command,MaxTextExtent,
+  (void) FormatLocaleString(command,MaxTextExtent,
     GetDelegateCommands(delegate_info),
     read_info->antialias != MagickFalse ? 4 : 1,
     read_info->antialias != MagickFalse ? 4 : 1,density,options,
index 13cb812812c34ec5d4daffefe5634c2ef01e0488..6c3cd5ccfcc77d6b90a7845d5b3a4cafba389beb 100644 (file)
 /* Define to 1 if you have the `fork' function. */
 #undef HAVE_FORK
 
+/* Define to 1 if you have the `fprintf_l' function. */
+#undef HAVE_FPRINTF_L
+
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #undef HAVE_FSEEKO
 
 /* Define to 1 if you have the `vsnprintf' function. */
 #undef HAVE_VSNPRINTF
 
+/* Define to 1 if you have the `vsnprintf_l' function. */
+#undef HAVE_VSNPRINTF_L
+
 /* Define to 1 if you have the `vsprintf' function. */
 #undef HAVE_VSPRINTF
 
index a21a4d4b4cc93eb6c8dec7d96048db23034f814f..a5f1855d436892ca43b4727e4d235c9e8d997d28 100644 (file)
@@ -10,7 +10,7 @@
   <configure name="VERSION" value="6.6.9"/>
   <configure name="LIB_VERSION" value="0x669"/>
   <configure name="LIB_VERSION_NUMBER" value="6,6,9,10"/>
-  <configure name="SVN_REVISION" value="4455" />
+  <configure name="SVN_REVISION" value="4458" />
   <configure name="RELEASE_DATE" value="2011-05-19"/>
   <configure name="CONFIGURE" value="./configure "/>
   <configure name="PREFIX" value="/usr/local"/>
index 035a623b5382d42854f3164eabaca91fbb6ad4e8..d9cf6d976412ebcb8502814ce031783cf6a953e1 100755 (executable)
--- a/configure
+++ b/configure
@@ -3455,7 +3455,7 @@ MAGICK_LIBRARY_CURRENT_MIN=`expr $MAGICK_LIBRARY_CURRENT - $MAGICK_LIBRARY_AGE`
 
 MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
 
-MAGICK_SVN_REVISION=4455
+MAGICK_SVN_REVISION=4458
 
 
 
@@ -24005,7 +24005,7 @@ fi
 LIBS="$MATH_LIBS $LIBS"
 
 
-for ac_func in atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf waitpid _wfopen _wstat
+for ac_func in atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork fprintf_l ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
index be6e6616385bed39c1affa4264848b6e6b198950..7aba68bb576a129f0e672961dbf8ac9344adfce8 100755 (executable)
@@ -1051,7 +1051,7 @@ AC_CHECK_LIB(m,sqrt,MATH_LIBS="-lm",,)
 LIBS="$MATH_LIBS $LIBS"
 AC_SUBST(MATH_LIBS)
 
-AC_CHECK_FUNCS([atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
+AC_CHECK_FUNCS([atoll atexit cabs carg cimag creal clock ctime_r directio _exit execvp fchmod floor fork fprintf_l ftime ftruncate getc_unlocked getcwd getpid getexecname getdtablesize getpagesize getrlimit getrusage gettimeofday gmtime_r j0 j1 lltostr localtime_r lstat memmove memset mkstemp munmap nanosleep newlocale _NSGetExecutablePath pclose _pclose poll popen _popen posix_fadvise posix_fallocate posix_madvise posix_memalign posix_spawnp pow pread pwrite qsort_r raise rand_r readlink readdir_r realpath select seekdir setlocale sqrt setvbuf stat strchr strerror_r strrchr strcspn strdup strpbrk strspn strstr strtod strtod_l strtol strtoul symlink sysconf sigemptyset sigaction spawnvp strerror strlcat strlcpy strcasecmp strncasecmp telldir tempnam times ulltostr uselocale usleep utime vsprintf vsnprintf vsnprintf_l waitpid _wfopen _wstat])
 
 #
 # Check for clock_gettime().
index 4ed86091cb9ff4b9977fa21bf982dc73a2dc2b88..6606a1494f73fc2610489d578adfa0146fd78183 100644 (file)
@@ -184,11 +184,11 @@ ModuleExport size_t analyzeImage(Image **images,const int argc,
     if (area <= 0.0)
       break;
     brightness_mean=brightness_sum_x/area;
-    (void) FormatMagickString(text,MaxTextExtent,"%g",brightness_mean);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",brightness_mean);
     (void) SetImageProperty(image,"filter:brightness:mean",text);
     brightness_standard_deviation=sqrt(brightness_sum_x2/area-(brightness_sum_x/
       area*brightness_sum_x/area));
-    (void) FormatMagickString(text,MaxTextExtent,"%g",
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",
       brightness_standard_deviation);
     (void) SetImageProperty(image,"filter:brightness:standard-deviation",text);
     if (brightness_standard_deviation != 0)
@@ -198,21 +198,21 @@ ModuleExport size_t analyzeImage(Image **images,const int argc,
         brightness_mean*brightness_mean)/(brightness_standard_deviation*
         brightness_standard_deviation*brightness_standard_deviation*
         brightness_standard_deviation)-3.0;
-    (void) FormatMagickString(text,MaxTextExtent,"%g",brightness_kurtosis);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",brightness_kurtosis);
     (void) SetImageProperty(image,"filter:brightness:kurtosis",text);
     if (brightness_standard_deviation != 0)
       brightness_skewness=(brightness_sum_x3/area-3.0*brightness_mean*
         brightness_sum_x2/area+2.0*brightness_mean*brightness_mean*
         brightness_mean)/(brightness_standard_deviation*
         brightness_standard_deviation*brightness_standard_deviation);
-    (void) FormatMagickString(text,MaxTextExtent,"%g",brightness_skewness);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",brightness_skewness);
     (void) SetImageProperty(image,"filter:brightness:skewness",text);
     saturation_mean=saturation_sum_x/area;
-    (void) FormatMagickString(text,MaxTextExtent,"%g",saturation_mean);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",saturation_mean);
     (void) SetImageProperty(image,"filter:saturation:mean",text);
     saturation_standard_deviation=sqrt(saturation_sum_x2/area-(saturation_sum_x/
       area*saturation_sum_x/area));
-    (void) FormatMagickString(text,MaxTextExtent,"%g",
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",
       saturation_standard_deviation);
     (void) SetImageProperty(image,"filter:saturation:standard-deviation",text);
     if (saturation_standard_deviation != 0)
@@ -222,14 +222,14 @@ ModuleExport size_t analyzeImage(Image **images,const int argc,
         saturation_mean*saturation_mean)/(saturation_standard_deviation*
         saturation_standard_deviation*saturation_standard_deviation*
         saturation_standard_deviation)-3.0;
-    (void) FormatMagickString(text,MaxTextExtent,"%g",saturation_kurtosis);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",saturation_kurtosis);
     (void) SetImageProperty(image,"filter:saturation:kurtosis",text);
     if (saturation_standard_deviation != 0)
       saturation_skewness=(saturation_sum_x3/area-3.0*saturation_mean*
         saturation_sum_x2/area+2.0*saturation_mean*saturation_mean*
         saturation_mean)/(saturation_standard_deviation*
         saturation_standard_deviation*saturation_standard_deviation);
-    (void) FormatMagickString(text,MaxTextExtent,"%g",saturation_skewness);
+    (void) FormatLocaleString(text,MaxTextExtent,"%g",saturation_skewness);
     (void) SetImageProperty(image,"filter:saturation:skewness",text);
   }
   return(MagickImageFilterSignature);
index ca09f4b51259fa13e8a40148449cf8d15f306293..6abc3cc8f4d752a952b82e4961400670d1c950ac 100644 (file)
@@ -150,7 +150,6 @@ MAGICK_BASE_SRCS = \
        magick/list.h \
        magick/locale.c \
        magick/locale_.h \
-       magick/locale-private.h \
        magick/log.c \
        magick/log.h \
        magick/mac.h \
@@ -387,7 +386,6 @@ MAGICK_NOINST_HDRS = \
        magick/exception-private.h \
        magick/fx-private.h \
        magick/image-private.h \
-       magick/locale-private.h \
        magick/mac.h \
        magick/mime-private.h \
        magick/monitor-private.h \
index 37e2361d56f5e3fd05090723891751bce006a54c..e530e55eef2c9a050920028eb69b9363d8e073ea 100644 (file)
@@ -551,7 +551,7 @@ static ConvolveInfo *GetConvolveInfo(const Image *image,const char *name,
       convolve_info=DestroyConvolveInfo(convolve_info);
       return((ConvolveInfo *) NULL);
     }
-  (void) FormatMagickString(options,MaxTextExtent,CLOptions,(double)
+  (void) FormatLocaleString(options,MaxTextExtent,CLOptions,(double)
     QuantumRange,MagickEpsilon);
   status=clBuildProgram(convolve_info->program,1,convolve_info->devices,options,
     NULL,NULL);
index 8741fde791013e693712e147323401c2ccf4e0a7..7459c5871cbc6c81b97577bc0c1927146595f31f 100644 (file)
@@ -483,7 +483,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       *state|=PlayAnimationState;
       *state&=(~AutoReverseAnimationState);
       GetPathComponent((*image)->magick_filename,BasePath,basename);
-      (void) FormatMagickString(windows->image.name,MaxTextExtent,
+      (void) FormatLocaleString(windows->image.name,MaxTextExtent,
         "%s: %s",MagickPackageName,basename);
       if (resource_info->title != (char *) NULL)
         {
@@ -607,7 +607,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
             Display documentation using Netscape remote control.
           */
           url=GetMagickHomeURL();
-          (void) FormatMagickString(command,MaxTextExtent,
+          (void) FormatLocaleString(command,MaxTextExtent,
             "openurl(%s,new-tab)",url);
           url=DestroyString(url);
           mozilla_atom=XInternAtom(display,"_MOZILLA_COMMAND",MagickFalse);
@@ -817,7 +817,7 @@ MagickExport void XAnimateBackgroundImage(Display *display,
   status=XGetWindowAttributes(display,window_info.id,&window_attributes) != 0 ?
     MagickTrue : MagickFalse;
   if (status != MagickFalse)
-    (void) FormatMagickString(visual_type,MaxTextExtent,"0x%lx",
+    (void) FormatLocaleString(visual_type,MaxTextExtent,"0x%lx",
       XVisualIDFromVisual(window_attributes.visual));
   if (visual_info == (XVisualInfo *) NULL)
     {
@@ -943,7 +943,7 @@ MagickExport void XAnimateBackgroundImage(Display *display,
       (image_list[0]->rows != window_info.height))
     ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
       image_list[0]->filename);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%ux%u+0+0>",
     window_attributes.width,window_attributes.height);
   geometry_info.width=window_info.width;
   geometry_info.height=window_info.height;
@@ -1011,7 +1011,7 @@ MagickExport void XAnimateBackgroundImage(Display *display,
         ThrowXWindowFatalException(ResourceLimitFatalError,
           "MemoryAllocationFailed",images->filename);
       size_hints->flags=0L;
-      (void) FormatMagickString(default_geometry,MaxTextExtent,"%ux%u",width,
+      (void) FormatLocaleString(default_geometry,MaxTextExtent,"%ux%u",width,
         height);
       flags=XWMGeometry(display,visual_info->screen,resources.image_geometry,
         default_geometry,window_info.border_width,size_hints,&window_info.x,
@@ -1655,7 +1655,7 @@ MagickExport Image *XAnimateImages(Display *display,
         Window name is the base of the filename.
       */
       GetPathComponent(display_image->magick_filename,TailPath,filename);
-      (void) FormatMagickString(windows->image.name,MaxTextExtent,
+      (void) FormatLocaleString(windows->image.name,MaxTextExtent,
         "%s: %s[scene: %.20g frames: %.20g]",MagickPackageName,filename,(double)
         display_image->scene,(double) number_scenes);
       (void) CopyMagickString(windows->image.icon_name,filename,MaxTextExtent);
@@ -1664,7 +1664,7 @@ MagickExport Image *XAnimateImages(Display *display,
     windows->image.immutable=MagickTrue;
   windows->image.shape=MagickTrue;
   windows->image.geometry=resource_info->image_geometry;
-  (void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>!",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%ux%u+0+0>!",
     XDisplayWidth(display,visual_info->screen),
     XDisplayHeight(display,visual_info->screen));
   geometry_info.width=display_image->columns;
@@ -1791,7 +1791,7 @@ MagickExport Image *XAnimateImages(Display *display,
     resource_info,&windows->command);
   windows->command.data=MagickMenus;
   (void) XCommandWidget(display,windows,CommandMenu,(XEvent *) NULL);
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.command",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.command",
     resource_info->client_name);
   windows->command.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
@@ -1821,7 +1821,7 @@ MagickExport Image *XAnimateImages(Display *display,
   */
   XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
     resource_info,&windows->widget);
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.widget",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.widget",
     resource_info->client_name);
   windows->widget.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
@@ -1962,7 +1962,7 @@ MagickExport Image *XAnimateImages(Display *display,
           strlen(image_list[scene]->magick_filename)-1;
         while ((p > image_list[scene]->magick_filename) && (*(p-1) != '/'))
           p--;
-        (void) FormatMagickString(windows->image.name,MaxTextExtent,
+        (void) FormatLocaleString(windows->image.name,MaxTextExtent,
           "%s: %s[%.20g of %.20g]",MagickPackageName,p,(double) scene+1,
           (double) number_scenes);
       }
@@ -2081,7 +2081,7 @@ MagickExport Image *XAnimateImages(Display *display,
                 strlen(image_list[scene]->filename)-1;
               while ((p > image_list[scene]->filename) && (*(p-1) != '/'))
                 p--;
-              (void) FormatMagickString(windows->image.name,MaxTextExtent,
+              (void) FormatLocaleString(windows->image.name,MaxTextExtent,
                 "%s: %s[%.20g of %.20g]",MagickPackageName,p,(double)
                 scene+1,(double) number_scenes);
               if (resource_info->title != (char *) NULL)
@@ -2933,7 +2933,7 @@ static MagickBooleanType XSaveImage(Display *display,
       /*
         Request JPEG quality from user.
       */
-      (void) FormatMagickString(quality,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(quality,MaxTextExtent,"%.20g",(double)
         image_info->quality);
       status=XDialogWidget(display,windows,"Save","Enter JPEG quality:",
         quality);
index 0d20d1c16ae7af734c1d35d91380c9d8ca752a5f..bb69d1959ca1367b391a39d99a745f58b26645fa 100644 (file)
@@ -450,7 +450,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
         undercolor_info->affine=draw_info->affine;
         undercolor_info->affine.tx=offset.x-draw_info->affine.ry*metrics.ascent;
         undercolor_info->affine.ty=offset.y-draw_info->affine.sy*metrics.ascent;
-        (void) FormatMagickString(primitive,MaxTextExtent,
+        (void) FormatLocaleString(primitive,MaxTextExtent,
           "rectangle 0,0 %g,%.20g",metrics.origin.x,(double) height);
         (void) CloneString(&undercolor_info->primitive,primitive);
         (void) DrawImage(image,undercolor_info);
@@ -458,7 +458,7 @@ MagickExport MagickBooleanType AnnotateImage(Image *image,
       }
     annotate_info->affine.tx=offset.x;
     annotate_info->affine.ty=offset.y;
-    (void) FormatMagickString(primitive,MaxTextExtent,"stroke-width %g "
+    (void) FormatLocaleString(primitive,MaxTextExtent,"stroke-width %g "
       "line 0,0 %g,0",metrics.underline_thickness,metrics.width);
     if (annotate->decorate == OverlineDecoration)
       {
@@ -950,7 +950,7 @@ static int TraceCubicBezier(FT_Vector *p,FT_Vector *q,FT_Vector *to,
     path[MaxTextExtent];
 
   affine=draw_info->affine;
-  (void) FormatMagickString(path,MaxTextExtent,
+  (void) FormatLocaleString(path,MaxTextExtent,
     "C%g,%g %g,%g %g,%g",affine.tx+p->x/64.0,affine.ty-
     p->y/64.0,affine.tx+q->x/64.0,affine.ty-q->y/64.0,affine.tx+to->x/64.0,
     affine.ty-to->y/64.0);
@@ -967,7 +967,7 @@ static int TraceLineTo(FT_Vector *to,DrawInfo *draw_info)
     path[MaxTextExtent];
 
   affine=draw_info->affine;
-  (void) FormatMagickString(path,MaxTextExtent,"L%g,%g",affine.tx+
+  (void) FormatLocaleString(path,MaxTextExtent,"L%g,%g",affine.tx+
     to->x/64.0,affine.ty-to->y/64.0);
   (void) ConcatenateString(&draw_info->primitive,path);
   return(0);
@@ -982,7 +982,7 @@ static int TraceMoveTo(FT_Vector *to,DrawInfo *draw_info)
     path[MaxTextExtent];
 
   affine=draw_info->affine;
-  (void) FormatMagickString(path,MaxTextExtent,"M%g,%g",affine.tx+
+  (void) FormatLocaleString(path,MaxTextExtent,"M%g,%g",affine.tx+
     to->x/64.0,affine.ty-to->y/64.0);
   (void) ConcatenateString(&draw_info->primitive,path);
   return(0);
@@ -998,7 +998,7 @@ static int TraceQuadraticBezier(FT_Vector *control,FT_Vector *to,
     path[MaxTextExtent];
 
   affine=draw_info->affine;
-  (void) FormatMagickString(path,MaxTextExtent,"Q%g,%g %g,%g",
+  (void) FormatLocaleString(path,MaxTextExtent,"Q%g,%g %g,%g",
     affine.tx+control->x/64.0,affine.ty-control->y/64.0,affine.tx+to->x/64.0,
     affine.ty-to->y/64.0);
   (void) ConcatenateString(&draw_info->primitive,path);
@@ -1631,15 +1631,15 @@ static MagickBooleanType RenderPostscript(Image *image,
         filename);
       return(MagickFalse);
     }
-  (void) fprintf(file,"%%!PS-Adobe-3.0\n");
-  (void) fprintf(file,"/ReencodeType\n");
-  (void) fprintf(file,"{\n");
-  (void) fprintf(file,"  findfont dup length\n");
-  (void) fprintf(file,
+  (void) FormatLocaleFile(file,"%%!PS-Adobe-3.0\n");
+  (void) FormatLocaleFile(file,"/ReencodeType\n");
+  (void) FormatLocaleFile(file,"{\n");
+  (void) FormatLocaleFile(file,"  findfont dup length\n");
+  (void) FormatLocaleFile(file,
     "  dict begin { 1 index /FID ne {def} {pop pop} ifelse } forall\n");
-  (void) fprintf(file,
+  (void) FormatLocaleFile(file,
     "  /Encoding ISOLatin1Encoding def currentdict end definefont pop\n");
-  (void) fprintf(file,"} bind def\n");
+  (void) FormatLocaleFile(file,"} bind def\n");
   /*
     Sample to compute bounding box.
   */
@@ -1659,31 +1659,31 @@ static MagickBooleanType RenderPostscript(Image *image,
     if (point.y > extent.y)
       extent.y=point.y;
   }
-  (void) fprintf(file,"%g %g moveto\n",identity  != MagickFalse ? 0.0 :
+  (void) FormatLocaleFile(file,"%g %g moveto\n",identity  != MagickFalse ? 0.0 :
     extent.x/2.0,extent.y/2.0);
-  (void) fprintf(file,"%g %g scale\n",draw_info->pointsize,
+  (void) FormatLocaleFile(file,"%g %g scale\n",draw_info->pointsize,
     draw_info->pointsize);
   if ((draw_info->font == (char *) NULL) || (*draw_info->font == '\0') ||
       (strchr(draw_info->font,'/') != (char *) NULL))
-    (void) fprintf(file,
+    (void) FormatLocaleFile(file,
       "/Times-Roman-ISO dup /Times-Roman ReencodeType findfont setfont\n");
   else
-    (void) fprintf(file,"/%s-ISO dup /%s ReencodeType findfont setfont\n",
+    (void) FormatLocaleFile(file,"/%s-ISO dup /%s ReencodeType findfont setfont\n",
       draw_info->font,draw_info->font);
-  (void) fprintf(file,"[%g %g %g %g 0 0] concat\n",
+  (void) FormatLocaleFile(file,"[%g %g %g %g 0 0] concat\n",
     draw_info->affine.sx,-draw_info->affine.rx,-draw_info->affine.ry,
     draw_info->affine.sy);
   text=EscapeParenthesis(draw_info->text);
   if (identity == MagickFalse)
-    (void) fprintf(file,"(%s) stringwidth pop -0.5 mul -0.5 rmoveto\n",text);
-  (void) fprintf(file,"(%s) show\n",text);
+    (void) FormatLocaleFile(file,"(%s) stringwidth pop -0.5 mul -0.5 rmoveto\n",text);
+  (void) FormatLocaleFile(file,"(%s) show\n",text);
   text=DestroyString(text);
-  (void) fprintf(file,"showpage\n");
+  (void) FormatLocaleFile(file,"showpage\n");
   (void) fclose(file);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g+0+0!",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g+0+0!",
     floor(extent.x+0.5),floor(extent.y+0.5));
   annotate_info=AcquireImageInfo();
-  (void) FormatMagickString(annotate_info->filename,MaxTextExtent,"ps:%s",
+  (void) FormatLocaleString(annotate_info->filename,MaxTextExtent,"ps:%s",
     filename);
   (void) CloneString(&annotate_info->page,geometry);
   if (draw_info->density != (char *) NULL)
@@ -1723,7 +1723,7 @@ static MagickBooleanType RenderPostscript(Image *image,
         ExpandAffine(&draw_info->affine)*draw_info->pointsize+0.5);
       crop_info.y=(ssize_t) ceil((resolution.y/DefaultResolution)*extent.y/8.0-
         0.5);
-      (void) FormatMagickString(geometry,MaxTextExtent,
+      (void) FormatLocaleString(geometry,MaxTextExtent,
         "%.20gx%.20g%+.20g%+.20g",(double) crop_info.width,(double)
         crop_info.height,(double) crop_info.x,(double) crop_info.y);
       (void) TransformImage(&annotate_image,geometry,(char *) NULL);
@@ -2019,7 +2019,7 @@ static MagickBooleanType RenderX11(Image *image,const DrawInfo *draw_info,
         annotate_info.degrees=(180.0/MagickPI)*
           atan2(draw_info->affine.rx,draw_info->affine.sx);
     }
-  (void) FormatMagickString(annotate_info.geometry,MaxTextExtent,
+  (void) FormatLocaleString(annotate_info.geometry,MaxTextExtent,
     "%.20gx%.20g%+.20g%+.20g",(double) width,(double) height,
     ceil(offset->x-0.5),ceil(offset->y-metrics->ascent-metrics->descent+
     draw_info->interline_spacing-0.5));
index 09f037085f87d9a02a96193f35c9ffb3da3b20be..0e30d90b3d1f1a5fea58e5c7c2599dca0cb01b94 100644 (file)
@@ -51,6 +51,7 @@
 #include "magick/exception-private.h"
 #include "magick/image-private.h"
 #include "magick/list.h"
+#include "magick/locale_.h"
 #include "magick/log.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
@@ -377,7 +378,7 @@ MagickExport Image *BlobToImage(const ImageInfo *image_info,const void *blob,
       return((Image *) NULL);
     }
   clone_info=CloneImageInfo(blob_info);
-  (void) FormatMagickString(clone_info->filename,MaxTextExtent,"%s:%s",
+  (void) FormatLocaleString(clone_info->filename,MaxTextExtent,"%s:%s",
     blob_info->magick,blob_info->filename);
   image=ReadImage(clone_info,exception);
   clone_info=DestroyImageInfo(clone_info);
@@ -1537,7 +1538,7 @@ MagickExport unsigned char *ImageToBlob(const ImageInfo *image_info,
           blob_info->file=fdopen(file,"wb");
           if (blob_info->file != (FILE *) NULL)
             {
-              (void) FormatMagickString(image->filename,MaxTextExtent,"%s:%s",
+              (void) FormatLocaleString(image->filename,MaxTextExtent,"%s:%s",
                 image->magick,unique);
               status=WriteImage(blob_info,image);
               (void) fclose(blob_info->file);
@@ -1796,7 +1797,7 @@ MagickExport unsigned char *ImagesToBlob(const ImageInfo *image_info,
           blob_info->file=fdopen(file,"wb");
           if (blob_info->file != (FILE *) NULL)
             {
-              (void) FormatMagickString(filename,MaxTextExtent,"%s:%s",
+              (void) FormatLocaleString(filename,MaxTextExtent,"%s:%s",
                 images->magick,unique);
               status=WriteImages(blob_info,images,filename,exception);
               (void) fclose(blob_info->file);
@@ -1910,7 +1911,7 @@ MagickExport MagickBooleanType InjectImageBlob(const ImageInfo *image_info,
       (void) RelinquishUniqueFileResource(filename);
       return(MagickFalse);
     }
-  (void) FormatMagickString(byte_image->filename,MaxTextExtent,"%s:%s",format,
+  (void) FormatLocaleString(byte_image->filename,MaxTextExtent,"%s:%s",format,
     filename);
   DestroyBlob(byte_image);
   byte_image->blob=CloneBlobInfo((BlobInfo *) NULL);
@@ -2440,10 +2441,10 @@ MagickExport MagickBooleanType OpenBlob(const ImageInfo *image_info,
 
               GetPathComponent(image->filename,RootPath,path);
               if (*extension == '\0')
-                (void) FormatMagickString(filename,MaxTextExtent,"%s-%.20g",
+                (void) FormatLocaleString(filename,MaxTextExtent,"%s-%.20g",
                   path,(double) image->scene);
               else
-                (void) FormatMagickString(filename,MaxTextExtent,"%s-%.20g.%s",
+                (void) FormatLocaleString(filename,MaxTextExtent,"%s-%.20g.%s",
                   path,(double) image->scene,extension);
             }
           (void) CopyMagickString(image->filename,filename,MaxTextExtent);
index 9d228a8ccc6998a1d52248f045cc8d3acad1b10e..f44526cacd57c4adf85a64bdc14a52928788adef 100644 (file)
@@ -1499,7 +1499,7 @@ MagickExport Cache DestroyPixelCache(Cache cache)
       char
         message[MaxTextExtent];
 
-      (void) FormatMagickString(message,MaxTextExtent,"destroy %s",
+      (void) FormatLocaleString(message,MaxTextExtent,"destroy %s",
         cache_info->filename);
       (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
     }
@@ -3991,7 +3991,7 @@ static MagickBooleanType ExtendCache(Image *image,MagickSizeType length)
         message[MaxTextExtent];
 
       (void) FormatMagickSize(length,MagickFalse,format);
-      (void) FormatMagickString(message,MaxTextExtent,
+      (void) FormatLocaleString(message,MaxTextExtent,
         "extend %s (%s[%d], disk, %sB)",cache_info->filename,
         cache_info->cache_filename,cache_info->file,format);
       (void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
@@ -4041,7 +4041,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
   assert(cache_info->signature == MagickSignature);
   source_info=(*cache_info);
   source_info.file=(-1);
-  (void) FormatMagickString(cache_info->filename,MaxTextExtent,"%s[%.20g]",
+  (void) FormatLocaleString(cache_info->filename,MaxTextExtent,"%s[%.20g]",
     image->filename,(double) GetImageIndexInList(image));
   cache_info->mode=mode;
   cache_info->rows=image->rows;
@@ -4089,7 +4089,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
                 {
                   (void) FormatMagickSize(cache_info->length,MagickTrue,
                     format);
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "open %s (%s memory, %.20gx%.20g %sB)",cache_info->filename,
                     cache_info->mapped != MagickFalse ? "anonymous" : "heap",
                     (double) cache_info->columns,(double) cache_info->rows,
@@ -4183,7 +4183,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
                 {
                   (void) FormatMagickSize(cache_info->length,MagickTrue,
                     format);
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "open %s (%s[%d], memory-mapped, %.20gx%.20g %sB)",
                     cache_info->filename,cache_info->cache_filename,
                     cache_info->file,(double) cache_info->columns,(double)
@@ -4204,7 +4204,7 @@ static MagickBooleanType OpenPixelCache(Image *image,const MapMode mode,
   if (image->debug != MagickFalse)
     {
       (void) FormatMagickSize(cache_info->length,MagickFalse,format);
-      (void) FormatMagickString(message,MaxTextExtent,
+      (void) FormatLocaleString(message,MaxTextExtent,
         "open %s (%s[%d], disk, %.20gx%.20g %sB)",cache_info->filename,
         cache_info->cache_filename,cache_info->file,(double)
         cache_info->columns,(double) cache_info->rows,format);
index 277251dc49437e88d7e3323bef0795f54ad3086f..3d939a34f0da0883aa029c90ad7c59f2fdeba18c 100644 (file)
@@ -600,18 +600,18 @@ MagickExport MagickBooleanType ListCoderInfo(FILE *file,
         (LocaleCompare(path,coder_info[i]->path) != 0))
       {
         if (coder_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",coder_info[i]->path);
-        (void) fprintf(file,"Magick      Coder\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",coder_info[i]->path);
+        (void) FormatLocaleFile(file,"Magick      Coder\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=coder_info[i]->path;
-    (void) fprintf(file,"%s",coder_info[i]->magick);
+    (void) FormatLocaleFile(file,"%s",coder_info[i]->magick);
     for (j=(ssize_t) strlen(coder_info[i]->magick); j <= 11; j++)
-      (void) fprintf(file," ");
+      (void) FormatLocaleFile(file," ");
     if (coder_info[i]->name != (char *) NULL)
-      (void) fprintf(file,"%s",coder_info[i]->name);
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"%s",coder_info[i]->name);
+    (void) FormatLocaleFile(file,"\n");
   }
   coder_info=(const CoderInfo **) RelinquishMagickMemory((void *) coder_info);
   (void) fflush(file);
index b3ab7427f63e1dd943b1ee6a1d25050959c3a9fe..a558696cd7b3d59abd6d366027bcef6eda6554c5 100644 (file)
@@ -1060,26 +1060,26 @@ MagickExport void ConcatenateColorComponent(const MagickPixelPacket *pixel,
     {
       if (pixel->depth > 16)
         {
-          (void) FormatMagickString(component,MaxTextExtent,"%10lu",
+          (void) FormatLocaleString(component,MaxTextExtent,"%10lu",
             (unsigned long) ScaleQuantumToLong(ClampToQuantum(color)));
           (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
           return;
         }
       if (pixel->depth > 8)
         {
-          (void) FormatMagickString(component,MaxTextExtent,"%5d",
+          (void) FormatLocaleString(component,MaxTextExtent,"%5d",
             ScaleQuantumToShort(ClampToQuantum(color)));
           (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
           return;
         }
-      (void) FormatMagickString(component,MaxTextExtent,"%3d",
+      (void) FormatLocaleString(component,MaxTextExtent,"%3d",
         ScaleQuantumToChar(ClampToQuantum(color)));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
     }
   if (channel == OpacityChannel)
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%g",
+      (void) FormatLocaleString(component,MaxTextExtent,"%g",
         (double) (QuantumScale*color));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
@@ -1087,19 +1087,19 @@ MagickExport void ConcatenateColorComponent(const MagickPixelPacket *pixel,
   if ((pixel->colorspace == HSLColorspace) ||
       (pixel->colorspace == HSBColorspace))
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%g%%",
+      (void) FormatLocaleString(component,MaxTextExtent,"%g%%",
         (double) (100.0*QuantumScale*color));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
     }
   if (pixel->depth > 8)
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%g%%",
+      (void) FormatLocaleString(component,MaxTextExtent,"%g%%",
         (double) (100.0*QuantumScale*color));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
     }
-  (void) FormatMagickString(component,MaxTextExtent,"%d",
+  (void) FormatLocaleString(component,MaxTextExtent,"%d",
     ScaleQuantumToChar(ClampToQuantum(color)));
   (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
 }
@@ -1363,7 +1363,7 @@ static void ConcatentateHexColorComponent(const MagickPixelPacket *pixel,
   }
   if (pixel->depth > 32)
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%08lX%08lX",
+      (void) FormatLocaleString(component,MaxTextExtent,"%08lX%08lX",
         (unsigned long) ScaleQuantumToLong(ClampToQuantum(color)),
         (unsigned long) ScaleQuantumToLong(ClampToQuantum(color)));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
@@ -1371,19 +1371,19 @@ static void ConcatentateHexColorComponent(const MagickPixelPacket *pixel,
     }
   if (pixel->depth > 16)
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%08X",
+      (void) FormatLocaleString(component,MaxTextExtent,"%08X",
         (unsigned int) ScaleQuantumToLong(ClampToQuantum(color)));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
     }
   if (pixel->depth > 8)
     {
-      (void) FormatMagickString(component,MaxTextExtent,"%04X",
+      (void) FormatLocaleString(component,MaxTextExtent,"%04X",
         ScaleQuantumToShort(ClampToQuantum(color)));
       (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
       return;
     }
-  (void) FormatMagickString(component,MaxTextExtent,"%02X",
+  (void) FormatLocaleString(component,MaxTextExtent,"%02X",
     ScaleQuantumToChar(ClampToQuantum(color)));
   (void) ConcatenateMagickString(tuple,component,MaxTextExtent);
   return;
@@ -1983,23 +1983,23 @@ MagickExport MagickBooleanType ListColorInfo(FILE *file,
         (LocaleCompare(path,color_info[i]->path) != 0))
       {
         if (color_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",color_info[i]->path);
-        (void) fprintf(file,"Name                  Color                  "
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",color_info[i]->path);
+        (void) FormatLocaleFile(file,"Name                  Color                  "
           "                       Compliance\n");
-        (void) fprintf(file,"-------------------------------------------------"
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=color_info[i]->path;
-    (void) fprintf(file,"%-21.21s ",color_info[i]->name);
+    (void) FormatLocaleFile(file,"%-21.21s ",color_info[i]->name);
     GetColorTuple(&color_info[i]->color,MagickFalse,tuple);
-    (void) fprintf(file,"%-45.45s ",tuple);
+    (void) FormatLocaleFile(file,"%-45.45s ",tuple);
     if ((color_info[i]->compliance & SVGCompliance) != 0)
-      (void) fprintf(file,"SVG ");
+      (void) FormatLocaleFile(file,"SVG ");
     if ((color_info[i]->compliance & X11Compliance) != 0)
-      (void) fprintf(file,"X11 ");
+      (void) FormatLocaleFile(file,"X11 ");
     if ((color_info[i]->compliance & XPMCompliance) != 0)
-      (void) fprintf(file,"XPM ");
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"XPM ");
+    (void) FormatLocaleFile(file,"\n");
   }
   color_info=(const ColorInfo **) RelinquishMagickMemory((void *) color_info);
   (void) fflush(file);
index 66c847f6540093d187d3bb0400b5f3ef894a3c47..891328c5b07593b539bc3dfab315e44af9af63a0 100644 (file)
@@ -622,20 +622,20 @@ MagickExport MagickBooleanType RGBTransformImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma");
       if (value != (const char *) NULL)
-        gamma=1.0/StringToDouble(value,(char **) NULL) != 0.0 ?
-          StringToDouble(value,(char **) NULL) : 1.0;
+        gamma=1.0/LocaleToDouble(value,(char **) NULL) != 0.0 ?
+          LocaleToDouble(value,(char **) NULL) : 1.0;
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma");
       if (value != (const char *) NULL)
-        film_gamma=StringToDouble(value,(char **) NULL);
+        film_gamma=LocaleToDouble(value,(char **) NULL);
       reference_black=ReferenceBlack;
       value=GetImageProperty(image,"reference-black");
       if (value != (const char *) NULL)
-        reference_black=StringToDouble(value,(char **) NULL);
+        reference_black=LocaleToDouble(value,(char **) NULL);
       reference_white=ReferenceWhite;
       value=GetImageProperty(image,"reference-white");
       if (value != (const char *) NULL)
-        reference_white=StringToDouble(value,(char **) NULL);
+        reference_white=LocaleToDouble(value,(char **) NULL);
       logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
         sizeof(*logmap));
       if (logmap == (Quantum *) NULL)
@@ -2076,20 +2076,20 @@ MagickExport MagickBooleanType TransformRGBImage(Image *image,
       gamma=DisplayGamma;
       value=GetImageProperty(image,"gamma");
       if (value != (const char *) NULL)
-        gamma=1.0/StringToDouble(value,(char **) NULL) != 0.0 ?
-          StringToDouble(value,(char **) NULL) : 1.0;
+        gamma=1.0/LocaleToDouble(value,(char **) NULL) != 0.0 ?
+          LocaleToDouble(value,(char **) NULL) : 1.0;
       film_gamma=FilmGamma;
       value=GetImageProperty(image,"film-gamma");
       if (value != (const char *) NULL)
-        film_gamma=StringToDouble(value,(char **) NULL);
+        film_gamma=LocaleToDouble(value,(char **) NULL);
       reference_black=ReferenceBlack;
       value=GetImageProperty(image,"reference-black");
       if (value != (const char *) NULL)
-        reference_black=StringToDouble(value,(char **) NULL);
+        reference_black=LocaleToDouble(value,(char **) NULL);
       reference_white=ReferenceWhite;
       value=GetImageProperty(image,"reference-white");
       if (value != (const char *) NULL)
-        reference_white=StringToDouble(value,(char **) NULL);
+        reference_white=LocaleToDouble(value,(char **) NULL);
       logmap=(Quantum *) AcquireQuantumMemory((size_t) MaxMap+1UL,
         sizeof(*logmap));
       if (logmap == (Quantum *) NULL)
index cae5e08f35fa79bfb88f6fc85922681fef78962e..460dce5f69beb7b7d8b1d3224876c815ae7479c5 100644 (file)
@@ -560,7 +560,7 @@ MagickExport LinkedListInfo *GetConfigureOptions(const char *filename,
       element=(const char *) GetNextValueInLinkedList(paths);
       while (element != (const char *) NULL)
       {
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",element,filename);
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",element,filename);
         (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),
           "Searching for configure file: \"%s\"",path);
         xml=ConfigureFileToStringInfo(path);
@@ -690,7 +690,7 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
     key_value=NTRegistryKeyLookup(registry_key);
     if (key_value != (unsigned char *) NULL)
       {
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",(char *) key_value,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",(char *) key_value,
           DirectorySeparator);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
         key_value=(unsigned char *) RelinquishMagickMemory(key_value);
@@ -709,14 +709,14 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
     if (home != (char *) NULL)
       {
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",home,
           DirectorySeparator);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
 #else
-        (void) FormatMagickString(path,MaxTextExtent,"%s/etc/%s/",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s/etc/%s/",home,
           MAGICKCORE_CONFIGURE_RELATIVE_PATH);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
-        (void) FormatMagickString(path,MaxTextExtent,"%s/share/%s/",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s/share/%s/",home,
           MAGICKCORE_SHARE_RELATIVE_PATH);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
 #endif
@@ -726,7 +726,7 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
   if (*GetClientPath() != '\0')
     {
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s",GetClientPath(),
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s",GetClientPath(),
         DirectorySeparator);
       (void) AppendValueToLinkedList(paths,ConstantString(path));
 #else
@@ -738,10 +738,10 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
       */
       (void) CopyMagickString(prefix,GetClientPath(),MaxTextExtent);
       ChopPathComponents(prefix,1);
-      (void) FormatMagickString(path,MaxTextExtent,"%s/etc/%s/",prefix,
+      (void) FormatLocaleString(path,MaxTextExtent,"%s/etc/%s/",prefix,
         MAGICKCORE_CONFIGURE_RELATIVE_PATH);
       (void) AppendValueToLinkedList(paths,ConstantString(path));
-      (void) FormatMagickString(path,MaxTextExtent,"%s/share/%s/",prefix,
+      (void) FormatLocaleString(path,MaxTextExtent,"%s/share/%s/",prefix,
         MAGICKCORE_SHARE_RELATIVE_PATH);
       (void) AppendValueToLinkedList(paths,ConstantString(path));
 #endif
@@ -763,7 +763,7 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
         /*
           Search $HOME/.magick.
         */
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s.magick%s",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s.magick%s",home,
           DirectorySeparator,DirectorySeparator);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
         home=DestroyString(home);
@@ -783,7 +783,7 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
         /*
           Search module path.
         */
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",module_path,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",module_path,
           DirectorySeparator);
         element=(char *) RemoveElementByValueFromLinkedList(paths,path);
         if (element != (char *) NULL)
@@ -795,10 +795,10 @@ MagickExport LinkedListInfo *GetConfigurePaths(const char *filename,
         /*
           Search PerlMagick module path.
         */
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",module_path,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",module_path,
           DirectorySeparator);
         (void) AppendValueToLinkedList(paths,ConstantString(path));
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",module_path,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",module_path,
           "\\inc\\lib\\auto\\Image\\Magick\\");
         (void) AppendValueToLinkedList(paths,ConstantString(path));
       }
@@ -936,24 +936,24 @@ MagickExport MagickBooleanType ListConfigureInfo(FILE *file,
         (LocaleCompare(path,configure_info[i]->path) != 0))
       {
         if (configure_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",configure_info[i]->path);
-        (void) fprintf(file,"Name          Value\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",configure_info[i]->path);
+        (void) FormatLocaleFile(file,"Name          Value\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=configure_info[i]->path;
     name="unknown";
     if (configure_info[i]->name != (char *) NULL)
       name=configure_info[i]->name;
-    (void) fprintf(file,"%s",name);
+    (void) FormatLocaleFile(file,"%s",name);
     for (j=(ssize_t) strlen(name); j <= 12; j++)
-      (void) fprintf(file," ");
-    (void) fprintf(file," ");
+      (void) FormatLocaleFile(file," ");
+    (void) FormatLocaleFile(file," ");
     value="unknown";
     if (configure_info[i]->value != (char *) NULL)
       value=configure_info[i]->value;
-    (void) fprintf(file,"%s",value);
-    (void) fprintf(file,"\n");
+    (void) FormatLocaleFile(file,"%s",value);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   configure_info=(const ConfigureInfo **)
index 27cfb3c22b0d842e152fca7096736d33a4fd608e..6f8f606c0e0d10b00ccb81611a1df98fc6234c84 100644 (file)
@@ -953,7 +953,7 @@ MagickExport MagickBooleanType InvokeDelegate(ImageInfo *image_info,
       if (LocaleCompare(magick,"NULL") != 0)
         (void) CopyMagickString(image->magick,magick,MaxTextExtent);
       magick=DestroyString(magick);
-      (void) FormatMagickString(clone_info->filename,MaxTextExtent,"%s:",
+      (void) FormatLocaleString(clone_info->filename,MaxTextExtent,"%s:",
         delegate_info->decode);
       (void) SetImageInfo(clone_info,(unsigned int) GetImageListLength(image),
         exception);
@@ -963,7 +963,7 @@ MagickExport MagickBooleanType InvokeDelegate(ImageInfo *image_info,
         MaxTextExtent);
       for (p=image; p != (Image *) NULL; p=GetNextImageInList(p))
       {
-        (void) FormatMagickString(p->filename,MaxTextExtent,"%s:%s",
+        (void) FormatLocaleString(p->filename,MaxTextExtent,"%s:%s",
           delegate_info->decode,clone_info->filename);
         status=WriteImage(clone_info,p);
         if (status == MagickFalse)
@@ -1134,9 +1134,9 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
         (LocaleCompare(path,delegate_info[i]->path) != 0))
       {
         if (delegate_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",delegate_info[i]->path);
-        (void) fprintf(file,"Delegate                Command\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",delegate_info[i]->path);
+        (void) FormatLocaleFile(file,"Delegate                Command\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=delegate_info[i]->path;
@@ -1148,15 +1148,15 @@ MagickExport MagickBooleanType ListDelegateInfo(FILE *file,
     commands=StringToList(delegate_info[i]->commands);
     if (commands == (char **) NULL)
       continue;
-    (void) fprintf(file,"%11s%c=%c%s  ",delegate_info[i]->decode ?
+    (void) FormatLocaleFile(file,"%11s%c=%c%s  ",delegate_info[i]->decode ?
       delegate_info[i]->decode : "",delegate_info[i]->mode <= 0 ? '<' : ' ',
       delegate_info[i]->mode >= 0 ? '>' : ' ',delegate);
     StripString(commands[0]);
-    (void) fprintf(file,"\"%s\"\n",commands[0]);
+    (void) FormatLocaleFile(file,"\"%s\"\n",commands[0]);
     for (j=1; commands[j] != (char *) NULL; j++)
     {
       StripString(commands[j]);
-      (void) fprintf(file,"                     \"%s\"\n",commands[j]);
+      (void) FormatLocaleFile(file,"                     \"%s\"\n",commands[j]);
     }
     for (j=0; commands[j] != (char *) NULL; j++)
       commands[j]=DestroyString(commands[j]);
index 7fe6c197ad940d71411fbb15bac34cf7b4d9694f..8db76df1efcced81a7deef8e58a53a0997f13698 100644 (file)
@@ -1472,7 +1472,7 @@ MagickExport unsigned int DeleteImageList(Image *images,const ssize_t offset)
 %  Deprecated, replace with:
 %
 %    char key[MaxTextExtent];
-%    FormatMagickString(key,MaxTextExtent,"%ld\n",id);
+%    FormatLocaleString(key,MaxTextExtent,"%ld\n",id);
 %    DeleteImageRegistry(key);
 %
 %  The format of the DeleteMagickRegistry method is:
@@ -1489,7 +1489,7 @@ MagickExport MagickBooleanType DeleteMagickRegistry(const ssize_t id)
   char
     key[MaxTextExtent];
 
-  (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
+  (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double) id);
   return(DeleteImageRegistry(key));
 }
 \f
@@ -2020,6 +2020,67 @@ MagickExport MagickBooleanType FormatImageAttribute(Image *image,
 %                                                                             %
 %                                                                             %
 %                                                                             %
+%  F o r m a t M a g i c k S t r i n g                                        %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  FormatMagickString() prints formatted output of a variable argument list.
+%
+%  The format of the FormatMagickString method is:
+%
+%      ssize_t FormatMagickString(char *string,const size_t length,
+%        const char *format,...)
+%
+%  A description of each parameter follows.
+%
+%   o string:  FormatMagickString() returns the formatted string in this
+%     character buffer.
+%
+%   o length: the maximum length of the string.
+%
+%   o format:  A string describing the format to use to write the remaining
+%     arguments.
+%
+*/
+
+MagickExport ssize_t FormatMagickStringList(char *string,const size_t length,
+  const char *format,va_list operands)
+{
+  int
+    n;
+
+#if defined(MAGICKCORE_HAVE_VSNPRINTF)
+  n=vsnprintf(string,length,format,operands);
+#else
+  n=vsprintf(string,format,operands);
+#endif
+  if (n < 0)
+    string[length-1]='\0';
+  return((ssize_t) n);
+}
+
+MagickExport ssize_t FormatMagickString(char *string,const size_t length,
+  const char *format,...)
+{
+  ssize_t
+    n;
+
+  va_list
+    operands;
+
+  va_start(operands,format);
+  n=(ssize_t) FormatMagickStringList(string,length,format,operands);
+  va_end(operands);
+  return(n);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
 %  F o r m a t S t r i n g                                                    %
 %                                                                             %
 %                                                                             %
@@ -2064,7 +2125,7 @@ MagickExport void FormatString(char *string,const char *format,...)
     operands;
 
   va_start(operands,format);
-  (void) FormatMagickStringList(string,MaxTextExtent,format,operands);
+  (void) FormatLocaleStringList(string,MaxTextExtent,format,operands);
   va_end(operands);
   return;
 }
@@ -2254,7 +2315,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
       /*
         Search hard coded paths.
       */
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s",
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s",
         MAGICKCORE_LIBRARY_PATH,filename);
       if (IsPathAccessible(path) != MagickFalse)
         blob=FileToBlob(path,~0,length,exception);
@@ -2272,7 +2333,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
       key_value=NTRegistryKeyLookup("ConfigurePath");
       if (key_value != (char *) NULL)
         {
-          (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",key_value,
+          (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",key_value,
             DirectorySeparator,filename);
           if (IsPathAccessible(path) != MagickFalse)
             blob=FileToBlob(path,~0,length,exception);
@@ -2292,10 +2353,10 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
             Search MAGICK_HOME.
           */
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-          (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",home,
+          (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",home,
             DirectorySeparator,filename);
 #else
-          (void) FormatMagickString(path,MaxTextExtent,"%s/lib/%s/%s",home,
+          (void) FormatLocaleString(path,MaxTextExtent,"%s/lib/%s/%s",home,
             MAGICKCORE_LIBRARY_RELATIVE_PATH,filename);
 #endif
           if (IsPathAccessible(path) != MagickFalse)
@@ -2310,7 +2371,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
           /*
             Search $HOME/.magick.
           */
-          (void) FormatMagickString(path,MaxTextExtent,"%s%s.magick%s%s",home,
+          (void) FormatLocaleString(path,MaxTextExtent,"%s%s.magick%s%s",home,
             DirectorySeparator,DirectorySeparator,filename);
           if ((IsPathAccessible(path) != MagickFalse) && (blob == (void *) NULL))
             blob=FileToBlob(path,~0,length,exception);
@@ -2320,7 +2381,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
   if ((blob == (void *) NULL) && (*GetClientPath() != '\0'))
     {
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
         DirectorySeparator,filename);
 #else
       char
@@ -2332,7 +2393,7 @@ MagickExport void *GetConfigureBlob(const char *filename,char *path,
       (void) CopyMagickString(prefix,GetClientPath(),
         MaxTextExtent);
       ChopPathComponents(prefix,1);
-      (void) FormatMagickString(path,MaxTextExtent,"%s/lib/%s/%s",prefix,
+      (void) FormatLocaleString(path,MaxTextExtent,"%s/lib/%s/%s",prefix,
         MAGICKCORE_LIBRARY_RELATIVE_PATH,filename);
 #endif
       if (IsPathAccessible(path) != MagickFalse)
@@ -2668,7 +2729,7 @@ MagickExport void *GetMagickRegistry(const ssize_t id,RegistryType *type,
 
   *type=UndefinedRegistryType;
   *length=0;
-  (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
+  (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double) id);
   blob=(void *) GetImageRegistry(ImageRegistryType,key,exception);
   if (blob != (void *) NULL)
     return(blob);
@@ -6142,7 +6203,7 @@ MagickExport ssize_t SetMagickRegistry(const RegistryType type,const void *blob,
   static ssize_t
     id = 0;
 
-  (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
+  (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double) id);
   status=SetImageRegistry(type,key,blob,exception);
   if (status == MagickFalse)
     return(-1);
index d8441eb4584265da6191e1070215be42a56dbc2a..59a53393f514c13428ec990c149e5874acb88788 100644 (file)
@@ -154,6 +154,10 @@ extern MagickExport int
     magick_attribute((deprecated));
 
 extern MagickExport ssize_t
+  FormatMagickString(char *,const size_t,const char *,...)
+    magick_attribute((format (printf,3,4))),
+  FormatMagickStringList(char *,const size_t,const char *,va_list)
+    magick_attribute((format (printf,3,0))),
   GetImageListIndex(const Image *) magick_attribute((deprecated)),
   SetMagickRegistry(const RegistryType,const void *,const size_t,
     ExceptionInfo *) magick_attribute((deprecated));
index ad31ba6f06780ae324b2a6d0fe8b2539a84a79cf..76fdb6c0847f755e6d471f0c3fa2cdb0b725f394 100644 (file)
@@ -1914,7 +1914,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
           x+windows->image.x,y+windows->image.y);
         XInfoWidget(display,windows,text);
       }
@@ -2105,14 +2105,14 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
               break;
             if (entry != 8)
               {
-                degrees=StringToDouble(RotateMenu[entry],(char **) NULL);
+                degrees=LocaleToDouble(RotateMenu[entry],(char **) NULL);
                 break;
               }
             (void) XDialogWidget(display,windows,"OK","Enter rotation angle:",
               angle);
             if (*angle == '\0')
               break;
-            degrees=StringToDouble(angle,(char **) NULL);
+            degrees=LocaleToDouble(angle,(char **) NULL);
             break;
           }
           case AnnotateHelpCommand:
@@ -2702,7 +2702,7 @@ static MagickBooleanType XAnnotateEditImage(Display *display,
       width*(annotate_info->x+windows->image.x)/windows->image.ximage->width;
     annotate_info->y=(int) height*(annotate_info->y-font_info->ascent+
       windows->image.y)/windows->image.ximage->height;
-    (void) FormatMagickString(annotate_info->geometry,MaxTextExtent,
+    (void) FormatLocaleString(annotate_info->geometry,MaxTextExtent,
       "%ux%u%+d%+d",width*annotate_info->width/windows->image.ximage->width,
       height*annotate_info->height/windows->image.ximage->height,
       annotate_info->x+x,annotate_info->y+y);
@@ -2914,7 +2914,7 @@ static MagickBooleanType XChopImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
           x+windows->image.x,y+windows->image.y);
         XInfoWidget(display,windows,text);
       }
@@ -3086,7 +3086,7 @@ static MagickBooleanType XChopImage(Display *display,
         */
         if (windows->info.mapped == MagickFalse)
           (void) XMapWindow(display,windows->info.id);
-        (void) FormatMagickString(text,MaxTextExtent,
+        (void) FormatLocaleString(text,MaxTextExtent,
           " %.20gx%.20g%+.20g%+.20g",(double) chop_info.width,(double)
           chop_info.height,(double) chop_info.x,(double) chop_info.y);
         XInfoWidget(display,windows,text);
@@ -3356,7 +3356,7 @@ static MagickBooleanType XColorEditImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
           x+windows->image.x,y+windows->image.y);
         XInfoWidget(display,windows,text);
       }
@@ -3981,7 +3981,7 @@ static MagickBooleanType XCompositeImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+ld%+ld ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+ld%+ld ",
           (long) composite_info.x,(long) composite_info.y);
         XInfoWidget(display,windows,text);
       }
@@ -4042,7 +4042,7 @@ static MagickBooleanType XCompositeImage(Display *display,
               GXinvert);
             if (*factor == '\0')
               break;
-            blend=StringToDouble(factor,(char **) NULL);
+            blend=LocaleToDouble(factor,(char **) NULL);
             compose=DissolveCompositeOp;
             break;
           }
@@ -4420,10 +4420,10 @@ static MagickBooleanType XConfigureImage(Display *display,
     Notify window manager of the new configuration.
   */
   if (resource_info->image_geometry != (char *) NULL)
-    (void) FormatMagickString(geometry,MaxTextExtent,"%s>!",
+    (void) FormatLocaleString(geometry,MaxTextExtent,"%s>!",
       resource_info->image_geometry);
   else
-    (void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>!",
+    (void) FormatLocaleString(geometry,MaxTextExtent,"%ux%u+0+0>!",
       XDisplayWidth(display,windows->image.screen),
       XDisplayHeight(display,windows->image.screen));
   (void) ParseMetaGeometry(geometry,&x,&y,&width,&height);
@@ -4653,7 +4653,7 @@ static MagickBooleanType XCropImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+ld%+ld ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+ld%+ld ",
           (long) crop_info.x,(long) crop_info.y);
         XInfoWidget(display,windows,text);
       }
@@ -4848,7 +4848,7 @@ static MagickBooleanType XCropImage(Display *display,
           */
           if (windows->info.mapped == MagickFalse)
             (void) XMapWindow(display,windows->info.id);
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             " %.20gx%.20g%+.20g%+.20g",(double) crop_info.width,(double)
             crop_info.height,(double) crop_info.x,(double) crop_info.y);
           XInfoWidget(display,windows,text);
@@ -4941,7 +4941,7 @@ static MagickBooleanType XCropImage(Display *display,
           /*
             Display pointer position.
           */
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             " %.20gx%.20g%+.20g%+.20g",(double) crop_info.width,(double)
             crop_info.height,(double) crop_info.x,(double) crop_info.y);
           XInfoWidget(display,windows,text);
@@ -5227,7 +5227,7 @@ static MagickBooleanType XCropImage(Display *display,
           /*
             Set primary selection.
           */
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) crop_info.width,(double)
             crop_info.height,(double) crop_info.x,(double) crop_info.y);
           request=(&(event.xselectionrequest));
@@ -5498,7 +5498,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
           /*
             Display pointer position.
           */
-          (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+          (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
             x+windows->image.x,y+windows->image.y);
           XInfoWidget(display,windows,text);
         }
@@ -5709,7 +5709,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               if (stipple_image == (Image *) NULL)
                 break;
               (void) AcquireUniqueFileResource(filename);
-              (void) FormatMagickString(stipple_image->filename,MaxTextExtent,
+              (void) FormatLocaleString(stipple_image->filename,MaxTextExtent,
                 "xbm:%s",filename);
               (void) WriteImage(image_info,stipple_image);
               stipple_image=DestroyImage(stipple_image);
@@ -5903,7 +5903,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               (void) XDrawLines(display,windows->image.id,
                 windows->image.highlight_context,coordinate_info,
                 number_coordinates,CoordModeOrigin);
-              (void) FormatMagickString(text,MaxTextExtent," %+d%+d",
+              (void) FormatLocaleString(text,MaxTextExtent," %+d%+d",
                 coordinate_info[number_coordinates-1].x,
                 coordinate_info[number_coordinates-1].y);
               XInfoWidget(display,windows,text);
@@ -5919,7 +5919,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               */
               degrees=RadiansToDegrees(-atan2((double) (line_info.y2-
                 line_info.y1),(double) (line_info.x2-line_info.x1)));
-              (void) FormatMagickString(text,MaxTextExtent," %g",
+              (void) FormatLocaleString(text,MaxTextExtent," %g",
                 (double) degrees);
               XInfoWidget(display,windows,text);
               XHighlightLine(display,windows->image.id,
@@ -5939,7 +5939,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               /*
                 Display info and draw drawing rectangle.
               */
-              (void) FormatMagickString(text,MaxTextExtent,
+              (void) FormatLocaleString(text,MaxTextExtent,
                 " %.20gx%.20g%+.20g%+.20g",(double) rectangle_info.width,
                 (double) rectangle_info.height,(double) rectangle_info.x,
                 (double) rectangle_info.y);
@@ -5963,7 +5963,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               /*
                 Display info and draw drawing rectangle.
               */
-              (void) FormatMagickString(text,MaxTextExtent,
+              (void) FormatLocaleString(text,MaxTextExtent,
                 " %.20gx%.20g%+.20g%+.20g",(double) rectangle_info.width,
                 (double) rectangle_info.height,(double) rectangle_info.x,
                 (double) rectangle_info.y);
@@ -5991,7 +5991,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
               */
               degrees=RadiansToDegrees(-atan2((double) (line_info.y2-
                 line_info.y1),(double) (line_info.x2-line_info.x1)));
-              (void) FormatMagickString(text,MaxTextExtent," %g",
+              (void) FormatLocaleString(text,MaxTextExtent," %g",
                 (double) degrees);
               XInfoWidget(display,windows,text);
               XHighlightLine(display,windows->image.id,
@@ -6235,7 +6235,7 @@ static MagickBooleanType XDrawEditImage(Display *display,
     draw_info.height=(unsigned int) rectangle_info.height+(line_width << 1);
     if (draw_info.height > (unsigned int) (*image)->rows)
       draw_info.height=(unsigned int) (*image)->rows;
-    (void) FormatMagickString(draw_info.geometry,MaxTextExtent,"%ux%u%+d%+d",
+    (void) FormatLocaleString(draw_info.geometry,MaxTextExtent,"%ux%u%+d%+d",
       width*draw_info.width/windows->image.ximage->width,
       height*draw_info.height/windows->image.ximage->height,
       draw_info.x+x,draw_info.y+y);
@@ -6428,7 +6428,7 @@ static void XImageCache(Display *display,XResourceInfo *resource_info,
       undo_image=GetPreviousImageInList(undo_image);
       windows->image.window_changes.width=(int) cache_image->columns;
       windows->image.window_changes.height=(int) cache_image->rows;
-      (void) FormatMagickString(image_geometry,MaxTextExtent,"%dx%d!",
+      (void) FormatLocaleString(image_geometry,MaxTextExtent,"%dx%d!",
         windows->image.ximage->width,windows->image.ximage->height);
       (void) TransformImage(image,windows->image.crop_geometry,image_geometry);
       if (windows->image.crop_geometry != (char *) NULL)
@@ -7222,7 +7222,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       /*
         Create canvas.
       */
-      (void) FormatMagickString(image_info->filename,MaxTextExtent,
+      (void) FormatLocaleString(image_info->filename,MaxTextExtent,
         "%s:%s",format,color);
       (void) CloneString(&image_info->size,geometry);
       nexus=ReadImage(image_info,&(*image)->exception);
@@ -7343,7 +7343,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       height=(size_t) windows->image.ximage->height;
       x=0;
       y=0;
-      (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g+0+0",
+      (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g+0+0",
         (double) width,(double) height);
       status=XDialogWidget(display,windows,"Resize",
         "Enter resize geometry (e.g. 640x480, 200%):",geometry);
@@ -7374,7 +7374,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       /*
         Crop and/or scale displayed image.
       */
-      (void) FormatMagickString(image_geometry,MaxTextExtent,"%dx%d!",
+      (void) FormatLocaleString(image_geometry,MaxTextExtent,"%dx%d!",
         windows->image.ximage->width,windows->image.ximage->height);
       (void) TransformImage(image,windows->image.crop_geometry,image_geometry);
       if (windows->image.crop_geometry != (char *) NULL)
@@ -7466,7 +7466,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
           height=(unsigned int) (*image)->rows;
           (void) XParseGeometry(windows->image.crop_geometry,&x,&y,
             &width,&height);
-          (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+          (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
             "%ux%u%+d%+d",width,height,(int) (*image)->columns-(int) width-x,y);
         }
       if (windows->image.orphan != MagickFalse)
@@ -7501,7 +7501,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
           height=(unsigned int) (*image)->rows;
           (void) XParseGeometry(windows->image.crop_geometry,&x,&y,
             &width,&height);
-          (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+          (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
             "%ux%u%+d%+d",width,height,x,(int) (*image)->rows-(int) height-y);
         }
       if (windows->image.orphan != MagickFalse)
@@ -7645,7 +7645,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       /*
         Query user for the fuzz factor.
       */
-      (void) FormatMagickString(fuzz,MaxTextExtent,"%g%%",100.0*
+      (void) FormatLocaleString(fuzz,MaxTextExtent,"%g%%",100.0*
         (*image)->fuzz/(QuantumRange+1.0));
       (void) XDialogWidget(display,windows,"Trim","Enter fuzz factor:",fuzz);
       if (*fuzz == '\0')
@@ -8926,7 +8926,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       XSetCursorState(display,windows,MagickTrue);
       XCheckRefreshWindows(display,windows);
       (void) AcquireUniqueFilename(filename);
-      (void) FormatMagickString((*image)->filename,MaxTextExtent,"launch:%s",
+      (void) FormatLocaleString((*image)->filename,MaxTextExtent,"launch:%s",
         filename);
       status=WriteImage(image_info,*image);
       if (status == MagickFalse)
@@ -9005,7 +9005,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) DeleteImageProperty(*image,"label");
       (void) SetImageProperty(*image,"label","Preview");
       (void) AcquireUniqueFilename(filename);
-      (void) FormatMagickString((*image)->filename,MaxTextExtent,"preview:%s",
+      (void) FormatLocaleString((*image)->filename,MaxTextExtent,"preview:%s",
         filename);
       status=WriteImage(image_info,*image);
       (void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
@@ -9013,7 +9013,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) RelinquishUniqueFileResource(filename);
       if (preview_image == (Image *) NULL)
         break;
-      (void) FormatMagickString(preview_image->filename,MaxTextExtent,"show:%s",
+      (void) FormatLocaleString(preview_image->filename,MaxTextExtent,"show:%s",
         filename);
       status=WriteImage(image_info,preview_image);
       preview_image=DestroyImage(preview_image);
@@ -9038,7 +9038,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) DeleteImageProperty(*image,"label");
       (void) SetImageProperty(*image,"label","Histogram");
       (void) AcquireUniqueFilename(filename);
-      (void) FormatMagickString((*image)->filename,MaxTextExtent,"histogram:%s",
+      (void) FormatLocaleString((*image)->filename,MaxTextExtent,"histogram:%s",
         filename);
       status=WriteImage(image_info,*image);
       (void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
@@ -9046,7 +9046,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) RelinquishUniqueFileResource(filename);
       if (histogram_image == (Image *) NULL)
         break;
-      (void) FormatMagickString(histogram_image->filename,MaxTextExtent,
+      (void) FormatLocaleString(histogram_image->filename,MaxTextExtent,
         "show:%s",filename);
       status=WriteImage(image_info,histogram_image);
       histogram_image=DestroyImage(histogram_image);
@@ -9077,7 +9077,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) DeleteImageProperty(*image,"label");
       (void) SetImageProperty(*image,"label","Matte");
       (void) AcquireUniqueFilename(filename);
-      (void) FormatMagickString((*image)->filename,MaxTextExtent,"matte:%s",
+      (void) FormatLocaleString((*image)->filename,MaxTextExtent,"matte:%s",
         filename);
       status=WriteImage(image_info,*image);
       (void) CopyMagickString(image_info->filename,filename,MaxTextExtent);
@@ -9085,7 +9085,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
       (void) RelinquishUniqueFileResource(filename);
       if (matte_image == (Image *) NULL)
         break;
-      (void) FormatMagickString(matte_image->filename,MaxTextExtent,"show:%s",
+      (void) FormatLocaleString(matte_image->filename,MaxTextExtent,"show:%s",
         filename);
       status=WriteImage(image_info,matte_image);
       matte_image=DestroyImage(matte_image);
@@ -9175,7 +9175,7 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
             Display documentation using Netscape remote control.
           */
           url=GetMagickHomeURL();
-          (void) FormatMagickString(command,MaxTextExtent,
+          (void) FormatLocaleString(command,MaxTextExtent,
             "openurl(%s,new-tab)",url);
           url=DestroyString(url);
           mozilla_atom=XInternAtom(display,"_MOZILLA_COMMAND",MagickFalse);
@@ -9283,7 +9283,7 @@ static void XMagnifyImage(Display *display,XWindows *windows,XEvent *event)
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
           windows->magnify.x,windows->magnify.y);
         XInfoWidget(display,windows,text);
       }
@@ -9642,7 +9642,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+d%+d ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+d%+d ",
           x+windows->image.x,y+windows->image.y);
         XInfoWidget(display,windows,text);
       }
@@ -9786,14 +9786,14 @@ static MagickBooleanType XMatteEditImage(Display *display,
               break;
             if (entry != 2)
               {
-                (void) FormatMagickString(matte,MaxTextExtent,QuantumFormat,
+                (void) FormatLocaleString(matte,MaxTextExtent,QuantumFormat,
                   OpaqueOpacity);
                 if (LocaleCompare(MatteMenu[entry],"Transparent") == 0)
-                  (void) FormatMagickString(matte,MaxTextExtent,QuantumFormat,
+                  (void) FormatLocaleString(matte,MaxTextExtent,QuantumFormat,
                     (Quantum) TransparentOpacity);
                 break;
               }
-            (void) FormatMagickString(message,MaxTextExtent,
+            (void) FormatLocaleString(message,MaxTextExtent,
               "Enter matte value (0 - " QuantumFormat "):",(Quantum)
               QuantumRange);
             (void) XDialogWidget(display,windows,"Matte",message,matte);
@@ -10055,7 +10055,7 @@ static MagickBooleanType XMatteEditImage(Display *display,
               }
             draw_info=CloneDrawInfo(resource_info->image_info,
               (DrawInfo *) NULL);
-            draw_info->fill.opacity=ClampToQuantum(StringToDouble(matte,
+            draw_info->fill.opacity=ClampToQuantum(LocaleToDouble(matte,
               (char **) NULL));
             (void) FloodfillPaintImage(*image,OpacityChannel,draw_info,&target,
               (ssize_t) x_offset,(ssize_t) y_offset,
@@ -10268,7 +10268,7 @@ static Image *XOpenImage(Display *display,XResourceInfo *resource_info,
           register int
             i;
 
-          (void) FormatMagickString(title,MaxTextExtent,
+          (void) FormatLocaleString(title,MaxTextExtent,
             "Unknown format: %s",filename);
           XTextViewWidget(display,resource_info,windows,MagickTrue,title,
             (const char **) textlist);
@@ -10424,7 +10424,7 @@ static void XPanImage(Display *display,XWindows *windows,XEvent *event)
             */
             windows->image.x=(int) pan_info.x;
             windows->image.y=(int) pan_info.y;
-            (void) FormatMagickString(text,MaxTextExtent," %ux%u%+d%+d ",
+            (void) FormatLocaleString(text,MaxTextExtent," %ux%u%+d%+d ",
               windows->image.width,windows->image.height,windows->image.x,
               windows->image.y);
             XInfoWidget(display,windows,text);
@@ -10573,7 +10573,7 @@ static MagickBooleanType XPasteImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+ld%+ld ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+ld%+ld ",
           (long) paste_info.x,(long) paste_info.y);
         XInfoWidget(display,windows,text);
       }
@@ -10867,7 +10867,7 @@ static MagickBooleanType XPrintImage(Display *display,
     Request Postscript page geometry from user.
   */
   image_info=CloneImageInfo(resource_info->image_info);
-  (void) FormatMagickString(geometry,MaxTextExtent,"Letter");
+  (void) FormatLocaleString(geometry,MaxTextExtent,"Letter");
   if (image_info->page != (char *) NULL)
     (void) CopyMagickString(geometry,image_info->page,MaxTextExtent);
   XListBrowserWidget(display,windows,&windows->widget,PageSizes,"Select",
@@ -10883,14 +10883,14 @@ static MagickBooleanType XPrintImage(Display *display,
   print_image=CloneImage(image,0,0,MagickTrue,&image->exception);
   if (print_image == (Image *) NULL)
     return(MagickFalse);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%dx%d!",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%dx%d!",
     windows->image.ximage->width,windows->image.ximage->height);
   (void) TransformImage(&print_image,windows->image.crop_geometry,geometry);
   /*
     Print image.
   */
   (void) AcquireUniqueFilename(filename);
-  (void) FormatMagickString(print_image->filename,MaxTextExtent,"print:%s",
+  (void) FormatLocaleString(print_image->filename,MaxTextExtent,"print:%s",
     filename);
   status=WriteImage(image_info,print_image);
   (void) RelinquishUniqueFileResource(filename);
@@ -11209,7 +11209,7 @@ static MagickBooleanType XROIImage(Display *display,
         /*
           Display pointer position.
         */
-        (void) FormatMagickString(text,MaxTextExtent," %+ld%+ld ",
+        (void) FormatLocaleString(text,MaxTextExtent," %+ld%+ld ",
           (long) roi_info.x,(long) roi_info.y);
         XInfoWidget(display,windows,text);
       }
@@ -11367,7 +11367,7 @@ static MagickBooleanType XROIImage(Display *display,
           */
           if (windows->info.mapped == MagickFalse)
             (void) XMapWindow(display,windows->info.id);
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             " %.20gx%.20g%+.20g%+.20g",(double) roi_info.width,(double)
             roi_info.height,(double) roi_info.x,(double) roi_info.y);
           XInfoWidget(display,windows,text);
@@ -11463,7 +11463,7 @@ static MagickBooleanType XROIImage(Display *display,
           /*
             Display pointer position.
           */
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             " %.20gx%.20g%+.20g%+.20g",(double) roi_info.width,(double)
             roi_info.height,(double) roi_info.x,(double) roi_info.y);
           XInfoWidget(display,windows,text);
@@ -11804,7 +11804,7 @@ static MagickBooleanType XROIImage(Display *display,
           /*
             Set primary selection.
           */
-          (void) FormatMagickString(text,MaxTextExtent,
+          (void) FormatLocaleString(text,MaxTextExtent,
             "%.20gx%.20g%+.20g%+.20g",(double) roi_info.width,(double)
             roi_info.height,(double) roi_info.x,(double) roi_info.y);
           request=(&(event.xselectionrequest));
@@ -12177,7 +12177,7 @@ static MagickBooleanType XRotateImage(Display *display,
             */
             if (windows->info.mapped == MagickFalse)
               (void) XMapWindow(display,windows->info.id);
-            (void) FormatMagickString(text,MaxTextExtent," %g",
+            (void) FormatLocaleString(text,MaxTextExtent," %g",
               direction == VerticalRotateCommand ? degrees-90.0 : degrees);
             XInfoWidget(display,windows,text);
             XHighlightLine(display,windows->image.id,
@@ -12293,7 +12293,7 @@ static MagickBooleanType XRotateImage(Display *display,
           /*
             Rotate 90 degrees.
           */
-          (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+          (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
             "%ux%u%+d%+d",height,width,(int) (*image)->columns-
             (int) height-y,x);
           break;
@@ -12303,7 +12303,7 @@ static MagickBooleanType XRotateImage(Display *display,
           /*
             Rotate 180 degrees.
           */
-          (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+          (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
             "%ux%u%+d%+d",width,height,(int) width-x,(int) height-y);
           break;
         }
@@ -12312,7 +12312,7 @@ static MagickBooleanType XRotateImage(Display *display,
           /*
             Rotate 270 degrees.
           */
-          (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+          (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
             "%ux%u%+d%+d",height,width,y,(int) (*image)->rows-(int) width-x);
           break;
         }
@@ -12449,7 +12449,7 @@ static MagickBooleanType XSaveImage(Display *display,
       /*
         Request JPEG quality from user.
       */
-      (void) FormatMagickString(quality,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(quality,MaxTextExtent,"%.20g",(double)
         image->quality);
       status=XDialogWidget(display,windows,"Save","Enter JPEG quality:",
         quality);
@@ -12487,7 +12487,7 @@ static MagickBooleanType XSaveImage(Display *display,
   save_image=CloneImage(image,0,0,MagickTrue,&image->exception);
   if (save_image == (Image *) NULL)
     return(MagickFalse);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%dx%d!",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%dx%d!",
     windows->image.ximage->width,windows->image.ximage->height);
   (void) TransformImage(&save_image,windows->image.crop_geometry,geometry);
   /*
@@ -12826,7 +12826,7 @@ static void XSetCropGeometry(Display *display,XWindows *windows,
       /*
         Display info on cropping rectangle.
       */
-      (void) FormatMagickString(text,MaxTextExtent," %.20gx%.20g%+.20g%+.20g",
+      (void) FormatLocaleString(text,MaxTextExtent," %.20gx%.20g%+.20g%+.20g",
         (double) crop_info->width,(double) crop_info->height,(double)
         crop_info->x,(double) crop_info->y);
       XInfoWidget(display,windows,text);
@@ -12857,7 +12857,7 @@ static void XSetCropGeometry(Display *display,XWindows *windows,
   height=(unsigned int) (scale_factor*crop_info->height+0.5);
   if (height == 0)
     height=1;
-  (void) FormatMagickString(windows->image.crop_geometry,MaxTextExtent,
+  (void) FormatLocaleString(windows->image.crop_geometry,MaxTextExtent,
     "%ux%u%+d%+d",width,height,x,y);
 }
 \f
@@ -13255,7 +13255,7 @@ static void XTranslateImage(Display *display,XWindows *windows,
   /*
     Refresh Image window.
   */
-  (void) FormatMagickString(text,MaxTextExtent," %ux%u%+d%+d ",
+  (void) FormatLocaleString(text,MaxTextExtent," %ux%u%+d%+d ",
     windows->image.width,windows->image.height,windows->image.x,
     windows->image.y);
   XInfoWidget(display,windows,text);
@@ -13511,7 +13511,7 @@ static Image *XVisualDirectoryImage(Display *display,
   */
   background_resources=(*resource_info);
   background_resources.window_id=AcquireString("");
-  (void) FormatMagickString(background_resources.window_id,MaxTextExtent,
+  (void) FormatLocaleString(background_resources.window_id,MaxTextExtent,
     "0x%lx",windows->image.id);
   background_resources.backdrop=MagickTrue;
   /*
@@ -13702,7 +13702,7 @@ MagickExport MagickBooleanType XDisplayBackgroundImage(Display *display,
   (void) CopyMagickString(visual_type,"default",MaxTextExtent);
   status=XGetWindowAttributes(display,window_info.id,&window_attributes);
   if (status != 0)
-    (void) FormatMagickString(visual_type,MaxTextExtent,"0x%lx",
+    (void) FormatLocaleString(visual_type,MaxTextExtent,"0x%lx",
       XVisualIDFromVisual(window_attributes.visual));
   if (visual_info == (XVisualInfo *) NULL)
     {
@@ -13768,7 +13768,7 @@ MagickExport MagickBooleanType XDisplayBackgroundImage(Display *display,
       (image->rows != window_info.height))
     ThrowXWindowFatalException(XServerFatalError,"UnableToCreateXImage",
       image->filename);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%ux%u+0+0>",
     window_attributes.width,window_attributes.height);
   geometry_info.width=window_info.width;
   geometry_info.height=window_info.height;
@@ -13835,7 +13835,7 @@ MagickExport MagickBooleanType XDisplayBackgroundImage(Display *display,
         ThrowXWindowFatalException(ResourceLimitFatalError,
           "MemoryAllocationFailed",image->filename);
       size_hints->flags=0L;
-      (void) FormatMagickString(default_geometry,MaxTextExtent,"%dx%d",
+      (void) FormatLocaleString(default_geometry,MaxTextExtent,"%dx%d",
         width,height);
       flags=XWMGeometry(display,visual_info->screen,resources.image_geometry,
         default_geometry,window_info.border_width,size_hints,&window_info.x,
@@ -14560,10 +14560,10 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
       */
       GetPathComponent(display_image->magick_filename,TailPath,filename);
       if (GetImageListLength(display_image) == 1)
-        (void) FormatMagickString(windows->image.name,MaxTextExtent,
+        (void) FormatLocaleString(windows->image.name,MaxTextExtent,
           "%s: %s",MagickPackageName,filename);
       else
-        (void) FormatMagickString(windows->image.name,MaxTextExtent,
+        (void) FormatLocaleString(windows->image.name,MaxTextExtent,
           "%s: %s[scene: %.20g frames: %.20g]",MagickPackageName,filename,
           (double) display_image->scene,(double) GetImageListLength(
           display_image));
@@ -14573,7 +14573,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
     windows->image.immutable=MagickTrue;
   windows->image.use_pixmap=resource_info->use_pixmap;
   windows->image.geometry=resource_info->image_geometry;
-  (void) FormatMagickString(geometry,MaxTextExtent,"%ux%u+0+0>!",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%ux%u+0+0>!",
     XDisplayWidth(display,visual_info->screen),
     XDisplayHeight(display,visual_info->screen));
   geometry_info.width=display_image->columns;
@@ -14700,7 +14700,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
     resource_info,&windows->command);
   windows->command.data=MagickMenus;
   (void) XCommandWidget(display,windows,CommandMenu,(XEvent *) NULL);
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.command",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.command",
     resource_info->client_name);
   windows->command.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
@@ -14732,7 +14732,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
   */
   XGetWindowInfo(display,visual_info,map_info,pixel,font_info,
     resource_info,&windows->widget);
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.widget",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.widget",
     resource_info->client_name);
   windows->widget.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
@@ -14787,11 +14787,11 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
     resource_info,&windows->magnify);
   if (resource_info->use_shared_memory == MagickFalse)
     windows->magnify.shared_memory=MagickFalse;
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.magnify",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.magnify",
     resource_info->client_name);
   windows->magnify.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
-  (void) FormatMagickString(windows->magnify.name,MaxTextExtent,"Magnify %uX",
+  (void) FormatLocaleString(windows->magnify.name,MaxTextExtent,"Magnify %uX",
     resource_info->magnify);
   if (windows->magnify.cursor != (Cursor) NULL)
     (void) XFreeCursor(display,windows->magnify.cursor);
@@ -14831,7 +14831,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
   (void) CloneString(&windows->pan.name,"Pan Icon");
   windows->pan.width=windows->icon.width;
   windows->pan.height=windows->icon.height;
-  (void) FormatMagickString(resource_name,MaxTextExtent,"%s.pan",
+  (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.pan",
     resource_info->client_name);
   windows->pan.geometry=XGetResourceClass(resource_info->resource_database,
     resource_name,"geometry",(char *) NULL);
@@ -14945,7 +14945,7 @@ MagickExport Image *XDisplayImage(Display *display,XResourceInfo *resource_info,
                         /*
                           Redisplay image.
                         */
-                        (void) FormatMagickString(
+                        (void) FormatLocaleString(
                           resource_info->image_info->filename,MaxTextExtent,
                           "%s:%s",display_image->magick,
                           display_image->filename);
index 6cbb353757a89e07ce8d8cad3a9ff2467012c017..bd592874e9710a068c91f4f74dd1d7902b76eb23 100644 (file)
@@ -1826,7 +1826,7 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
 
     /* Set destination image size and virtual offset */
     if ( bestfit || viewport_given ) {
-      (void) FormatMagickString(image_gen, MaxTextExtent,"  -size %.20gx%.20g "
+      (void) FormatLocaleString(image_gen, MaxTextExtent,"  -size %.20gx%.20g "
         "-page %+.20g%+.20g xc: +insert \\\n",(double) geometry.width,
         (double) geometry.height,(double) geometry.x,(double) geometry.y);
       lookup="v.p{ xx-v.page.x-.5, yy-v.page.x-.5 }";
@@ -1851,21 +1851,21 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
         }
         InvertAffineCoefficients(coeff, inverse);
         CoefficientsToAffineArgs(inverse);
-        fprintf(stderr, "Affine Projection:\n");
-        fprintf(stderr, "  -distort AffineProjection \\\n      '");
+        FormatLocaleFile(stderr, "Affine Projection:\n");
+        FormatLocaleFile(stderr, "  -distort AffineProjection \\\n      '");
         for (i=0; i<5; i++)
-          fprintf(stderr, "%lf,", inverse[i]);
-        fprintf(stderr, "%lf'\n", inverse[5]);
+          FormatLocaleFile(stderr, "%lf,", inverse[i]);
+        FormatLocaleFile(stderr, "%lf'\n", inverse[5]);
         inverse = (double *) RelinquishMagickMemory(inverse);
 
-        fprintf(stderr, "Affine Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
-        fprintf(stderr, "       xx=%+lf*ii %+lf*jj %+lf;\n",
+        FormatLocaleFile(stderr, "Affine Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+        FormatLocaleFile(stderr, "       xx=%+lf*ii %+lf*jj %+lf;\n",
             coeff[0], coeff[1], coeff[2]);
-        fprintf(stderr, "       yy=%+lf*ii %+lf*jj %+lf;\n",
+        FormatLocaleFile(stderr, "       yy=%+lf*ii %+lf*jj %+lf;\n",
             coeff[3], coeff[4], coeff[5]);
-        fprintf(stderr, "       %s'\n", lookup);
+        FormatLocaleFile(stderr, "       %s'\n", lookup);
 
         break;
       }
@@ -1883,155 +1883,155 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
           return((Image *) NULL);
         }
         InvertPerspectiveCoefficients(coeff, inverse);
-        fprintf(stderr, "Perspective Projection:\n");
-        fprintf(stderr, "  -distort PerspectiveProjection \\\n      '");
+        FormatLocaleFile(stderr, "Perspective Projection:\n");
+        FormatLocaleFile(stderr, "  -distort PerspectiveProjection \\\n      '");
         for (i=0; i<4; i++)
-          fprintf(stderr, "%lf, ", inverse[i]);
-        fprintf(stderr, "\n       ");
+          FormatLocaleFile(stderr, "%lf, ", inverse[i]);
+        FormatLocaleFile(stderr, "\n       ");
         for (; i<7; i++)
-          fprintf(stderr, "%lf, ", inverse[i]);
-        fprintf(stderr, "%lf'\n", inverse[7]);
+          FormatLocaleFile(stderr, "%lf, ", inverse[i]);
+        FormatLocaleFile(stderr, "%lf'\n", inverse[7]);
         inverse = (double *) RelinquishMagickMemory(inverse);
 
-        fprintf(stderr, "Perspective Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
-        fprintf(stderr, "       rr=%+lf*ii %+lf*jj + 1;\n",
+        FormatLocaleFile(stderr, "Perspective Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+        FormatLocaleFile(stderr, "       rr=%+lf*ii %+lf*jj + 1;\n",
             coeff[6], coeff[7]);
-        fprintf(stderr, "       xx=(%+lf*ii %+lf*jj %+lf)/rr;\n",
+        FormatLocaleFile(stderr, "       xx=(%+lf*ii %+lf*jj %+lf)/rr;\n",
             coeff[0], coeff[1], coeff[2]);
-        fprintf(stderr, "       yy=(%+lf*ii %+lf*jj %+lf)/rr;\n",
+        FormatLocaleFile(stderr, "       yy=(%+lf*ii %+lf*jj %+lf)/rr;\n",
             coeff[3], coeff[4], coeff[5]);
-        fprintf(stderr, "       rr%s0 ? %s : blue'\n",
+        FormatLocaleFile(stderr, "       rr%s0 ? %s : blue'\n",
             coeff[8] < 0 ? "<" : ">", lookup);
         break;
       }
 
       case BilinearForwardDistortion:
-        fprintf(stderr, "BilinearForward Mapping Equations:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "    i = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
+        FormatLocaleFile(stderr, "BilinearForward Mapping Equations:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "    i = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
             coeff[0], coeff[1], coeff[2], coeff[3]);
-        fprintf(stderr, "    j = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
+        FormatLocaleFile(stderr, "    j = %+lf*x %+lf*y %+lf*x*y %+lf;\n",
             coeff[4], coeff[5], coeff[6], coeff[7]);
 #if 0
         /* for debugging */
-        fprintf(stderr, "   c8 = %+lf  c9 = 2*a = %+lf;\n",
+        FormatLocaleFile(stderr, "   c8 = %+lf  c9 = 2*a = %+lf;\n",
             coeff[8], coeff[9]);
 #endif
-        fprintf(stderr, "BilinearForward Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
+        FormatLocaleFile(stderr, "BilinearForward Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
             0.5-coeff[3], 0.5-coeff[7]);
-        fprintf(stderr, "       bb=%lf*ii %+lf*jj %+lf;\n",
+        FormatLocaleFile(stderr, "       bb=%lf*ii %+lf*jj %+lf;\n",
             coeff[6], -coeff[2], coeff[8]);
         /* Handle Special degenerate (non-quadratic) or trapezoidal case */
         if ( coeff[9] != 0 ) {
-          fprintf(stderr, "       rt=bb*bb %+lf*(%lf*ii%+lf*jj);\n",
+          FormatLocaleFile(stderr, "       rt=bb*bb %+lf*(%lf*ii%+lf*jj);\n",
               -2*coeff[9],  coeff[4], -coeff[0]);
-          fprintf(stderr, "       yy=( -bb + sqrt(rt) ) / %lf;\n",
+          FormatLocaleFile(stderr, "       yy=( -bb + sqrt(rt) ) / %lf;\n",
                coeff[9]);
         } else
-          fprintf(stderr, "       yy=(%lf*ii%+lf*jj)/bb;\n",
+          FormatLocaleFile(stderr, "       yy=(%lf*ii%+lf*jj)/bb;\n",
                 -coeff[4], coeff[0]);
-        fprintf(stderr, "       xx=(ii %+lf*yy)/(%lf %+lf*yy);\n",
+        FormatLocaleFile(stderr, "       xx=(ii %+lf*yy)/(%lf %+lf*yy);\n",
              -coeff[1], coeff[0], coeff[2]);
         if ( coeff[9] != 0 )
-          fprintf(stderr, "       (rt < 0 ) ? red : %s'\n", lookup);
+          FormatLocaleFile(stderr, "       (rt < 0 ) ? red : %s'\n", lookup);
         else
-          fprintf(stderr, "       %s'\n", lookup);
+          FormatLocaleFile(stderr, "       %s'\n", lookup);
         break;
 
       case BilinearReverseDistortion:
 #if 0
-        fprintf(stderr, "Polynomial Projection Distort:\n");
-        fprintf(stderr, "  -distort PolynomialProjection \\\n");
-        fprintf(stderr, "      '1.5, %lf, %lf, %lf, %lf,\n",
+        FormatLocaleFile(stderr, "Polynomial Projection Distort:\n");
+        FormatLocaleFile(stderr, "  -distort PolynomialProjection \\\n");
+        FormatLocaleFile(stderr, "      '1.5, %lf, %lf, %lf, %lf,\n",
             coeff[3], coeff[0], coeff[1], coeff[2]);
-        fprintf(stderr, "            %lf, %lf, %lf, %lf'\n",
+        FormatLocaleFile(stderr, "            %lf, %lf, %lf, %lf'\n",
             coeff[7], coeff[4], coeff[5], coeff[6]);
 #endif
-        fprintf(stderr, "BilinearReverse Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
-        fprintf(stderr, "       xx=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
+        FormatLocaleFile(stderr, "BilinearReverse Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+        FormatLocaleFile(stderr, "       xx=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
             coeff[0], coeff[1], coeff[2], coeff[3]);
-        fprintf(stderr, "       yy=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
+        FormatLocaleFile(stderr, "       yy=%+lf*ii %+lf*jj %+lf*ii*jj %+lf;\n",
             coeff[4], coeff[5], coeff[6], coeff[7]);
-        fprintf(stderr, "       %s'\n", lookup);
+        FormatLocaleFile(stderr, "       %s'\n", lookup);
         break;
 
       case PolynomialDistortion:
       {
         size_t nterms = (size_t) coeff[1];
-        fprintf(stderr, "Polynomial (order %lg, terms %lu), FX Equivelent\n",
+        FormatLocaleFile(stderr, "Polynomial (order %lg, terms %lu), FX Equivelent\n",
           coeff[0],(unsigned long) nterms);
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
-        fprintf(stderr, "       xx =");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x+0.5; jj=j+page.y+0.5;\n");
+        FormatLocaleFile(stderr, "       xx =");
         for (i=0; i<(ssize_t) nterms; i++) {
-          if ( i != 0 && i%4 == 0 ) fprintf(stderr, "\n         ");
-          fprintf(stderr, " %+lf%s", coeff[2+i],
+          if ( i != 0 && i%4 == 0 ) FormatLocaleFile(stderr, "\n         ");
+          FormatLocaleFile(stderr, " %+lf%s", coeff[2+i],
                poly_basis_str(i));
         }
-        fprintf(stderr, ";\n       yy =");
+        FormatLocaleFile(stderr, ";\n       yy =");
         for (i=0; i<(ssize_t) nterms; i++) {
-          if ( i != 0 && i%4 == 0 ) fprintf(stderr, "\n         ");
-          fprintf(stderr, " %+lf%s", coeff[2+i+nterms],
+          if ( i != 0 && i%4 == 0 ) FormatLocaleFile(stderr, "\n         ");
+          FormatLocaleFile(stderr, " %+lf%s", coeff[2+i+nterms],
                poly_basis_str(i));
         }
-        fprintf(stderr, ";\n       %s'\n", lookup);
+        FormatLocaleFile(stderr, ";\n       %s'\n", lookup);
         break;
       }
       case ArcDistortion:
       {
-        fprintf(stderr, "Arc Distort, Internal Coefficients:\n");
+        FormatLocaleFile(stderr, "Arc Distort, Internal Coefficients:\n");
         for ( i=0; i<5; i++ )
-          fprintf(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
-        fprintf(stderr, "Arc Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x; jj=j+page.y;\n");
-        fprintf(stderr, "       xx=(atan2(jj,ii)%+lf)/(2*pi);\n",
+          FormatLocaleFile(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
+        FormatLocaleFile(stderr, "Arc Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x; jj=j+page.y;\n");
+        FormatLocaleFile(stderr, "       xx=(atan2(jj,ii)%+lf)/(2*pi);\n",
                                   -coeff[0]);
-        fprintf(stderr, "       xx=xx-round(xx);\n");
-        fprintf(stderr, "       xx=xx*%lf %+lf;\n",
+        FormatLocaleFile(stderr, "       xx=xx-round(xx);\n");
+        FormatLocaleFile(stderr, "       xx=xx*%lf %+lf;\n",
                             coeff[1], coeff[4]);
-        fprintf(stderr, "       yy=(%lf - hypot(ii,jj)) * %lf;\n",
+        FormatLocaleFile(stderr, "       yy=(%lf - hypot(ii,jj)) * %lf;\n",
                             coeff[2], coeff[3]);
-        fprintf(stderr, "       v.p{xx-.5,yy-.5}'\n");
+        FormatLocaleFile(stderr, "       v.p{xx-.5,yy-.5}'\n");
         break;
       }
       case PolarDistortion:
       {
-        fprintf(stderr, "Polar Distort, Internal Coefficents\n");
+        FormatLocaleFile(stderr, "Polar Distort, Internal Coefficents\n");
         for ( i=0; i<8; i++ )
-          fprintf(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
-        fprintf(stderr, "Polar Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
+          FormatLocaleFile(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
+        FormatLocaleFile(stderr, "Polar Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'ii=i+page.x%+lf; jj=j+page.y%+lf;\n",
                          -coeff[2], -coeff[3]);
-        fprintf(stderr, "       xx=(atan2(ii,jj)%+lf)/(2*pi);\n",
+        FormatLocaleFile(stderr, "       xx=(atan2(ii,jj)%+lf)/(2*pi);\n",
                          -(coeff[4]+coeff[5])/2 );
-        fprintf(stderr, "       xx=xx-round(xx);\n");
-        fprintf(stderr, "       xx=xx*2*pi*%lf + v.w/2;\n",
+        FormatLocaleFile(stderr, "       xx=xx-round(xx);\n");
+        FormatLocaleFile(stderr, "       xx=xx*2*pi*%lf + v.w/2;\n",
                          coeff[6] );
-        fprintf(stderr, "       yy=(hypot(ii,jj)%+lf)*%lf;\n",
+        FormatLocaleFile(stderr, "       yy=(hypot(ii,jj)%+lf)*%lf;\n",
                          -coeff[1], coeff[7] );
-        fprintf(stderr, "       v.p{xx-.5,yy-.5}'\n");
+        FormatLocaleFile(stderr, "       v.p{xx-.5,yy-.5}'\n");
         break;
       }
       case DePolarDistortion:
       {
-        fprintf(stderr, "DePolar Distort, Internal Coefficents\n");
+        FormatLocaleFile(stderr, "DePolar Distort, Internal Coefficents\n");
         for ( i=0; i<8; i++ )
-          fprintf(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
-        fprintf(stderr, "DePolar Distort, FX Equivelent:\n");
-        fprintf(stderr, "%s", image_gen);
-        fprintf(stderr, "  -fx 'aa=(i+.5)*%lf %+lf;\n", coeff[6], -coeff[4] );
-        fprintf(stderr, "       rr=(j+.5)*%lf %+lf;\n", coeff[7], +coeff[1] );
-        fprintf(stderr, "       xx=rr*sin(aa) %+lf;\n", coeff[2] );
-        fprintf(stderr, "       yy=rr*cos(aa) %+lf;\n", coeff[3] );
-        fprintf(stderr, "       v.p{xx-.5,yy-.5}'\n");
+          FormatLocaleFile(stderr, "  c%.20g = %+lf\n", (double) i, coeff[i]);
+        FormatLocaleFile(stderr, "DePolar Distort, FX Equivelent:\n");
+        FormatLocaleFile(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "  -fx 'aa=(i+.5)*%lf %+lf;\n", coeff[6], -coeff[4] );
+        FormatLocaleFile(stderr, "       rr=(j+.5)*%lf %+lf;\n", coeff[7], +coeff[1] );
+        FormatLocaleFile(stderr, "       xx=rr*sin(aa) %+lf;\n", coeff[2] );
+        FormatLocaleFile(stderr, "       yy=rr*cos(aa) %+lf;\n", coeff[3] );
+        FormatLocaleFile(stderr, "       v.p{xx-.5,yy-.5}'\n");
         break;
       }
       case BarrelDistortion:
@@ -2043,23 +2043,23 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
         */
         xc = ((double)image->columns-1.0)/2.0 + image->page.x;
         yc = ((double)image->rows-1.0)/2.0    + image->page.y;
-        fprintf(stderr, "Barrel%s Distort, FX Equivelent:\n",
+        FormatLocaleFile(stderr, "Barrel%s Distort, FX Equivelent:\n",
              method == BarrelDistortion ? "" : "Inv");
-        fprintf(stderr, "%s", image_gen);
+        FormatLocaleFile(stderr, "%s", image_gen);
         if ( fabs(coeff[8]-xc-0.5) < 0.1 && fabs(coeff[9]-yc-0.5) < 0.1 )
-          fprintf(stderr, "  -fx 'xc=(w-1)/2;  yc=(h-1)/2;\n");
+          FormatLocaleFile(stderr, "  -fx 'xc=(w-1)/2;  yc=(h-1)/2;\n");
         else
-          fprintf(stderr, "  -fx 'xc=%lf;  yc=%lf;\n",
+          FormatLocaleFile(stderr, "  -fx 'xc=%lf;  yc=%lf;\n",
                coeff[8]-0.5, coeff[9]-0.5);
-        fprintf(stderr,
+        FormatLocaleFile(stderr,
              "       ii=i-xc;  jj=j-yc;  rr=hypot(ii,jj);\n");
-        fprintf(stderr, "       ii=ii%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
+        FormatLocaleFile(stderr, "       ii=ii%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
              method == BarrelDistortion ? "*" : "/",
              coeff[0],coeff[1],coeff[2],coeff[3]);
-        fprintf(stderr, "       jj=jj%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
+        FormatLocaleFile(stderr, "       jj=jj%s(%lf*rr*rr*rr %+lf*rr*rr %+lf*rr %+lf);\n",
              method == BarrelDistortion ? "*" : "/",
              coeff[4],coeff[5],coeff[6],coeff[7]);
-        fprintf(stderr, "       v.p{fx*ii+xc,fy*jj+yc}'\n");
+        FormatLocaleFile(stderr, "       v.p{fx*ii+xc,fy*jj+yc}'\n");
       }
       default:
         break;
@@ -2075,7 +2075,7 @@ MagickExport Image *DistortImage(const Image *image,DistortImageMethod method,
     artifact=GetImageArtifact(image,"distort:scale");
     output_scaling = 1.0;
     if (artifact != (const char *) NULL) {
-      output_scaling = fabs(StringToDouble(artifact,(char **) NULL));
+      output_scaling = fabs(LocaleToDouble(artifact,(char **) NULL));
       geometry.width  *= output_scaling;
       geometry.height *= output_scaling;
       geometry.x      *= output_scaling;
@@ -2642,46 +2642,46 @@ MagickExport Image *SparseColorImage(const Image *image,
       case BarycentricColorInterpolate:
       {
         register ssize_t x=0;
-        fprintf(stderr, "Barycentric Sparse Color:\n");
+        FormatLocaleFile(stderr, "Barycentric Sparse Color:\n");
         if ( channel & RedChannel )
-          fprintf(stderr, "  -channel R -fx '%+lf*i %+lf*j %+lf' \\\n",
+          FormatLocaleFile(stderr, "  -channel R -fx '%+lf*i %+lf*j %+lf' \\\n",
               coeff[x], coeff[x+1], coeff[x+2]),x+=3;
         if ( channel & GreenChannel )
-          fprintf(stderr, "  -channel G -fx '%+lf*i %+lf*j %+lf' \\\n",
+          FormatLocaleFile(stderr, "  -channel G -fx '%+lf*i %+lf*j %+lf' \\\n",
               coeff[x], coeff[x+1], coeff[x+2]),x+=3;
         if ( channel & BlueChannel )
-          fprintf(stderr, "  -channel B -fx '%+lf*i %+lf*j %+lf' \\\n",
+          FormatLocaleFile(stderr, "  -channel B -fx '%+lf*i %+lf*j %+lf' \\\n",
               coeff[x], coeff[x+1], coeff[x+2]),x+=3;
         if ( channel & IndexChannel )
-          fprintf(stderr, "  -channel K -fx '%+lf*i %+lf*j %+lf' \\\n",
+          FormatLocaleFile(stderr, "  -channel K -fx '%+lf*i %+lf*j %+lf' \\\n",
               coeff[x], coeff[x+1], coeff[x+2]),x+=3;
         if ( channel & OpacityChannel )
-          fprintf(stderr, "  -channel A -fx '%+lf*i %+lf*j %+lf' \\\n",
+          FormatLocaleFile(stderr, "  -channel A -fx '%+lf*i %+lf*j %+lf' \\\n",
               coeff[x], coeff[x+1], coeff[x+2]),x+=3;
         break;
       }
       case BilinearColorInterpolate:
       {
         register ssize_t x=0;
-        fprintf(stderr, "Bilinear Sparse Color\n");
+        FormatLocaleFile(stderr, "Bilinear Sparse Color\n");
         if ( channel & RedChannel )
-          fprintf(stderr, "   -channel R -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+          FormatLocaleFile(stderr, "   -channel R -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
               coeff[ x ], coeff[x+1],
               coeff[x+2], coeff[x+3]),x+=4;
         if ( channel & GreenChannel )
-          fprintf(stderr, "   -channel G -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+          FormatLocaleFile(stderr, "   -channel G -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
               coeff[ x ], coeff[x+1],
               coeff[x+2], coeff[x+3]),x+=4;
         if ( channel & BlueChannel )
-          fprintf(stderr, "   -channel B -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+          FormatLocaleFile(stderr, "   -channel B -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
               coeff[ x ], coeff[x+1],
               coeff[x+2], coeff[x+3]),x+=4;
         if ( channel & IndexChannel )
-          fprintf(stderr, "   -channel K -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+          FormatLocaleFile(stderr, "   -channel K -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
               coeff[ x ], coeff[x+1],
               coeff[x+2], coeff[x+3]),x+=4;
         if ( channel & OpacityChannel )
-          fprintf(stderr, "   -channel A -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
+          FormatLocaleFile(stderr, "   -channel A -fx '%+lf*i %+lf*j %+lf*i*j %+lf;\n",
               coeff[ x ], coeff[x+1],
               coeff[x+2], coeff[x+3]),x+=4;
         break;
index 63c30bbf242b85c799b98b41ae25cb7b2b9b7479..db4cef864dd5c7e33077debd840738ce36c61112 100644 (file)
@@ -1414,7 +1414,7 @@ MagickExport MagickBooleanType DrawClipPath(Image *image,
   if (image->debug != MagickFalse)
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(draw_info != (const DrawInfo *) NULL);
-  (void) FormatMagickString(clip_mask,MaxTextExtent,"%s",name);
+  (void) FormatLocaleString(clip_mask,MaxTextExtent,"%s",name);
   value=GetImageArtifact(image,clip_mask);
   if (value == (const char *) NULL)
     return(MagickFalse);
@@ -1657,7 +1657,7 @@ static inline MagickBooleanType IsPoint(const char *point)
   double
     value;
 
-  value=StringToDouble(point,&p);
+  value=LocaleToDouble(point,&p);
   return((value == 0.0) && (p == point) ? MagickFalse : MagickTrue);
 }
 
@@ -1822,27 +1822,27 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("affine",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=StringToDouble(token,(char **) NULL);
+            affine.sx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.rx=StringToDouble(token,(char **) NULL);
+            affine.rx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ry=StringToDouble(token,(char **) NULL);
+            affine.ry=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=StringToDouble(token,(char **) NULL);
+            affine.sy=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.tx=StringToDouble(token,(char **) NULL);
+            affine.tx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=StringToDouble(token,(char **) NULL);
+            affine.ty=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("arc",keyword) == 0)
@@ -1984,7 +1984,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("fill",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(pattern,MaxTextExtent,"%s",token);
+            (void) FormatLocaleString(pattern,MaxTextExtent,"%s",token);
             if (GetImageArtifact(image,pattern) != (const char *) NULL)
               (void) DrawPatternPath(image,draw_info,token,
                 &graphic_context[n]->fill_pattern);
@@ -2013,7 +2013,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
             GetMagickToken(q,&q,token);
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->fill.opacity=ClampToQuantum((MagickRealType)
-              QuantumRange*(1.0-factor*StringToDouble(token,(char **) NULL)));
+              QuantumRange*(1.0-factor*LocaleToDouble(token,(char **) NULL)));
             break;
           }
         if (LocaleCompare("fill-rule",keyword) == 0)
@@ -2050,7 +2050,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("font-size",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->pointsize=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->pointsize=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("font-stretch",keyword) == 0)
@@ -2152,13 +2152,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("interline-spacing",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->interline_spacing=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->interline_spacing=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("interword-spacing",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->interword_spacing=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->interword_spacing=LocaleToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -2170,7 +2170,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("kerning",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->kerning=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->kerning=LocaleToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -2212,7 +2212,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->opacity=ClampToQuantum((MagickRealType)
               QuantumRange*(1.0-((1.0-QuantumScale*graphic_context[n]->opacity)*
-              factor*StringToDouble(token,(char **) NULL))));
+              factor*LocaleToDouble(token,(char **) NULL))));
             graphic_context[n]->fill.opacity=graphic_context[n]->opacity;
             graphic_context[n]->stroke.opacity=graphic_context[n]->opacity;
             break;
@@ -2284,7 +2284,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                   name[MaxTextExtent];
 
                 GetMagickToken(q,&q,token);
-                (void) FormatMagickString(name,MaxTextExtent,"%s",token);
+                (void) FormatLocaleString(name,MaxTextExtent,"%s",token);
                 for (p=q; *q != '\0'; )
                 {
                   GetMagickToken(q,&q,token);
@@ -2315,19 +2315,19 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(type,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                segment.x1=StringToDouble(token,(char **) NULL);
+                segment.x1=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.y1=StringToDouble(token,(char **) NULL);
+                segment.y1=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.x2=StringToDouble(token,(char **) NULL);
+                segment.x2=LocaleToDouble(token,(char **) NULL);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                segment.y2=StringToDouble(token,(char **) NULL);
+                segment.y2=LocaleToDouble(token,(char **) NULL);
                 if (LocaleCompare(type,"radial") == 0)
                   {
                     GetMagickToken(q,&q,token);
@@ -2357,10 +2357,10 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                 bounds.y2=graphic_context[n]->affine.rx*segment.x2+
                   graphic_context[n]->affine.sy*segment.y2+
                   graphic_context[n]->affine.ty;
-                (void) FormatMagickString(key,MaxTextExtent,"%s",name);
+                (void) FormatLocaleString(key,MaxTextExtent,"%s",name);
                 (void) SetImageArtifact(image,key,token);
-                (void) FormatMagickString(key,MaxTextExtent,"%s-geometry",name);
-                (void) FormatMagickString(geometry,MaxTextExtent,
+                (void) FormatLocaleString(key,MaxTextExtent,"%s-geometry",name);
+                (void) FormatLocaleString(geometry,MaxTextExtent,
                   "%gx%g%+.15g%+.15g",
                   MagickMax(fabs(bounds.x2-bounds.x1+1.0),1.0),
                   MagickMax(fabs(bounds.y2-bounds.y1+1.0),1.0),
@@ -2377,19 +2377,19 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                 GetMagickToken(q,&q,token);
                 (void) CopyMagickString(name,token,MaxTextExtent);
                 GetMagickToken(q,&q,token);
-                bounds.x=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-0.5);
+                bounds.x=(ssize_t) ceil(LocaleToDouble(token,(char **) NULL)-0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.y=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-0.5);
+                bounds.y=(ssize_t) ceil(LocaleToDouble(token,(char **) NULL)-0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.width=(size_t) floor(StringToDouble(token,(char **) NULL)+0.5);
+                bounds.width=(size_t) floor(LocaleToDouble(token,(char **) NULL)+0.5);
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                bounds.height=(size_t) floor(StringToDouble(token,(char **) NULL)+0.5);
+                bounds.height=(size_t) floor(LocaleToDouble(token,(char **) NULL)+0.5);
                 for (p=q; *q != '\0'; )
                 {
                   GetMagickToken(q,&q,token);
@@ -2401,10 +2401,10 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                   break;
                 }
                 (void) CopyMagickString(token,p,(size_t) (q-p-4+1));
-                (void) FormatMagickString(key,MaxTextExtent,"%s",name);
+                (void) FormatLocaleString(key,MaxTextExtent,"%s",name);
                 (void) SetImageArtifact(image,key,token);
-                (void) FormatMagickString(key,MaxTextExtent,"%s-geometry",name);
-                (void) FormatMagickString(geometry,MaxTextExtent,
+                (void) FormatLocaleString(key,MaxTextExtent,"%s-geometry",name);
+                (void) FormatLocaleString(geometry,MaxTextExtent,
                   "%.20gx%.20g%+.20g%+.20g",(double) bounds.width,(double)
                   bounds.height,(double) bounds.x,(double) bounds.y);
                 (void) SetImageArtifact(image,key,geometry);
@@ -2446,7 +2446,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("rotate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=StringToDouble(token,(char **) NULL);
+            angle=LocaleToDouble(token,(char **) NULL);
             affine.sx=cos(DegreesToRadians(fmod((double) angle,360.0)));
             affine.rx=sin(DegreesToRadians(fmod((double) angle,360.0)));
             affine.ry=(-sin(DegreesToRadians(fmod((double) angle,360.0))));
@@ -2467,24 +2467,24 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("scale",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.sx=StringToDouble(token,(char **) NULL);
+            affine.sx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.sy=StringToDouble(token,(char **) NULL);
+            affine.sy=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("skewX",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=StringToDouble(token,(char **) NULL);
+            angle=LocaleToDouble(token,(char **) NULL);
             affine.ry=sin(DegreesToRadians(angle));
             break;
           }
         if (LocaleCompare("skewY",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            angle=StringToDouble(token,(char **) NULL);
+            angle=LocaleToDouble(token,(char **) NULL);
             affine.rx=(-tan(DegreesToRadians(angle)/2.0));
             break;
           }
@@ -2504,7 +2504,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("stroke",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            (void) FormatMagickString(pattern,MaxTextExtent,"%s",token);
+            (void) FormatLocaleString(pattern,MaxTextExtent,"%s",token);
             if (GetImageArtifact(image,pattern) != (const char *) NULL)
               (void) DrawPatternPath(image,draw_info,token,
                 &graphic_context[n]->stroke_pattern);
@@ -2570,7 +2570,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
                   GetMagickToken(q,&q,token);
                   if (*token == ',')
                     GetMagickToken(q,&q,token);
-                  graphic_context[n]->dash_pattern[j]=StringToDouble(token,(char **) NULL);
+                  graphic_context[n]->dash_pattern[j]=LocaleToDouble(token,(char **) NULL);
                 }
                 if ((x & 0x01) != 0)
                   for ( ; j < (2*x); j++)
@@ -2585,7 +2585,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("stroke-dashoffset",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->dash_offset=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->dash_offset=LocaleToDouble(token,(char **) NULL);
             break;
           }
         if (LocaleCompare("stroke-linecap",keyword) == 0)
@@ -2629,13 +2629,13 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
             GetMagickToken(q,&q,token);
             factor=strchr(token,'%') != (char *) NULL ? 0.01 : 1.0;
             graphic_context[n]->stroke.opacity=ClampToQuantum((MagickRealType)
-              QuantumRange*(1.0-factor*StringToDouble(token,(char **) NULL)));
+              QuantumRange*(1.0-factor*LocaleToDouble(token,(char **) NULL)));
             break;
           }
         if (LocaleCompare("stroke-width",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->stroke_width=StringToDouble(token,(char **) NULL);
+            graphic_context[n]->stroke_width=LocaleToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -2696,11 +2696,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("translate",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            affine.tx=StringToDouble(token,(char **) NULL);
+            affine.tx=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            affine.ty=StringToDouble(token,(char **) NULL);
+            affine.ty=LocaleToDouble(token,(char **) NULL);
             break;
           }
         status=MagickFalse;
@@ -2712,23 +2712,23 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
         if (LocaleCompare("viewbox",keyword) == 0)
           {
             GetMagickToken(q,&q,token);
-            graphic_context[n]->viewbox.x=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-
+            graphic_context[n]->viewbox.x=(ssize_t) ceil(LocaleToDouble(token,(char **) NULL)-
               0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
-            graphic_context[n]->viewbox.y=(ssize_t) ceil(StringToDouble(token,(char **) NULL)-
+            graphic_context[n]->viewbox.y=(ssize_t) ceil(LocaleToDouble(token,(char **) NULL)-
               0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
             graphic_context[n]->viewbox.width=(size_t) floor(
-              StringToDouble(token,(char **) NULL)+0.5);
+              LocaleToDouble(token,(char **) NULL)+0.5);
             GetMagickToken(q,&q,token);
             if (*token == ',')
               GetMagickToken(q,&q,token);
             graphic_context[n]->viewbox.height=(size_t) floor(
-              StringToDouble(token,(char **) NULL)+0.5);
+              LocaleToDouble(token,(char **) NULL)+0.5);
             break;
           }
         status=MagickFalse;
@@ -2776,11 +2776,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
       if (IsPoint(q) == MagickFalse)
         break;
       GetMagickToken(q,&q,token);
-      point.x=StringToDouble(token,(char **) NULL);
+      point.x=LocaleToDouble(token,(char **) NULL);
       GetMagickToken(q,&q,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
-      point.y=StringToDouble(token,(char **) NULL);
+      point.y=LocaleToDouble(token,(char **) NULL);
       GetMagickToken(q,(const char **) NULL,token);
       if (*token == ',')
         GetMagickToken(q,&q,token);
@@ -2862,7 +2862,7 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info)
           double
             value;
 
-          value=StringToDouble(s,&t);
+          value=LocaleToDouble(s,&t);
           (void) value;
           if (s == t)
             {
@@ -3504,11 +3504,11 @@ MagickExport MagickBooleanType DrawPatternPath(Image *image,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(draw_info != (const DrawInfo *) NULL);
   assert(name != (const char *) NULL);
-  (void) FormatMagickString(property,MaxTextExtent,"%s",name);
+  (void) FormatLocaleString(property,MaxTextExtent,"%s",name);
   path=GetImageArtifact(image,property);
   if (path == (const char *) NULL)
     return(MagickFalse);
-  (void) FormatMagickString(property,MaxTextExtent,"%s-geometry",name);
+  (void) FormatLocaleString(property,MaxTextExtent,"%s-geometry",name);
   geometry=GetImageArtifact(image,property);
   if (geometry == (const char *) NULL)
     return(MagickFalse);
@@ -4397,7 +4397,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
         break;
       clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info);
       (void) CloneString(&clone_info->text,primitive_info->text);
-      (void) FormatMagickString(geometry,MaxTextExtent,"%+f%+f",
+      (void) FormatLocaleString(geometry,MaxTextExtent,"%+f%+f",
         primitive_info->point.x,primitive_info->point.y);
       (void) CloneString(&clone_info->geometry,geometry);
       status=AnnotateImage(image,clone_info);
@@ -4453,7 +4453,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
           /*
             Resize image.
           */
-          (void) FormatMagickString(geometry,MaxTextExtent,"%gx%g!",
+          (void) FormatLocaleString(geometry,MaxTextExtent,"%gx%g!",
             primitive_info[1].point.x,primitive_info[1].point.y);
           composite_image->filter=image->filter;
           (void) TransformImage(&composite_image,(char *) NULL,geometry);
@@ -4466,7 +4466,7 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
       image->gravity=draw_info->gravity;
       geometry.x=x;
       geometry.y=y;
-      (void) FormatMagickString(composite_geometry,MaxTextExtent,
+      (void) FormatLocaleString(composite_geometry,MaxTextExtent,
         "%.20gx%.20g%+.20g%+.20g",(double) composite_image->columns,(double)
         composite_image->rows,(double) geometry.x,(double) geometry.y);
       (void) ParseGravityGeometry(image,composite_geometry,&geometry,
@@ -4759,14 +4759,14 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
     (void) CloneString(&draw_info->encoding,option);
   option=GetImageOption(clone_info,"kerning");
   if (option != (const char *) NULL)
-    draw_info->kerning=StringToDouble(option,(char **) NULL);
+    draw_info->kerning=LocaleToDouble(option,(char **) NULL);
   option=GetImageOption(clone_info,"interline-spacing");
   if (option != (const char *) NULL)
-    draw_info->interline_spacing=StringToDouble(option,(char **) NULL);
+    draw_info->interline_spacing=LocaleToDouble(option,(char **) NULL);
   draw_info->direction=UndefinedDirection;
   option=GetImageOption(clone_info,"interword-spacing");
   if (option != (const char *) NULL)
-    draw_info->interword_spacing=StringToDouble(option,(char **) NULL);
+    draw_info->interword_spacing=LocaleToDouble(option,(char **) NULL);
   option=GetImageOption(clone_info,"direction");
   if (option != (const char *) NULL)
     draw_info->direction=(DirectionType) ParseCommandOption(
@@ -4779,7 +4779,7 @@ MagickExport void GetDrawInfo(const ImageInfo *image_info,DrawInfo *draw_info)
     (void) QueryColorDatabase(option,&draw_info->stroke,exception);
   option=GetImageOption(clone_info,"strokewidth");
   if (option != (const char *) NULL)
-    draw_info->stroke_width=StringToDouble(option,(char **) NULL);
+    draw_info->stroke_width=LocaleToDouble(option,(char **) NULL);
   option=GetImageOption(clone_info,"undercolor");
   if (option != (const char *) NULL)
     (void) QueryColorDatabase(option,&draw_info->undercolor,exception);
@@ -5256,15 +5256,15 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          arc.x=StringToDouble(token,(char **) NULL);
+          arc.x=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          arc.y=StringToDouble(token,(char **) NULL);
+          arc.y=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          angle=StringToDouble(token,(char **) NULL);
+          angle=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
@@ -5276,11 +5276,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=StringToDouble(token,(char **) NULL);
+          x=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=StringToDouble(token,(char **) NULL);
+          y=LocaleToDouble(token,(char **) NULL);
           end.x=(double) (attribute == (int) 'A' ? x : point.x+x);
           end.y=(double) (attribute == (int) 'A' ? y : point.y+y);
           TraceArcPath(q,point,end,arc,angle,large_arc,sweep);
@@ -5303,11 +5303,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=StringToDouble(token,(char **) NULL);
+            x=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=StringToDouble(token,(char **) NULL);
+            y=LocaleToDouble(token,(char **) NULL);
             end.x=(double) (attribute == (int) 'C' ? x : point.x+x);
             end.y=(double) (attribute == (int) 'C' ? y : point.y+y);
             points[i]=end;
@@ -5328,7 +5328,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=StringToDouble(token,(char **) NULL);
+          x=LocaleToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'H' ? x: point.x+x);
           TracePoint(q,point);
           q+=q->coordinates;
@@ -5343,11 +5343,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=StringToDouble(token,(char **) NULL);
+          x=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=StringToDouble(token,(char **) NULL);
+          y=LocaleToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'L' ? x : point.x+x);
           point.y=(double) (attribute == (int) 'L' ? y : point.y+y);
           TracePoint(q,point);
@@ -5370,11 +5370,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          x=StringToDouble(token,(char **) NULL);
+          x=LocaleToDouble(token,(char **) NULL);
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=StringToDouble(token,(char **) NULL);
+          y=LocaleToDouble(token,(char **) NULL);
           point.x=(double) (attribute == (int) 'M' ? x : point.x+x);
           point.y=(double) (attribute == (int) 'M' ? y : point.y+y);
           if (i == 0)
@@ -5404,11 +5404,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=StringToDouble(token,(char **) NULL);
+            x=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=StringToDouble(token,(char **) NULL);
+            y=LocaleToDouble(token,(char **) NULL);
             if (*p == ',')
               p++;
             end.x=(double) (attribute == (int) 'Q' ? x : point.x+x);
@@ -5439,11 +5439,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=StringToDouble(token,(char **) NULL);
+            x=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=StringToDouble(token,(char **) NULL);
+            y=LocaleToDouble(token,(char **) NULL);
             if (*p == ',')
               p++;
             end.x=(double) (attribute == (int) 'S' ? x : point.x+x);
@@ -5479,11 +5479,11 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            x=StringToDouble(token,(char **) NULL);
+            x=LocaleToDouble(token,(char **) NULL);
             GetMagickToken(p,&p,token);
             if (*token == ',')
               GetMagickToken(p,&p,token);
-            y=StringToDouble(token,(char **) NULL);
+            y=LocaleToDouble(token,(char **) NULL);
             end.x=(double) (attribute == (int) 'T' ? x : point.x+x);
             end.y=(double) (attribute == (int) 'T' ? y : point.y+y);
             points[i]=end;
@@ -5509,7 +5509,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
           GetMagickToken(p,&p,token);
           if (*token == ',')
             GetMagickToken(p,&p,token);
-          y=StringToDouble(token,(char **) NULL);
+          y=LocaleToDouble(token,(char **) NULL);
           point.y=(double) (attribute == (int) 'V' ? y : point.y+y);
           TracePoint(q,point);
           q+=q->coordinates;
@@ -5531,7 +5531,7 @@ static size_t TracePath(PrimitiveInfo *primitive_info,const char *path)
       default:
       {
         if (isalpha((int) ((unsigned char) attribute)) != 0)
-          (void) fprintf(stderr,"attribute not recognized: %c\n",attribute);
+          (void) FormatLocaleFile(stderr,"attribute not recognized: %c\n",attribute);
         break;
       }
     }
index a028c9e238225344a32945fafb508b6745ab1551..36dc41029e36e927f96e0030ab6ebeab5a2255b6 100644 (file)
@@ -888,9 +888,9 @@ MagickExport Image *BlurImageChannel(const Image *image,
       for (i=0; i < (ssize_t) width; i++)
       {
         *message='\0';
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) i);
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g: ",(double) i);
         (void) ConcatenateString(&message,format);
-        (void) FormatMagickString(format,MaxTextExtent,"%g ",*k++);
+        (void) FormatLocaleString(format,MaxTextExtent,"%g ",*k++);
         (void) ConcatenateString(&message,format);
         (void) LogMagickEvent(TransformEvent,GetMagickModule(),"%s",message);
       }
@@ -1394,11 +1394,11 @@ MagickExport Image *ConvolveImageChannel(const Image *image,
       for (v=0; v < (ssize_t) width; v++)
       {
         *message='\0';
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g: ",(double) v);
         (void) ConcatenateString(&message,format);
         for (u=0; u < (ssize_t) width; u++)
         {
-          (void) FormatMagickString(format,MaxTextExtent,"%g ",*k++);
+          (void) FormatLocaleString(format,MaxTextExtent,"%g ",*k++);
           (void) ConcatenateString(&message,format);
         }
         (void) LogMagickEvent(TransformEvent,GetMagickModule(),"%s",message);
@@ -2209,11 +2209,11 @@ MagickExport Image *FilterImageChannel(const Image *image,
       for (v=0; v < (ssize_t) kernel->height; v++)
       {
         *message='\0';
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g: ",(double) v);
         (void) ConcatenateString(&message,format);
         for (u=0; u < (ssize_t) kernel->width; u++)
         {
-          (void) FormatMagickString(format,MaxTextExtent,"%g ",*k++);
+          (void) FormatLocaleString(format,MaxTextExtent,"%g ",*k++);
           (void) ConcatenateString(&message,format);
         }
         (void) LogMagickEvent(TransformEvent,GetMagickModule(),"%s",message);
@@ -2962,14 +2962,14 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
       {
         degrees+=45.0;
         preview_image=RotateImage(thumbnail,degrees,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"rotate %g",degrees);
+        (void) FormatLocaleString(label,MaxTextExtent,"rotate %g",degrees);
         break;
       }
       case ShearPreview:
       {
         degrees+=5.0;
         preview_image=ShearImage(thumbnail,degrees,degrees,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"shear %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"shear %gx%g",
           degrees,2.0*degrees);
         break;
       }
@@ -2978,7 +2978,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         x=(ssize_t) ((i+1)*thumbnail->columns)/NumberTiles;
         y=(ssize_t) ((i+1)*thumbnail->rows)/NumberTiles;
         preview_image=RollImage(thumbnail,x,y,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"roll %+.20gx%+.20g",
+        (void) FormatLocaleString(label,MaxTextExtent,"roll %+.20gx%+.20g",
           (double) x,(double) y);
         break;
       }
@@ -2987,10 +2987,10 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
         if (preview_image == (Image *) NULL)
           break;
-        (void) FormatMagickString(factor,MaxTextExtent,"100,100,%g",
+        (void) FormatLocaleString(factor,MaxTextExtent,"100,100,%g",
           2.0*percentage);
         (void) ModulateImage(preview_image,factor);
-        (void) FormatMagickString(label,MaxTextExtent,"modulate %s",factor);
+        (void) FormatLocaleString(label,MaxTextExtent,"modulate %s",factor);
         break;
       }
       case SaturationPreview:
@@ -2998,10 +2998,10 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
         if (preview_image == (Image *) NULL)
           break;
-        (void) FormatMagickString(factor,MaxTextExtent,"100,%g",
+        (void) FormatLocaleString(factor,MaxTextExtent,"100,%g",
           2.0*percentage);
         (void) ModulateImage(preview_image,factor);
-        (void) FormatMagickString(label,MaxTextExtent,"modulate %s",factor);
+        (void) FormatLocaleString(label,MaxTextExtent,"modulate %s",factor);
         break;
       }
       case BrightnessPreview:
@@ -3009,9 +3009,9 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         preview_image=CloneImage(thumbnail,0,0,MagickTrue,exception);
         if (preview_image == (Image *) NULL)
           break;
-        (void) FormatMagickString(factor,MaxTextExtent,"%g",2.0*percentage);
+        (void) FormatLocaleString(factor,MaxTextExtent,"%g",2.0*percentage);
         (void) ModulateImage(preview_image,factor);
-        (void) FormatMagickString(label,MaxTextExtent,"modulate %s",factor);
+        (void) FormatLocaleString(label,MaxTextExtent,"modulate %s",factor);
         break;
       }
       case GammaPreview:
@@ -3022,7 +3022,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
           break;
         gamma+=0.4f;
         (void) GammaImageChannel(preview_image,DefaultChannels,gamma);
-        (void) FormatMagickString(label,MaxTextExtent,"gamma %g",gamma);
+        (void) FormatLocaleString(label,MaxTextExtent,"gamma %g",gamma);
         break;
       }
       case SpiffPreview:
@@ -3031,7 +3031,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         if (preview_image != (Image *) NULL)
           for (x=0; x < i; x++)
             (void) ContrastImage(preview_image,MagickTrue);
-        (void) FormatMagickString(label,MaxTextExtent,"contrast (%.20g)",
+        (void) FormatLocaleString(label,MaxTextExtent,"contrast (%.20g)",
           (double) i+1);
         break;
       }
@@ -3042,7 +3042,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
           break;
         for (x=0; x < i; x++)
           (void) ContrastImage(preview_image,MagickFalse);
-        (void) FormatMagickString(label,MaxTextExtent,"+contrast (%.20g)",
+        (void) FormatLocaleString(label,MaxTextExtent,"+contrast (%.20g)",
           (double) i+1);
         break;
       }
@@ -3055,7 +3055,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         quantize_info.number_colors=colors;
         quantize_info.colorspace=GRAYColorspace;
         (void) QuantizeImage(&quantize_info,preview_image);
-        (void) FormatMagickString(label,MaxTextExtent,
+        (void) FormatLocaleString(label,MaxTextExtent,
           "-colorspace gray -colors %.20g",(double) colors);
         break;
       }
@@ -3067,7 +3067,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         colors<<=1;
         quantize_info.number_colors=colors;
         (void) QuantizeImage(&quantize_info,preview_image);
-        (void) FormatMagickString(label,MaxTextExtent,"colors %.20g",(double)
+        (void) FormatLocaleString(label,MaxTextExtent,"colors %.20g",(double)
           colors);
         break;
       }
@@ -3084,7 +3084,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         preview_image=DespeckleImage(thumbnail,exception);
         if (preview_image == (Image *) NULL)
           break;
-        (void) FormatMagickString(label,MaxTextExtent,"despeckle (%.20g)",
+        (void) FormatLocaleString(label,MaxTextExtent,"despeckle (%.20g)",
           (double) i+1);
         break;
       }
@@ -3092,7 +3092,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
       {
         preview_image=StatisticImage(thumbnail,NonpeakStatistic,(size_t) radius,
           (size_t) radius,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"noise %g",radius);
+        (void) FormatLocaleString(label,MaxTextExtent,"noise %g",radius);
         break;
       }
       case AddNoisePreview:
@@ -3137,20 +3137,20 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         }
         preview_image=StatisticImage(thumbnail,NonpeakStatistic,(size_t) i,
           (size_t) i,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"+noise %s",factor);
+        (void) FormatLocaleString(label,MaxTextExtent,"+noise %s",factor);
         break;
       }
       case SharpenPreview:
       {
         preview_image=SharpenImage(thumbnail,radius,sigma,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"sharpen %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"sharpen %gx%g",
           radius,sigma);
         break;
       }
       case BlurPreview:
       {
         preview_image=BlurImage(thumbnail,radius,sigma,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"blur %gx%g",radius,
+        (void) FormatLocaleString(label,MaxTextExtent,"blur %gx%g",radius,
           sigma);
         break;
       }
@@ -3161,20 +3161,20 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
           break;
         (void) BilevelImage(thumbnail,
           (double) (percentage*((MagickRealType) QuantumRange+1.0))/100.0);
-        (void) FormatMagickString(label,MaxTextExtent,"threshold %g",
+        (void) FormatLocaleString(label,MaxTextExtent,"threshold %g",
           (double) (percentage*((MagickRealType) QuantumRange+1.0))/100.0);
         break;
       }
       case EdgeDetectPreview:
       {
         preview_image=EdgeImage(thumbnail,radius,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"edge %g",radius);
+        (void) FormatLocaleString(label,MaxTextExtent,"edge %g",radius);
         break;
       }
       case SpreadPreview:
       {
         preview_image=SpreadImage(thumbnail,radius,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"spread %g",
+        (void) FormatLocaleString(label,MaxTextExtent,"spread %g",
           radius+0.5);
         break;
       }
@@ -3185,7 +3185,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
           break;
         (void) SolarizeImage(preview_image,(double) QuantumRange*
           percentage/100.0);
-        (void) FormatMagickString(label,MaxTextExtent,"solarize %g",
+        (void) FormatLocaleString(label,MaxTextExtent,"solarize %g",
           (QuantumRange*percentage)/100.0);
         break;
       }
@@ -3194,7 +3194,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         degrees+=10.0;
         preview_image=ShadeImage(thumbnail,MagickTrue,degrees,degrees,
           exception);
-        (void) FormatMagickString(label,MaxTextExtent,"shade %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"shade %gx%g",
           degrees,degrees);
         break;
       }
@@ -3208,7 +3208,7 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         geometry.x=i/2;
         geometry.y=i/2;
         (void) RaiseImage(preview_image,&geometry,MagickTrue);
-        (void) FormatMagickString(label,MaxTextExtent,
+        (void) FormatLocaleString(label,MaxTextExtent,
           "raise %.20gx%.20g%+.20g%+.20g",(double) geometry.width,(double)
           geometry.height,(double) geometry.x,(double) geometry.y);
         break;
@@ -3221,14 +3221,14 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         threshold+=0.4f;
         (void) SegmentImage(preview_image,RGBColorspace,MagickFalse,threshold,
           threshold);
-        (void) FormatMagickString(label,MaxTextExtent,"segment %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"segment %gx%g",
           threshold,threshold);
         break;
       }
       case SwirlPreview:
       {
         preview_image=SwirlImage(thumbnail,degrees,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"swirl %g",degrees);
+        (void) FormatLocaleString(label,MaxTextExtent,"swirl %g",degrees);
         degrees+=45.0;
         break;
       }
@@ -3236,28 +3236,28 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
       {
         degrees+=0.1f;
         preview_image=ImplodeImage(thumbnail,degrees,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"implode %g",degrees);
+        (void) FormatLocaleString(label,MaxTextExtent,"implode %g",degrees);
         break;
       }
       case WavePreview:
       {
         degrees+=5.0f;
         preview_image=WaveImage(thumbnail,0.5*degrees,2.0*degrees,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"wave %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"wave %gx%g",
           0.5*degrees,2.0*degrees);
         break;
       }
       case OilPaintPreview:
       {
         preview_image=OilPaintImage(thumbnail,(double) radius,exception);
-        (void) FormatMagickString(label,MaxTextExtent,"paint %g",radius);
+        (void) FormatLocaleString(label,MaxTextExtent,"paint %g",radius);
         break;
       }
       case CharcoalDrawingPreview:
       {
         preview_image=CharcoalImage(thumbnail,(double) radius,(double) sigma,
           exception);
-        (void) FormatMagickString(label,MaxTextExtent,"charcoal %gx%g",
+        (void) FormatLocaleString(label,MaxTextExtent,"charcoal %gx%g",
           radius,sigma);
         break;
       }
@@ -3276,12 +3276,12 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
         if (preview_image == (Image *) NULL)
           break;
         preview_info->quality=(size_t) percentage;
-        (void) FormatMagickString(factor,MaxTextExtent,"%.20g",(double)
+        (void) FormatLocaleString(factor,MaxTextExtent,"%.20g",(double)
           preview_info->quality);
         file=AcquireUniqueFileResource(filename);
         if (file != -1)
           file=close(file)-1;
-        (void) FormatMagickString(preview_image->filename,MaxTextExtent,
+        (void) FormatLocaleString(preview_image->filename,MaxTextExtent,
           "jpeg:%s",filename);
         status=WriteImage(preview_info,preview_image);
         if (status != MagickFalse)
@@ -3300,16 +3300,16 @@ MagickExport Image *PreviewImage(const Image *image,const PreviewType preview,
           }
         (void) RelinquishUniqueFileResource(preview_image->filename);
         if ((GetBlobSize(preview_image)/1024) >= 1024)
-          (void) FormatMagickString(label,MaxTextExtent,"quality %s\n%gmb ",
+          (void) FormatLocaleString(label,MaxTextExtent,"quality %s\n%gmb ",
             factor,(double) ((MagickOffsetType) GetBlobSize(preview_image))/
             1024.0/1024.0);
         else
           if (GetBlobSize(preview_image) >= 1024)
-            (void) FormatMagickString(label,MaxTextExtent,
+            (void) FormatLocaleString(label,MaxTextExtent,
               "quality %s\n%gkb ",factor,(double) ((MagickOffsetType)
               GetBlobSize(preview_image))/1024.0);
           else
-            (void) FormatMagickString(label,MaxTextExtent,"quality %s\n%.20gb ",
+            (void) FormatLocaleString(label,MaxTextExtent,"quality %s\n%.20gb ",
               factor,(double) GetBlobSize(thumbnail));
         break;
       }
@@ -3798,11 +3798,11 @@ MagickExport Image *SelectiveBlurImageChannel(const Image *image,
       for (v=0; v < (ssize_t) width; v++)
       {
         *message='\0';
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g: ",(double) v);
         (void) ConcatenateString(&message,format);
         for (u=0; u < (ssize_t) width; u++)
         {
-          (void) FormatMagickString(format,MaxTextExtent,"%+f ",*k++);
+          (void) FormatLocaleString(format,MaxTextExtent,"%+f ",*k++);
           (void) ConcatenateString(&message,format);
         }
         (void) LogMagickEvent(TransformEvent,GetMagickModule(),"%s",message);
index 81732adde4796ae6658fdf52f561dbe7b7142bbb..b375a931e8b5532525a62c2ee415d13bbbff4896 100644 (file)
@@ -454,9 +454,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
               GetMagickToken(p,&p,token);
             switch (i)
             {
-              case 0: color_correction.red.slope=StringToDouble(token,(char **) NULL); break;
-              case 1: color_correction.green.slope=StringToDouble(token,(char **) NULL); break;
-              case 2: color_correction.blue.slope=StringToDouble(token,(char **) NULL); break;
+              case 0: color_correction.red.slope=LocaleToDouble(token,(char **) NULL); break;
+              case 1: color_correction.green.slope=LocaleToDouble(token,(char **) NULL); break;
+              case 2: color_correction.blue.slope=LocaleToDouble(token,(char **) NULL); break;
             }
           }
         }
@@ -472,9 +472,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
               GetMagickToken(p,&p,token);
             switch (i)
             {
-              case 0: color_correction.red.offset=StringToDouble(token,(char **) NULL); break;
-              case 1: color_correction.green.offset=StringToDouble(token,(char **) NULL); break;
-              case 2: color_correction.blue.offset=StringToDouble(token,(char **) NULL); break;
+              case 0: color_correction.red.offset=LocaleToDouble(token,(char **) NULL); break;
+              case 1: color_correction.green.offset=LocaleToDouble(token,(char **) NULL); break;
+              case 2: color_correction.blue.offset=LocaleToDouble(token,(char **) NULL); break;
             }
           }
         }
@@ -490,9 +490,9 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
               GetMagickToken(p,&p,token);
             switch (i)
             {
-              case 0: color_correction.red.power=StringToDouble(token,(char **) NULL); break;
-              case 1: color_correction.green.power=StringToDouble(token,(char **) NULL); break;
-              case 2: color_correction.blue.power=StringToDouble(token,(char **) NULL); break;
+              case 0: color_correction.red.power=LocaleToDouble(token,(char **) NULL); break;
+              case 1: color_correction.green.power=LocaleToDouble(token,(char **) NULL); break;
+              case 2: color_correction.blue.power=LocaleToDouble(token,(char **) NULL); break;
             }
           }
         }
@@ -509,7 +509,7 @@ MagickExport MagickBooleanType ColorDecisionListImage(Image *image,
           content=GetXMLTreeContent(saturation);
           p=(const char *) content;
           GetMagickToken(p,&p,token);
-          color_correction.saturation=StringToDouble(token,(char **) NULL);
+          color_correction.saturation=LocaleToDouble(token,(char **) NULL);
         }
     }
   ccc=DestroyXMLTree(ccc);
index 09ad1cfcdb9dd26156f7050f5cb899eac7382cae..57dc25ea6836fb99fa9de8cb9ca39fd8cf2f71e5 100644 (file)
@@ -258,10 +258,10 @@ static void DefaultErrorHandler(const ExceptionType magick_unused(severity),
 {
   if (reason == (char *) NULL)
     return;
-  (void) fprintf(stderr,"%s: %s",GetClientName(),reason);
+  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
   if (description != (char *) NULL)
-    (void) fprintf(stderr," (%s)",description);
-  (void) fprintf(stderr,".\n");
+    (void) FormatLocaleFile(stderr," (%s)",description);
+  (void) FormatLocaleFile(stderr,".\n");
   (void) fflush(stderr);
 }
 \f
@@ -300,10 +300,10 @@ static void DefaultFatalErrorHandler(
 {
   if (reason == (char *) NULL)
     return;
-  (void) fprintf(stderr,"%s: %s",GetClientName(),reason);
+  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
   if (description != (char *) NULL)
-    (void) fprintf(stderr," (%s)",description);
-  (void) fprintf(stderr,".\n");
+    (void) FormatLocaleFile(stderr," (%s)",description);
+  (void) FormatLocaleFile(stderr,".\n");
   (void) fflush(stderr);
   MagickCoreTerminus();
   exit(1);
@@ -342,10 +342,10 @@ static void DefaultWarningHandler(const ExceptionType magick_unused(severity),
 {
   if (reason == (char *) NULL)
     return;
-  (void) fprintf(stderr,"%s: %s",GetClientName(),reason);
+  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
   if (description != (char *) NULL)
-    (void) fprintf(stderr," (%s)",description);
-  (void) fprintf(stderr,".\n");
+    (void) FormatLocaleFile(stderr," (%s)",description);
+  (void) FormatLocaleFile(stderr,".\n");
   (void) fflush(stderr);
 }
 \f
@@ -573,7 +573,7 @@ MagickExport const char *GetLocaleExceptionMessage(const ExceptionType severity,
     *locale_message;
 
   assert(tag != (const char *) NULL);
-  (void) FormatMagickString(message,MaxTextExtent,"Exception/%s%s",
+  (void) FormatLocaleString(message,MaxTextExtent,"Exception/%s%s",
     ExceptionSeverityToTag(severity),tag);
   locale_message=GetLocaleMessage(message);
   if (locale_message == (const char *) NULL)
@@ -981,7 +981,7 @@ MagickExport MagickBooleanType ThrowMagickExceptionList(
     type="error";
   if (severity >= FatalErrorException)
     type="fatal";
-  (void) FormatMagickString(message,MaxTextExtent,"%s @ %s/%s/%s/%.20g",reason,
+  (void) FormatLocaleString(message,MaxTextExtent,"%s @ %s/%s/%s/%.20g",reason,
     type,path,function,(double) line);
   (void) ThrowException(exception,severity,message,(char *) NULL);
   return(status);
index 1dc1e18f9fe771fe8bcd0327c1df9a0f89611182..f186d35c2da5fde19d901cd0bd963cf4018921c4 100644 (file)
@@ -340,7 +340,7 @@ MagickExport Image *AddNoiseImageChannel(const Image *image,
   attenuate=1.0;
   option=GetImageArtifact(image,"attenuate");
   if (option != (char *) NULL)
-    attenuate=StringToDouble(option,(char **) NULL);
+    attenuate=LocaleToDouble(option,(char **) NULL);
   status=MagickTrue;
   progress=0;
   random_info=AcquireRandomInfoThreadSet();
@@ -929,11 +929,11 @@ MagickExport Image *ColorMatrixImage(const Image *image,
       for (v=0; v < 6; v++)
       {
         *message='\0';
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g: ",(double) v);
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g: ",(double) v);
         (void) ConcatenateString(&message,format);
         for (u=0; u < 6; u++)
         {
-          (void) FormatMagickString(format,MaxTextExtent,"%+f ",
+          (void) FormatLocaleString(format,MaxTextExtent,"%+f ",
             ColorMatrix[v][u]);
           (void) ConcatenateString(&message,format);
         }
@@ -1161,11 +1161,11 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
       case 'k': channel=BlackChannel; break;
       default: break;
     }
-  (void) FormatMagickString(key,MaxTextExtent,"%p.%.20g.%s",(void *) image,
+  (void) FormatLocaleString(key,MaxTextExtent,"%p.%.20g.%s",(void *) image,
     (double) channel,symbol);
   value=(const char *) GetValueFromSplayTree(fx_info->symbols,key);
   if (value != (const char *) NULL)
-    return(QuantumScale*StringToDouble(value,(char **) NULL));
+    return(QuantumScale*LocaleToDouble(value,(char **) NULL));
   (void) DeleteNodeFromSplayTree(fx_info->symbols,key);
   if (LocaleNCompare(symbol,"depth",5) == 0)
     {
@@ -1173,7 +1173,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
         depth;
 
       depth=GetImageChannelDepth(image,channel,exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%.20g",(double)
         depth);
     }
   if (LocaleNCompare(symbol,"kurtosis",8) == 0)
@@ -1184,7 +1184,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
 
       (void) GetImageChannelKurtosis(image,channel,&kurtosis,&skewness,
         exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",kurtosis);
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",kurtosis);
     }
   if (LocaleNCompare(symbol,"maxima",6) == 0)
     {
@@ -1193,7 +1193,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
         minima;
 
       (void) GetImageChannelRange(image,channel,&minima,&maxima,exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",maxima);
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",maxima);
     }
   if (LocaleNCompare(symbol,"mean",4) == 0)
     {
@@ -1203,7 +1203,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
 
       (void) GetImageChannelMean(image,channel,&mean,&standard_deviation,
         exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",mean);
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",mean);
     }
   if (LocaleNCompare(symbol,"minima",6) == 0)
     {
@@ -1212,7 +1212,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
         minima;
 
       (void) GetImageChannelRange(image,channel,&minima,&maxima,exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",minima);
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",minima);
     }
   if (LocaleNCompare(symbol,"skewness",8) == 0)
     {
@@ -1222,7 +1222,7 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
 
       (void) GetImageChannelKurtosis(image,channel,&kurtosis,&skewness,
         exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",skewness);
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",skewness);
     }
   if (LocaleNCompare(symbol,"standard_deviation",18) == 0)
     {
@@ -1232,12 +1232,12 @@ static MagickRealType FxChannelStatistics(FxInfo *fx_info,const Image *image,
 
       (void) GetImageChannelMean(image,channel,&mean,&standard_deviation,
         exception);
-      (void) FormatMagickString(statistic,MaxTextExtent,"%g",
+      (void) FormatLocaleString(statistic,MaxTextExtent,"%g",
         standard_deviation);
     }
   (void) AddValueToSplayTree(fx_info->symbols,ConstantString(key),
     ConstantString(statistic));
-  return(QuantumScale*StringToDouble(statistic,(char **) NULL));
+  return(QuantumScale*LocaleToDouble(statistic,(char **) NULL));
 }
 
 static MagickRealType
@@ -1849,7 +1849,7 @@ static MagickRealType FxGetSymbol(FxInfo *fx_info,const ChannelType channel,
   }
   value=(const char *) GetValueFromSplayTree(fx_info->symbols,symbol);
   if (value != (const char *) NULL)
-    return((MagickRealType) StringToDouble(value,(char **) NULL));
+    return((MagickRealType) LocaleToDouble(value,(char **) NULL));
   (void) ThrowMagickException(exception,GetMagickModule(),OptionError,
     "UnableToParseExpression","`%s'",symbol);
   return(0.0);
@@ -2279,7 +2279,7 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info,
             }
           ClearMagickException(exception);
           *beta=FxEvaluateSubexpression(fx_info,channel,x,y,++p,beta,exception);
-          (void) FormatMagickString(numeric,MaxTextExtent,"%g",(double)
+          (void) FormatLocaleString(numeric,MaxTextExtent,"%g",(double)
             *beta);
           (void) DeleteNodeFromSplayTree(fx_info->symbols,subexpression);
           (void) AddValueToSplayTree(fx_info->symbols,ConstantString(
@@ -2451,7 +2451,7 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info,
           if (strlen(subexpression) > 1)
             subexpression[strlen(subexpression)-1]='\0';
           if (fx_info->file != (FILE *) NULL)
-            (void) fprintf(fx_info->file,"%s[%.20g,%.20g].%s: %s=%.*g\n",
+            (void) FormatLocaleFile(fx_info->file,"%s[%.20g,%.20g].%s: %s=%.*g\n",
               fx_info->images->filename,(double) x,(double) y,type,
               subexpression,GetMagickPrecision(),(double) alpha);
           return(0.0);
@@ -2777,7 +2777,7 @@ static MagickRealType FxEvaluateSubexpression(FxInfo *fx_info,
       break;
   }
   q=(char *) expression;
-  alpha=StringToDouble(expression,&q);
+  alpha=LocaleToDouble(expression,&q);
   if (q == expression)
     return(FxGetSymbol(fx_info,channel,x,y,expression,exception));
   return(alpha);
@@ -3852,7 +3852,7 @@ MagickExport Image *PolaroidImage(const Image *image,const DrawInfo *draw_info,
           caption_image->background_color=image->border_color;
           (void) SetImageBackgroundColor(caption_image);
           (void) CloneString(&annotate_info->text,caption);
-          (void) FormatMagickString(geometry,MaxTextExtent,"+0+%g",
+          (void) FormatLocaleString(geometry,MaxTextExtent,"+0+%g",
             metrics.ascent);
           if (annotate_info->gravity == UndefinedGravity)
             (void) CloneString(&annotate_info->geometry,AcquireString(
@@ -5273,7 +5273,7 @@ MagickExport Image *VignetteImage(const Image *image,const double radius,
   draw_info=CloneDrawInfo((const ImageInfo *) NULL,(const DrawInfo *) NULL);
   (void) QueryColorDatabase("#ffffff",&draw_info->fill,exception);
   (void) QueryColorDatabase("#ffffff",&draw_info->stroke,exception);
-  (void) FormatMagickString(ellipse,MaxTextExtent,
+  (void) FormatLocaleString(ellipse,MaxTextExtent,
     "ellipse %g,%g,%g,%g,0.0,360.0",image->columns/2.0,
     image->rows/2.0,image->columns/2.0-x,image->rows/2.0-y);
   draw_info->primitive=AcquireString(ellipse);
index e75303ab3813bb7b03f8a2f252250d69598c64ef..30ed8adc6a9deb1acfc598aa4c33cd1f814ad4d0 100644 (file)
@@ -188,7 +188,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
   if (*p == '\0')
     return(flags);
   q=p;
-  value=StringToDouble(p,&q);
+  value=LocaleToDouble(p,&q);
   (void) value;
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
@@ -201,7 +201,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
       if (LocaleNCompare(p,"0x",2) == 0)
         *width=(size_t) strtol(p,&p,10);
       else
-        *width=(size_t) floor(StringToDouble(p,&p)+0.5);
+        *width=(size_t) floor(LocaleToDouble(p,&p)+0.5);
       if (p != q)
         flags|=WidthValue;
     }
@@ -214,7 +214,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
             Parse height.
           */
           q=p;
-          *height=(size_t) floor(StringToDouble(p,&p)+0.5);
+          *height=(size_t) floor(LocaleToDouble(p,&p)+0.5);
           if (p != q)
             flags|=HeightValue;
         }
@@ -227,7 +227,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
       if (*p == '-')
         flags|=XNegative;
       q=p;
-      *x=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
+      *x=(ssize_t) ceil(LocaleToDouble(p,&p)-0.5);
       if (p != q)
         flags|=XValue;
       if ((*p == '+') || (*p == '-'))
@@ -238,7 +238,7 @@ MagickExport MagickStatusType GetGeometry(const char *geometry,ssize_t *x,
           if (*p == '-')
             flags|=YNegative;
           q=p;
-          *y=(ssize_t) ceil(StringToDouble(p,&p)-0.5);
+          *y=(ssize_t) ceil(LocaleToDouble(p,&p)-0.5);
           if (p != q)
             flags|=YValue;
         }
@@ -553,7 +553,7 @@ MagickExport MagickBooleanType IsSceneGeometry(const char *geometry,
   if (geometry == (const char *) NULL)
     return(MagickFalse);
   p=(char *) geometry;
-  value=StringToDouble(geometry,&p);
+  value=LocaleToDouble(geometry,&p);
   (void) value;
   if (p == geometry)
     return(MagickFalse);
@@ -662,12 +662,12 @@ MagickExport MagickStatusType ParseAffineGeometry(const char *geometry,
       GetMagickToken(p,&p,token);
     switch (i)
     {
-      case 0: affine_matrix->sx=StringToDouble(token,(char **) NULL); break;
-      case 1: affine_matrix->rx=StringToDouble(token,(char **) NULL); break;
-      case 2: affine_matrix->ry=StringToDouble(token,(char **) NULL); break;
-      case 3: affine_matrix->sy=StringToDouble(token,(char **) NULL); break;
-      case 4: affine_matrix->tx=StringToDouble(token,(char **) NULL); flags|=XValue; break;
-      case 5: affine_matrix->ty=StringToDouble(token,(char **) NULL); flags|=YValue; break;
+      case 0: affine_matrix->sx=LocaleToDouble(token,(char **) NULL); break;
+      case 1: affine_matrix->rx=LocaleToDouble(token,(char **) NULL); break;
+      case 2: affine_matrix->ry=LocaleToDouble(token,(char **) NULL); break;
+      case 3: affine_matrix->sy=LocaleToDouble(token,(char **) NULL); break;
+      case 4: affine_matrix->tx=LocaleToDouble(token,(char **) NULL); flags|=XValue; break;
+      case 5: affine_matrix->ty=LocaleToDouble(token,(char **) NULL); flags|=YValue; break;
     }
   }
   determinant=(affine_matrix->sx*affine_matrix->sy-affine_matrix->rx*
@@ -824,7 +824,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
   if (*p == '\0')
     return(flags);
   q=p;
-  value=StringToDouble(p,&q);
+  value=LocaleToDouble(p,&q);
   if (LocaleNCompare(p,"0x",2) == 0)
     value=(double) strtol(p,&q,10);
   if ((((int) *q) == -41) || (*q == 'x') || (*q == 'X') || (*q == ',') ||
@@ -837,7 +837,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       if (LocaleNCompare(p,"0x",2) == 0)
         value=(double) strtol(p,&p,10);
       else
-        value=StringToDouble(p,&p);
+        value=LocaleToDouble(p,&p);
       if (p != q)
         {
           flags|=RhoValue;
@@ -858,7 +858,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           ((*p != '+') && (*p != '-')))
         {
           q=p;
-          value=StringToDouble(p,&p);
+          value=LocaleToDouble(p,&p);
           if (p != q)
             {
               flags|=SigmaValue;
@@ -876,7 +876,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
       if ((*p == ',') || (*p == '/') || (*p == ':'))
         p++;
       q=p;
-      value=StringToDouble(p,&p);
+      value=LocaleToDouble(p,&p);
       if (p != q)
         {
           flags|=XiValue;
@@ -895,7 +895,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           if ((*p == ',') || (*p == '/') || (*p == ':'))
             p++;
           q=p;
-          value=StringToDouble(p,&p);
+          value=LocaleToDouble(p,&p);
           if (p != q)
             {
               flags|=PsiValue;
@@ -915,7 +915,7 @@ MagickExport MagickStatusType ParseGeometry(const char *geometry,
           if ((*p == ',') || (*p == '/') || (*p == ':'))
             p++;
           q=p;
-          value=StringToDouble(p,&p);
+          value=LocaleToDouble(p,&p);
           if (p != q)
             {
               flags|=ChiValue;
index 4586bcf72a735f654b159361ff4d80a47cf27921..5027c53e6a7ea228ef3474ba3dfec7248a86253a 100644 (file)
@@ -1184,8 +1184,8 @@ MagickExport size_t GetNumberColors(const Image *image,FILE *file,
     (void) ConcatenateMagickString(tuple,")",MaxTextExtent);
     (void) QueryMagickColorname(image,&pixel,SVGCompliance,color,exception);
     GetColorTuple(&pixel,MagickTrue,hex);
-    (void) fprintf(file,"%10" MagickSizeFormat,p->count);
-    (void) fprintf(file,": %s %s %s\n",tuple,hex,color);
+    (void) FormatLocaleFile(file,"%10" MagickSizeFormat,p->count);
+    (void) FormatLocaleFile(file,": %s %s %s\n",tuple,hex,color);
     if (image->progress_monitor != (MagickProgressMonitor) NULL)
       {
         MagickBooleanType
index 853541dc8de030c37b3f9d092b319ee5825882c7..7ac595eee6dc21bf8d2da94393e3e830b9d76229 100644 (file)
@@ -187,7 +187,7 @@ static int PrintChannelFeatures(FILE *file,const ChannelType channel,
   int
     status;
 
-  status=fprintf(file,FeaturesFormat,name,
+  status=FormatLocaleFile(file,FeaturesFormat,name,
     PrintFeature(channel_features[channel].angular_second_moment),
     PrintFeature(channel_features[channel].contrast),
     PrintFeature(channel_features[channel].correlation),
@@ -219,7 +219,7 @@ static int PrintChannelStatistics(FILE *file,const ChannelType channel,
 
   if (channel == AlphaChannel)
     {
-      status=fprintf(file,StatisticsFormat,name,ClampToQuantum(scale*
+      status=FormatLocaleFile(file,StatisticsFormat,name,ClampToQuantum(scale*
         (QuantumRange-channel_statistics[channel].maxima)),
         (QuantumRange-channel_statistics[channel].maxima)/(double) QuantumRange,
         ClampToQuantum(scale*(QuantumRange-channel_statistics[channel].minima)),
@@ -232,7 +232,7 @@ static int PrintChannelStatistics(FILE *file,const ChannelType channel,
         channel_statistics[channel].skewness);
       return(status);
     }
-  status=fprintf(file,StatisticsFormat,name,ClampToQuantum(scale*
+  status=FormatLocaleFile(file,StatisticsFormat,name,ClampToQuantum(scale*
     channel_statistics[channel].minima),channel_statistics[channel].minima/
     (double) QuantumRange,ClampToQuantum(scale*
     channel_statistics[channel].maxima),channel_statistics[channel].maxima/
@@ -315,59 +315,59 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       */
       if (*image->magick_filename != '\0')
         if (LocaleCompare(image->magick_filename,image->filename) != 0)
-          (void) fprintf(file,"%s=>",image->magick_filename);
+          (void) FormatLocaleFile(file,"%s=>",image->magick_filename);
        if ((GetPreviousImageInList(image) == (Image *) NULL) &&
            (GetNextImageInList(image) == (Image *) NULL) &&
            (image->scene == 0))
-        (void) fprintf(file,"%s ",image->filename);
+        (void) FormatLocaleFile(file,"%s ",image->filename);
       else
-        (void) fprintf(file,"%s[%.20g] ",image->filename,(double) image->scene);
-      (void) fprintf(file,"%s ",image->magick);
+        (void) FormatLocaleFile(file,"%s[%.20g] ",image->filename,(double) image->scene);
+      (void) FormatLocaleFile(file,"%s ",image->magick);
       if ((image->magick_columns != 0) || (image->magick_rows != 0))
         if ((image->magick_columns != image->columns) ||
             (image->magick_rows != image->rows))
-          (void) fprintf(file,"%.20gx%.20g=>",(double) image->magick_columns,
+          (void) FormatLocaleFile(file,"%.20gx%.20g=>",(double) image->magick_columns,
             (double) image->magick_rows);
-      (void) fprintf(file,"%.20gx%.20g ",(double) image->columns,(double)
+      (void) FormatLocaleFile(file,"%.20gx%.20g ",(double) image->columns,(double)
         image->rows);
       if ((image->page.width != 0) || (image->page.height != 0) ||
           (image->page.x != 0) || (image->page.y != 0))
-        (void) fprintf(file,"%.20gx%.20g%+.20g%+.20g ",(double)
+        (void) FormatLocaleFile(file,"%.20gx%.20g%+.20g%+.20g ",(double)
           image->page.width,(double) image->page.height,(double) image->page.x,
           (double) image->page.y);
-      (void) fprintf(file,"%.20g-bit ",(double) image->depth);
+      (void) FormatLocaleFile(file,"%.20g-bit ",(double) image->depth);
       if (image->type != UndefinedType)
-        (void) fprintf(file,"%s ",CommandOptionToMnemonic(MagickTypeOptions,
+        (void) FormatLocaleFile(file,"%s ",CommandOptionToMnemonic(MagickTypeOptions,
           (ssize_t) image->type));
       if (image->storage_class == DirectClass)
         {
-          (void) fprintf(file,"DirectClass ");
+          (void) FormatLocaleFile(file,"DirectClass ");
           if (image->total_colors != 0)
             {
               (void) FormatMagickSize(image->total_colors,MagickFalse,format);
-              (void) fprintf(file,"%s ",format);
+              (void) FormatLocaleFile(file,"%s ",format);
             }
         }
       else
         if (image->total_colors <= image->colors)
-          (void) fprintf(file,"PseudoClass %.20gc ",(double) image->colors);
+          (void) FormatLocaleFile(file,"PseudoClass %.20gc ",(double) image->colors);
         else
-          (void) fprintf(file,"PseudoClass %.20g=>%.20gc ",(double)
+          (void) FormatLocaleFile(file,"PseudoClass %.20g=>%.20gc ",(double)
             image->total_colors,(double) image->colors);
       if (image->error.mean_error_per_pixel != 0.0)
-        (void) fprintf(file,"%.20g/%f/%fdb ",(double)
+        (void) FormatLocaleFile(file,"%.20g/%f/%fdb ",(double)
           (image->error.mean_error_per_pixel+0.5),
           image->error.normalized_mean_error,
           image->error.normalized_maximum_error);
       if (GetBlobSize(image) != 0)
         {
           (void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
-          (void) fprintf(file,"%s ",format);
+          (void) FormatLocaleFile(file,"%s ",format);
         }
-      (void) fprintf(file,"%0.3fu %lu:%02lu.%03lu",user_time,(unsigned long)
+      (void) FormatLocaleFile(file,"%0.3fu %lu:%02lu.%03lu",user_time,(unsigned long)
         (elapsed_time/60.0),(unsigned long) floor(fmod(elapsed_time,60.0)),
         (unsigned long) (1000.0*(elapsed_time-floor(elapsed_time))));
-      (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"\n");
       (void) fflush(file);
       return(ferror(file) != 0 ? MagickFalse : MagickTrue);
     }
@@ -380,7 +380,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
   ping=pixels == (const PixelPacket *) NULL ? MagickTrue : MagickFalse;
   type=GetImageType(image,&image->exception);
   (void) SignatureImage(image);
-  (void) fprintf(file,"Image: %s\n",image->filename);
+  (void) FormatLocaleFile(file,"Image: %s\n",image->filename);
   if (*image->magick_filename != '\0')
     if (LocaleCompare(image->magick_filename,image->filename) != 0)
       {
@@ -388,45 +388,45 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
           filename[MaxTextExtent];
 
         GetPathComponent(image->magick_filename,TailPath,filename);
-        (void) fprintf(file,"  Base filename: %s\n",filename);
+        (void) FormatLocaleFile(file,"  Base filename: %s\n",filename);
       }
   magick_info=GetMagickInfo(image->magick,&image->exception);
   if ((magick_info == (const MagickInfo *) NULL) ||
       (*GetMagickDescription(magick_info) == '\0'))
-    (void) fprintf(file,"  Format: %s\n",image->magick);
+    (void) FormatLocaleFile(file,"  Format: %s\n",image->magick);
   else
-    (void) fprintf(file,"  Format: %s (%s)\n",image->magick,
+    (void) FormatLocaleFile(file,"  Format: %s (%s)\n",image->magick,
       GetMagickDescription(magick_info));
-  (void) fprintf(file,"  Class: %s\n",CommandOptionToMnemonic(MagickClassOptions,
+  (void) FormatLocaleFile(file,"  Class: %s\n",CommandOptionToMnemonic(MagickClassOptions,
     (ssize_t) image->storage_class));
-  (void) fprintf(file,"  Geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
+  (void) FormatLocaleFile(file,"  Geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
     image->columns,(double) image->rows,(double) image->tile_offset.x,(double)
     image->tile_offset.y);
   if ((image->magick_columns != 0) || (image->magick_rows != 0))
     if ((image->magick_columns != image->columns) ||
         (image->magick_rows != image->rows))
-      (void) fprintf(file,"  Base geometry: %.20gx%.20g\n",(double)
+      (void) FormatLocaleFile(file,"  Base geometry: %.20gx%.20g\n",(double)
         image->magick_columns,(double) image->magick_rows);
   if ((image->x_resolution != 0.0) && (image->y_resolution != 0.0))
     {
-      (void) fprintf(file,"  Resolution: %gx%g\n",image->x_resolution,
+      (void) FormatLocaleFile(file,"  Resolution: %gx%g\n",image->x_resolution,
         image->y_resolution);
-      (void) fprintf(file,"  Print size: %gx%g\n",(double) image->columns/
+      (void) FormatLocaleFile(file,"  Print size: %gx%g\n",(double) image->columns/
         image->x_resolution,(double) image->rows/image->y_resolution);
     }
-  (void) fprintf(file,"  Units: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Units: %s\n",CommandOptionToMnemonic(
     MagickResolutionOptions,(ssize_t) image->units));
-  (void) fprintf(file,"  Type: %s\n",CommandOptionToMnemonic(MagickTypeOptions,
+  (void) FormatLocaleFile(file,"  Type: %s\n",CommandOptionToMnemonic(MagickTypeOptions,
     (ssize_t) type));
   if (image->type != UndefinedType)
-    (void) fprintf(file,"  Base type: %s\n",CommandOptionToMnemonic(
+    (void) FormatLocaleFile(file,"  Base type: %s\n",CommandOptionToMnemonic(
       MagickTypeOptions,(ssize_t) image->type));
-  (void) fprintf(file,"  Endianess: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Endianess: %s\n",CommandOptionToMnemonic(
     MagickEndianOptions,(ssize_t) image->endian));
   /*
     Detail channel depth and extrema.
   */
-  (void) fprintf(file,"  Colorspace: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Colorspace: %s\n",CommandOptionToMnemonic(
     MagickColorspaceOptions,(ssize_t) image->colorspace));
   channel_statistics=(ChannelStatistics *) NULL;
   channel_features=(ChannelFeatures *) NULL;
@@ -446,11 +446,11 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
         }
       depth=GetImageDepth(image,&image->exception);
       if (image->depth == depth)
-        (void) fprintf(file,"  Depth: %.20g-bit\n",(double) image->depth);
+        (void) FormatLocaleFile(file,"  Depth: %.20g-bit\n",(double) image->depth);
       else
-        (void) fprintf(file,"  Depth: %.20g/%.20g-bit\n",(double)
+        (void) FormatLocaleFile(file,"  Depth: %.20g/%.20g-bit\n",(double)
           image->depth,(double) depth);
-      (void) fprintf(file,"  Channel depth:\n");
+      (void) FormatLocaleFile(file,"  Channel depth:\n");
       if (IsGrayImage(image,&image->exception) != MagickFalse)
         colorspace=GRAYColorspace;
       switch (colorspace)
@@ -458,35 +458,35 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
         case RGBColorspace:
         default:
         {
-          (void) fprintf(file,"    red: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    red: %.20g-bit\n",(double)
             channel_statistics[RedChannel].depth);
-          (void) fprintf(file,"    green: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    green: %.20g-bit\n",(double)
             channel_statistics[GreenChannel].depth);
-          (void) fprintf(file,"    blue: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    blue: %.20g-bit\n",(double)
             channel_statistics[BlueChannel].depth);
           break;
         }
         case CMYKColorspace:
         {
-          (void) fprintf(file,"    cyan: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    cyan: %.20g-bit\n",(double)
             channel_statistics[CyanChannel].depth);
-          (void) fprintf(file,"    magenta: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    magenta: %.20g-bit\n",(double)
             channel_statistics[MagentaChannel].depth);
-          (void) fprintf(file,"    yellow: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    yellow: %.20g-bit\n",(double)
             channel_statistics[YellowChannel].depth);
-          (void) fprintf(file,"    black: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    black: %.20g-bit\n",(double)
             channel_statistics[BlackChannel].depth);
           break;
         }
         case GRAYColorspace:
         {
-          (void) fprintf(file,"    gray: %.20g-bit\n",(double)
+          (void) FormatLocaleFile(file,"    gray: %.20g-bit\n",(double)
             channel_statistics[GrayChannel].depth);
           break;
         }
       }
       if (image->matte != MagickFalse)
-        (void) fprintf(file,"    alpha: %.20g-bit\n",(double)
+        (void) FormatLocaleFile(file,"    alpha: %.20g-bit\n",(double)
           channel_statistics[OpacityChannel].depth);
       scale=1;
       if (image->depth <= MAGICKCORE_QUANTUM_DEPTH)
@@ -495,7 +495,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
     }
   if (channel_statistics != (ChannelStatistics *) NULL)
     {
-      (void) fprintf(file,"  Channel statistics:\n");
+      (void) FormatLocaleFile(file,"  Channel statistics:\n");
       switch (colorspace)
       {
         case RGBColorspace:
@@ -533,7 +533,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
           channel_statistics);
       if (colorspace != GRAYColorspace)
         {
-          (void) fprintf(file,"  Image statistics:\n");
+          (void) FormatLocaleFile(file,"  Image statistics:\n");
           (void) PrintChannelStatistics(file,CompositeChannels,"Overall",1.0/scale,
             channel_statistics);
         }
@@ -542,7 +542,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
     }
   if (channel_features != (ChannelFeatures *) NULL)
     {
-      (void) fprintf(file,"  Channel features (horizontal, vertical, left and right diagonals, average):\n");
+      (void) FormatLocaleFile(file,"  Channel features (horizontal, vertical, left and right diagonals, average):\n");
       switch (colorspace)
       {
         case RGBColorspace:
@@ -579,7 +579,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
   if (ping == MagickFalse)
     {
       if (image->colorspace == CMYKColorspace)
-        (void) fprintf(file,"  Total ink density: %.0f%%\n",100.0*
+        (void) FormatLocaleFile(file,"  Total ink density: %.0f%%\n",100.0*
           GetImageTotalInkDensity(image)/(double) QuantumRange);
       x=0;
       if (image->matte != MagickFalse)
@@ -619,25 +619,25 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
               SetMagickPixelPacket(image,p,indexes+x,&pixel);
               (void) QueryMagickColorname(image,&pixel,SVGCompliance,tuple,
                 &image->exception);
-              (void) fprintf(file,"  Alpha: %s ",tuple);
+              (void) FormatLocaleFile(file,"  Alpha: %s ",tuple);
               GetColorTuple(&pixel,MagickTrue,tuple);
-              (void) fprintf(file,"  %s\n",tuple);
+              (void) FormatLocaleFile(file,"  %s\n",tuple);
             }
         }
       artifact=GetImageArtifact(image,"identify:unique-colors");
       if ((artifact != (const char *) NULL) &&
           (IsMagickTrue(artifact) != MagickFalse))
-        (void) fprintf(file,"  Colors: %.20g\n",(double)
+        (void) FormatLocaleFile(file,"  Colors: %.20g\n",(double)
           GetNumberColors(image,(FILE *) NULL,&image->exception));
       if (IsHistogramImage(image,&image->exception) != MagickFalse)
         {
-          (void) fprintf(file,"  Histogram:\n");
+          (void) FormatLocaleFile(file,"  Histogram:\n");
           (void) GetNumberColors(image,file,&image->exception);
         }
     }
   if (image->storage_class == PseudoClass)
     {
-      (void) fprintf(file,"  Colormap: %.20g\n",(double) image->colors);
+      (void) FormatLocaleFile(file,"  Colormap: %.20g\n",(double) image->colors);
       if (image->colors <= 1024)
         {
           char
@@ -678,24 +678,24 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
             (void) QueryMagickColorname(image,&pixel,SVGCompliance,color,
               &image->exception);
             GetColorTuple(&pixel,MagickTrue,hex);
-            (void) fprintf(file,"  %8ld: %s %s %s\n",(long) i,tuple,hex,color);
+            (void) FormatLocaleFile(file,"  %8ld: %s %s %s\n",(long) i,tuple,hex,color);
             p++;
           }
         }
     }
   if (image->error.mean_error_per_pixel != 0.0)
-    (void) fprintf(file,"  Mean error per pixel: %g\n",
+    (void) FormatLocaleFile(file,"  Mean error per pixel: %g\n",
       image->error.mean_error_per_pixel);
   if (image->error.normalized_mean_error != 0.0)
-    (void) fprintf(file,"  Normalized mean error: %g\n",
+    (void) FormatLocaleFile(file,"  Normalized mean error: %g\n",
       image->error.normalized_mean_error);
   if (image->error.normalized_maximum_error != 0.0)
-    (void) fprintf(file,"  Normalized maximum error: %g\n",
+    (void) FormatLocaleFile(file,"  Normalized maximum error: %g\n",
       image->error.normalized_maximum_error);
-  (void) fprintf(file,"  Rendering intent: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Rendering intent: %s\n",CommandOptionToMnemonic(
     MagickIntentOptions,(ssize_t) image->rendering_intent));
   if (image->gamma != 0.0)
-    (void) fprintf(file,"  Gamma: %g\n",image->gamma);
+    (void) FormatLocaleFile(file,"  Gamma: %g\n",image->gamma);
   if ((image->chromaticity.red_primary.x != 0.0) ||
       (image->chromaticity.green_primary.x != 0.0) ||
       (image->chromaticity.blue_primary.x != 0.0) ||
@@ -704,66 +704,66 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       /*
         Display image chromaticity.
       */
-      (void) fprintf(file,"  Chromaticity:\n");
-      (void) fprintf(file,"    red primary: (%g,%g)\n",
+      (void) FormatLocaleFile(file,"  Chromaticity:\n");
+      (void) FormatLocaleFile(file,"    red primary: (%g,%g)\n",
         image->chromaticity.red_primary.x,image->chromaticity.red_primary.y);
-      (void) fprintf(file,"    green primary: (%g,%g)\n",
+      (void) FormatLocaleFile(file,"    green primary: (%g,%g)\n",
         image->chromaticity.green_primary.x,
         image->chromaticity.green_primary.y);
-      (void) fprintf(file,"    blue primary: (%g,%g)\n",
+      (void) FormatLocaleFile(file,"    blue primary: (%g,%g)\n",
         image->chromaticity.blue_primary.x,image->chromaticity.blue_primary.y);
-      (void) fprintf(file,"    white point: (%g,%g)\n",
+      (void) FormatLocaleFile(file,"    white point: (%g,%g)\n",
         image->chromaticity.white_point.x,image->chromaticity.white_point.y);
     }
   if ((image->extract_info.width*image->extract_info.height) != 0)
-    (void) fprintf(file,"  Tile geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
+    (void) FormatLocaleFile(file,"  Tile geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
       image->extract_info.width,(double) image->extract_info.height,(double)
       image->extract_info.x,(double) image->extract_info.y);
-  (void) fprintf(file,"  Interlace: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Interlace: %s\n",CommandOptionToMnemonic(
     MagickInterlaceOptions,(ssize_t) image->interlace));
   (void) QueryColorname(image,&image->background_color,SVGCompliance,color,
     &image->exception);
-  (void) fprintf(file,"  Background color: %s\n",color);
+  (void) FormatLocaleFile(file,"  Background color: %s\n",color);
   (void) QueryColorname(image,&image->border_color,SVGCompliance,color,
     &image->exception);
-  (void) fprintf(file,"  Border color: %s\n",color);
+  (void) FormatLocaleFile(file,"  Border color: %s\n",color);
   (void) QueryColorname(image,&image->matte_color,SVGCompliance,color,
     &image->exception);
-  (void) fprintf(file,"  Matte color: %s\n",color);
+  (void) FormatLocaleFile(file,"  Matte color: %s\n",color);
   (void) QueryColorname(image,&image->transparent_color,SVGCompliance,color,
     &image->exception);
-  (void) fprintf(file,"  Transparent color: %s\n",color);
-  (void) fprintf(file,"  Compose: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Transparent color: %s\n",color);
+  (void) FormatLocaleFile(file,"  Compose: %s\n",CommandOptionToMnemonic(
     MagickComposeOptions,(ssize_t) image->compose));
   if ((image->page.width != 0) || (image->page.height != 0) ||
       (image->page.x != 0) || (image->page.y != 0))
-    (void) fprintf(file,"  Page geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
+    (void) FormatLocaleFile(file,"  Page geometry: %.20gx%.20g%+.20g%+.20g\n",(double)
       image->page.width,(double) image->page.height,(double)
       image->page.x,(double) image->page.y);
   if ((image->page.x != 0) || (image->page.y != 0))
-    (void) fprintf(file,"  Origin geometry: %+.20g%+.20g\n",(double)
+    (void) FormatLocaleFile(file,"  Origin geometry: %+.20g%+.20g\n",(double)
       image->page.x,(double) image->page.y);
-  (void) fprintf(file,"  Dispose: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Dispose: %s\n",CommandOptionToMnemonic(
     MagickDisposeOptions,(ssize_t) image->dispose));
   if (image->delay != 0)
-    (void) fprintf(file,"  Delay: %.20gx%.20g\n",(double) image->delay,
+    (void) FormatLocaleFile(file,"  Delay: %.20gx%.20g\n",(double) image->delay,
       (double) image->ticks_per_second);
   if (image->iterations != 1)
-    (void) fprintf(file,"  Iterations: %.20g\n",(double) image->iterations);
+    (void) FormatLocaleFile(file,"  Iterations: %.20g\n",(double) image->iterations);
   if ((image->next != (Image *) NULL) || (image->previous != (Image *) NULL))
-    (void) fprintf(file,"  Scene: %.20g of %.20g\n",(double) image->scene,
+    (void) FormatLocaleFile(file,"  Scene: %.20g of %.20g\n",(double) image->scene,
       (double) GetImageListLength(image));
   else
     if (image->scene != 0)
-      (void) fprintf(file,"  Scene: %.20g\n",(double) image->scene);
-  (void) fprintf(file,"  Compression: %s\n",CommandOptionToMnemonic(
+      (void) FormatLocaleFile(file,"  Scene: %.20g\n",(double) image->scene);
+  (void) FormatLocaleFile(file,"  Compression: %s\n",CommandOptionToMnemonic(
     MagickCompressOptions,(ssize_t) image->compression));
   if (image->quality != UndefinedCompressionQuality)
-    (void) fprintf(file,"  Quality: %.20g\n",(double) image->quality);
-  (void) fprintf(file,"  Orientation: %s\n",CommandOptionToMnemonic(
+    (void) FormatLocaleFile(file,"  Quality: %.20g\n",(double) image->quality);
+  (void) FormatLocaleFile(file,"  Orientation: %s\n",CommandOptionToMnemonic(
     MagickOrientationOptions,(ssize_t) image->orientation));
   if (image->montage != (char *) NULL)
-    (void) fprintf(file,"  Montage: %s\n",image->montage);
+    (void) FormatLocaleFile(file,"  Montage: %s\n",image->montage);
   if (image->directory != (char *) NULL)
     {
       Image
@@ -784,7 +784,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       */
       image_info=AcquireImageInfo();
       (void) CloneString(&image_info->size,"64x64");
-      (void) fprintf(file,"  Directory:\n");
+      (void) FormatLocaleFile(file,"  Directory:\n");
       for (p=image->directory; *p != '\0'; p++)
       {
         q=p;
@@ -792,26 +792,26 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
           q++;
         (void) CopyMagickString(image_info->filename,p,(size_t) (q-p+1));
         p=q;
-        (void) fprintf(file,"    %s",image_info->filename);
+        (void) FormatLocaleFile(file,"    %s",image_info->filename);
         handler=SetWarningHandler((WarningHandler) NULL);
         tile=ReadImage(image_info,&image->exception);
         (void) SetWarningHandler(handler);
         if (tile == (Image *) NULL)
           {
-            (void) fprintf(file,"\n");
+            (void) FormatLocaleFile(file,"\n");
             continue;
           }
-        (void) fprintf(file," %.20gx%.20g %s\n",(double) tile->magick_columns,
+        (void) FormatLocaleFile(file," %.20gx%.20g %s\n",(double) tile->magick_columns,
           (double) tile->magick_rows,tile->magick);
         (void) SignatureImage(tile);
         ResetImagePropertyIterator(tile);
         property=GetNextImageProperty(tile);
         while (property != (const char *) NULL)
         {
-          (void) fprintf(file,"  %s:\n",property);
+          (void) FormatLocaleFile(file,"  %s:\n",property);
           value=GetImageProperty(tile,property);
           if (value != (const char *) NULL)
-            (void) fprintf(file,"%s\n",value);
+            (void) FormatLocaleFile(file,"%s\n",value);
           property=GetNextImageProperty(tile);
         }
         tile=DestroyImage(tile);
@@ -826,27 +826,27 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       /*
         Display image properties.
       */
-      (void) fprintf(file,"  Properties:\n");
+      (void) FormatLocaleFile(file,"  Properties:\n");
       while (property != (const char *) NULL)
       {
-        (void) fprintf(file,"    %s: ",property);
+        (void) FormatLocaleFile(file,"    %s: ",property);
         value=GetImageProperty(image,property);
         if (value != (const char *) NULL)
-          (void) fprintf(file,"%s\n",value);
+          (void) FormatLocaleFile(file,"%s\n",value);
         property=GetNextImageProperty(image);
       }
     }
-  (void) FormatMagickString(key,MaxTextExtent,"8BIM:1999,2998:#1");
+  (void) FormatLocaleString(key,MaxTextExtent,"8BIM:1999,2998:#1");
   value=GetImageProperty(image,key);
   if (value != (const char *) NULL)
     {
       /*
         Display clipping path.
       */
-      (void) fprintf(file,"  Clipping path: ");
+      (void) FormatLocaleFile(file,"  Clipping path: ");
       if (strlen(value) > 80)
         (void) fputc('\n',file);
-      (void) fprintf(file,"%s\n",value);
+      (void) FormatLocaleFile(file,"%s\n",value);
     }
   ResetImageProfileIterator(image);
   name=GetNextImageProfile(image);
@@ -858,13 +858,13 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       /*
         Identify image profiles.
       */
-      (void) fprintf(file,"  Profiles:\n");
+      (void) FormatLocaleFile(file,"  Profiles:\n");
       while (name != (char *) NULL)
       {
         profile=GetImageProfile(image,name);
         if (profile == (StringInfo *) NULL)
           continue;
-        (void) fprintf(file,"    Profile-%s: %.20g bytes\n",name,(double)
+        (void) FormatLocaleFile(file,"    Profile-%s: %.20g bytes\n",name,(double)
           GetStringInfoLength(profile));
 #if defined(MAGICKCORE_LCMS_DELEGATE)
         if ((LocaleCompare(name,"icc") == 0) ||
@@ -883,23 +883,23 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
 
                 name=cmsTakeProductName(icc_profile);
                 if (name != (const char *) NULL)
-                  (void) fprintf(file,"      %s\n",name);
+                  (void) FormatLocaleFile(file,"      %s\n",name);
 #else
                 char
                   info[MaxTextExtent];
 
                 (void) cmsGetProfileInfoASCII(icc_profile,cmsInfoDescription,
                   "en","US",info,MaxTextExtent);
-                (void) fprintf(file,"      Description: %s\n",info);
+                (void) FormatLocaleFile(file,"      Description: %s\n",info);
                 (void) cmsGetProfileInfoASCII(icc_profile,cmsInfoManufacturer,
                   "en","US",info,MaxTextExtent);
-                (void) fprintf(file,"      Manufacturer: %s\n",info);
+                (void) FormatLocaleFile(file,"      Manufacturer: %s\n",info);
                 (void) cmsGetProfileInfoASCII(icc_profile,cmsInfoModel,"en",
                   "US",info,MaxTextExtent);
-                (void) fprintf(file,"      Model: %s\n",info);
+                (void) FormatLocaleFile(file,"      Model: %s\n",info);
                 (void) cmsGetProfileInfoASCII(icc_profile,cmsInfoCopyright,
                   "en","US",info,MaxTextExtent);
-                (void) fprintf(file,"      Copyright: %s\n",info);
+                (void) FormatLocaleFile(file,"      Copyright: %s\n",info);
 #endif
                 (void) cmsCloseProfile(icc_profile);
               }
@@ -991,7 +991,7 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
                 case 219: tag="Custom Field 20"; break;
                 default: tag="unknown"; break;
               }
-              (void) fprintf(file,"      %s[%.20g,%.20g]: ",tag,(double)
+              (void) FormatLocaleFile(file,"      %s[%.20g,%.20g]: ",tag,(double)
                 dataset,(double) record);
               length=(size_t) (GetStringInfoDatum(profile)[i++] << 8);
               length|=GetStringInfoDatum(profile)[i++];
@@ -1032,13 +1032,13 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       /*
         Display image artifacts.
       */
-      (void) fprintf(file,"  Artifacts:\n");
+      (void) FormatLocaleFile(file,"  Artifacts:\n");
       while (artifact != (const char *) NULL)
       {
-        (void) fprintf(file,"    %s: ",artifact);
+        (void) FormatLocaleFile(file,"    %s: ",artifact);
         value=GetImageArtifact(image,artifact);
         if (value != (const char *) NULL)
-          (void) fprintf(file,"%s\n",value);
+          (void) FormatLocaleFile(file,"%s\n",value);
         artifact=GetNextImageArtifact(image);
       }
     }
@@ -1049,32 +1049,32 @@ MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file,
       /*
         Display image registry.
       */
-      (void) fprintf(file,"  Registry:\n");
+      (void) FormatLocaleFile(file,"  Registry:\n");
       while (registry != (const char *) NULL)
       {
-        (void) fprintf(file,"    %s: ",registry);
+        (void) FormatLocaleFile(file,"    %s: ",registry);
         value=(const char *) GetImageRegistry(StringRegistryType,registry,
           &image->exception);
         if (value != (const char *) NULL)
-          (void) fprintf(file,"%s\n",value);
+          (void) FormatLocaleFile(file,"%s\n",value);
         registry=GetNextImageRegistry();
       }
     }
-  (void) fprintf(file,"  Tainted: %s\n",CommandOptionToMnemonic(
+  (void) FormatLocaleFile(file,"  Tainted: %s\n",CommandOptionToMnemonic(
     MagickBooleanOptions,(ssize_t) image->taint));
   (void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
-  (void) fprintf(file,"  Filesize: %sB\n",format);
+  (void) FormatLocaleFile(file,"  Filesize: %sB\n",format);
   (void) FormatMagickSize((MagickSizeType) image->columns*image->rows,
      MagickFalse,format);
-  (void) fprintf(file,"  Number pixels: %s\n",format);
+  (void) FormatLocaleFile(file,"  Number pixels: %s\n",format);
   (void) FormatMagickSize((MagickSizeType) ((double) image->columns*image->rows/
     elapsed_time+0.5),MagickFalse,format);
-  (void) fprintf(file,"  Pixels per second: %s\n",format);
-  (void) fprintf(file,"  User time: %0.3fu\n",user_time);
-  (void) fprintf(file,"  Elapsed time: %lu:%02lu.%03lu\n",(unsigned long)
+  (void) FormatLocaleFile(file,"  Pixels per second: %s\n",format);
+  (void) FormatLocaleFile(file,"  User time: %0.3fu\n",user_time);
+  (void) FormatLocaleFile(file,"  Elapsed time: %lu:%02lu.%03lu\n",(unsigned long)
     (elapsed_time/60.0),(unsigned long) ceil(fmod(elapsed_time,60.0)),
     (unsigned long) (1000.0*(elapsed_time-floor(elapsed_time))));
-  (void) fprintf(file,"  Version: %s\n",GetMagickVersion((size_t *)
+  (void) FormatLocaleFile(file,"  Version: %s\n",GetMagickVersion((size_t *)
     NULL));
   (void) fflush(file);
   return(ferror(file) != 0 ? MagickFalse : MagickTrue);
index 3a2aa0fc8e4fbe150bfc98861f9aebbdc0237a07..377599b55cf541a01e8b114d791c4061161de50c 100644 (file)
@@ -683,7 +683,7 @@ MagickExport MagickBooleanType ClipImagePath(Image *image,const char *pathname,
     (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
   assert(pathname != NULL);
   property=AcquireString(pathname);
-  (void) FormatMagickString(property,MaxTextExtent,"8BIM:1999,2998:%s",
+  (void) FormatLocaleString(property,MaxTextExtent,"8BIM:1999,2998:%s",
     pathname);
   value=GetImageProperty(image,property);
   property=DestroyString(property);
@@ -708,7 +708,7 @@ MagickExport MagickBooleanType ClipImagePath(Image *image,const char *pathname,
     }
   if (inside == MagickFalse)
     (void) NegateImage(clip_mask,MagickFalse);
-  (void) FormatMagickString(clip_mask->magick_filename,MaxTextExtent,
+  (void) FormatLocaleString(clip_mask->magick_filename,MaxTextExtent,
     "8BIM:1999,2998:%s\nPS",pathname);
   (void) SetImageClipMask(image,clip_mask);
   clip_mask=DestroyImage(clip_mask);
@@ -1772,7 +1772,7 @@ MagickExport size_t InterpretImageFilename(const ImageInfo *image_info,
         q++;
         c=(*q);
         *q='\0';
-        (void) FormatMagickString(filename+(p-format),(size_t) (MaxTextExtent-
+        (void) FormatLocaleString(filename+(p-format),(size_t) (MaxTextExtent-
           (p-format)),p,value);
         *q=c;
         (void) ConcatenateMagickString(filename,q,MaxTextExtent);
@@ -4596,7 +4596,7 @@ MagickExport MagickBooleanType SyncImageSettings(const ImageInfo *image_info,
     value=GetImageOption(image_info,option);
     if (value != (const char *) NULL)
       {
-        (void) FormatMagickString(property,MaxTextExtent,"%s",option);
+        (void) FormatLocaleString(property,MaxTextExtent,"%s",option);
         (void) SetImageArtifact(image,property,value);
       }
     option=GetNextImageOption(image_info);
index 136e1b0acf29217e10dd379d5a621a86ab4d47aa..9638c45a265947367d33df61b8dc781898c15580 100644 (file)
@@ -134,6 +134,7 @@ typedef struct _ChromaticityInfo
 #include "magick/effect.h"
 #include "magick/geometry.h"
 #include "magick/layer.h"
+#include "magick/locale_.h"
 #include "magick/monitor.h"
 #include "magick/pixel.h"
 #include "magick/profile.h"
index a7f3d0809112d5caa6dd61074582f198dec26665..81afc0809aef921d192ba2bbd48b9cc72bda9f66 100644 (file)
@@ -1064,12 +1064,12 @@ static Image *OptimizeLayerFrames(const Image *image,
   */
 #if DEBUG_OPT_FRAME
   i=0;
-  fprintf(stderr, "frame %.20g :-\n", (double) i);
+  FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
 #endif
   disposals[0]=NoneDispose;
   bounds[0]=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
 #if DEBUG_OPT_FRAME
-  fprintf(stderr, "overlay: %.20gx%.20g%+.20g%+.20g\n\n",
+  FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g\n\n",
        (double) bounds[i].width,(double) bounds[i].height,
        (double) bounds[i].x,(double) bounds[i].y );
 #endif
@@ -1087,7 +1087,7 @@ static Image *OptimizeLayerFrames(const Image *image,
   for ( ; curr != (const Image *) NULL; curr=GetNextImageInList(curr))
   {
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "frame %.20g :-\n", (double) i);
+    FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
 #endif
     /*
       Assume none disposal is the best
@@ -1096,7 +1096,7 @@ static Image *OptimizeLayerFrames(const Image *image,
     cleared=IsBoundsCleared(curr->previous,curr,&bounds[i],exception);
     disposals[i-1]=NoneDispose;
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "overlay: %.20gx%.20g%+.20g%+.20g%s%s\n",
+    FormatLocaleFile(stderr, "overlay: %.20gx%.20g%+.20g%+.20g%s%s\n",
          (double) bounds[i].width,(double) bounds[i].height,
          (double) bounds[i].x,(double) bounds[i].y,
          bounds[i].x < 0?"  (unchanged)":"",
@@ -1125,7 +1125,7 @@ static Image *OptimizeLayerFrames(const Image *image,
         try_bounds=CompareImageBounds(prev_image,curr,CompareAnyLayer,exception);
         try_cleared=IsBoundsCleared(prev_image,curr,&try_bounds,exception);
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "test_prev: %.20gx%.20g%+.20g%+.20g%s\n",
+    FormatLocaleFile(stderr, "test_prev: %.20gx%.20g%+.20g%+.20g%s\n",
          (double) try_bounds.width,(double) try_bounds.height,
          (double) try_bounds.x,(double) try_bounds.y,
          try_cleared?"  (pixels were cleared)":"");
@@ -1138,9 +1138,9 @@ static Image *OptimizeLayerFrames(const Image *image,
             bounds[i]=try_bounds;
             disposals[i-1]=PreviousDispose;
 #if DEBUG_OPT_FRAME
-            fprintf(stderr, "previous: accepted\n");
+            FormatLocaleFile(stderr, "previous: accepted\n");
           } else {
-            fprintf(stderr, "previous: rejected\n");
+            FormatLocaleFile(stderr, "previous: rejected\n");
 #endif
           }
 
@@ -1196,7 +1196,7 @@ static Image *OptimizeLayerFrames(const Image *image,
         try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
         try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "background: %s\n",
+    FormatLocaleFile(stderr, "background: %s\n",
          try_cleared?"(pixels cleared)":"");
 #endif
         if ( try_cleared )
@@ -1209,7 +1209,7 @@ static Image *OptimizeLayerFrames(const Image *image,
             */
             try_bounds=CompareImageBounds(curr->previous,curr,CompareClearLayer,exception);
 #if DEBUG_OPT_FRAME
-            fprintf(stderr, "expand_clear: %.20gx%.20g%+.20g%+.20g%s\n",
+            FormatLocaleFile(stderr, "expand_clear: %.20gx%.20g%+.20g%+.20g%s\n",
                 (double) try_bounds.width,(double) try_bounds.height,
                 (double) try_bounds.x,(double) try_bounds.y,
                 try_bounds.x<0?"  (no expand nessary)":"");
@@ -1219,7 +1219,7 @@ static Image *OptimizeLayerFrames(const Image *image,
             else
               {
 #if DEBUG_OPT_FRAME
-                fprintf(stderr, "expand_bgnd: %.20gx%.20g%+.20g%+.20g\n",
+                FormatLocaleFile(stderr, "expand_bgnd: %.20gx%.20g%+.20g%+.20g\n",
                     (double) bgnd_bounds.width,(double) bgnd_bounds.height,
                     (double) bgnd_bounds.x,(double) bgnd_bounds.y );
 #endif
@@ -1250,7 +1250,7 @@ static Image *OptimizeLayerFrames(const Image *image,
                        bgnd_bounds.height = try_bounds.height;
                   }
 #if DEBUG_OPT_FRAME
-                fprintf(stderr, "        to : %.20gx%.20g%+.20g%+.20g\n",
+                FormatLocaleFile(stderr, "        to : %.20gx%.20g%+.20g%+.20g\n",
                     (double) bgnd_bounds.width,(double) bgnd_bounds.height,
                     (double) bgnd_bounds.x,(double) bgnd_bounds.y );
 #endif
@@ -1265,12 +1265,12 @@ static Image *OptimizeLayerFrames(const Image *image,
  * Only CompareOverlay seemed to return something sensible.
  */
             try_bounds=CompareImageBounds(bgnd_image,curr,CompareClearLayer,exception);
-            fprintf(stderr, "expand_ctst: %.20gx%.20g%+.20g%+.20g\n",
+            FormatLocaleFile(stderr, "expand_ctst: %.20gx%.20g%+.20g%+.20g\n",
                 (double) try_bounds.width,(double) try_bounds.height,
                 (double) try_bounds.x,(double) try_bounds.y );
             try_bounds=CompareImageBounds(bgnd_image,curr,CompareAnyLayer,exception);
             try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
-            fprintf(stderr, "expand_any : %.20gx%.20g%+.20g%+.20g%s\n",
+            FormatLocaleFile(stderr, "expand_any : %.20gx%.20g%+.20g%+.20g%s\n",
                 (double) try_bounds.width,(double) try_bounds.height,
                 (double) try_bounds.x,(double) try_bounds.y,
                 try_cleared?"   (pixels cleared)":"");
@@ -1278,7 +1278,7 @@ static Image *OptimizeLayerFrames(const Image *image,
             try_bounds=CompareImageBounds(bgnd_image,curr,CompareOverlayLayer,exception);
 #if DEBUG_OPT_FRAME
             try_cleared=IsBoundsCleared(bgnd_image,curr,&try_bounds,exception);
-            fprintf(stderr, "expand_test: %.20gx%.20g%+.20g%+.20g%s\n",
+            FormatLocaleFile(stderr, "expand_test: %.20gx%.20g%+.20g%+.20g%s\n",
                 (double) try_bounds.width,(double) try_bounds.height,
                 (double) try_bounds.x,(double) try_bounds.y,
                 try_cleared?"   (pixels cleared)":"");
@@ -1302,9 +1302,9 @@ static Image *OptimizeLayerFrames(const Image *image,
               dup_image=DestroyImage(dup_image);
             disposals[i-1]=BackgroundDispose;
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "expand_bgnd: accepted\n");
+    FormatLocaleFile(stderr, "expand_bgnd: accepted\n");
           } else {
-    fprintf(stderr, "expand_bgnd: reject\n");
+    FormatLocaleFile(stderr, "expand_bgnd: reject\n");
 #endif
           }
       }
@@ -1350,19 +1350,19 @@ static Image *OptimizeLayerFrames(const Image *image,
     assert(prev_image != (Image *) NULL);
     disposals[i]=disposals[i-1];
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "final   %.20g : %s  %.20gx%.20g%+.20g%+.20g\n",
+    FormatLocaleFile(stderr, "final   %.20g : %s  %.20gx%.20g%+.20g%+.20g\n",
          (double) i-1,
          CommandOptionToMnemonic(MagickDisposeOptions, disposals[i-1]),
          (double) bounds[i-1].width, (double) bounds[i-1].height,
          (double) bounds[i-1].x, (double) bounds[i-1].y );
 #endif
 #if DEBUG_OPT_FRAME
-    fprintf(stderr, "interum %.20g : %s  %.20gx%.20g%+.20g%+.20g\n",
+    FormatLocaleFile(stderr, "interum %.20g : %s  %.20gx%.20g%+.20g%+.20g\n",
          (double) i,
          CommandOptionToMnemonic(MagickDisposeOptions, disposals[i]),
          (double) bounds[i].width, (double) bounds[i].height,
          (double) bounds[i].x, (double) bounds[i].y );
-    fprintf(stderr, "\n");
+    FormatLocaleFile(stderr, "\n");
 #endif
     i++;
   }
diff --git a/magick/locale-private.h b/magick/locale-private.h
deleted file mode 100644 (file)
index edd9721..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-  Copyright 1999-2011 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.
-  obtain a copy of the License at
-  
-    http://www.imagemagick.org/script/license.php
-  
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-  MagickCore locale private methods.
-*/
-#ifndef _MAGICKCORE_LOCALE_PRIVATE_H
-#define _MAGICKCORE_LOCALE_PRIVATE_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-extern MagickExport locale_t
-  AcquireMagickLocale(void);
-
-extern MagickExport void
-  DestroyMagickLocale(void);
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
-#endif
index d86f3e437e751ab3cc335eb2ef5116de4581a54c..e66b2664c2cc8ee8f4f49afbcbc7892f033bbab8 100644 (file)
@@ -87,7 +87,7 @@ static volatile MagickBooleanType
   instantiate_locale = MagickFalse;
 
 static volatile locale_t
-  locale_cache = (locale_t) NULL;
+  c_locale = (locale_t) NULL;
 \f
 /*
   Forward declarations.
@@ -101,30 +101,61 @@ static MagickBooleanType
 %                                                                             %
 %                                                                             %
 %                                                                             %
-+   A c q u i r e M a g i c k L o c a l e                                     %
++   A c q u i r e C L o c a l e                                               %
 %                                                                             %
 %                                                                             %
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  AcquireMagickLocale() allocates the C locale object, or (locale_t) 0 with
+%  AcquireCLocale() allocates the C locale object, or (locale_t) 0 with
 %  errno set if it cannot be acquired.
 %
-%  The format of the AcquireMagickLocale method is:
+%  The format of the AcquireCLocale method is:
 %
-%      locale_t AcquireMagickLocale(void)
+%      locale_t AcquireCLocale(void)
 %
 */
-MagickExport locale_t AcquireMagickLocale(void)
+static locale_t AcquireCLocale(void)
 {
 #if defined(MAGICKCORE_HAVE_NEWLOCALE)
-  if (locale_cache == (locale_t) NULL)
-    locale_cache=newlocale(LC_ALL_MASK,"C",(locale_t) 0);
+  if (c_locale == (locale_t) NULL)
+    c_locale=newlocale(LC_ALL_MASK,"C",(locale_t) 0);
 #elif defined(MAGICKCORE_WINDOWS_SUPPORT)
-  if (locale_cache == (locale_t) NULL)
-    locale_cache=_create_locale(LC_ALL,"C");
+  if (c_locale == (locale_t) NULL)
+    c_locale=_create_locale(LC_ALL,"C");
 #endif
-  return(locale_cache);
+  return(c_locale);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
++   D e s t r o y C L o c a l e                                               %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  DestroyCLocale() releases the resources allocated for a locale object
+%  returned by a call to the AcquireCLocale() method.
+%
+%  The format of the DestroyCLocale method is:
+%
+%      void DestroyCLocale(void)
+%
+*/
+static void DestroyCLocale(void)
+{
+#if defined(MAGICKCORE_HAVE_NEWLOCALE)
+  if (c_locale != (locale_t) NULL)
+    freelocale(c_locale);
+#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
+  if (c_locale != (locale_t) NULL)
+    _free_locale(c_locale);
+#endif
+  c_locale=(locale_t) NULL;
 }
 \f
 /*
@@ -168,30 +199,163 @@ MagickExport LinkedListInfo *DestroyLocaleOptions(LinkedListInfo *messages)
 %                                                                             %
 %                                                                             %
 %                                                                             %
-+   D e s t r o y M a g i c k L o c a l e                                     %
++  F o r m a t L o c a l e F i l e                                            %
 %                                                                             %
 %                                                                             %
 %                                                                             %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %
-%  DestroyMagickLocale() releases the resources allocated for a locale object
-%  returned by a call to the AcquireMagickLocale() method.
+%  FormatLocaleFile() prints formatted output of a variable argument list to a
+%  file in the "C" locale.
+%
+%  The format of the FormatLocaleFile method is:
 %
-%  The format of the DestroyMagickLocale method is:
+%      ssize_t FormatLocaleFile(FILE *file,const char *format,...)
 %
-%      void DestroyMagickLocale(void)
+%  A description of each parameter follows.
+%
+%   o file:  the file.
+%
+%   o format:  A file describing the format to use to write the remaining
+%     arguments.
 %
 */
-MagickExport void DestroyMagickLocale(void)
+
+MagickExport ssize_t FormatLocaleFileList(FILE *file,const char *format,
+  va_list operands)
 {
-#if defined(MAGICKCORE_HAVE_NEWLOCALE)
-  if (locale_cache != (locale_t) NULL)
-    freelocale(locale_cache);
-#elif defined(MAGICKCORE_WINDOWS_SUPPORT)
-  if (locale_cache != (locale_t) NULL)
-    _free_locale(locale_cache);
+  int
+    n;
+
+#if defined(MAGICKCORE_HAVE_FPRINTF_L)
+  {
+    locale_t
+      locale;
+
+    locale=AcquireCLocale();
+    if (locale == (locale_t) NULL)
+      n=fprintf(file,format,operands);
+    else
+      n=fprintf_l(file,format,locale,operands);
+  }
+#else
+#if defined(MAGICKCORE_HAVE_USELOCALE)
+  {
+    locale_t
+      locale,
+      previous_locale;
+
+    locale=AcquireCLocale();
+    if (locale == (locale_t) NULL)
+      n=fprintf(file,format,operands);
+    else
+      {
+        previous_locale=uselocale(locale);
+        n=fprintf(file,format,operands);
+        uselocale(previous_locale);
+      }
+  }
+#else
+  n=fprintf(file,format,operands);
+#endif
 #endif
-  locale_cache=(locale_t) NULL;
+  return((ssize_t) n);
+}
+
+MagickExport ssize_t FormatLocaleFile(FILE *file,const char *format,...)
+{
+  ssize_t
+    n;
+
+  va_list
+    operands;
+
+  va_start(operands,format);
+  n=(ssize_t) FormatLocaleFileList(file,format,operands);
+  va_end(operands);
+  return(n);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
++  F o r m a t L o c a l e S t r i n g                                        %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  FormatLocaleString() prints formatted output of a variable argument list to
+%  a string buffer in the "C" locale.
+%
+%  The format of the FormatLocaleString method is:
+%
+%      ssize_t FormatLocaleString(char *string,const size_t length,
+%        const char *format,...)
+%
+%  A description of each parameter follows.
+%
+%   o string:  FormatLocaleString() returns the formatted string in this
+%     character buffer.
+%
+%   o length: the maximum length of the string.
+%
+%   o format:  A string describing the format to use to write the remaining
+%     arguments.
+%
+*/
+
+MagickExport ssize_t FormatLocaleStringList(char *string,const size_t length,
+  const char *format,va_list operands)
+{
+  int
+    n;
+
+#if defined(MAGICKCORE_HAVE_VSNPRINTF_L)
+  n=vsnprintf_l(string,length,format,(locale_t) NULL,operands);
+#elif defined(MAGICKCORE_HAVE_VSNPRINTF)
+#if defined(MAGICKCORE_HAVE_USELOCALE)
+  {
+    locale_t
+      locale,
+      previous_locale;
+
+    locale=AcquireCLocale();
+    if (locale == (locale_t) NULL)
+      n=vsnprintf(string,length,format,operands);
+    else
+      {
+        previous_locale=uselocale(locale);
+        n=vsnprintf(string,length,format,operands);
+        uselocale(previous_locale);
+      }
+  }
+#else
+  n=vsnprintf(string,length,format,operands);
+#endif
+#else
+  n=vsprintf(string,format,operands);
+#endif
+  if (n < 0)
+    string[length-1]='\0';
+  return((ssize_t) n);
+}
+
+MagickExport ssize_t FormatLocaleString(char *string,const size_t length,
+  const char *format,...)
+{
+  ssize_t
+    n;
+
+  va_list
+    operands;
+
+  va_start(operands,format);
+  n=(ssize_t) FormatLocaleStringList(string,length,format,operands);
+  va_end(operands);
+  return(n);
 }
 \f
 /*
@@ -464,7 +628,7 @@ MagickExport const char *GetLocaleMessage(const char *tag)
   if ((tag == (const char *) NULL) || (*tag == '\0'))
     return(tag);
   exception=AcquireExceptionInfo();
-  (void) FormatMagickString(name,MaxTextExtent,"%s/",tag);
+  (void) FormatLocaleString(name,MaxTextExtent,"%s/",tag);
   locale_info=GetLocaleInfo_(name,exception);
   exception=DestroyExceptionInfo(exception);
   if (locale_info != (const LocaleInfo *) NULL)
@@ -529,7 +693,7 @@ MagickExport LinkedListInfo *GetLocaleOptions(const char *filename,
       element=(const char *) GetNextValueInLinkedList(paths);
       while (element != (const char *) NULL)
       {
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s",element,filename);
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s",element,filename);
         (void) LogMagickEvent(LocaleEvent,GetMagickModule(),
           "Searching for locale file: \"%s\"",path);
         xml=ConfigureFileToStringInfo(path);
@@ -703,16 +867,16 @@ MagickExport MagickBooleanType ListLocaleInfo(FILE *file,
         (LocaleCompare(path,locale_info[i]->path) != 0))
       {
         if (locale_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",locale_info[i]->path);
-        (void) fprintf(file,"Tag/Message\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",locale_info[i]->path);
+        (void) FormatLocaleFile(file,"Tag/Message\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=locale_info[i]->path;
-    (void) fprintf(file,"%s\n",locale_info[i]->tag);
+    (void) FormatLocaleFile(file,"%s\n",locale_info[i]->tag);
     if (locale_info[i]->message != (char *) NULL)
-      (void) fprintf(file,"  %s",locale_info[i]->message);
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"  %s",locale_info[i]->message);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   locale_info=(const LocaleInfo **)
@@ -795,10 +959,10 @@ static void LocaleFatalErrorHandler(
 {
   if (reason == (char *) NULL)
     return;
-  (void) fprintf(stderr,"%s: %s",GetClientName(),reason);
+  (void) FormatLocaleFile(stderr,"%s: %s",GetClientName(),reason);
   if (description != (char *) NULL)
-    (void) fprintf(stderr," (%s)",description);
-  (void) fprintf(stderr,".\n");
+    (void) FormatLocaleFile(stderr," (%s)",description);
+  (void) FormatLocaleFile(stderr,".\n");
   (void) fflush(stderr);
   exit(1);
 }
@@ -1156,8 +1320,59 @@ MagickExport void LocaleComponentTerminus(void)
   if (locale_semaphore == (SemaphoreInfo *) NULL)
     AcquireSemaphoreInfo(&locale_semaphore);
   LockSemaphoreInfo(locale_semaphore);
-  DestroyMagickLocale();
+  DestroyCLocale();
   instantiate_locale=MagickFalse;
   UnlockSemaphoreInfo(locale_semaphore);
   DestroySemaphoreInfo(&locale_semaphore);
 }
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%                                                                             %
+%                                                                             %
+%                                                                             %
++   L o c a l e T o D o u b l e                                               %
+%                                                                             %
+%                                                                             %
+%                                                                             %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+%  LocaleToDouble() interprets the string as a floating point number in the
+%  "C" locale and returns its value as a double. If sentinal is not a null
+%  pointer, the method also sets the value pointed by sentinal to point to the
+%  first character after the number.
+%
+%  The format of the LocaleToDouble method is:
+%
+%      double LocaleToDouble(const char *value,char **sentinal)
+%
+%  A description of each parameter follows:
+%
+%    o value: the string value.
+%
+%    o sentinal:  if sentinal is not NULL, a pointer to the character after the
+%      last character used in the conversion is stored in the location
+%      referenced by sentinal.
+%
+*/
+MagickExport double LocaleToDouble(const char *string,char **sentinal)
+{
+  double
+    value;
+
+#if defined(MAGICKCORE_HAVE_STRTOD_L)
+  {
+    locale_t
+      locale;
+
+    locale=AcquireCLocale();
+    if (locale == (locale_t) NULL)
+      value=strtod(string,sentinal);
+    else
+      value=strtod_l(string,sentinal,locale);
+  }
+#else
+  value=strtod(string,sentinal);
+#endif
+  return(value);
+}
index 88819b57f4426fbe24ae9fce35eca6426a554703..59e7fbdcd9194b16c334e14b8a44dd7baddd7623 100644 (file)
@@ -52,6 +52,9 @@ extern MagickExport const LocaleInfo
   *GetLocaleInfo_(const char *,ExceptionInfo *),
   **GetLocaleInfoList(const char *,size_t *,ExceptionInfo *);
 
+extern MagickExport double
+  LocaleToDouble(const char *,char **);
+
 extern MagickExport LinkedListInfo
   *DestroyLocaleOptions(LinkedListInfo *),
   *GetLocaleOptions(const char *,ExceptionInfo *);
@@ -60,6 +63,16 @@ extern MagickExport MagickBooleanType
   ListLocaleInfo(FILE *,ExceptionInfo *),
   LocaleComponentGenesis(void);
 
+extern MagickExport ssize_t
+  FormatLocaleFile(FILE *,const char *,...)
+    magick_attribute((format (printf,2,3))),
+  FormatLocaleFileList(FILE *,const char *,va_list)
+    magick_attribute((format (printf,2,0))),
+  FormatLocaleString(char *,const size_t,const char *,...)
+    magick_attribute((format (printf,3,4))),
+  FormatLocaleStringList(char *,const size_t,const char *,va_list)
+    magick_attribute((format (printf,3,0)));
+
 extern MagickExport void
   LocaleComponentTerminus(void);
 
index 97168cd9bc9e51e8a1940d3d7bf403e8b16e264c..fce62b3377931040a34ee68d689f79e23bb2ed0c 100644 (file)
@@ -230,7 +230,7 @@ MagickExport void CloseMagickLog(void)
   if (log_info->file != (FILE *) NULL)
     {
       if (log_info->append == MagickFalse)
-        (void) fprintf(log_info->file,"</log>\n");
+        (void) FormatLocaleFile(log_info->file,"</log>\n");
       (void) fclose(log_info->file);
       log_info->file=(FILE *) NULL;
     }
@@ -641,25 +641,25 @@ MagickExport MagickBooleanType ListLogInfo(FILE *file,ExceptionInfo *exception)
         (LocaleCompare(path,log_info[i]->path) != 0))
       {
         if (log_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",log_info[i]->path);
-        (void) fprintf(file,"Filename       Generations     Limit  Format\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",log_info[i]->path);
+        (void) FormatLocaleFile(file,"Filename       Generations     Limit  Format\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=log_info[i]->path;
     if (log_info[i]->filename != (char *) NULL)
       {
-        (void) fprintf(file,"%s",log_info[i]->filename);
+        (void) FormatLocaleFile(file,"%s",log_info[i]->filename);
         for (j=(ssize_t) strlen(log_info[i]->filename); j <= 16; j++)
-          (void) fprintf(file," ");
+          (void) FormatLocaleFile(file," ");
       }
-    (void) fprintf(file,"%9g  ",(double) log_info[i]->generations);
+    (void) FormatLocaleFile(file,"%9g  ",(double) log_info[i]->generations);
     (void) FormatMagickSize(MegabytesToBytes(log_info[i]->limit),MagickFalse,
       limit);
-    (void) fprintf(file,"%8sB  ",limit);
+    (void) FormatLocaleFile(file,"%8sB  ",limit);
     if (log_info[i]->format != (char *) NULL)
-      (void) fprintf(file,"%s",log_info[i]->format);
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"%s",log_info[i]->format);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   log_info=(const LogInfo **) RelinquishMagickMemory((void *) log_info);
@@ -718,7 +718,7 @@ static void *DestroyLogElement(void *log_info)
   if (p->file != (FILE *) NULL)
     {
       if (p->append == MagickFalse)
-        (void) fprintf(p->file,"</log>\n");
+        (void) FormatLocaleFile(p->file,"</log>\n");
       (void) fclose(p->file);
       p->file=(FILE *) NULL;
     }
@@ -828,7 +828,7 @@ static char *TranslateEvent(const LogEventType magick_unused(type),
         Translate event in "XML" format.
       */
       (void) FormatMagickTime(seconds,extent,timestamp);
-      (void) FormatMagickString(text,extent,
+      (void) FormatLocaleString(text,extent,
         "<entry>\n"
         "  <timestamp>%s</timestamp>\n"
         "  <elapsed-time>%lu:%02lu.%03lu</elapsed-time>\n"
@@ -931,13 +931,13 @@ static char *TranslateEvent(const LogEventType magick_unused(type),
             q++;
             break;
           }
-        q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
+        q+=FormatLocaleString(q,extent,"%.20g",(double) (log_info->generation %
           log_info->generations));
         break;
       }
       case 'l':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) line);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) line);
         break;
       }
       case 'm':
@@ -961,12 +961,12 @@ static char *TranslateEvent(const LogEventType magick_unused(type),
       }
       case 'p':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
+        q+=FormatLocaleString(q,extent,"%.20g",(double) getpid());
         break;
       }
       case 'r':
       {
-        q+=FormatMagickString(q,extent,"%lu:%02lu.%03lu",(unsigned long)
+        q+=FormatLocaleString(q,extent,"%lu:%02lu.%03lu",(unsigned long)
           (elapsed_time/60.0),(unsigned long) floor(fmod(elapsed_time,60.0)),
           (unsigned long) (1000.0*(elapsed_time-floor(elapsed_time))+0.5));
         break;
@@ -978,7 +978,7 @@ static char *TranslateEvent(const LogEventType magick_unused(type),
       }
       case 'u':
       {
-        q+=FormatMagickString(q,extent,"%0.3fu",user_time);
+        q+=FormatLocaleString(q,extent,"%0.3fu",user_time);
         break;
       }
       case 'v':
@@ -1068,7 +1068,7 @@ static char *TranslateFilename(const LogInfo *log_info)
             q++;
             break;
           }
-        q+=FormatMagickString(q,extent,"%.20g",(double) (log_info->generation %
+        q+=FormatLocaleString(q,extent,"%.20g",(double) (log_info->generation %
           log_info->generations));
         break;
       }
@@ -1079,7 +1079,7 @@ static char *TranslateFilename(const LogInfo *log_info)
       }
       case 'p':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
+        q+=FormatLocaleString(q,extent,"%.20g",(double) getpid());
         break;
       }
       case 'v':
@@ -1152,7 +1152,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module,
     }
   if ((log_info->handler_mask & ConsoleHandler) != 0)
     {
-      (void) fprintf(stderr,"%s\n",text);
+      (void) FormatLocaleFile(stderr,"%s\n",text);
       (void) fflush(stderr);
     }
   if ((log_info->handler_mask & DebugHandler) != 0)
@@ -1177,7 +1177,7 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module,
         (void) fstat(fileno(log_info->file),&file_info);
       if (file_info.st_size > (1024*1024*log_info->limit))
         {
-          (void) fprintf(log_info->file,"</log>\n");
+          (void) FormatLocaleFile(log_info->file,"</log>\n");
           (void) fclose(log_info->file);
           log_info->file=(FILE *) NULL;
         }
@@ -1204,22 +1204,22 @@ MagickBooleanType LogMagickEventList(const LogEventType type,const char *module,
           log_info->generation++;
           if (log_info->append == MagickFalse)
             {
-              (void) fprintf(log_info->file,"<?xml version=\"1.0\" "
+              (void) FormatLocaleFile(log_info->file,"<?xml version=\"1.0\" "
                 "encoding=\"UTF-8\" standalone=\"yes\"?>\n");
-              (void) fprintf(log_info->file,"<log>\n");
+              (void) FormatLocaleFile(log_info->file,"<log>\n");
             }
         }
-      (void) fprintf(log_info->file,"%s\n",text);
+      (void) FormatLocaleFile(log_info->file,"%s\n",text);
       (void) fflush(log_info->file);
     }
   if ((log_info->handler_mask & StdoutHandler) != 0)
     {
-      (void) fprintf(stdout,"%s\n",text);
+      (void) FormatLocaleFile(stdout,"%s\n",text);
       (void) fflush(stdout);
     }
   if ((log_info->handler_mask & StderrHandler) != 0)
     {
-      (void) fprintf(stderr,"%s\n",text);
+      (void) FormatLocaleFile(stderr,"%s\n",text);
       (void) fflush(stderr);
     }
   text=(char  *) RelinquishMagickMemory(text);
index 756c6f9abfcf6f858f67dc4bd1b40341094a66a1..3183d1f36a7af8a307c7a63c982ba920c888bc01 100644 (file)
@@ -339,7 +339,7 @@ MagickExport void closedir(DIR *entry)
 MagickExport int Exit(int status)
 {
 #if !defined(DISABLE_SIOUX)
-  (void) fprintf(stdout,"Select File->Quit to exit.\n");
+  (void) FormatLocaleFile(stdout,"Select File->Quit to exit.\n");
 #endif
   exit(status);
   return(0);
@@ -505,10 +505,10 @@ MagickExport void MACErrorHandler(const ExceptionType error,const char *reason,
   if (reason == (char *) NULL)
     return;
   if (description == (char *) NULL)
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
       reason);
   else
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s).\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s).\n",
       GetClientName(),reason,description);
 #if defined(DISABLE_SIOUX)
   if(exception.hook != (MACErrorHookPtr) NULL)
@@ -564,10 +564,10 @@ static void MACFatalErrorHandler(const ExceptionType severity,
   if (reason == (char *) NULL)
     return;
   if (description == (char *) NULL)
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
       reason);
   else
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s).\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s).\n",
       GetClientName(),reason,description);
   if(exception.hook != (MACErrorHookPtr) NULL)
     exception.hook(severity, buffer);
@@ -958,10 +958,10 @@ MagickExport void MACWarningHandler(const ExceptionType warning,
   if (reason == (char *) NULL)
     return;
   if (description == (char *) NULL)
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
       reason);
   else
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s).\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s).\n",
       GetClientName(),reason,description);
 #if defined(DISABLE_SIOUX)
   if(exception.hook != (MACErrorHookPtr) NULL)
index fbe8d66879b52fc798e62eda3d458bf9f88a9508..9a3db433109633225effd788dd8ca38b5c47b494 100644 (file)
@@ -597,16 +597,16 @@ MagickExport MagickBooleanType ListMagicInfo(FILE *file,
         (LocaleCompare(path,magic_info[i]->path) != 0))
       {
         if (magic_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",magic_info[i]->path);
-        (void) fprintf(file,"Name      Offset Target\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",magic_info[i]->path);
+        (void) FormatLocaleFile(file,"Name      Offset Target\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=magic_info[i]->path;
-    (void) fprintf(file,"%s",magic_info[i]->name);
+    (void) FormatLocaleFile(file,"%s",magic_info[i]->name);
     for (j=(ssize_t) strlen(magic_info[i]->name); j <= 9; j++)
-      (void) fprintf(file," ");
-    (void) fprintf(file,"%6ld ",(long) magic_info[i]->offset);
+      (void) FormatLocaleFile(file," ");
+    (void) FormatLocaleFile(file,"%6ld ",(long) magic_info[i]->offset);
     if (magic_info[i]->target != (char *) NULL)
       {
         register ssize_t
@@ -614,12 +614,12 @@ MagickExport MagickBooleanType ListMagicInfo(FILE *file,
 
         for (j=0; magic_info[i]->target[j] != '\0'; j++)
           if (isprint((int) ((unsigned char) magic_info[i]->target[j])) != 0)
-            (void) fprintf(file,"%c",magic_info[i]->target[j]);
+            (void) FormatLocaleFile(file,"%c",magic_info[i]->target[j]);
           else
-            (void) fprintf(file,"\\%03o",(unsigned int)
+            (void) FormatLocaleFile(file,"\\%03o",(unsigned int)
               ((unsigned char) magic_info[i]->target[j]));
       }
-    (void) fprintf(file,"\n");
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   magic_info=(const MagicInfo **) RelinquishMagickMemory((void *) magic_info);
index af13311a8248001d30f5a289ae723a659b6d6685..db6c5c3d5370636848dbc7bbeaee22f346b104bc 100644 (file)
 #define MAGICKCORE_HAVE_FORK 1
 #endif
 
+/* Define to 1 if you have the `fprintf_l' function. */
+/* #undef HAVE_FPRINTF_L */
+
 /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
 #ifndef MAGICKCORE_HAVE_FSEEKO
 #define MAGICKCORE_HAVE_FSEEKO 1
 #define MAGICKCORE_HAVE_VSNPRINTF 1
 #endif
 
+/* Define to 1 if you have the `vsnprintf_l' function. */
+/* #undef HAVE_VSNPRINTF_L */
+
 /* Define to 1 if you have the `vsprintf' function. */
 #ifndef MAGICKCORE_HAVE_VSPRINTF
 #define MAGICKCORE_HAVE_VSPRINTF 1
index cb73c6e888f5df625c97eb7e3949678edf556e1e..676a08647a486b99e376af5c657e3b6aebbce601 100644 (file)
@@ -954,17 +954,17 @@ MagickExport MagickBooleanType ListMagickInfo(FILE *file,
     return(MagickFalse);
   ClearMagickException(exception);
 #if !defined(MAGICKCORE_MODULES_SUPPORT)
-  (void) fprintf(file,"   Format  Mode  Description\n");
+  (void) FormatLocaleFile(file,"   Format  Mode  Description\n");
 #else
-  (void) fprintf(file,"   Format  Module    Mode  Description\n");
+  (void) FormatLocaleFile(file,"   Format  Module    Mode  Description\n");
 #endif
-  (void) fprintf(file,"--------------------------------------------------------"
+  (void) FormatLocaleFile(file,"--------------------------------------------------------"
     "-----------------------\n");
   for (i=0; i < (ssize_t) number_formats; i++)
   {
     if (magick_info[i]->stealth != MagickFalse)
       continue;
-    (void) fprintf(file,"%9s%c ",magick_info[i]->name != (char *) NULL ?
+    (void) FormatLocaleFile(file,"%9s%c ",magick_info[i]->name != (char *) NULL ?
       magick_info[i]->name : "",
       magick_info[i]->blob_support != MagickFalse ? '*' : ' ');
 #if defined(MAGICKCORE_MODULES_SUPPORT)
@@ -977,17 +977,17 @@ MagickExport MagickBooleanType ListMagickInfo(FILE *file,
         (void) CopyMagickString(module,magick_info[i]->module,MaxTextExtent);
       (void) ConcatenateMagickString(module,"          ",MaxTextExtent);
       module[9]='\0';
-      (void) fprintf(file,"%9s ",module);
+      (void) FormatLocaleFile(file,"%9s ",module);
     }
 #endif
-    (void) fprintf(file,"%c%c%c ",magick_info[i]->decoder ? 'r' : '-',
+    (void) FormatLocaleFile(file,"%c%c%c ",magick_info[i]->decoder ? 'r' : '-',
       magick_info[i]->encoder ? 'w' : '-',magick_info[i]->encoder != NULL &&
       magick_info[i]->adjoin != MagickFalse ? '+' : '-');
     if (magick_info[i]->description != (char *) NULL)
-      (void) fprintf(file,"  %s",magick_info[i]->description);
+      (void) FormatLocaleFile(file,"  %s",magick_info[i]->description);
     if (magick_info[i]->version != (char *) NULL)
-      (void) fprintf(file," (%s)",magick_info[i]->version);
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file," (%s)",magick_info[i]->version);
+    (void) FormatLocaleFile(file,"\n");
     if (magick_info[i]->note != (char *) NULL)
       {
         char
@@ -998,17 +998,17 @@ MagickExport MagickBooleanType ListMagickInfo(FILE *file,
           {
             for (j=0; text[j] != (char *) NULL; j++)
             {
-              (void) fprintf(file,"           %s\n",text[j]);
+              (void) FormatLocaleFile(file,"           %s\n",text[j]);
               text[j]=DestroyString(text[j]);
             }
             text=(char **) RelinquishMagickMemory(text);
           }
       }
   }
-  (void) fprintf(file,"\n* native blob support\n");
-  (void) fprintf(file,"r read support\n");
-  (void) fprintf(file,"w write support\n");
-  (void) fprintf(file,"+ support for multiple images\n");
+  (void) FormatLocaleFile(file,"\n* native blob support\n");
+  (void) FormatLocaleFile(file,"r read support\n");
+  (void) FormatLocaleFile(file,"w write support\n");
+  (void) FormatLocaleFile(file,"+ support for multiple images\n");
   (void) fflush(file);
   magick_info=(const MagickInfo **) RelinquishMagickMemory((void *)
     magick_info);
index 65a2b71c59b15a71f2afc861ae899da887867e62..9d5b6758a6476fae0f36999216fe06f9e094cba3 100644 (file)
@@ -336,8 +336,8 @@ extern "C" {
 #define FormatImageProperty  PrependMagickMethod(FormatImageProperty)
 #define FormatMagickCaption  PrependMagickMethod(FormatMagickCaption)
 #define FormatMagickSize  PrependMagickMethod(FormatMagickSize)
-#define FormatMagickStringList  PrependMagickMethod(FormatMagickStringList)
-#define FormatMagickString  PrependMagickMethod(FormatMagickString)
+#define FormatLocaleStringList  PrependMagickMethod(FormatLocaleStringList)
+#define FormatLocaleString  PrependMagickMethod(FormatLocaleString)
 #define FormatMagickTime  PrependMagickMethod(FormatMagickTime)
 #define FormatStringList  PrependMagickMethod(FormatStringList)
 #define FormatString  PrependMagickMethod(FormatString)
index b5d6dae04b8bc0bd826146e5cee941cb11ead630..f8397bb9368209c2ce3c60780d4d0ccf11d6e8ec 100644 (file)
@@ -674,27 +674,27 @@ MagickExport MagickBooleanType ListMimeInfo(FILE *file,ExceptionInfo *exception)
         (strcasecmp(path,mime_info[i]->path) != 0))
       {
         if (mime_info[i]->path != (char *) NULL)
-          (void) fprintf(file,"\nPath: %s\n\n",mime_info[i]->path);
-        (void) fprintf(file,"Type                   Description\n");
-        (void) fprintf(file,"-------------------------------------------------"
+          (void) FormatLocaleFile(file,"\nPath: %s\n\n",mime_info[i]->path);
+        (void) FormatLocaleFile(file,"Type                   Description\n");
+        (void) FormatLocaleFile(file,"-------------------------------------------------"
           "------------------------------\n");
       }
     path=mime_info[i]->path;
-    (void) fprintf(file,"%s",mime_info[i]->type);
+    (void) FormatLocaleFile(file,"%s",mime_info[i]->type);
     if (strlen(mime_info[i]->type) <= 25)
       {
         for (j=(ssize_t) strlen(mime_info[i]->type); j <= 27; j++)
-          (void) fprintf(file," ");
+          (void) FormatLocaleFile(file," ");
       }
     else
       {
-        (void) fprintf(file,"\n");
+        (void) FormatLocaleFile(file,"\n");
         for (j=0; j <= 27; j++)
-          (void) fprintf(file," ");
+          (void) FormatLocaleFile(file," ");
       }
     if (mime_info[i]->description != (char *) NULL)
-      (void) fprintf(file,"%s",mime_info[i]->description);
-    (void) fprintf(file,"\n");
+      (void) FormatLocaleFile(file,"%s",mime_info[i]->description);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   mime_info=(const MimeInfo **) RelinquishMagickMemory((void *) mime_info);
@@ -1021,14 +1021,14 @@ MagickExport char *MagickToMime(const char *magick)
   ExceptionInfo
     *exception;
 
-  (void) FormatMagickString(filename,MaxTextExtent,"file.%s",magick);
+  (void) FormatLocaleString(filename,MaxTextExtent,"file.%s",magick);
   LocaleLower(filename);
   exception=AcquireExceptionInfo();
   mime_info=GetMimeInfo(filename,(unsigned char *) " ",1,exception);
   exception=DestroyExceptionInfo(exception);
   if (mime_info != (const MimeInfo *) NULL)
     return(ConstantString(GetMimeType(mime_info)));
-  (void) FormatMagickString(media,MaxTextExtent,"image/x-%s",magick);
+  (void) FormatLocaleString(media,MaxTextExtent,"image/x-%s",magick);
   LocaleLower(media+8);
   return(ConstantString(media));
 }
index 60a979d7a757776fe4a3e51d6958909839ab8326..a3cd583a94d656012de4141c2d97eeccbfae97c6 100644 (file)
@@ -632,7 +632,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
           break;
         }
       }
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s",directory,filename);
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s",directory,filename);
       if (IsPathAccessible(path) == MagickFalse)
         {
           ThrowFileException(exception,ConfigureWarning,
@@ -674,7 +674,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
             "RegistryKeyLookupFailed","`%s'",registery_key);
           return(MagickFalse);
         }
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",(char *) key_value,
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",(char *) key_value,
         DirectorySeparator,filename);
       key_value=(unsigned char *) RelinquishMagickMemory(key_value);
       if (IsPathAccessible(path) == MagickFalse)
@@ -702,7 +702,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
           Search MAGICK_HOME.
         */
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",home,
           DirectorySeparator,filename);
 #else
         const char
@@ -722,7 +722,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
             break;
           }
         }
-        (void) FormatMagickString(path,MaxTextExtent,"%s/lib/%s/%s",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s/lib/%s/%s",home,
           directory,filename);
 #endif
         home=DestroyString(home);
@@ -736,7 +736,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
         Search based on executable directory.
       */
 #if !defined(MAGICKCORE_POSIX_SUPPORT)
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
         DirectorySeparator,filename);
 #else
       char
@@ -761,7 +761,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
       }
       (void) CopyMagickString(prefix,GetClientPath(),MaxTextExtent);
       ChopPathComponents(prefix,1);
-      (void) FormatMagickString(path,MaxTextExtent,
+      (void) FormatLocaleString(path,MaxTextExtent,
         "%s/lib/%s/modules-Q%d/%s/%s",prefix,MAGICKCORE_LIBRARY_RELATIVE_PATH,
         MAGICKCORE_QUANTUM_DEPTH,directory,filename);
 #endif
@@ -796,7 +796,7 @@ static MagickBooleanType GetMagickModulePath(const char *filename,
         /*
           Search $HOME/.magick.
         */
-        (void) FormatMagickString(path,MaxTextExtent,"%s%s.magick%s%s",home,
+        (void) FormatLocaleString(path,MaxTextExtent,"%s%s.magick%s%s",home,
           DirectorySeparator,DirectorySeparator,filename);
         home=DestroyString(home);
         if (IsPathAccessible(path) != MagickFalse)
@@ -998,9 +998,9 @@ MagickExport MagickBooleanType InvokeDynamicImageFilter(const char *tag,
     Locate the module.
   */
 #if !defined(MAGICKCORE_NAMESPACE_PREFIX)
-  (void) FormatMagickString(name,MaxTextExtent,"%sImage",tag);
+  (void) FormatLocaleString(name,MaxTextExtent,"%sImage",tag);
 #else
-  (void) FormatMagickString(name,MaxTextExtent,"%s%sImage",
+  (void) FormatLocaleString(name,MaxTextExtent,"%s%sImage",
     MAGICKCORE_NAMESPACE_PREFIX,tag);
 #endif
   /*
@@ -1088,14 +1088,14 @@ MagickExport MagickBooleanType ListModuleInfo(FILE *file,
   (void) GetMagickModulePath(filename,MagickImageCoderModule,module_path,
     exception);
   GetPathComponent(module_path,HeadPath,path);
-  (void) fprintf(file,"\nPath: %s\n\n",path);
-  (void) fprintf(file,"Image Coder\n");
-  (void) fprintf(file,"-------------------------------------------------"
+  (void) FormatLocaleFile(file,"\nPath: %s\n\n",path);
+  (void) FormatLocaleFile(file,"Image Coder\n");
+  (void) FormatLocaleFile(file,"-------------------------------------------------"
     "------------------------------\n");
   for (i=0; i < (ssize_t) number_modules; i++)
   {
-    (void) fprintf(file,"%s",modules[i]);
-    (void) fprintf(file,"\n");
+    (void) FormatLocaleFile(file,"%s",modules[i]);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   /*
@@ -1114,14 +1114,14 @@ MagickExport MagickBooleanType ListModuleInfo(FILE *file,
   (void) GetMagickModulePath(filename,MagickImageFilterModule,module_path,
     exception);
   GetPathComponent(module_path,HeadPath,path);
-  (void) fprintf(file,"\nPath: %s\n\n",path);
-  (void) fprintf(file,"Image Filter\n");
-  (void) fprintf(file,"-------------------------------------------------"
+  (void) FormatLocaleFile(file,"\nPath: %s\n\n",path);
+  (void) FormatLocaleFile(file,"Image Filter\n");
+  (void) FormatLocaleFile(file,"-------------------------------------------------"
     "------------------------------\n");
   for (i=0; i < (ssize_t) number_modules; i++)
   {
-    (void) fprintf(file,"%s",modules[i]);
-    (void) fprintf(file,"\n");
+    (void) FormatLocaleFile(file,"%s",modules[i]);
+    (void) FormatLocaleFile(file,"\n");
   }
   (void) fflush(file);
   /*
@@ -1452,7 +1452,7 @@ static void TagToCoderModuleName(const char *tag,char *name)
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",tag);
   assert(name != (char *) NULL);
 #if defined(MAGICKCORE_LTDL_DELEGATE)
-  (void) FormatMagickString(name,MaxTextExtent,"%s.la",tag);
+  (void) FormatLocaleString(name,MaxTextExtent,"%s.la",tag);
   (void) LocaleLower(name);
 #else
 #if defined(MAGICKCORE_WINDOWS_SUPPORT)
@@ -1461,9 +1461,9 @@ static void TagToCoderModuleName(const char *tag,char *name)
   else
     {
 #if defined(_DEBUG)
-      (void) FormatMagickString(name,MaxTextExtent,"IM_MOD_DB_%s_.dll",tag);
+      (void) FormatLocaleString(name,MaxTextExtent,"IM_MOD_DB_%s_.dll",tag);
 #else
-      (void) FormatMagickString(name,MaxTextExtent,"IM_MOD_RL_%s_.dll",tag);
+      (void) FormatLocaleString(name,MaxTextExtent,"IM_MOD_RL_%s_.dll",tag);
 #endif
     }
 #endif
@@ -1501,9 +1501,9 @@ static void TagToFilterModuleName(const char *tag,char *name)
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",tag);
   assert(name != (char *) NULL);
 #if !defined(MAGICKCORE_LTDL_DELEGATE)
-  (void) FormatMagickString(name,MaxTextExtent,"%s.dll",tag);
+  (void) FormatLocaleString(name,MaxTextExtent,"%s.dll",tag);
 #else
-  (void) FormatMagickString(name,MaxTextExtent,"%s.la",tag);
+  (void) FormatLocaleString(name,MaxTextExtent,"%s.la",tag);
 #endif
 }
 \f
@@ -1547,15 +1547,15 @@ static void TagToModuleName(const char *tag,const char *format,char *module)
   (void) CopyMagickString(name,tag,MaxTextExtent);
   LocaleUpper(name);
 #if !defined(MAGICKCORE_NAMESPACE_PREFIX)
-  (void) FormatMagickString(module,MaxTextExtent,format,name);
+  (void) FormatLocaleString(module,MaxTextExtent,format,name);
 #else
   {
     char
       prefix_format[MaxTextExtent];
 
-    (void) FormatMagickString(prefix_format,MaxTextExtent,"%s%s",
+    (void) FormatLocaleString(prefix_format,MaxTextExtent,"%s%s",
       MAGICKCORE_NAMESPACE_PREFIX,format);
-    (void) FormatMagickString(module,MaxTextExtent,prefix_format,name);
+    (void) FormatLocaleString(module,MaxTextExtent,prefix_format,name);
   }
 #endif
 }
index 63f945080cdc4c9cc5dff4ced4e150a4303c8ab3..48a661ac427bbeec08b8e61292910ce8952034ed 100644 (file)
@@ -32,7 +32,7 @@ static inline MagickBooleanType SetImageProgress(const Image *image,
 
   if (image->progress_monitor == (MagickProgressMonitor) NULL)
     return(MagickTrue);
-  (void) FormatMagickString(message,MaxTextExtent,"%s/%s",tag,image->filename);
+  (void) FormatLocaleString(message,MaxTextExtent,"%s/%s",tag,image->filename);
   return(image->progress_monitor(message,offset,extent,image->client_data));
 }
 
index 01a4ef84c566922d3a74002af4ebcfe2eafe73e5..7b6376387ca44986ab1c4310909d75c0c8778087 100644 (file)
@@ -509,7 +509,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
       (void) ResetMagickMemory(&frame_info,0,sizeof(frame_info));
       frame_info.width=extract_info.width;
       frame_info.height=extract_info.height;
-      (void) FormatMagickString(absolute_geometry,MaxTextExtent,"%s!",
+      (void) FormatLocaleString(absolute_geometry,MaxTextExtent,"%s!",
         montage_info->frame);
       flags=ParseMetaGeometry(absolute_geometry,&frame_info.outer_bevel,
         &frame_info.inner_bevel,&frame_info.width,&frame_info.height);
@@ -660,7 +660,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
       GetMontageGeometry(montage_info->tile,number_images,&x_offset,&y_offset,
         &sans,&sans);
     y_offset+=(ssize_t) title_offset;
-    (void) FormatMagickString(montage->montage,MaxTextExtent,
+    (void) FormatLocaleString(montage->montage,MaxTextExtent,
       "%.20gx%.20g%+.20g%+.20g",(double) (extract_info.width+
       (extract_info.x+border_width)*2),(double) (extract_info.height+
       (extract_info.y+border_width)*2+(double) ((metrics.ascent-
@@ -697,7 +697,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
         clone_info->gravity=CenterGravity;
         clone_info->pointsize*=2.0;
         (void) GetTypeMetrics(image_list[0],clone_info,&metrics);
-        (void) FormatMagickString(geometry,MaxTextExtent,
+        (void) FormatLocaleString(geometry,MaxTextExtent,
           "%.20gx%.20g%+.20g%+.20g",(double) montage->columns,(double)
           (metrics.ascent-metrics.descent),0.0,(double) extract_info.y+4);
         (void) CloneString(&clone_info->geometry,geometry);
@@ -767,7 +767,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
       tile_image->gravity=montage_info->gravity;
       if (image->gravity != UndefinedGravity)
         tile_image->gravity=image->gravity;
-      (void) FormatMagickString(tile_geometry,MaxTextExtent,"%.20gx%.20g+0+0",
+      (void) FormatLocaleString(tile_geometry,MaxTextExtent,"%.20gx%.20g+0+0",
         (double) image->columns,(double) image->rows);
       flags=ParseGravityGeometry(tile_image,tile_geometry,&geometry,exception);
       x=(ssize_t) (geometry.x+border_width);
@@ -834,7 +834,7 @@ MagickExport Image *MontageImageList(const ImageInfo *image_info,
               /*
                 Annotate composite tile with label.
               */
-              (void) FormatMagickString(geometry,MaxTextExtent,
+              (void) FormatLocaleString(geometry,MaxTextExtent,
                 "%.20gx%.20g%+.20g%+.20g",(double) ((montage_info->frame ?
                 image->columns : width)-2*border_width),(double)
                 (metrics.ascent-metrics.descent+4)*MultilineCensus(value),
index db3175c8a39ddd783071438fe593dd6e6dbb30ad..fff530ee87a30ccf1ff48b3af9648079c880d61c 100644 (file)
@@ -329,7 +329,7 @@ static KernelInfo *ParseKernelArray(const char *kernel_string)
       kernel->values[i] = nan; /* do not include this value in kernel */
     }
     else {
-      kernel->values[i] = StringToDouble(token,(char **) NULL);
+      kernel->values[i] = LocaleToDouble(token,(char **) NULL);
       ( kernel->values[i] < 0)
           ?  ( kernel->negative_range += kernel->values[i] )
           :  ( kernel->positive_range += kernel->values[i] );
@@ -414,7 +414,7 @@ static KernelInfo *ParseKernelName(const char *kernel_string)
 
 #if 0
   /* For Debugging Geometry Input */
-  fprintf(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
+  FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
        flags, args.rho, args.sigma, args.xi, args.psi );
 #endif
 
@@ -516,7 +516,7 @@ MagickExport KernelInfo *AcquireKernelInfo(const char *kernel_string)
 
       /* Error handling -- this is not proper error handling! */
       if ( new_kernel == (KernelInfo *) NULL ) {
-        fprintf(stderr, "Failed to parse kernel number #%.20g\n",(double)
+        FormatLocaleFile(stderr, "Failed to parse kernel number #%.20g\n",(double)
           kernel_number);
         if ( kernel != (KernelInfo *) NULL )
           kernel=DestroyKernelInfo(kernel);
@@ -3852,7 +3852,7 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
                       channel, kernel, exception);
 
       if ( verbose == MagickTrue )
-        (void) fprintf(stderr, "%s:%.20g.%.20g #%.20g => Changed %.20g\n",
+        (void) FormatLocaleFile(stderr, "%s:%.20g.%.20g #%.20g => Changed %.20g\n",
             CommandOptionToMnemonic(MagickMorphologyOptions, method),
             1.0,0.0,1.0, (double) changed);
 
@@ -3998,11 +3998,11 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
         /* Extra information for debugging compound operations */
         if ( verbose == MagickTrue ) {
           if ( stage_limit > 1 )
-            (void) FormatMagickString(v_info,MaxTextExtent,"%s:%.20g.%.20g -> ",
+            (void) FormatLocaleString(v_info,MaxTextExtent,"%s:%.20g.%.20g -> ",
              CommandOptionToMnemonic(MagickMorphologyOptions,method),(double)
              method_loop,(double) stage_loop);
           else if ( primitive != method )
-            (void) FormatMagickString(v_info, MaxTextExtent, "%s:%.20g -> ",
+            (void) FormatLocaleString(v_info, MaxTextExtent, "%s:%.20g -> ",
               CommandOptionToMnemonic(MagickMorphologyOptions, method),(double)
               method_loop);
           else
@@ -4037,8 +4037,8 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
 
           if ( verbose == MagickTrue ) {
             if ( kernel_loop > 1 )
-              fprintf(stderr, "\n"); /* add end-of-line from previous */
-            (void) fprintf(stderr, "%s%s%s:%.20g.%.20g #%.20g => Changed %.20g",
+              FormatLocaleFile(stderr, "\n"); /* add end-of-line from previous */
+            (void) FormatLocaleFile(stderr, "%s%s%s:%.20g.%.20g #%.20g => Changed %.20g",
               v_info,CommandOptionToMnemonic(MagickMorphologyOptions,
               primitive),(this_kernel == rflt_kernel ) ? "*" : "",
               (double) (method_loop+kernel_loop-1),(double) kernel_number,
@@ -4060,16 +4060,16 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
         } /* End Loop 4: Iterate the kernel with primitive */
 
         if ( verbose == MagickTrue && kernel_changed != (size_t)changed )
-          fprintf(stderr, "   Total %.20g",(double) kernel_changed);
+          FormatLocaleFile(stderr, "   Total %.20g",(double) kernel_changed);
         if ( verbose == MagickTrue && stage_loop < stage_limit )
-          fprintf(stderr, "\n"); /* add end-of-line before looping */
+          FormatLocaleFile(stderr, "\n"); /* add end-of-line before looping */
 
 #if 0
-    fprintf(stderr, "--E-- image=0x%lx\n", (unsigned long)image);
-    fprintf(stderr, "      curr =0x%lx\n", (unsigned long)curr_image);
-    fprintf(stderr, "      work =0x%lx\n", (unsigned long)work_image);
-    fprintf(stderr, "      save =0x%lx\n", (unsigned long)save_image);
-    fprintf(stderr, "      union=0x%lx\n", (unsigned long)rslt_image);
+    FormatLocaleFile(stderr, "--E-- image=0x%lx\n", (unsigned long)image);
+    FormatLocaleFile(stderr, "      curr =0x%lx\n", (unsigned long)curr_image);
+    FormatLocaleFile(stderr, "      work =0x%lx\n", (unsigned long)work_image);
+    FormatLocaleFile(stderr, "      save =0x%lx\n", (unsigned long)save_image);
+    FormatLocaleFile(stderr, "      union=0x%lx\n", (unsigned long)rslt_image);
 #endif
 
       } /* End Loop 3: Primative (staging) Loop for Coumpound Methods */
@@ -4087,7 +4087,7 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
         case TopHatMorphology:
         case BottomHatMorphology:
           if ( verbose == MagickTrue )
-            fprintf(stderr, "\n%s: Difference with original image",
+            FormatLocaleFile(stderr, "\n%s: Difference with original image",
                  CommandOptionToMnemonic(MagickMorphologyOptions, method) );
           (void) CompositeImageChannel(curr_image,
                   (ChannelType) (channel & ~SyncChannels),
@@ -4095,7 +4095,7 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
           break;
         case EdgeMorphology:
           if ( verbose == MagickTrue )
-            fprintf(stderr, "\n%s: Difference of Dilate and Erode",
+            FormatLocaleFile(stderr, "\n%s: Difference of Dilate and Erode",
                  CommandOptionToMnemonic(MagickMorphologyOptions, method) );
           (void) CompositeImageChannel(curr_image,
                   (ChannelType) (channel & ~SyncChannels),
@@ -4112,15 +4112,15 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
       else if ( rslt_compose == NoCompositeOp )
         { if ( verbose == MagickTrue ) {
             if ( this_kernel->next != (KernelInfo *) NULL )
-              fprintf(stderr, " (re-iterate)");
+              FormatLocaleFile(stderr, " (re-iterate)");
             else
-              fprintf(stderr, " (done)");
+              FormatLocaleFile(stderr, " (done)");
           }
           rslt_image = curr_image; /* return result, and re-iterate */
         }
       else if ( rslt_image == (Image *) NULL)
         { if ( verbose == MagickTrue )
-            fprintf(stderr, " (save for compose)");
+            FormatLocaleFile(stderr, " (save for compose)");
           rslt_image = curr_image;
           curr_image = (Image *) image;  /* continue with original image */
         }
@@ -4133,7 +4133,7 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
           ** IE: Turn off SVG composition 'alpha blending'.
           */
           if ( verbose == MagickTrue )
-            fprintf(stderr, " (compose \"%s\")",
+            FormatLocaleFile(stderr, " (compose \"%s\")",
                  CommandOptionToMnemonic(MagickComposeOptions, rslt_compose) );
           (void) CompositeImageChannel(rslt_image,
                (ChannelType) (channel & ~SyncChannels), rslt_compose,
@@ -4142,7 +4142,7 @@ MagickExport Image *MorphologyApply(const Image *image, const ChannelType
           curr_image = (Image *) image;  /* continue with original image */
         }
       if ( verbose == MagickTrue )
-        fprintf(stderr, "\n");
+        FormatLocaleFile(stderr, "\n");
 
       /* loop to the next kernel in a multi-kernel list */
       norm_kernel = norm_kernel->next;
@@ -4548,7 +4548,7 @@ MagickExport void ScaleGeometryKernelInfo (KernelInfo *kernel,
 
 #if 0
   /* For Debugging Geometry Input */
-  fprintf(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
+  FormatLocaleFile(stderr, "Geometry = 0x%04X : %lg x %lg %+lg %+lg\n",
        flags, args.rho, args.sigma, args.xi, args.psi );
 #endif
 
@@ -4736,38 +4736,38 @@ MagickExport void ShowKernelInfo(KernelInfo *kernel)
 
   for (c=0, k=kernel;  k != (KernelInfo *) NULL;  c++, k=k->next ) {
 
-    fprintf(stderr, "Kernel");
+    FormatLocaleFile(stderr, "Kernel");
     if ( kernel->next != (KernelInfo *) NULL )
-      fprintf(stderr, " #%lu", (unsigned long) c );
-    fprintf(stderr, " \"%s",
+      FormatLocaleFile(stderr, " #%lu", (unsigned long) c );
+    FormatLocaleFile(stderr, " \"%s",
           CommandOptionToMnemonic(MagickKernelOptions, k->type) );
     if ( fabs(k->angle) > MagickEpsilon )
-      fprintf(stderr, "@%lg", k->angle);
-    fprintf(stderr, "\" of size %lux%lu%+ld%+ld",(unsigned long) k->width,
+      FormatLocaleFile(stderr, "@%lg", k->angle);
+    FormatLocaleFile(stderr, "\" of size %lux%lu%+ld%+ld",(unsigned long) k->width,
       (unsigned long) k->height,(long) k->x,(long) k->y);
-    fprintf(stderr,
+    FormatLocaleFile(stderr,
           " with values from %.*lg to %.*lg\n",
           GetMagickPrecision(), k->minimum,
           GetMagickPrecision(), k->maximum);
-    fprintf(stderr, "Forming a output range from %.*lg to %.*lg",
+    FormatLocaleFile(stderr, "Forming a output range from %.*lg to %.*lg",
           GetMagickPrecision(), k->negative_range,
           GetMagickPrecision(), k->positive_range);
     if ( fabs(k->positive_range+k->negative_range) < MagickEpsilon )
-      fprintf(stderr, " (Zero-Summing)\n");
+      FormatLocaleFile(stderr, " (Zero-Summing)\n");
     else if ( fabs(k->positive_range+k->negative_range-1.0) < MagickEpsilon )
-      fprintf(stderr, " (Normalized)\n");
+      FormatLocaleFile(stderr, " (Normalized)\n");
     else
-      fprintf(stderr, " (Sum %.*lg)\n",
+      FormatLocaleFile(stderr, " (Sum %.*lg)\n",
           GetMagickPrecision(), k->positive_range+k->negative_range);
     for (i=v=0; v < k->height; v++) {
-      fprintf(stderr, "%2lu:", (unsigned long) v );
+      FormatLocaleFile(stderr, "%2lu:", (unsigned long) v );
       for (u=0; u < k->width; u++, i++)
         if ( IsNan(k->values[i]) )
-          fprintf(stderr," %*s", GetMagickPrecision()+3, "nan");
+          FormatLocaleFile(stderr," %*s", GetMagickPrecision()+3, "nan");
         else
-          fprintf(stderr," %*.*lg", GetMagickPrecision()+3,
+          FormatLocaleFile(stderr," %*.*lg", GetMagickPrecision()+3,
               GetMagickPrecision(), k->values[i]);
-      fprintf(stderr,"\n");
+      FormatLocaleFile(stderr,"\n");
     }
   }
 }
index 166fc6f04b94b1be35a3d641bd4ed3b12cab9eab..8ebee1fb38c494ca789006bf65c41e1d57bd66d0 100644 (file)
@@ -182,7 +182,7 @@ BOOL WINAPI DllMain(HINSTANCE handle,DWORD reason,LPVOID lpvReserved)
                       module_path=DestroyString(module_path);
                       return(FALSE);
                     }
-                  (void) FormatMagickString(variable,16*MaxTextExtent,
+                  (void) FormatLocaleString(variable,16*MaxTextExtent,
                     "%s;%s",module_path,path);
                   SetEnvironmentVariable("PATH",variable);
                   variable=DestroyString(variable);
@@ -507,18 +507,18 @@ MagickExport void NTErrorHandler(const ExceptionType severity,
     }
   message=GetExceptionMessage(errno);
   if ((description != (char *) NULL) && errno)
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s) [%s].\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s) [%s].\n",
       GetClientName(),reason,description,message);
   else
     if (description != (char *) NULL)
-      (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s).\n",
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s).\n",
         GetClientName(),reason,description);
     else
       if (errno != 0)
-        (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s [%s].\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s [%s].\n",
           GetClientName(),reason,message);
       else
-        (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s.\n",
+        (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s.\n",
           GetClientName(),reason);
   message=DestroyString(message);
   (void) MessageBox(NULL,buffer,"ImageMagick Exception",MB_OK | MB_TASKMODAL |
@@ -904,7 +904,7 @@ static int NTLocateGhostscript(const char **product_family,int *major_version,
     REGSAM
       mode;
 
-    (void) FormatMagickString(key,MaxTextExtent,"SOFTWARE\\%s",products[i]);
+    (void) FormatLocaleString(key,MaxTextExtent,"SOFTWARE\\%s",products[i]);
     root=HKEY_LOCAL_MACHINE;
     mode=KEY_READ;
 #if defined(KEY_WOW64_32KEY)
@@ -993,7 +993,7 @@ static int NTGhostscriptGetString(const char *name,char *value,
     (void) NTLocateGhostscript(&product_family,&major_version,&minor_version);
   if (product_family == NULL)
     return(FALSE);
-  (void) FormatMagickString(key,MaxTextExtent,"SOFTWARE\\%s\\%d.%02d",
+  (void) FormatLocaleString(key,MaxTextExtent,"SOFTWARE\\%s\\%d.%02d",
     product_family,major_version,minor_version);
   for (i=0; i < (ssize_t) (sizeof(hkeys)/sizeof(hkeys[0])); i++)
   {
@@ -1144,7 +1144,7 @@ MagickExport int NTGhostscriptFonts(char *path,int length)
     q=strchr(path,DirectoryListSeparator);
     if (q != (char *) NULL)
       *q='\0';
-    (void) FormatMagickString(filename,MaxTextExtent,"%s%sfonts.dir",path,
+    (void) FormatLocaleString(filename,MaxTextExtent,"%s%sfonts.dir",path,
       DirectorySeparator);
     if (IsPathAccessible(filename) != MagickFalse)
       return(TRUE);
@@ -1595,7 +1595,7 @@ MagickExport unsigned char *NTRegistryKeyLookup(const char *subkey)
   /*
     Look-up base key.
   */
-  (void) FormatMagickString(package_key,MaxTextExtent,"SOFTWARE\\%s\\%s\\Q:%d",
+  (void) FormatLocaleString(package_key,MaxTextExtent,"SOFTWARE\\%s\\%s\\Q:%d",
     MagickPackageName,MagickLibVersionText,MAGICKCORE_QUANTUM_DEPTH);
   (void) LogMagickEvent(ConfigureEvent,GetMagickModule(),"%s",package_key);
   registry_key=(HKEY) INVALID_HANDLE_VALUE;
@@ -1728,7 +1728,7 @@ MagickExport unsigned char *NTResourceToBlob(const char *id)
 
   assert(id != (const char *) NULL);
   (void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",id);
-  (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
+  (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",GetClientPath(),
     DirectorySeparator,GetClientName());
   if (IsPathAccessible(path) != MagickFalse)
     handle=GetModuleHandle(path);
@@ -2222,10 +2222,10 @@ MagickExport void NTWarningHandler(const ExceptionType severity,
   if (reason == (char *) NULL)
     return;
   if (description == (char *) NULL)
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s.\n",GetClientName(),
       reason);
   else
-    (void) FormatMagickString(buffer,MaxTextExtent,"%s: %s (%s).\n",
+    (void) FormatLocaleString(buffer,MaxTextExtent,"%s: %s (%s).\n",
       GetClientName(),reason,description);
   (void) MessageBox(NULL,buffer,"ImageMagick Warning",MB_OK | MB_TASKMODAL |
     MB_SETFOREGROUND | MB_ICONINFORMATION);
index 875b7e4ab6f2fc28a86318288ed59c97d350feca..cd2d90286b5ae9efa58762537e755801b460c525 100644 (file)
@@ -191,6 +191,16 @@ extern "C" {
 #if !defined(popen)
 #  define popen  _popen
 #endif
+#if !defined(fprintf)
+#if !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER < 1500))
+#define fprintf  _fprintf_s
+#endif
+#endif
+#if !defined(fprintf_l)
+#if !defined(_MSC_VER) || (defined(_MSC_VER) && (_MSC_VER < 1500))
+#define fprintf_l  _fprintf_s_l
+#endif
+#endif
 #if !defined(read)
 #  define read  _read
 #endif
index da584c4a13f380a29e1502c1122d4ec9660952ac..7460c360a55a7de8d7621c2a554cb14d5a62251d 100644 (file)
@@ -2134,7 +2134,7 @@ MagickExport MagickBooleanType ListCommandOptions(FILE *file,
   {
     if (option_info[i].stealth != MagickFalse)
       continue;
-    (void) fprintf(file,"%s\n",option_info[i].mnemonic);
+    (void) FormatLocaleFile(file,"%s\n",option_info[i].mnemonic);
   }
   return(MagickTrue);
 }
index 9629ba4d6362409ec597cf43ed4543177b588f6a..933dc9bc866e4efc0bb5131d7b815b7c57ad07f0 100644 (file)
@@ -572,33 +572,33 @@ MagickExport MagickBooleanType ListPolicyInfo(FILE *file,
     if (((path == (const char *) NULL) ||
          (LocaleCompare(path,policy_info[i]->path) != 0)) &&
          (policy_info[i]->path != (char *) NULL))
-      (void) fprintf(file,"\nPath: %s\n",policy_info[i]->path);
+      (void) FormatLocaleFile(file,"\nPath: %s\n",policy_info[i]->path);
     path=policy_info[i]->path;
     domain=CommandOptionToMnemonic(MagickPolicyDomainOptions,
       policy_info[i]->domain);
-    (void) fprintf(file,"  Policy: %s\n",domain);
+    (void) FormatLocaleFile(file,"  Policy: %s\n",domain);
     if ((policy_info[i]->domain == ResourcePolicyDomain) ||
         (policy_info[i]->domain == SystemPolicyDomain))
       {
         if (policy_info[i]->name != (char *) NULL)
-          (void) fprintf(file,"    name: %s\n",policy_info[i]->name);
+          (void) FormatLocaleFile(file,"    name: %s\n",policy_info[i]->name);
         if (policy_info[i]->value != (char *) NULL)
-          (void) fprintf(file,"    value: %s\n",policy_info[i]->value);
+          (void) FormatLocaleFile(file,"    value: %s\n",policy_info[i]->value);
       }
     else
       {
-        (void) fprintf(file,"    rights: ");
+        (void) FormatLocaleFile(file,"    rights: ");
         if (policy_info[i]->rights == NoPolicyRights)
-          (void) fprintf(file,"None ");
+          (void) FormatLocaleFile(file,"None ");
         if ((policy_info[i]->rights & ReadPolicyRights) != 0)
-          (void) fprintf(file,"Read ");
+          (void) FormatLocaleFile(file,"Read ");
         if ((policy_info[i]->rights & WritePolicyRights) != 0)
-          (void) fprintf(file,"Write ");
+          (void) FormatLocaleFile(file,"Write ");
         if ((policy_info[i]->rights & ExecutePolicyRights) != 0)
-          (void) fprintf(file,"Execute ");
-        (void) fprintf(file,"\n");
+          (void) FormatLocaleFile(file,"Execute ");
+        (void) FormatLocaleFile(file,"\n");
         if (policy_info[i]->pattern != (char *) NULL)
-          (void) fprintf(file,"    pattern: %s\n",policy_info[i]->pattern);
+          (void) FormatLocaleFile(file,"    pattern: %s\n",policy_info[i]->pattern);
       }
   }
   policy_info=(const PolicyInfo **) RelinquishMagickMemory((void *)
index 01894576052f9fc79df8628b939d59f95ce21dfd..669942a1d1a5c0a2d29e71e3780b1ce551d202a9 100644 (file)
@@ -1688,7 +1688,7 @@ MagickExport MagickBooleanType SetImageProfile(Image *image,const char *name,
   /*
     Inject profile into image properties.
   */
-  (void) FormatMagickString(property,MaxTextExtent,"%s:sans",name);
+  (void) FormatLocaleString(property,MaxTextExtent,"%s:sans",name);
   (void) GetImageProperty(image,property);
   return(status);
 }
index 49dc1cdd7360b19a41ade621ca3fc605f8a56a00..51aa4f2d79d08b46e9edc9d4ddbfc54cc9430866 100644 (file)
@@ -746,7 +746,7 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
    p1=p; \
    for (component=0; component < components; component++) \
    { \
-     length+=FormatMagickString(buffer+length,MaxTextExtent-length, \
+     length+=FormatLocaleString(buffer+length,MaxTextExtent-length, \
        format", ",arg); \
      if (length >= MaxTextExtent - 1) \
        length=MaxTextExtent-1; \
@@ -772,7 +772,7 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
    p1=p; \
    for (component=0; component < components; component++) \
    { \
-     length+=FormatMagickString(buffer+length,MaxTextExtent-length, \
+     length+=FormatLocaleString(buffer+length,MaxTextExtent-length, \
        format", ",arg1, arg2); \
      if (length >= MaxTextExtent - 1) \
        length=MaxTextExtent-1; \
@@ -1419,21 +1419,21 @@ static MagickBooleanType GetEXIFProperty(const Image *image,
                         break;
                       }
                   }
-                  (void) FormatMagickString(key,MaxTextExtent,"%s",
+                  (void) FormatLocaleString(key,MaxTextExtent,"%s",
                     description);
                   break;
                 }
                 case 2:
                 {
                   if (tag_value < 0x10000)
-                    (void) FormatMagickString(key,MaxTextExtent,"#%04lx",
+                    (void) FormatLocaleString(key,MaxTextExtent,"#%04lx",
                       (unsigned long) tag_value);
                   else
                     if (tag_value < 0x20000)
-                      (void) FormatMagickString(key,MaxTextExtent,"@%04lx",
+                      (void) FormatLocaleString(key,MaxTextExtent,"@%04lx",
                         (unsigned long) (tag_value & 0xffff));
                     else
-                      (void) FormatMagickString(key,MaxTextExtent,"unknown");
+                      (void) FormatLocaleString(key,MaxTextExtent,"unknown");
                   break;
                 }
               }
@@ -1596,26 +1596,26 @@ static char *TracePSClippath(const unsigned char *blob,size_t length,
   if (path == (char *) NULL)
     return((char *) NULL);
   message=AcquireString((char *) NULL);
-  (void) FormatMagickString(message,MaxTextExtent,"/ClipImage\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"/ClipImage\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"{\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"{\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"  /c {curveto} bind def\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"  /c {curveto} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"  /l {lineto} bind def\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"  /l {lineto} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"  /m {moveto} bind def\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"  /m {moveto} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "  /v {currentpoint 6 2 roll curveto} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "  /y {2 copy curveto} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "  /z {closepath} bind def\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"  newpath\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"  newpath\n");
   (void) ConcatenateString(&path,message);
   /*
     The clipping path format is defined in "Adobe Photoshop File
@@ -1684,7 +1684,7 @@ static char *TracePSClippath(const unsigned char *blob,size_t length,
         }
         if (in_subpath == MagickFalse)
           {
-            (void) FormatMagickString(message,MaxTextExtent,"  %g %g m\n",
+            (void) FormatLocaleString(message,MaxTextExtent,"  %g %g m\n",
               point[1].x,point[1].y);
             for (i=0; i < 3; i++)
             {
@@ -1700,20 +1700,20 @@ static char *TracePSClippath(const unsigned char *blob,size_t length,
             */
             if ((last[1].x == last[2].x) && (last[1].y == last[2].y) &&
                 (point[0].x == point[1].x) && (point[0].y == point[1].y))
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "  %g %g l\n",point[1].x,point[1].y);
             else
               if ((last[1].x == last[2].x) && (last[1].y == last[2].y))
-                (void) FormatMagickString(message,MaxTextExtent,
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "  %g %g %g %g v\n",point[0].x,point[0].y,
                   point[1].x,point[1].y);
               else
                 if ((point[0].x == point[1].x) && (point[0].y == point[1].y))
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "  %g %g %g %g y\n",last[2].x,last[2].y,
                     point[1].x,point[1].y);
                 else
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "  %g %g %g %g %g %g c\n",last[2].x,
                     last[2].y,point[0].x,point[0].y,point[1].x,point[1].y);
             for (i=0; i < 3; i++)
@@ -1733,20 +1733,20 @@ static char *TracePSClippath(const unsigned char *blob,size_t length,
             */
             if ((last[1].x == last[2].x) && (last[1].y == last[2].y) &&
                 (first[0].x == first[1].x) && (first[0].y == first[1].y))
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "  %g %g l z\n",first[1].x,first[1].y);
             else
               if ((last[1].x == last[2].x) && (last[1].y == last[2].y))
-                (void) FormatMagickString(message,MaxTextExtent,
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "  %g %g %g %g v z\n",first[0].x,first[0].y,
                   first[1].x,first[1].y);
               else
                 if ((first[0].x == first[1].x) && (first[0].y == first[1].y))
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "  %g %g %g %g y z\n",last[2].x,last[2].y,
                     first[1].x,first[1].y);
                 else
-                  (void) FormatMagickString(message,MaxTextExtent,
+                  (void) FormatLocaleString(message,MaxTextExtent,
                     "  %g %g %g %g %g %g c z\n",last[2].x,
                     last[2].y,first[0].x,first[0].y,first[1].x,first[1].y);
             (void) ConcatenateString(&path,message);
@@ -1768,9 +1768,9 @@ static char *TracePSClippath(const unsigned char *blob,size_t length,
   /*
     Returns an empty PS path if the path has no knots.
   */
-  (void) FormatMagickString(message,MaxTextExtent,"  eoclip\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"  eoclip\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"} bind def");
+  (void) FormatLocaleString(message,MaxTextExtent,"} bind def");
   (void) ConcatenateString(&path,message);
   message=DestroyString(message);
   return(path);
@@ -1804,18 +1804,18 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
   if (path == (char *) NULL)
     return((char *) NULL);
   message=AcquireString((char *) NULL);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "<svg width=\"%.20g\" height=\"%.20g\">\n",(double) columns,(double) rows);
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"<g>\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"<g>\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "<path style=\"fill:#00000000;stroke:#00000000;");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,
+  (void) FormatLocaleString(message,MaxTextExtent,
     "stroke-width:0;stroke-antialiasing:false\" d=\"\n");
   (void) ConcatenateString(&path,message);
   (void) ResetMagickMemory(point,0,sizeof(point));
@@ -1881,7 +1881,7 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
         }
         if (in_subpath == MagickFalse)
           {
-            (void) FormatMagickString(message,MaxTextExtent,"M %g,%g\n",
+            (void) FormatLocaleString(message,MaxTextExtent,"M %g,%g\n",
               point[1].x,point[1].y);
             for (i=0; i < 3; i++)
             {
@@ -1893,10 +1893,10 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
           {
             if ((last[1].x == last[2].x) && (last[1].y == last[2].y) &&
                 (point[0].x == point[1].x) && (point[0].y == point[1].y))
-              (void) FormatMagickString(message,MaxTextExtent,"L %g,%g\n",
+              (void) FormatLocaleString(message,MaxTextExtent,"L %g,%g\n",
                 point[1].x,point[1].y);
             else
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "C %g,%g %g,%g %g,%g\n",last[2].x,last[2].y,
                 point[0].x,point[0].y,point[1].x,point[1].y);
             for (i=0; i < 3; i++)
@@ -1912,11 +1912,11 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
           {
             if ((last[1].x == last[2].x) && (last[1].y == last[2].y) &&
                 (first[0].x == first[1].x) && (first[0].y == first[1].y))
-              (void) FormatMagickString(message,MaxTextExtent,
+              (void) FormatLocaleString(message,MaxTextExtent,
                 "L %g,%g Z\n",first[1].x,first[1].y);
             else
               {
-                (void) FormatMagickString(message,MaxTextExtent,
+                (void) FormatLocaleString(message,MaxTextExtent,
                   "C %g,%g %g,%g %g,%g Z\n",last[2].x,
                   last[2].y,first[0].x,first[0].y,first[1].x,first[1].y);
                 (void) ConcatenateString(&path,message);
@@ -1939,11 +1939,11 @@ static char *TraceSVGClippath(const unsigned char *blob,size_t length,
   /*
     Return an empty SVG image if the path does not have knots.
   */
-  (void) FormatMagickString(message,MaxTextExtent,"\"/>\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"\"/>\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"</g>\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"</g>\n");
   (void) ConcatenateString(&path,message);
-  (void) FormatMagickString(message,MaxTextExtent,"</svg>\n");
+  (void) FormatLocaleString(message,MaxTextExtent,"</svg>\n");
   (void) ConcatenateString(&path,message);
   message=DestroyString(message);
   return(path);
@@ -2038,7 +2038,7 @@ MagickExport const char *GetImageProperty(const Image *image,
               char
                 value[MaxTextExtent];
 
-              (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+              (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
                 GetMagickPrecision(),(double) alpha);
               (void) SetImageProperty((Image *) image,property,value);
             }
@@ -2183,7 +2183,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
           /*
             Image channels.
           */
-          (void) FormatMagickString(value,MaxTextExtent,"%s",
+          (void) FormatLocaleString(value,MaxTextExtent,"%s",
             CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t)
             image->colorspace));
           LocaleLower(value);
@@ -2202,7 +2202,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
           colorspace=image->colorspace;
           if (IsGrayImage(image,&image->exception) != MagickFalse)
             colorspace=GRAYColorspace;
-          (void) FormatMagickString(value,MaxTextExtent,"%s",
+          (void) FormatLocaleString(value,MaxTextExtent,"%s",
             CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t)
             colorspace));
           break;
@@ -2218,7 +2218,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("depth",property,5) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
             image->depth);
           break;
         }
@@ -2244,7 +2244,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("group",property,5) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"0x%lx",
+          (void) FormatLocaleString(value,MaxTextExtent,"0x%lx",
             (unsigned long) image_info->group);
           break;
         }
@@ -2254,7 +2254,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("height",property,6) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",
             image->magick_rows != 0 ? (double) image->magick_rows : 256.0);
           break;
         }
@@ -2279,7 +2279,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelKurtosis(image,image_info->channel,&kurtosis,
             &skewness,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),kurtosis);
           break;
         }
@@ -2300,7 +2300,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelRange(image,image_info->channel,&minimum,
             &maximum,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),maximum);
           break;
         }
@@ -2312,7 +2312,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelMean(image,image_info->channel,&mean,
             &standard_deviation,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),mean);
           break;
         }
@@ -2324,7 +2324,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelRange(image,image_info->channel,&minimum,
             &maximum,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),minimum);
           break;
         }
@@ -2362,7 +2362,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("page",property,4) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
               GetImageIndexInList(image)+1);
           break;
         }
@@ -2376,21 +2376,21 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
             format[MaxTextExtent];
 
           (void) FormatMagickSize(GetBlobSize(image),MagickFalse,format);
-          (void) FormatMagickString(value,MaxTextExtent,"%sB",format);
+          (void) FormatLocaleString(value,MaxTextExtent,"%sB",format);
           break;
         }
       if (LocaleNCompare("scenes",property,6) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
             GetImageListLength(image));
           break;
         }
       if (LocaleNCompare("scene",property,5) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
             image->scene);
           if (image_info->number_scenes != 0)
-            (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+            (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
               image_info->scene);
           break;
         }
@@ -2402,7 +2402,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelKurtosis(image,image_info->channel,&kurtosis,
             &skewness,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),skewness);
           break;
         }
@@ -2415,7 +2415,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
 
           (void) GetImageChannelMean(image,image_info->channel,&mean,
             &standard_deviation,&image->exception);
-          (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
             GetMagickPrecision(),standard_deviation);
           break;
         }
@@ -2445,7 +2445,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("width",property,5) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+          (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
             (image->magick_columns != 0 ? image->magick_columns : 256));
           break;
         }
@@ -2455,7 +2455,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("xresolution",property,11) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%g",
             image->x_resolution);
           break;
         }
@@ -2465,7 +2465,7 @@ MagickExport const char *GetMagickProperty(const ImageInfo *image_info,
     {
       if (LocaleNCompare("yresolution",property,11) == 0)
         {
-          (void) FormatMagickString(value,MaxTextExtent,"%g",
+          (void) FormatLocaleString(value,MaxTextExtent,"%g",
             image->y_resolution);
           break;
         }
@@ -2645,7 +2645,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           File size.
         */
-        (void) FormatMagickString(format,MaxTextExtent,"%.20g",(double)
+        (void) FormatLocaleString(format,MaxTextExtent,"%.20g",(double)
           image->extent);
         if (image->extent != (MagickSizeType) ((size_t) image->extent))
           (void) FormatMagickSize(image->extent,MagickFalse,format);
@@ -2731,7 +2731,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image geometry.
         */
-        q+=FormatMagickString(q,extent,"%.20gx%.20g%+.20g%+.20g",(double)
+        q+=FormatLocaleString(q,extent,"%.20gx%.20g%+.20g%+.20g",(double)
           image->page.width,(double) image->page.height,(double) image->page.x,
           (double) image->page.y);
         break;
@@ -2741,7 +2741,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image height.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double) (image->rows != 0 ?
+        q+=FormatLocaleString(q,extent,"%.20g",(double) (image->rows != 0 ?
           image->rows : image->magick_rows));
         break;
       }
@@ -2758,7 +2758,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Number of unique colors.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double) GetNumberColors(image,
+        q+=FormatLocaleString(q,extent,"%.20g",(double) GetNumberColors(image,
           (FILE *) NULL,&image->exception));
         break;
       }
@@ -2804,7 +2804,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Number of images in the list.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double)
+        q+=FormatLocaleString(q,extent,"%.20g",(double)
              GetImageListLength(image));
         break;
       }
@@ -2821,7 +2821,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image index in list.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double)
+        q+=FormatLocaleString(q,extent,"%.20g",(double)
             GetImageIndexInList(image));
         break;
       }
@@ -2830,7 +2830,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image depth.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double)
+        q+=FormatLocaleString(q,extent,"%.20g",(double)
           MAGICKCORE_QUANTUM_DEPTH);
         break;
       }
@@ -2845,7 +2845,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         colorspace=image->colorspace;
         if (IsGrayImage(image,&image->exception) != MagickFalse)
           colorspace=GRAYColorspace;
-        q+=FormatMagickString(q,extent,"%s%s%s",CommandOptionToMnemonic(
+        q+=FormatLocaleString(q,extent,"%s%s%s",CommandOptionToMnemonic(
           MagickClassOptions,(ssize_t) image->storage_class),
           CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t) colorspace),
           image->matte != MagickFalse ? "Matte" : "");
@@ -2857,9 +2857,9 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
           Image scene number.
         */
         if (image_info->number_scenes == 0)
-          q+=FormatMagickString(q,extent,"%.20g",(double) image->scene);
+          q+=FormatLocaleString(q,extent,"%.20g",(double) image->scene);
         else
-          q+=FormatMagickString(q,extent,"%.20g",(double) image_info->scene);
+          q+=FormatLocaleString(q,extent,"%.20g",(double) image_info->scene);
         break;
       }
       case 'u':
@@ -2876,7 +2876,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image width.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double) (image->columns != 0 ?
+        q+=FormatLocaleString(q,extent,"%.20g",(double) (image->columns != 0 ?
           image->columns : image->magick_columns));
         break;
       }
@@ -2885,7 +2885,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image horizontal resolution.
         */
-        q+=FormatMagickString(q,extent,"%g %s",image->x_resolution,
+        q+=FormatLocaleString(q,extent,"%g %s",image->x_resolution,
           CommandOptionToMnemonic(MagickResolutionOptions,(ssize_t)
             image->units));
         break;
@@ -2895,7 +2895,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image vertical resolution.
         */
-        q+=FormatMagickString(q,extent,"%g %s",image->y_resolution,
+        q+=FormatLocaleString(q,extent,"%g %s",image->y_resolution,
           CommandOptionToMnemonic(MagickResolutionOptions,(ssize_t)
           image->units));
         break;
@@ -2905,7 +2905,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image depth.
         */
-        q+=FormatMagickString(q,extent,"%.20g",(double) image->depth);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) image->depth);
         break;
       }
       case 'A':
@@ -2913,7 +2913,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image alpha channel.
         */
-        q+=FormatMagickString(q,extent,"%s",CommandOptionToMnemonic(
+        q+=FormatLocaleString(q,extent,"%s",CommandOptionToMnemonic(
           MagickBooleanOptions,(ssize_t) image->matte));
         break;
       }
@@ -2922,7 +2922,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image compression method.
         */
-        q+=FormatMagickString(q,extent,"%s",CommandOptionToMnemonic(
+        q+=FormatLocaleString(q,extent,"%s",CommandOptionToMnemonic(
           MagickCompressOptions,(ssize_t) image->compression));
         break;
       }
@@ -2931,36 +2931,36 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         /*
           Image dispose method.
         */
-        q+=FormatMagickString(q,extent,"%s",CommandOptionToMnemonic(
+        q+=FormatLocaleString(q,extent,"%s",CommandOptionToMnemonic(
           MagickDisposeOptions,(ssize_t) image->dispose));
         break;
       }
       case 'G':
       {
-        q+=FormatMagickString(q,extent,"%.20gx%.20g",(double)
+        q+=FormatLocaleString(q,extent,"%.20gx%.20g",(double)
           image->magick_columns,(double) image->magick_rows);
         break;
       }
       case 'H':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) image->page.height);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) image->page.height);
         break;
       }
       case 'O':
       {
-        q+=FormatMagickString(q,extent,"%+ld%+ld",(long) image->page.x,(long)
+        q+=FormatLocaleString(q,extent,"%+ld%+ld",(long) image->page.x,(long)
           image->page.y);
         break;
       }
       case 'P':
       {
-        q+=FormatMagickString(q,extent,"%.20gx%.20g",(double) image->page.width,
+        q+=FormatLocaleString(q,extent,"%.20gx%.20g",(double) image->page.width,
           (double) image->page.height);
         break;
       }
       case 'Q':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) image->quality);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) image->quality);
         break;
       }
       case 'S':
@@ -2971,28 +2971,28 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
         if (image_info->number_scenes == 0)
           q+=CopyMagickString(q,"2147483647",extent);
         else
-          q+=FormatMagickString(q,extent,"%.20g",(double) (image_info->scene+
+          q+=FormatLocaleString(q,extent,"%.20g",(double) (image_info->scene+
             image_info->number_scenes));
         break;
       }
       case 'T':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) image->delay);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) image->delay);
         break;
       }
       case 'W':
       {
-        q+=FormatMagickString(q,extent,"%.20g",(double) image->page.width);
+        q+=FormatLocaleString(q,extent,"%.20g",(double) image->page.width);
         break;
       }
       case 'X':
       {
-        q+=FormatMagickString(q,extent,"%+.20g",(double) image->page.x);
+        q+=FormatLocaleString(q,extent,"%+.20g",(double) image->page.x);
         break;
       }
       case 'Y':
       {
-        q+=FormatMagickString(q,extent,"%+.20g",(double) image->page.y);
+        q+=FormatLocaleString(q,extent,"%+.20g",(double) image->page.y);
         break;
       }
       case 'Z':
@@ -3077,7 +3077,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
                               break;
                             q=interpret_text+strlen(interpret_text);
                           }
-                        q+=FormatMagickString(q,extent,"%s=%s\n",key,value);
+                        q+=FormatLocaleString(q,extent,"%s=%s\n",key,value);
                       }
                   }
                 key=GetNextImageProperty(image);
@@ -3130,7 +3130,7 @@ MagickExport char *InterpretImageProperties(const ImageInfo *image_info,
           Image bounding box.
         */
         page=GetImageBoundingBox(image,&image->exception);
-        q+=FormatMagickString(q,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
+        q+=FormatLocaleString(q,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
           (double) page.width,(double) page.height,(double) page.x,(double)
           page.y);
         break;
index cf84a428806ec5617455d381bb73766e4d4273cc..aee39511ea69fc90ea7170c1541fa751006d8337 100644 (file)
@@ -372,10 +372,10 @@ MagickExport void GetQuantumInfo(const ImageInfo *image_info,
       MagickQuantumFormatOptions,MagickFalse,option);
   option=GetImageOption(image_info,"quantum:minimum");
   if (option != (char *) NULL)
-    quantum_info->minimum=StringToDouble(option,(char **) NULL);
+    quantum_info->minimum=LocaleToDouble(option,(char **) NULL);
   option=GetImageOption(image_info,"quantum:maximum");
   if (option != (char *) NULL)
-    quantum_info->maximum=StringToDouble(option,(char **) NULL);
+    quantum_info->maximum=LocaleToDouble(option,(char **) NULL);
   if ((quantum_info->minimum == 0.0) && (quantum_info->maximum == 0.0))
     quantum_info->scale=0.0;
   else
@@ -389,7 +389,7 @@ MagickExport void GetQuantumInfo(const ImageInfo *image_info,
         quantum_info->minimum);
   option=GetImageOption(image_info,"quantum:scale");
   if (option != (char *) NULL)
-    quantum_info->scale=StringToDouble(option,(char **) NULL);
+    quantum_info->scale=LocaleToDouble(option,(char **) NULL);
   option=GetImageOption(image_info,"quantum:polarity");
   if (option != (char *) NULL)
     quantum_info->min_is_white=LocaleCompare(option,"min-is-white") == 0 ?
index 53935ba97bf8bfbeec84668949812749bdc24572..72579574a0d4c122ca168216b0336382932919ae 100644 (file)
@@ -340,7 +340,7 @@ MagickExport MagickBooleanType ResamplePixelColor(
   }
 
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
+  FormatLocaleFile(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
 #endif
 
   /*
@@ -551,8 +551,8 @@ MagickExport MagickBooleanType ResamplePixelColor(
   uw = (ssize_t)(2.0*resample_filter->Uwidth)+1;
 
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "v1=%ld; v2=%ld\n", (long)v1, (long)v2);
-  fprintf(stderr, "u1=%ld; uw=%ld\n", (long)u1, (long)uw);
+  FormatLocaleFile(stderr, "v1=%ld; v2=%ld\n", (long)v1, (long)v2);
+  FormatLocaleFile(stderr, "u1=%ld; uw=%ld\n", (long)u1, (long)uw);
 #else
 # define DEBUG_HIT_MISS 0 /* only valid if DEBUG_ELLIPSE is enabled */
 #endif
@@ -565,7 +565,7 @@ MagickExport MagickBooleanType ResamplePixelColor(
   for( v=v1; v<=v2;  v++ ) {
 #if DEBUG_HIT_MISS
     long uu = ceil(u1);   /* actual pixel location (for debug only) */
-    fprintf(stderr, "# scan line from pixel %ld, %ld\n", (long)uu, (long)v);
+    FormatLocaleFile(stderr, "# scan line from pixel %ld, %ld\n", (long)uu, (long)v);
 #endif
     u = (ssize_t)ceil(u1);        /* first pixel in scanline */
     u1 += resample_filter->slope; /* start of next scan line */
@@ -614,14 +614,14 @@ MagickExport MagickBooleanType ResamplePixelColor(
         hit++;
 #if DEBUG_HIT_MISS
         /* mark the pixel according to hit/miss of the ellipse */
-        fprintf(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
+        FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
                      (long)uu-.1,(double)v-.1,(long)uu+.1,(long)v+.1);
-        fprintf(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
+        FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 3\n",
                      (long)uu+.1,(double)v-.1,(long)uu-.1,(long)v+.1);
       } else {
-        fprintf(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
+        FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
                      (long)uu-.1,(double)v-.1,(long)uu+.1,(long)v+.1);
-        fprintf(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
+        FormatLocaleFile(stderr, "set arrow from %lf,%lf to %lf,%lf nohead ls 1\n",
                      (long)uu+.1,(double)v-.1,(long)uu-.1,(long)v+.1);
       }
       uu++;
@@ -635,7 +635,7 @@ MagickExport MagickBooleanType ResamplePixelColor(
     }
   }
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "Hit=%ld;  Total=%ld;\n", (long)hit, (long)uw*(v2-v1) );
+  FormatLocaleFile(stderr, "Hit=%ld;  Total=%ld;\n", (long)hit, (long)uw*(v2-v1) );
 #endif
 
   /*
@@ -1036,8 +1036,8 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
     return; /* EWA turned off - nothing to do */
 
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "# -----\n" );
-  fprintf(stderr, "dux=%lf; dvx=%lf;   duy=%lf; dvy=%lf;\n",
+  FormatLocaleFile(stderr, "# -----\n" );
+  FormatLocaleFile(stderr, "dux=%lf; dvx=%lf;   duy=%lf; dvy=%lf;\n",
        dux, dvx, duy, dvy);
 #endif
 
@@ -1067,7 +1067,7 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
   major_x *= major_mag;  major_y *= major_mag;
   minor_x *= minor_mag;  minor_y *= minor_mag;
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "major_x=%lf; major_y=%lf;  minor_x=%lf; minor_y=%lf;\n",
+  FormatLocaleFile(stderr, "major_x=%lf; major_y=%lf;  minor_x=%lf; minor_y=%lf;\n",
         major_x, major_y, minor_x, minor_y);
 #endif
   A = major_y*major_y+minor_y*minor_y;
@@ -1106,7 +1106,7 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
 #endif
 
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "A=%lf; B=%lf; C=%lf; F=%lf\n", A,B,C,F);
+  FormatLocaleFile(stderr, "A=%lf; B=%lf; C=%lf; F=%lf\n", A,B,C,F);
 
   /* Figure out the various information directly about the ellipse.
      This information currently not needed at this time, but may be
@@ -1127,14 +1127,14 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
       Major = sqrt(2*F/(alpha - gamma));
     Minor = sqrt(2*F/(alpha + gamma));
 
-    fprintf(stderr, "# Major=%lf; Minor=%lf\n", Major, Minor );
+    FormatLocaleFile(stderr, "# Major=%lf; Minor=%lf\n", Major, Minor );
 
     /* other information about ellipse include... */
     Eccentricity = Major/Minor;
     Ellipse_Area = MagickPI*Major*Minor;
     Ellipse_Angle = atan2(B, A-C);
 
-    fprintf(stderr, "# Angle=%lf   Area=%lf\n",
+    FormatLocaleFile(stderr, "# Angle=%lf   Area=%lf\n",
          RadiansToDegrees(Ellipse_Angle), Ellipse_Area);
   }
 #endif
@@ -1166,7 +1166,7 @@ MagickExport void ScaleResampleFilter(ResampleFilter *resample_filter,
   resample_filter->slope = -B/(2.0*A); /* Reciprocal slope of the parallelogram */
 
 #if DEBUG_ELLIPSE
-  fprintf(stderr, "Ulimit=%lf; Vlimit=%lf; UWidth=%lf; Slope=%lf;\n",
+  FormatLocaleFile(stderr, "Ulimit=%lf; Vlimit=%lf; UWidth=%lf; Slope=%lf;\n",
            resample_filter->Ulimit, resample_filter->Vlimit,
            resample_filter->Uwidth, resample_filter->slope );
 #endif
index 84ecaa6bd447d180c5b348a83809e8fbf3461a84..559547a239cf5bdf8978e5c5828be9b2592041dc 100644 (file)
@@ -922,7 +922,7 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   /* User Sigma Override - no support change */
   artifact=GetImageArtifact(image,"filter:sigma");
   if (artifact != (const char *) NULL)
-    sigma=StringToDouble(artifact,(char **) NULL);
+    sigma=LocaleToDouble(artifact,(char **) NULL);
   /* Define coefficents for Gaussian */
   if ( GaussianFilter ) {
     resize_filter->coefficient[0]=1.0/(2.0*sigma*sigma);
@@ -933,7 +933,7 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   /* Blur Override */
   artifact=GetImageArtifact(image,"filter:blur");
   if (artifact != (const char *) NULL)
-    resize_filter->blur *= StringToDouble(artifact,(char **) NULL);
+    resize_filter->blur *= LocaleToDouble(artifact,(char **) NULL);
   if (resize_filter->blur < MagickEpsilon)
     resize_filter->blur=(MagickRealType) MagickEpsilon;
 
@@ -960,7 +960,7 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   /* expert override of the support setting */
   artifact=GetImageArtifact(image,"filter:support");
   if (artifact != (const char *) NULL)
-    resize_filter->support=fabs(StringToDouble(artifact,(char **) NULL));
+    resize_filter->support=fabs(LocaleToDouble(artifact,(char **) NULL));
   /*
     Scale windowing function separatally to the support 'clipping'
     window that calling operator is planning to actually use. (Expert
@@ -969,7 +969,7 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
   resize_filter->window_support=resize_filter->support; /* default */
   artifact=GetImageArtifact(image,"filter:win-support");
   if (artifact != (const char *) NULL)
-    resize_filter->window_support=fabs(StringToDouble(artifact,(char **) NULL));
+    resize_filter->window_support=fabs(LocaleToDouble(artifact,(char **) NULL));
   /*
     Adjust window function scaling to match windowing support for
     weighting function.  This avoids a division on every filter call.
@@ -994,18 +994,18 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
       artifact=GetImageArtifact(image,"filter:b");
       if (artifact != (const char *) NULL)
         {
-          B=StringToDouble(artifact,(char **) NULL);
+          B=LocaleToDouble(artifact,(char **) NULL);
           C=(1.0-B)/2.0; /* Calculate C to get a Keys cubic filter. */
           artifact=GetImageArtifact(image,"filter:c"); /* user C override */
           if (artifact != (const char *) NULL)
-            C=StringToDouble(artifact,(char **) NULL);
+            C=LocaleToDouble(artifact,(char **) NULL);
         }
       else
         {
           artifact=GetImageArtifact(image,"filter:c");
           if (artifact != (const char *) NULL)
             {
-              C=StringToDouble(artifact,(char **) NULL);
+              C=LocaleToDouble(artifact,(char **) NULL);
               B=1.0-2.0*C; /* Calculate B to get a Keys cubic filter. */
             }
         }
@@ -1056,35 +1056,35 @@ MagickExport ResizeFilter *AcquireResizeFilter(const Image *image,
           Report Filter Details.
         */
         support=GetResizeFilterSupport(resize_filter); /* practical_support */
-        (void) fprintf(stdout,"# Resize Filter (for graphing)\n#\n");
-        (void) fprintf(stdout,"# filter = %s\n",
+        (void) FormatLocaleFile(stdout,"# Resize Filter (for graphing)\n#\n");
+        (void) FormatLocaleFile(stdout,"# filter = %s\n",
              CommandOptionToMnemonic(MagickFilterOptions,filter_type));
-        (void) fprintf(stdout,"# window = %s\n",
+        (void) FormatLocaleFile(stdout,"# window = %s\n",
              CommandOptionToMnemonic(MagickFilterOptions, window_type));
-        (void) fprintf(stdout,"# support = %.*g\n",
+        (void) FormatLocaleFile(stdout,"# support = %.*g\n",
              GetMagickPrecision(),(double) resize_filter->support);
-        (void) fprintf(stdout,"# win-support = %.*g\n",
+        (void) FormatLocaleFile(stdout,"# win-support = %.*g\n",
              GetMagickPrecision(),(double) resize_filter->window_support);
-        (void) fprintf(stdout,"# scale_blur = %.*g\n",
+        (void) FormatLocaleFile(stdout,"# scale_blur = %.*g\n",
              GetMagickPrecision(), (double)resize_filter->blur);
         if ( filter_type == GaussianFilter )
-          (void) fprintf(stdout,"# gaussian_sigma = %.*g\n",
+          (void) FormatLocaleFile(stdout,"# gaussian_sigma = %.*g\n",
                GetMagickPrecision(), (double)sigma);
-        (void) fprintf(stdout,"# practical_support = %.*g\n",
+        (void) FormatLocaleFile(stdout,"# practical_support = %.*g\n",
              GetMagickPrecision(), (double)support);
         if ( filter_type == CubicFilter || window_type == CubicFilter )
-          (void) fprintf(stdout,"# B,C = %.*g,%.*g\n",
+          (void) FormatLocaleFile(stdout,"# B,C = %.*g,%.*g\n",
                GetMagickPrecision(),(double)B, GetMagickPrecision(),(double)C);
-        (void) fprintf(stdout,"\n");
+        (void) FormatLocaleFile(stdout,"\n");
         /*
           Output values of resulting filter graph -- for graphing
           filter result.
         */
         for (x=0.0; x <= support; x+=0.01f)
-          (void) fprintf(stdout,"%5.2lf\t%.*g\n",x,GetMagickPrecision(),
+          (void) FormatLocaleFile(stdout,"%5.2lf\t%.*g\n",x,GetMagickPrecision(),
             (double) GetResizeFilterWeight(resize_filter,x));
         /* A final value so gnuplot can graph the 'stop' properly. */
-        (void) fprintf(stdout,"%5.2lf\t%.*g\n",support,GetMagickPrecision(),
+        (void) FormatLocaleFile(stdout,"%5.2lf\t%.*g\n",support,GetMagickPrecision(),
           0.0);
       }
       /* Output the above once only for each image - remove setting */
@@ -3317,33 +3317,33 @@ MagickExport Image *ThumbnailImage(const Image *image,const size_t columns,
   (void) DeleteImageProperty(thumbnail_image,"comment");
   (void) CopyMagickString(value,image->magick_filename,MaxTextExtent);
   if (strstr(image->magick_filename,"//") == (char *) NULL)
-    (void) FormatMagickString(value,MaxTextExtent,"file://%s",
+    (void) FormatLocaleString(value,MaxTextExtent,"file://%s",
       image->magick_filename);
   (void) SetImageProperty(thumbnail_image,"Thumb::URI",value);
   (void) CopyMagickString(value,image->magick_filename,MaxTextExtent);
   if (GetPathAttributes(image->filename,&attributes) != MagickFalse)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
         attributes.st_mtime);
       (void) SetImageProperty(thumbnail_image,"Thumb::MTime",value);
     }
-  (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
     attributes.st_mtime);
   (void) FormatMagickSize(GetBlobSize(image),MagickFalse,value);
   (void) ConcatenateMagickString(value,"B",MaxTextExtent);
   (void) SetImageProperty(thumbnail_image,"Thumb::Size",value);
-  (void) FormatMagickString(value,MaxTextExtent,"image/%s",image->magick);
+  (void) FormatLocaleString(value,MaxTextExtent,"image/%s",image->magick);
   LocaleLower(value);
   (void) SetImageProperty(thumbnail_image,"Thumb::Mimetype",value);
   (void) SetImageProperty(thumbnail_image,"software",
     GetMagickVersion(&version));
-  (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
     image->magick_columns);
   (void) SetImageProperty(thumbnail_image,"Thumb::Image::Width",value);
-  (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
     image->magick_rows);
   (void) SetImageProperty(thumbnail_image,"Thumb::Image::height",value);
-  (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
     GetImageListLength(image));
   (void) SetImageProperty(thumbnail_image,"Thumb::Document::Pages",value);
   return(thumbnail_image);
index 02877390deec36de6f137daf008983e3e6051108..de1c7a0a39c333f1b82e866db2b94ac8fed941e2 100644 (file)
@@ -394,9 +394,9 @@ static MagickBooleanType GetPathTemplate(char *path)
       return(MagickTrue);
     }
   if (directory[strlen(directory)-1] == *DirectorySeparator)
-    (void) FormatMagickString(path,MaxTextExtent,"%smagick-XXXXXXXX",directory);
+    (void) FormatLocaleString(path,MaxTextExtent,"%smagick-XXXXXXXX",directory);
   else
-    (void) FormatMagickString(path,MaxTextExtent,"%s%smagick-XXXXXXXX",
+    (void) FormatLocaleString(path,MaxTextExtent,"%s%smagick-XXXXXXXX",
       directory,DirectorySeparator);
   directory=DestroyString(directory);
   if (*DirectorySeparator != '/')
@@ -687,13 +687,13 @@ MagickExport MagickBooleanType ListMagickResourceInfo(FILE *file,
     (void) FormatMagickSize(resource_info.disk_limit,MagickTrue,disk_limit);
   (void) CopyMagickString(time_limit,"unlimited",MaxTextExtent);
   if (resource_info.time_limit != MagickResourceInfinity)
-    (void) FormatMagickString(time_limit,MaxTextExtent,"%.20g",(double)
+    (void) FormatLocaleString(time_limit,MaxTextExtent,"%.20g",(double)
       resource_info.time_limit);
-  (void) fprintf(file,"File         Area       Memory          Map"
+  (void) FormatLocaleFile(file,"File         Area       Memory          Map"
     "         Disk    Thread         Time\n");
-  (void) fprintf(file,"--------------------------------------------------------"
+  (void) FormatLocaleFile(file,"--------------------------------------------------------"
     "-----------------------\n");
-  (void) fprintf(file,"%4g   %10s   %10s   %10s   %10s    %6g  %11s\n",(double)
+  (void) FormatLocaleFile(file,"%4g   %10s   %10s   %10s   %10s    %6g  %11s\n",(double)
     resource_info.file_limit,area_limit,memory_limit,map_limit,disk_limit,
     (double) resource_info.thread_limit,time_limit);
   (void) fflush(file);
index 0f7d99f76d097fd11015827f19a76bce5dc22c9a..30486fc8dff953c894614874ba60074c7225f3d4 100644 (file)
@@ -445,32 +445,32 @@ static MagickBooleanType Classify(Image *image,short **extrema,
       /*
         Print cluster statistics.
       */
-      (void) fprintf(stdout,"Fuzzy C-means Statistics\n");
-      (void) fprintf(stdout,"===================\n\n");
-      (void) fprintf(stdout,"\tCluster Threshold = %g\n",(double)
+      (void) FormatLocaleFile(stdout,"Fuzzy C-means Statistics\n");
+      (void) FormatLocaleFile(stdout,"===================\n\n");
+      (void) FormatLocaleFile(stdout,"\tCluster Threshold = %g\n",(double)
         cluster_threshold);
-      (void) fprintf(stdout,"\tWeighting Exponent = %g\n",(double)
+      (void) FormatLocaleFile(stdout,"\tWeighting Exponent = %g\n",(double)
         weighting_exponent);
-      (void) fprintf(stdout,"\tTotal Number of Clusters = %.20g\n\n",(double)
+      (void) FormatLocaleFile(stdout,"\tTotal Number of Clusters = %.20g\n\n",(double)
         number_clusters);
       /*
         Print the total number of points per cluster.
       */
-      (void) fprintf(stdout,"\n\nNumber of Vectors Per Cluster\n");
-      (void) fprintf(stdout,"=============================\n\n");
+      (void) FormatLocaleFile(stdout,"\n\nNumber of Vectors Per Cluster\n");
+      (void) FormatLocaleFile(stdout,"=============================\n\n");
       for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
-        (void) fprintf(stdout,"Cluster #%.20g = %.20g\n",(double) cluster->id,
+        (void) FormatLocaleFile(stdout,"Cluster #%.20g = %.20g\n",(double) cluster->id,
           (double) cluster->count);
       /*
         Print the cluster extents.
       */
-      (void) fprintf(stdout,
+      (void) FormatLocaleFile(stdout,
         "\n\n\nCluster Extents:        (Vector Size: %d)\n",MaxDimension);
-      (void) fprintf(stdout,"================");
+      (void) FormatLocaleFile(stdout,"================");
       for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
       {
-        (void) fprintf(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
-        (void) fprintf(stdout,"%.20g-%.20g  %.20g-%.20g  %.20g-%.20g\n",(double)
+        (void) FormatLocaleFile(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
+        (void) FormatLocaleFile(stdout,"%.20g-%.20g  %.20g-%.20g  %.20g-%.20g\n",(double)
           cluster->red.left,(double) cluster->red.right,(double)
           cluster->green.left,(double) cluster->green.right,(double)
           cluster->blue.left,(double) cluster->blue.right);
@@ -478,17 +478,17 @@ static MagickBooleanType Classify(Image *image,short **extrema,
       /*
         Print the cluster center values.
       */
-      (void) fprintf(stdout,
+      (void) FormatLocaleFile(stdout,
         "\n\n\nCluster Center Values:        (Vector Size: %d)\n",MaxDimension);
-      (void) fprintf(stdout,"=====================");
+      (void) FormatLocaleFile(stdout,"=====================");
       for (cluster=head; cluster != (Cluster *) NULL; cluster=cluster->next)
       {
-        (void) fprintf(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
-        (void) fprintf(stdout,"%g  %g  %g\n",(double)
+        (void) FormatLocaleFile(stdout,"\n\nCluster #%.20g\n\n",(double) cluster->id);
+        (void) FormatLocaleFile(stdout,"%g  %g  %g\n",(double)
           cluster->red.center,(double) cluster->green.center,(double)
           cluster->blue.center);
       }
-      (void) fprintf(stdout,"\n");
+      (void) FormatLocaleFile(stdout,"\n");
     }
   if (number_clusters > 256)
     ThrowBinaryException(ImageError,"TooManyClusters",image->filename);
index 331bb9e078c5d9a6834926626062f47600e92b58..ee9be1c8bdbc185395addac08412a980bd5ba7a1 100644 (file)
@@ -280,7 +280,7 @@ MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
   if ((semaphore_info->reference_count > 0) &&
       (IsMagickThreadEqual(semaphore_info->id) != MagickFalse))
     {
-      (void) fprintf(stderr,"Warning: unexpected recursive lock!\n");
+      (void) FormatLocaleFile(stderr,"Warning: unexpected recursive lock!\n");
       (void) fflush(stderr);
     }
 #endif
@@ -394,7 +394,7 @@ MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
   assert(IsMagickThreadEqual(semaphore_info->id) != MagickFalse);
   if (semaphore_info->reference_count == 0)
     {
-      (void) fprintf(stderr,"Warning: semaphore lock already unlocked!\n");
+      (void) FormatLocaleFile(stderr,"Warning: semaphore lock already unlocked!\n");
       (void) fflush(stderr);
       return;
     }
index 6b92dd0b639ff1b35a28ac0e60e795beeae8b6d9..da1696b3f6b92bbe51b713e75b2fb2b380e51835 100644 (file)
@@ -31,7 +31,7 @@ static inline double SiPrefixToDouble(const char *string,const double interval)
     scale,
     value;
 
-  value=StringToDouble(string,&q);
+  value=LocaleToDouble(string,&q);
   scale=1000.0;
   if ((*q != '\0') && (tolower((int) ((unsigned char) *(q+1))) == 'i'))
     scale=1024.0;
index 0f936009b6a177a7e7996d64620fd096c8037bf0..ef6a228e6f54bed7ce6dd61c9c9b3a19e5dffa14 100644 (file)
@@ -45,7 +45,7 @@
 #include "magick/exception.h"
 #include "magick/exception-private.h"
 #include "magick/list.h"
-#include "magick/locale-private.h"
+#include "magick/locale_.h"
 #include "magick/log.h"
 #include "magick/memory_.h"
 #include "magick/property.h"
@@ -1050,7 +1050,7 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
     length/=bytes;
   for (j=2; j < 12; j++)
   {
-    count=FormatMagickString(format,MaxTextExtent,"%.*g%sB",(int) (i+j),length,
+    count=FormatLocaleString(format,MaxTextExtent,"%.*g%sB",(int) (i+j),length,
       units[i]);
     if (strchr(format,'+') == (char *) NULL)
       break;
@@ -1063,87 +1063,6 @@ MagickExport ssize_t FormatMagickSize(const MagickSizeType size,
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%  F o r m a t M a g i c k S t r i n g                                        %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  FormatMagickString() prints formatted output of a variable argument list.
-%
-%  The format of the FormatMagickString method is:
-%
-%      ssize_t FormatMagickString(char *string,const size_t length,
-%        const char *format,...)
-%
-%  A description of each parameter follows.
-%
-%   o string:  FormatMagickString() returns the formatted string in this
-%     character buffer.
-%
-%   o length: the maximum length of the string.
-%
-%   o format:  A string describing the format to use to write the remaining
-%     arguments.
-%
-*/
-
-MagickExport ssize_t FormatMagickStringList(char *string,const size_t length,
-  const char *format,va_list operands)
-{
-  int
-    n;
-
-#if defined(MAGICKCORE_HAVE_VSNPRINTF_L)
-  n=vsnprintf_l(string,length,(locale_t) NULL,format,operands);
-#elif defined(MAGICKCORE_HAVE_VSNPRINTF)
-#if defined(MAGICKCORE_HAVE_USELOCALE)
-  {
-    locale_t
-      locale,
-      previous_locale;
-
-    locale=AcquireMagickLocale();
-    if (locale == (locale_t) NULL)
-      n=vsnprintf(string,length,format,operands);
-    else
-      {
-        previous_locale=uselocale(locale);
-        n=vsnprintf(string,length,format,operands);
-        uselocale(previous_locale);
-      }
-  }
-#else
-  n=vsnprintf(string,length,format,operands);
-#endif
-#else
-  n=vsprintf(string,format,operands);
-#endif
-  if (n < 0)
-    string[length-1]='\0';
-  return((ssize_t) n);
-}
-
-MagickExport ssize_t FormatMagickString(char *string,const size_t length,
-  const char *format,...)
-{
-  ssize_t
-    n;
-
-  va_list
-    operands;
-
-  va_start(operands,format);
-  n=(ssize_t) FormatMagickStringList(string,length,format,operands);
-  va_end(operands);
-  return(n);
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %  F o r m a t M a g i c k T i m e                                            %
 %                                                                             %
 %                                                                             %
@@ -1212,7 +1131,7 @@ MagickExport ssize_t FormatMagickTime(const time_t time,const size_t length,
     local_time.tm_hour-gm_time.tm_hour+24*((local_time.tm_year-
     gm_time.tm_year) != 0 ? (local_time.tm_year-gm_time.tm_year) :
     (local_time.tm_yday-gm_time.tm_yday)));
-  count=FormatMagickString(timestamp,length,
+  count=FormatLocaleString(timestamp,length,
     "%04d-%02d-%02dT%02d:%02d:%02d%+03ld:00",local_time.tm_year+1900,
     local_time.tm_mon+1,local_time.tm_mday,local_time.tm_hour,
     local_time.tm_min,local_time.tm_sec,(long) timezone);
@@ -1595,10 +1514,10 @@ MagickExport void PrintStringInfo(FILE *file,const char *id,
   p=(char *) string_info->datum;
   for (i=0; i < string_info->length; i+=0x14)
   {
-    (void) fprintf(file,"0x%08lx: ",(unsigned long) (0x14*i));
+    (void) FormatLocaleFile(file,"0x%08lx: ",(unsigned long) (0x14*i));
     for (j=1; j <= MagickMin(string_info->length-i,0x14); j++)
     {
-      (void) fprintf(file,"%02lx",(unsigned long) (*(p+j)) & 0xff);
+      (void) FormatLocaleFile(file,"%02lx",(unsigned long) (*(p+j)) & 0xff);
       if ((j % 0x04) == 0)
         (void) fputc(' ',file);
     }
@@ -1998,43 +1917,6 @@ MagickExport char **StringToArgv(const char *text,int *argc)
 %                                                                             %
 %                                                                             %
 %                                                                             %
-%   S t r i n g T o D o u b l e                                               %
-%                                                                             %
-%                                                                             %
-%                                                                             %
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
-%  StringToDouble() interprets the string as a floating point number and
-%  returns its value as a double. If sentinal is not a null pointer, the
-%  method also sets the value pointed by sentinal to point to the first
-%  character after the number.
-%
-%  The format of the StringToDouble method is:
-%
-%      double StringToDouble(const char *value,char **sentinal)
-%
-%  A description of each parameter follows:
-%
-%    o value: the string value.
-%
-%    o sentinal:  if sentinal is not NULL, a pointer to the character after the
-%      last character used in the conversion is stored in the location
-%      referenced by sentinal.
-%
-*/
-MagickExport double StringToDouble(const char *value,char **sentinal)
-{
-#if defined(MAGICKCORE_HAVE_STRTOD_L)
-  return(strtod_l(value,sentinal,(locale_t) NULL));
-#endif
-  return(strtod(value,sentinal));
-}
-\f
-/*
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%                                                                             %
-%                                                                             %
-%                                                                             %
 %   S t r i n g I n f o T o H e x S t r i n g                                 %
 %                                                                             %
 %                                                                             %
@@ -2272,12 +2154,12 @@ MagickExport char **StringToList(const char *text)
           sizeof(**textlist));
         if (textlist[i] == (char *) NULL)
           ThrowFatalException(ResourceLimitFatalError,"UnableToConvertText");
-        (void) FormatMagickString(textlist[i],MaxTextExtent,"0x%08lx: ",
+        (void) FormatLocaleString(textlist[i],MaxTextExtent,"0x%08lx: ",
           (long) (0x14*i));
         q=textlist[i]+strlen(textlist[i]);
         for (j=1; j <= (ssize_t) MagickMin(strlen(p),0x14); j++)
         {
-          (void) FormatMagickString(hex_string,MaxTextExtent,"%02x",*(p+j));
+          (void) FormatLocaleString(hex_string,MaxTextExtent,"%02x",*(p+j));
           (void) CopyMagickString(q,hex_string,MaxTextExtent);
           q+=2;
           if ((j % 0x04) == 0)
index 3787e47095ae6c6bf1e478851bd6f4032b2ebebd..b1fd5b564da50d3a2aaf3f655adc03fb3b182911 100644 (file)
@@ -57,9 +57,6 @@ extern MagickExport char
 extern MagickExport const char
   *GetStringInfoPath(const StringInfo *);
 
-extern MagickExport double
-  StringToDouble(const char *,char **);
-
 extern MagickExport int
   CompareStringInfo(const StringInfo *,const StringInfo *),
   LocaleCompare(const char *,const char *),
@@ -78,10 +75,6 @@ extern MagickExport size_t
 
 extern MagickExport ssize_t
   FormatMagickSize(const MagickSizeType,const MagickBooleanType,char *),
-  FormatMagickString(char *,const size_t,const char *,...)
-    magick_attribute((format (printf,3,4))),
-  FormatMagickStringList(char *,const size_t,const char *,va_list)
-    magick_attribute((format (printf,3,0))),
   FormatMagickTime(const time_t,const size_t,char *);
 
 extern MagickExport StringInfo
index a1da573b9a2aa96fbf95fb9db01711b25ee7001d..c65ef9b3415dd9a2eda21e8b667d12a4df95fbab 100644 (file)
@@ -1156,8 +1156,8 @@ MagickBooleanType ListThresholdMapFile(FILE *file,const char *xml,
   if ( thresholds == (XMLTreeInfo *)NULL )
     return(MagickFalse);
 
-  (void) fprintf(file,"%-16s %-12s %s\n", "Map", "Alias", "Description");
-  (void) fprintf(file,"----------------------------------------------------\n");
+  (void) FormatLocaleFile(file,"%-16s %-12s %s\n", "Map", "Alias", "Description");
+  (void) FormatLocaleFile(file,"----------------------------------------------------\n");
 
   for( threshold = GetXMLTreeChild(thresholds,"threshold");
        threshold != (XMLTreeInfo *)NULL;
@@ -1186,7 +1186,7 @@ MagickBooleanType ListThresholdMapFile(FILE *file,const char *xml,
       thresholds=DestroyXMLTree(thresholds);
       return(MagickFalse);
     }
-    (void) fprintf(file,"%-16s %-12s %s\n",map,alias ? alias : "", content);
+    (void) FormatLocaleFile(file,"%-16s %-12s %s\n",map,alias ? alias : "", content);
   }
   thresholds=DestroyXMLTree(thresholds);
   return(MagickTrue);
@@ -1234,12 +1234,12 @@ MagickExport MagickBooleanType ListThresholdMaps(FILE *file,
     file = stdout;
   options=GetConfigureOptions(ThresholdsFilename,exception);
 
-  (void) fprintf(file, "\n   Threshold Maps for Ordered Dither Operations\n");
+  (void) FormatLocaleFile(file, "\n   Threshold Maps for Ordered Dither Operations\n");
 
   while ( ( option=(const StringInfo *) GetNextValueInLinkedList(options) )
           != (const StringInfo *) NULL)
   {
-    (void) fprintf(file,"\nPATH: %s\n\n",GetStringInfoPath(option));
+    (void) FormatLocaleFile(file,"\nPATH: %s\n\n",GetStringInfoPath(option));
     status|=ListThresholdMapFile(file,(const char *) GetStringInfoDatum(option),
       GetStringInfoPath(option),exception);
   }
index 5cb89da3fc1606ce47500c1b6c71a85bf72f8fee..12ee02409647f6d54996729390e3fef674081f01 100644 (file)
@@ -229,7 +229,7 @@ MagickExport void GetMagickToken(const char *start,const char **end,char *token)
         char
           *q;
 
-        value=StringToDouble(p,&q);
+        value=LocaleToDouble(p,&q);
         (void) value;
         if ((p != q) && (*p != ','))
           {
index 5a08ae312819ac5ae1ab27d5b560bfd138196507..234219a757807bb2681061496e03fdd005c23ac1 100644 (file)
@@ -853,7 +853,7 @@ MagickExport MagickBooleanType ListTypeInfo(FILE *file,ExceptionInfo *exception)
     if (((path == (const char *) NULL) ||
          (LocaleCompare(path,type_info[i]->path) != 0)) &&
          (type_info[i]->path != (char *) NULL))
-      (void) fprintf(file,"\nPath: %s\n",type_info[i]->path);
+      (void) FormatLocaleFile(file,"\nPath: %s\n",type_info[i]->path);
     path=type_info[i]->path;
     name="unknown";
     if (type_info[i]->name != (char *) NULL)
@@ -866,14 +866,14 @@ MagickExport MagickBooleanType ListTypeInfo(FILE *file,ExceptionInfo *exception)
     glyphs="unknown";
     if (type_info[i]->glyphs != (char *) NULL)
       glyphs=type_info[i]->glyphs;
-    (void) FormatMagickString(weight,MaxTextExtent,"%.20g",(double)
+    (void) FormatLocaleString(weight,MaxTextExtent,"%.20g",(double)
       type_info[i]->weight);
-    (void) fprintf(file,"  Font: %s\n",name);
-    (void) fprintf(file,"    family: %s\n",family);
-    (void) fprintf(file,"    style: %s\n",style);
-    (void) fprintf(file,"    stretch: %s\n",stretch);
-    (void) fprintf(file,"    weight: %s\n",weight);
-    (void) fprintf(file,"    glyphs: %s\n",glyphs);
+    (void) FormatLocaleFile(file,"  Font: %s\n",name);
+    (void) FormatLocaleFile(file,"    family: %s\n",family);
+    (void) FormatLocaleFile(file,"    style: %s\n",style);
+    (void) FormatLocaleFile(file,"    stretch: %s\n",stretch);
+    (void) FormatLocaleFile(file,"    weight: %s\n",weight);
+    (void) FormatLocaleFile(file,"    glyphs: %s\n",glyphs);
   }
   (void) fflush(file);
   type_info=(const TypeInfo **) RelinquishMagickMemory((void *) type_info);
@@ -1314,7 +1314,7 @@ static MagickBooleanType LoadTypeLists(const char *filename,
       /*
         Search MAGICK_FONT_PATH.
       */
-      (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",font_path,
+      (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",font_path,
         DirectorySeparator,filename);
       option=FileToString(path,~0,exception);
       if (option != (void *) NULL)
index d28c6f72c4cfe3ba6357cb0bbbb4d482d9900157..5e8a969b76f885bb5873270d3dc51e47142a451e 100644 (file)
@@ -279,7 +279,7 @@ MagickExport void AppendImageFormat(const char *format,char *filename)
       char
         message[MaxTextExtent];
 
-      (void) FormatMagickString(message,MaxTextExtent,"%s:%s",format,filename);
+      (void) FormatLocaleString(message,MaxTextExtent,"%s:%s",format,filename);
       (void) CopyMagickString(filename,message,MaxTextExtent);
       return;
     }
@@ -293,12 +293,12 @@ MagickExport void AppendImageFormat(const char *format,char *filename)
       GetPathComponent(filename,RootPath,root);
       (void) CopyMagickString(filename,root,MaxTextExtent);
       GetPathComponent(filename,RootPath,root);
-      (void) FormatMagickString(filename,MaxTextExtent,"%s.%s.%s",root,format,
+      (void) FormatLocaleString(filename,MaxTextExtent,"%s.%s.%s",root,format,
         extension);
       return;
     }
   GetPathComponent(filename,RootPath,root);
-  (void) FormatMagickString(filename,MaxTextExtent,"%s.%s",root,format);
+  (void) FormatLocaleString(filename,MaxTextExtent,"%s.%s",root,format);
 }
 \f
 /*
@@ -954,12 +954,12 @@ MagickExport MagickBooleanType GetExecutionPath(char *path,const size_t extent)
     ssize_t
       count;
 
-    (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%.20g/exe",
+    (void) FormatLocaleString(link_path,MaxTextExtent,"/proc/%.20g/exe",
       (double) getpid());
     count=readlink(link_path,execution_path,PATH_MAX);
     if (count == -1)
       {
-        (void) FormatMagickString(link_path,MaxTextExtent,"/proc/%.20g/file",
+        (void) FormatLocaleString(link_path,MaxTextExtent,"/proc/%.20g/file",
           (double) getpid());
         count=readlink(link_path,execution_path,PATH_MAX);
       }
@@ -1024,7 +1024,7 @@ MagickExport MagickBooleanType GetExecutionPath(char *path,const size_t extent)
         if (program_name == (char *) NULL)
           program_name=program_invocation_name;
         else
-          count=FormatMagickString(program_name,extent,"%s/%s",cwd,
+          count=FormatLocaleString(program_name,extent,"%s/%s",cwd,
             program_invocation_name);
       }
     if (count != -1)
@@ -2018,7 +2018,7 @@ MagickExport int SystemCommand(const MagickBooleanType asynchronous,
     }
   if (verbose != MagickFalse)
     {
-      (void) fprintf(stderr,"%s\n",command);
+      (void) FormatLocaleFile(stderr,"%s\n",command);
       (void) fflush(stderr);
     }
   shell_command=(char *) command;
index b079287e957637f0a0e980b83baa582678d66a43..a8583056208367a3cff0f354453ad3714baceda1 100644 (file)
@@ -41,6 +41,7 @@
 #include "magick/exception.h"
 #include "magick/exception-private.h"
 #include "magick/hashmap.h"
+#include "magick/locale_.h"
 #include "magick/option.h"
 #include "magick/string_.h"
 #include "magick/utility.h"
@@ -139,7 +140,7 @@ MagickExport char *GetMagickHomeURL(void)
   element=(const char *) GetNextValueInLinkedList(paths);
   while (element != (const char *) NULL)
   {
-    (void) FormatMagickString(path,MaxTextExtent,"%s%s%s",element,
+    (void) FormatLocaleString(path,MaxTextExtent,"%s%s%s",element,
       DirectorySeparator,MagickURLFilename);
     if (IsPathAccessible(path) != MagickFalse)
       return(ConstantString(path));
index d4fdf1512175ba4fb0040b2bb3565c80f35e6887..9828bc6075a608f8e96b31863042ec99cdbd0c37 100644 (file)
@@ -27,7 +27,7 @@ extern "C" {
 */
 #define MagickPackageName "ImageMagick"
 #define MagickCopyright  "Copyright (C) 1999-2011 ImageMagick Studio LLC"
-#define MagickSVNRevision  "4455"
+#define MagickSVNRevision  "4458"
 #define MagickLibVersion  0x669
 #define MagickLibVersionText  "6.6.9"
 #define MagickLibVersionNumber  4,0,1
index d304b4cb1c87ec7d8c405bd38b98424ffa9dce84..89a77940531da7c547161cc2b20446facf3d0a85 100644 (file)
@@ -130,7 +130,7 @@ DIR *opendir(char *name)
   /*
     Initialize descriptor.
   */
-  (void) FormatMagickString(directory->pattern,MaxTextExtent,"%s*.*",name);
+  (void) FormatLocaleString(directory->pattern,MaxTextExtent,"%s*.*",name);
   directory->context=0;
   directory->pat.dsc$a_pointer=directory->pattern;
   directory->pat.dsc$w_length=strlen(directory->pattern);
index c824b39b60e4732e7aadc2073af71abce6f5135b..8b647aca9eb850bf347d34410068f91b635cb9a1 100644 (file)
@@ -2103,7 +2103,7 @@ MagickExport void XColorBrowserWidget(Display *display,XWindows *windows,
           (unsigned int) windows->widget.visual_info->colormap_size,
           &windows->widget.pixel_info->matte_color);
         mode_info.text=colorname;
-        (void) FormatMagickString(mode_info.text,MaxTextExtent,"#%02x%02x%02x",
+        (void) FormatLocaleString(mode_info.text,MaxTextExtent,"#%02x%02x%02x",
           windows->widget.pixel_info->matte_color.red,
           windows->widget.pixel_info->matte_color.green,
           windows->widget.pixel_info->matte_color.blue);
@@ -8585,7 +8585,7 @@ MagickExport MagickBooleanType XPreferencesWidget(Display *display,
           SharedColormap ? MagickTrue : MagickFalse;
         preferences_info[7].raised=resource_info->use_pixmap ==
           MagickFalse ? MagickTrue : MagickFalse;
-        (void) FormatMagickString(cache,MaxTextExtent,CacheButtonText,
+        (void) FormatLocaleString(cache,MaxTextExtent,CacheButtonText,
           (unsigned long) resource_info->undo_cache);
         XGetWidgetInfo(cache,&cache_info);
         cache_info.bevel_width--;
@@ -8659,7 +8659,7 @@ MagickExport MagickBooleanType XPreferencesWidget(Display *display,
             resource_info->undo_cache<<=1;
             if (resource_info->undo_cache > 256)
               resource_info->undo_cache=1;
-            (void) FormatMagickString(cache,MaxTextExtent,CacheButtonText,
+            (void) FormatLocaleString(cache,MaxTextExtent,CacheButtonText,
               (unsigned long) resource_info->undo_cache);
             cache_info.raised=MagickFalse;
             XDrawTriangleEast(display,&windows->widget,&cache_info);
index d6fd0976a36683281363c5902c7e01e723124dfe..3e02023e81e95567d297ba169c0d15b382f52e89 100644 (file)
@@ -352,22 +352,22 @@ MagickExport char *CanonicalXMLContent(const char *content,
     {
       case '&':
       {
-        i+=FormatMagickString(canonical_content+i,extent,"&amp;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&amp;");
         break;
       }
       case '<':
       {
-        i+=FormatMagickString(canonical_content+i,extent,"&lt;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&lt;");
         break;
       }
       case '>':
       {
-        i+=FormatMagickString(canonical_content+i,extent,"&gt;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&gt;");
         break;
       }
       case '"':
       {
-        i+=FormatMagickString(canonical_content+i,extent,"&quot;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&quot;");
         break;
       }
       case '\n':
@@ -377,7 +377,7 @@ MagickExport char *CanonicalXMLContent(const char *content,
             canonical_content[i++]=(char) (*p);
             break;
           }
-        i+=FormatMagickString(canonical_content+i,extent,"&#xA;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&#xA;");
         break;
       }
       case '\t':
@@ -387,12 +387,12 @@ MagickExport char *CanonicalXMLContent(const char *content,
             canonical_content[i++]=(char) (*p);
             break;
           }
-        i+=FormatMagickString(canonical_content+i,extent,"&#x9;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&#x9;");
         break;
       }
       case '\r':
       {
-        i+=FormatMagickString(canonical_content+i,extent,"&#xD;");
+        i+=FormatLocaleString(canonical_content+i,extent,"&#xD;");
         break;
       }
       default:
@@ -2361,7 +2361,7 @@ static char *EncodePredefinedEntities(const char *source,ssize_t offset,
       if (*destination == (char *) NULL)
         return(*destination);
     }
-  *length+=FormatMagickString(*destination+(*length),*extent,"%s",
+  *length+=FormatLocaleString(*destination+(*length),*extent,"%s",
     canonical_content);
   canonical_content=DestroyString(canonical_content);
   return(*destination);
@@ -2398,7 +2398,7 @@ static char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length,
       if (*source == (char *) NULL)
         return(*source);
     }
-  *length+=FormatMagickString(*source+(*length),*extent,"<%s",xml_info->tag);
+  *length+=FormatLocaleString(*source+(*length),*extent,"<%s",xml_info->tag);
   for (i=0; xml_info->attributes[i]; i+=2)
   {
     attribute=GetXMLTreeAttribute(xml_info,xml_info->attributes[i]);
@@ -2411,11 +2411,11 @@ static char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length,
         if (*source == (char *) NULL)
           return((char *) NULL);
       }
-    *length+=FormatMagickString(*source+(*length),*extent," %s=\"",
+    *length+=FormatLocaleString(*source+(*length),*extent," %s=\"",
       xml_info->attributes[i]);
     (void) EncodePredefinedEntities(xml_info->attributes[i+1],-1,source,length,
       extent,MagickTrue);
-    *length+=FormatMagickString(*source+(*length),*extent,"\"");
+    *length+=FormatLocaleString(*source+(*length),*extent,"\"");
   }
   i=0;
   while ((attributes[i] != (char **) NULL) &&
@@ -2438,14 +2438,14 @@ static char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length,
         if (*source == (char *) NULL)
           return((char *) NULL);
       }
-    *length+=FormatMagickString(*source+(*length),*extent," %s=\"",
+    *length+=FormatLocaleString(*source+(*length),*extent," %s=\"",
       attributes[i][j]);
     (void) EncodePredefinedEntities(attributes[i][j+1],-1,source,length,extent,
       MagickTrue);
-    *length+=FormatMagickString(*source+(*length),*extent,"\"");
+    *length+=FormatLocaleString(*source+(*length),*extent,"\"");
     j+=3;
   }
-  *length+=FormatMagickString(*source+(*length),*extent,*xml_info->content ?
+  *length+=FormatLocaleString(*source+(*length),*extent,*xml_info->content ?
     ">" : "/>");
   if (xml_info->child != (XMLTreeInfo *) NULL)
     *source=XMLTreeTagToXML(xml_info->child,source,length,extent,0,attributes);
@@ -2460,7 +2460,7 @@ static char *XMLTreeTagToXML(XMLTreeInfo *xml_info,char **source,size_t *length,
         return((char *) NULL);
     }
   if (*xml_info->content != '\0')
-    *length+=FormatMagickString(*source+(*length),*extent,"</%s>",
+    *length+=FormatLocaleString(*source+(*length),*extent,"</%s>",
       xml_info->tag);
   while ((content[offset] != '\0') && (offset < xml_info->offset))
     offset++;
@@ -2538,7 +2538,7 @@ MagickExport char *XMLTreeInfoToXML(XMLTreeInfo *xml_info)
             if (xml == (char *) NULL)
               return(xml);
           }
-        length+=FormatMagickString(xml+length,extent,"<?%s%s%s?>\n",q,
+        length+=FormatLocaleString(xml+length,extent,"<?%s%s%s?>\n",q,
           *p != '\0' ? " " : "",p);
         p=root->processing_instructions[i][j];
       }
@@ -2574,7 +2574,7 @@ MagickExport char *XMLTreeInfoToXML(XMLTreeInfo *xml_info)
             if (xml == (char *) NULL)
               return(xml);
           }
-        length+=FormatMagickString(xml+length,extent,"\n<?%s%s%s?>",q,
+        length+=FormatLocaleString(xml+length,extent,"\n<?%s%s%s?>",q,
           *p != '\0' ? " " : "",p);
         p=root->processing_instructions[i][j];
       }
index c1e60818fb308d32ab339e5b44a773a0ff8fd08b..9ef30b5355550fa649af8f1f7a6683688237a9a4 100644 (file)
@@ -605,7 +605,7 @@ MagickExport MagickBooleanType XAnnotateImage(Display *display,
       /*
         Scale image.
       */
-      (void) FormatMagickString(image_geometry,MaxTextExtent,"%ux%u",
+      (void) FormatLocaleString(image_geometry,MaxTextExtent,"%ux%u",
         width,height);
       (void) TransformImage(&annotate_image,(char *) NULL,image_geometry);
     }
@@ -1301,7 +1301,7 @@ MagickExport XVisualInfo *XBestVisualInfo(Display *display,
           /*
             User specified Standard Colormap.
           */
-          (void) FormatMagickString((char *) map_name,MaxTextExtent,
+          (void) FormatLocaleString((char *) map_name,MaxTextExtent,
             "RGB_%s_MAP",map_type);
           LocaleUpper(map_name);
           map_property=XInternAtom(display,(char *) map_name,MagickTrue);
@@ -1977,42 +1977,42 @@ MagickExport void XDisplayImageInfo(Display *display,
     }
   if (resource_info->gamma_correct != MagickFalse)
     if (resource_info->display_gamma != (char *) NULL)
-      (void) fprintf(file,"Display\n  gamma: %s\n\n",
+      (void) FormatLocaleFile(file,"Display\n  gamma: %s\n\n",
         resource_info->display_gamma);
   /*
     Write info about the X image to a file.
   */
-  (void) fprintf(file,"X\n  visual: %s\n",
+  (void) FormatLocaleFile(file,"X\n  visual: %s\n",
     XVisualClassName((int) windows->image.storage_class));
-  (void) fprintf(file,"  depth: %d\n",windows->image.ximage->depth);
+  (void) FormatLocaleFile(file,"  depth: %d\n",windows->image.ximage->depth);
   if (windows->visual_info->colormap_size != 0)
-    (void) fprintf(file,"  colormap size: %d\n",
+    (void) FormatLocaleFile(file,"  colormap size: %d\n",
       windows->visual_info->colormap_size);
   if (resource_info->colormap== SharedColormap)
-    (void) fprintf(file,"  colormap type: Shared\n");
+    (void) FormatLocaleFile(file,"  colormap type: Shared\n");
   else
-    (void) fprintf(file,"  colormap type: Private\n");
-  (void) fprintf(file,"  geometry: %dx%d\n",windows->image.ximage->width,
+    (void) FormatLocaleFile(file,"  colormap type: Private\n");
+  (void) FormatLocaleFile(file,"  geometry: %dx%d\n",windows->image.ximage->width,
     windows->image.ximage->height);
   if (windows->image.crop_geometry != (char *) NULL)
-    (void) fprintf(file,"  crop geometry: %s\n",windows->image.crop_geometry);
+    (void) FormatLocaleFile(file,"  crop geometry: %s\n",windows->image.crop_geometry);
   if (windows->image.pixmap == (Pixmap) NULL)
-    (void) fprintf(file,"  type: X Image\n");
+    (void) FormatLocaleFile(file,"  type: X Image\n");
   else
-    (void) fprintf(file,"  type: Pixmap\n");
+    (void) FormatLocaleFile(file,"  type: Pixmap\n");
   if (windows->image.shape != MagickFalse)
-    (void) fprintf(file,"  non-rectangular shape: True\n");
+    (void) FormatLocaleFile(file,"  non-rectangular shape: True\n");
   else
-    (void) fprintf(file,"  non-rectangular shape: False\n");
+    (void) FormatLocaleFile(file,"  non-rectangular shape: False\n");
   if (windows->image.shared_memory != MagickFalse)
-    (void) fprintf(file,"  shared memory: True\n");
+    (void) FormatLocaleFile(file,"  shared memory: True\n");
   else
-    (void) fprintf(file,"  shared memory: False\n");
-  (void) fprintf(file,"\n");
+    (void) FormatLocaleFile(file,"  shared memory: False\n");
+  (void) FormatLocaleFile(file,"\n");
   if (resource_info->font != (char *) NULL)
-    (void) fprintf(file,"Font: %s\n\n",resource_info->font);
+    (void) FormatLocaleFile(file,"Font: %s\n\n",resource_info->font);
   if (resource_info->text_font != (char *) NULL)
-    (void) fprintf(file,"Text font: %s\n\n",resource_info->text_font);
+    (void) FormatLocaleFile(file,"Text font: %s\n\n",resource_info->text_font);
   /*
     Write info about the undo cache to a file.
   */
@@ -2023,9 +2023,9 @@ MagickExport void XDisplayImageInfo(Display *display,
     bytes+=number_pixels*sizeof(PixelPacket);
     undo_image=GetPreviousImageInList(undo_image);
   }
-  (void) fprintf(file,"Undo Edit Cache\n  levels: %u\n",levels);
-  (void) fprintf(file,"  bytes: %.20gmb\n",(double) ((bytes+(1 << 19)) >> 20));
-  (void) fprintf(file,"  limit: %.20gmb\n\n",(double)
+  (void) FormatLocaleFile(file,"Undo Edit Cache\n  levels: %u\n",levels);
+  (void) FormatLocaleFile(file,"  bytes: %.20gmb\n",(double) ((bytes+(1 << 19)) >> 20));
+  (void) FormatLocaleFile(file,"  limit: %.20gmb\n\n",(double)
     resource_info->undo_cache);
   /*
     Write info about the image to a file.
@@ -2050,7 +2050,7 @@ MagickExport void XDisplayImageInfo(Display *display,
         Display information about the image in the Text View widget.
       */
       (void) XWithdrawWindow(display,windows->info.id,windows->info.screen);
-      (void) FormatMagickString(title,MaxTextExtent,"Image Info: %s",
+      (void) FormatLocaleString(title,MaxTextExtent,"Image Info: %s",
         image->filename);
       XTextViewWidget(display,resource_info,windows,MagickTrue,title,
         (char const **) textlist);
@@ -2507,7 +2507,7 @@ MagickExport MagickBooleanType XDrawImage(Display *display,
       /*
         Scale image.
       */
-      (void) FormatMagickString(image_geometry,MaxTextExtent,"%ux%u",
+      (void) FormatLocaleString(image_geometry,MaxTextExtent,"%ux%u",
         width,height);
       (void) TransformImage(&draw_image,(char *) NULL,image_geometry);
     }
@@ -3271,7 +3271,7 @@ MagickExport char *XGetResourceClass(XrmDatabase database,
       /*
         Initialize resource keyword and class.
       */
-      (void) FormatMagickString(resource_name,MaxTextExtent,"%s.%s",
+      (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.%s",
         client_name,keyword);
       c=(int) (*client_name);
       if ((c >= XK_a) && (c <= XK_z))
@@ -3291,7 +3291,7 @@ MagickExport char *XGetResourceClass(XrmDatabase database,
         else
           if ((k >= XK_oslash) && (k <= XK_thorn))
             k-=(XK_oslash-XK_Ooblique);
-      (void) FormatMagickString(resource_class,MaxTextExtent,"%c%s.%c%s",c,
+      (void) FormatLocaleString(resource_class,MaxTextExtent,"%c%s.%c%s",c,
         client_name+1,k,keyword+1);
     }
   status=XrmGetResource(database,resource_name,resource_class,&resource_type,
@@ -3380,7 +3380,7 @@ MagickExport XrmDatabase XGetResourceDatabase(Display *display,
       if ((c >= XK_oslash) && (c <= XK_thorn))
         c-=(XK_oslash-XK_Ooblique);
 #if defined(X11_APPLICATION_PATH)
-  (void) FormatMagickString(filename,MaxTextExtent,"%s%c%s",
+  (void) FormatLocaleString(filename,MaxTextExtent,"%s%c%s",
     X11_APPLICATION_PATH,c,client_name+1);
   (void) XrmCombineFileDatabase(filename,&resource_database,MagickFalse);
 #endif
@@ -3396,7 +3396,7 @@ MagickExport XrmDatabase XGetResourceDatabase(Display *display,
     Merge user preferences database.
   */
 #if defined(X11_PREFERENCES_PATH)
-  (void) FormatMagickString(filename,MaxTextExtent,"%s%src",
+  (void) FormatLocaleString(filename,MaxTextExtent,"%s%src",
     X11_PREFERENCES_PATH,client_name);
   ExpandFilename(filename);
   (void) XrmCombineFileDatabase(filename,&resource_database,MagickFalse);
@@ -3654,7 +3654,7 @@ MagickExport char *XGetResourceInstance(XrmDatabase database,
     return((char *) resource_default);
   *resource_name='\0';
   if (keyword != (char *) NULL)
-    (void) FormatMagickString(resource_name,MaxTextExtent,"%s.%s",client_name,
+    (void) FormatLocaleString(resource_name,MaxTextExtent,"%s.%s",client_name,
       keyword);
   status=XrmGetResource(database,resource_name,"ImageMagick",&resource_type,
     &resource_value);
@@ -3706,7 +3706,7 @@ MagickExport char *XGetScreenDensity(Display *display)
     ((double) DisplayWidthMM(display,XDefaultScreen(display))));
   y_density=((((double) DisplayHeight(display,XDefaultScreen(display)))*25.4)/
     ((double) DisplayHeightMM(display,XDefaultScreen(display))));
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",x_density,
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",x_density,
     y_density);
   return(GetPageGeometry(density));
 }
@@ -5881,7 +5881,7 @@ static void XMakeImageLSBFirst(const XResourceInfo *resource_info,
         resource_info->image_info->texture != (char *) NULL ?
         resource_info->image_info->texture : "pattern:checkerboard",
         MaxTextExtent);
-      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",(double)
+      (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",(double)
         image->columns,(double) image->rows);
       image_info->size=ConstantString(size);
       pattern=ReadImage(image_info,&image->exception);
@@ -6508,7 +6508,7 @@ static void XMakeImageMSBFirst(const XResourceInfo *resource_info,
         resource_info->image_info->texture != (char *) NULL ?
         resource_info->image_info->texture : "pattern:checkerboard",
         MaxTextExtent);
-      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",(double)
+      (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",(double)
         image->columns,(double) image->rows);
       image_info->size=ConstantString(size);
       pattern=ReadImage(image_info,&image->exception);
@@ -7136,7 +7136,7 @@ MagickExport void XMakeMagnifyImage(Display *display,XWindows *windows)
       i=0;
       while ((1 << i) <= (int) magnify)
         i++;
-      (void) FormatMagickString(windows->magnify.name,MaxTextExtent,
+      (void) FormatLocaleString(windows->magnify.name,MaxTextExtent,
         "Magnify %.20gX",(double) i);
       status=XStringListToTextProperty(&windows->magnify.name,1,&window_name);
       if (status != False)
@@ -7457,7 +7457,7 @@ MagickExport void XMakeMagnifyImage(Display *display,XWindows *windows)
   (void) GetOneVirtualMagickPixel(windows->image.image,(ssize_t)
     windows->magnify.x,(ssize_t) windows->magnify.y,&pixel,
     &windows->image.image->exception);
-  (void) FormatMagickString(tuple,MaxTextExtent,"%d,%d: ",
+  (void) FormatLocaleString(tuple,MaxTextExtent,"%d,%d: ",
     windows->magnify.x,windows->magnify.y);
   (void) ConcatenateMagickString(tuple,"(",MaxTextExtent);
   ConcatenateColorComponent(&pixel,RedChannel,X11Compliance,tuple);
@@ -8377,7 +8377,7 @@ MagickExport void XMakeWindow(Display *display,Window parent,char **argv,
       /*
         User specified geometry.
       */
-      (void) FormatMagickString(default_geometry,MaxTextExtent,"%dx%d",
+      (void) FormatLocaleString(default_geometry,MaxTextExtent,"%dx%d",
         size_hints->width,size_hints->height);
       (void) CopyMagickString(geometry,window_info->geometry,MaxTextExtent);
       p=geometry;
@@ -8567,7 +8567,7 @@ static const char *GetLocaleMonitorMessage(const char *text)
   p=strrchr(tag,'/');
   if (p != (char *) NULL)
     *p='\0';
-  (void) FormatMagickString(message,MaxTextExtent,"Monitor/%s",tag);
+  (void) FormatLocaleString(message,MaxTextExtent,"Monitor/%s",tag);
   locale_message=GetLocaleMessage(message);
   if (locale_message == message)
     return(text);
@@ -9289,39 +9289,39 @@ MagickExport void XUserPreferences(XResourceInfo *resource_info)
   assert(resource_info != (XResourceInfo *) NULL);
   client_name=GetClientName();
   preferences_database=XrmGetStringDatabase("");
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.backdrop",client_name);
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.backdrop",client_name);
   value=resource_info->backdrop ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.colormap",client_name);
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.colormap",client_name);
   value=resource_info->colormap == SharedColormap ? "Shared" : "Private";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.confirmExit",
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.confirmExit",
     client_name);
   value=resource_info->confirm_exit ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.confirmEdit",
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.confirmEdit",
     client_name);
   value=resource_info->confirm_edit ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.displayWarnings",
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.displayWarnings",
     client_name);
   value=resource_info->display_warnings ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.dither",client_name);
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.dither",client_name);
   value=resource_info->quantize_info->dither ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.gammaCorrect",
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.gammaCorrect",
     client_name);
   value=resource_info->gamma_correct ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.undoCache",client_name);
-  (void) FormatMagickString(cache,MaxTextExtent,"%.20g",(double)
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.undoCache",client_name);
+  (void) FormatLocaleString(cache,MaxTextExtent,"%.20g",(double)
     resource_info->undo_cache);
   XrmPutStringResource(&preferences_database,specifier,cache);
-  (void) FormatMagickString(specifier,MaxTextExtent,"%s.usePixmap",client_name);
+  (void) FormatLocaleString(specifier,MaxTextExtent,"%s.usePixmap",client_name);
   value=resource_info->use_pixmap ? "True" : "False";
   XrmPutStringResource(&preferences_database,specifier,(char *) value);
-  (void) FormatMagickString(filename,MaxTextExtent,"%s%src",
+  (void) FormatLocaleString(filename,MaxTextExtent,"%s%src",
     X11_PREFERENCES_PATH,client_name);
   ExpandFilename(filename);
   XrmPutFileDatabase(preferences_database,filename);
index d2fc7b406612923ce41ed4631e123aba921c68b8..ebdb1428127ff5922f72d99ddb728e0b0c6a59fe 100644 (file)
@@ -104,18 +104,18 @@ static size_t ValidateCompareCommand(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate compare command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate compare command line program:\n");
   for (i=0; compare_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) (test++),
       compare_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s %s %s",
       compare_options[i],reference_filename,reference_filename,output_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -126,13 +126,13 @@ static size_t ValidateCompareCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -193,19 +193,19 @@ static size_t ValidateCompositeCommand(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate composite command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate composite command line program:\n");
   for (i=0; composite_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) (test++),
       composite_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s %s %s",
       reference_filename,composite_options[i],reference_filename,
       output_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -216,13 +216,13 @@ static size_t ValidateCompositeCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -283,18 +283,18 @@ static size_t ValidateConvertCommand(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate convert command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate convert command line program:\n");
   for (i=0; convert_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) test++,
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) test++,
       convert_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s %s %s",
       reference_filename,convert_options[i],reference_filename,output_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -305,13 +305,13 @@ static size_t ValidateConvertCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -373,18 +373,18 @@ static size_t ValidateIdentifyCommand(ImageInfo *image_info,
 
   (void) output_filename;
   test=0;
-  (void) fprintf(stdout,"validate identify command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate identify command line program:\n");
   for (i=0; identify_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) test++,
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) test++,
       identify_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s",
       identify_options[i],reference_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -395,13 +395,13 @@ static size_t ValidateIdentifyCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -476,7 +476,7 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate image formats in memory:\n");
+  (void) FormatLocaleFile(stdout,"validate image formats in memory:\n");
   for (i=0; reference_formats[i].magick != (char *) NULL; i++)
   {
     magick_info=GetMagickInfo(reference_formats[i].magick,exception);
@@ -490,7 +490,7 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
         Generate reference image.
       */
       CatchException(exception);
-      (void) fprintf(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
+      (void) FormatLocaleFile(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
         (test++),reference_formats[i].magick,CommandOptionToMnemonic(
         MagickCompressOptions,reference_formats[i].compression),
         CommandOptionToMnemonic(MagickTypeOptions,reference_types[j].type),
@@ -500,24 +500,24 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       reference_image=ReadImage(image_info,exception);
       if (reference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Write reference image.
       */
-      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",
+      (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",
         (double) reference_image->columns,(double) reference_image->rows);
       (void) CloneString(&image_info->size,size);
       image_info->depth=reference_types[j].depth;
-      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(reference_image->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       status=SetImageType(reference_image,reference_types[j].type);
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -526,7 +526,7 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -537,26 +537,26 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       reference_image=DestroyImage(reference_image);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Read reference image.
       */
-      (void) FormatMagickString(image_info->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(image_info->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       reference_image=ReadImage(image_info,exception);
       if (reference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Write reference image.
       */
-      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(reference_image->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       (void) CopyMagickString(image_info->magick,reference_formats[i].magick,
         MaxTextExtent);
@@ -566,7 +566,7 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       blob=ImageToBlob(image_info,reference_image,&length,exception);
       if (blob == (unsigned char *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -574,13 +574,13 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       /*
         Read reconstruct image.
       */
-      (void) FormatMagickString(image_info->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(image_info->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       reconstruct_image=BlobToImage(image_info,blob,length,exception);
       blob=(unsigned char *) RelinquishMagickMemory(blob);
       if (reconstruct_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -603,22 +603,22 @@ static size_t ValidateImageFormatsInMemory(ImageInfo *image_info,
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       difference_image=DestroyImage(difference_image);
       if ((distortion/QuantumRange) > fuzz)
         {
-          (void) fprintf(stdout,"... fail (with distortion %g).\n",
+          (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
             distortion/QuantumRange);
           (*fail)++;
           continue;
         }
-      (void) fprintf(stdout,"... pass.\n");
+      (void) FormatLocaleFile(stdout,"... pass.\n");
     }
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -687,7 +687,7 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate image formats on disk:\n");
+  (void) FormatLocaleFile(stdout,"validate image formats on disk:\n");
   for (i=0; reference_formats[i].magick != (char *) NULL; i++)
   {
     magick_info=GetMagickInfo(reference_formats[i].magick,exception);
@@ -701,7 +701,7 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
         Generate reference image.
       */
       CatchException(exception);
-      (void) fprintf(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
+      (void) FormatLocaleFile(stdout,"  test %.20g: %s/%s/%s/%.20g-bits",(double)
         (test++),reference_formats[i].magick,CommandOptionToMnemonic(
         MagickCompressOptions,reference_formats[i].compression),
         CommandOptionToMnemonic(MagickTypeOptions,reference_types[j].type),
@@ -711,24 +711,24 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       reference_image=ReadImage(image_info,exception);
       if (reference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Write reference image.
       */
-      (void) FormatMagickString(size,MaxTextExtent,"%.20gx%.20g",
+      (void) FormatLocaleString(size,MaxTextExtent,"%.20gx%.20g",
         (double) reference_image->columns,(double) reference_image->rows);
       (void) CloneString(&image_info->size,size);
       image_info->depth=reference_types[j].depth;
-      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(reference_image->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       status=SetImageType(reference_image,reference_types[j].type);
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -737,7 +737,7 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -748,26 +748,26 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       reference_image=DestroyImage(reference_image);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Read reference image.
       */
-      (void) FormatMagickString(image_info->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(image_info->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       reference_image=ReadImage(image_info,exception);
       if (reference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       /*
         Write reference image.
       */
-      (void) FormatMagickString(reference_image->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(reference_image->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       reference_image->depth=reference_types[j].depth;
       reference_image->compression=reference_formats[i].compression;
@@ -775,7 +775,7 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -783,12 +783,12 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       /*
         Read reconstruct image.
       */
-      (void) FormatMagickString(image_info->filename,MaxTextExtent,"%s:%s",
+      (void) FormatLocaleString(image_info->filename,MaxTextExtent,"%s:%s",
         reference_formats[i].magick,output_filename);
       reconstruct_image=ReadImage(image_info,exception);
       if (reconstruct_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -811,22 +811,22 @@ static size_t ValidateImageFormatsOnDisk(ImageInfo *image_info,
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       difference_image=DestroyImage(difference_image);
       if ((distortion/QuantumRange) > fuzz)
         {
-          (void) fprintf(stdout,"... fail (with distortion %g).\n",
+          (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
             distortion/QuantumRange);
           (*fail)++;
           continue;
         }
-      (void) fprintf(stdout,"... pass.\n");
+      (void) FormatLocaleFile(stdout,"... pass.\n");
     }
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -895,7 +895,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
 
   (void) output_filename;
   test=0;
-  (void) fprintf(stdout,"validate the import and export of image pixels:\n");
+  (void) FormatLocaleFile(stdout,"validate the import and export of image pixels:\n");
   for (i=0; reference_map[i] != (char *) NULL; i++)
   {
     for (j=0; reference_storage[j].type != UndefinedPixel; j++)
@@ -904,7 +904,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
         Generate reference image.
       */
       CatchException(exception);
-      (void) fprintf(stdout,"  test %.20g: %s/%s",(double) (test++),
+      (void) FormatLocaleFile(stdout,"  test %.20g: %s/%s",(double) (test++),
         reference_map[i],CommandOptionToMnemonic(MagickStorageOptions,
         reference_storage[j].type));
       (void) CopyMagickString(image_info->filename,reference_filename,
@@ -912,7 +912,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
       reference_image=ReadImage(image_info,exception);
       if (reference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
@@ -923,7 +923,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
       pixels=(unsigned char *) AcquireQuantumMemory(length,sizeof(*pixels));
       if (pixels == (unsigned char *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -934,7 +934,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
         exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           pixels=(unsigned char *) RelinquishMagickMemory(pixels);
           reference_image=DestroyImage(reference_image);
@@ -947,7 +947,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
       InheritException(exception,&reference_image->exception);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
            pixels=(unsigned char *) RelinquishMagickMemory(pixels);
           reference_image=DestroyImage(reference_image);
@@ -968,7 +968,7 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
       pixels=(unsigned char *) RelinquishMagickMemory(pixels);
       if (status == MagickFalse)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           reference_image=DestroyImage(reference_image);
           continue;
@@ -982,22 +982,22 @@ static size_t ValidateImportExportPixels(ImageInfo *image_info,
       reference_image=DestroyImage(reference_image);
       if (difference_image == (Image *) NULL)
         {
-          (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+          (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
           (*fail)++;
           continue;
         }
       difference_image=DestroyImage(difference_image);
       if ((distortion/QuantumRange) > 0.0)
         {
-          (void) fprintf(stdout,"... fail (with distortion %g).\n",
+          (void) FormatLocaleFile(stdout,"... fail (with distortion %g).\n",
             distortion/QuantumRange);
           (*fail)++;
           continue;
         }
-      (void) fprintf(stdout,"... pass.\n");
+      (void) FormatLocaleFile(stdout,"... pass.\n");
     }
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -1058,19 +1058,19 @@ static size_t ValidateMontageCommand(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate montage command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate montage command line program:\n");
   for (i=0; montage_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) (test++),
       montage_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s %s %s",
       reference_filename,montage_options[i],reference_filename,
       output_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -1081,13 +1081,13 @@ static size_t ValidateMontageCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -1148,18 +1148,18 @@ static size_t ValidateStreamCommand(ImageInfo *image_info,
     test;
 
   test=0;
-  (void) fprintf(stdout,"validate stream command line program:\n");
+  (void) FormatLocaleFile(stdout,"validate stream command line program:\n");
   for (i=0; stream_options[i] != (char *) NULL; i++)
   {
     CatchException(exception);
-    (void) fprintf(stdout,"  test %.20g: %s",(double) (test++),
+    (void) FormatLocaleFile(stdout,"  test %.20g: %s",(double) (test++),
       stream_options[i]);
-    (void) FormatMagickString(command,MaxTextExtent,"%s %s %s",
+    (void) FormatLocaleString(command,MaxTextExtent,"%s %s %s",
       stream_options[i],reference_filename,output_filename);
     arguments=StringToArgv(command,&number_arguments);
     if (arguments == (char **) NULL)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
@@ -1170,13 +1170,13 @@ static size_t ValidateStreamCommand(ImageInfo *image_info,
     arguments=(char **) RelinquishMagickMemory(arguments);
     if (status != MagickFalse)
       {
-        (void) fprintf(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
+        (void) FormatLocaleFile(stdout,"... fail @ %s/%s/%lu.\n",GetMagickModule());
         (*fail)++;
         continue;
       }
-    (void) fprintf(stdout,"... pass.\n");
+    (void) FormatLocaleFile(stdout,"... pass.\n");
   }
-  (void) fprintf(stdout,
+  (void) FormatLocaleFile(stdout,
     "  summary: %.20g subtests; %.20g passed; %.20g failed.\n",(double) test,
     (double) (test-(*fail)),(double) *fail);
   return(test);
@@ -1374,10 +1374,10 @@ int main(int argc,char **argv)
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             return(0);
           }
         ThrowValidateException(OptionError,"UnrecognizedOption",option)
@@ -1410,11 +1410,11 @@ int main(int argc,char **argv)
         fail++;
       else
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n\n",
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n\n",
             GetMagickCopyright());
-          (void) fprintf(stdout,"ImageMagick Validation Suite (%s)\n\n",
+          (void) FormatLocaleFile(stdout,"ImageMagick Validation Suite (%s)\n\n",
             CommandOptionToMnemonic(MagickValidateOptions,(ssize_t) type));
           if ((type & CompareValidate) != 0)
             tests+=ValidateCompareCommand(image_info,reference_filename,
@@ -1443,7 +1443,7 @@ int main(int argc,char **argv)
           if ((type & StreamValidate) != 0)
             tests+=ValidateStreamCommand(image_info,reference_filename,
               output_filename,&fail,exception);
-          (void) fprintf(stdout,
+          (void) FormatLocaleFile(stdout,
             "validation suite: %.20g tests; %.20g passed; %.20g failed.\n",
             (double) tests,(double) (tests-fail),(double) fail);
         }
@@ -1456,7 +1456,7 @@ int main(int argc,char **argv)
     {
       elapsed_time=GetElapsedTime(timer);
       user_time=GetUserTime(timer);
-      (void) fprintf(stderr,
+      (void) FormatLocaleFile(stderr,
         "Performance: %.20gi %gips %0.3fu %ld:%02ld.%03ld\n",(double)
         iterations,1.0*iterations/elapsed_time,user_time,(long)
         (elapsed_time/60.0),(long) ceil(fmod(elapsed_time,60.0)),
index bc97adaef33abd857459cf0297c4a40f1625a92b..9681961823f282a403ffec708bd0273a71f32909 100644 (file)
@@ -312,10 +312,10 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -1004,7 +1004,7 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowAnimateException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowAnimateInvalidArgumentException(option,argv[i]);
@@ -1367,10 +1367,10 @@ WandExport MagickBooleanType AnimateImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
index a3685a43684a675be314909d689eb1ce988786bd..413748e9889c2bcc234412994c349ae5d685a960 100644 (file)
@@ -262,10 +262,10 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -531,7 +531,7 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
             if (*option == '+')
               dissimilarity_threshold=DefaultDissimilarityThreshold;
             else
-              dissimilarity_threshold=StringToDouble(argv[i],(char **) NULL);
+              dissimilarity_threshold=LocaleToDouble(argv[i],(char **) NULL);
             break;
           }
         if (LocaleCompare("duration",option+1) == 0)
@@ -661,7 +661,7 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowCompareException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowCompareInvalidArgumentException(option,argv[i]);
@@ -894,10 +894,10 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
@@ -1005,37 +1005,37 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
             case RootMeanSquaredErrorMetric:
             case PeakAbsoluteErrorMetric:
             {
-              (void) fprintf(stderr,"%g (%g)",QuantumRange*distortion,
+              (void) FormatLocaleFile(stderr,"%g (%g)",QuantumRange*distortion,
                 (double) distortion);
               if ((reconstruct_image->columns != image->columns) ||
                   (reconstruct_image->rows != image->rows))
-                (void) fprintf(stderr," @ %.20g,%.20g",(double)
+                (void) FormatLocaleFile(stderr," @ %.20g,%.20g",(double)
                   difference_image->page.x,(double) difference_image->page.y);
-              (void) fprintf(stderr,"\n");
+              (void) FormatLocaleFile(stderr,"\n");
               break;
             }
             case AbsoluteErrorMetric:
             case NormalizedCrossCorrelationErrorMetric:
             case PeakSignalToNoiseRatioMetric:
             {
-              (void) fprintf(stderr,"%g",distortion);
+              (void) FormatLocaleFile(stderr,"%g",distortion);
               if ((reconstruct_image->columns != image->columns) ||
                   (reconstruct_image->rows != image->rows))
-                (void) fprintf(stderr," @ %.20g,%.20g",(double)
+                (void) FormatLocaleFile(stderr," @ %.20g,%.20g",(double)
                   difference_image->page.x,(double) difference_image->page.y);
-              (void) fprintf(stderr,"\n");
+              (void) FormatLocaleFile(stderr,"\n");
               break;
             }
             case MeanErrorPerPixelMetric:
             {
-              (void) fprintf(stderr,"%g (%g, %g)",distortion,
+              (void) FormatLocaleFile(stderr,"%g (%g, %g)",distortion,
                 image->error.normalized_mean_error,
                 image->error.normalized_maximum_error);
               if ((reconstruct_image->columns != image->columns) ||
                   (reconstruct_image->rows != image->rows))
-                (void) fprintf(stderr," @ %.20g,%.20g",(double)
+                (void) FormatLocaleFile(stderr," @ %.20g,%.20g",(double)
                   difference_image->page.x,(double) difference_image->page.y);
-              (void) fprintf(stderr,"\n");
+              (void) FormatLocaleFile(stderr,"\n");
               break;
             }
             case UndefinedMetric:
@@ -1049,12 +1049,12 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
 
           channel_distortion=GetImageChannelDistortions(image,reconstruct_image,
             metric,&image->exception);
-          (void) fprintf(stderr,"Image: %s\n",image->filename);
+          (void) FormatLocaleFile(stderr,"Image: %s\n",image->filename);
           if ((reconstruct_image->columns != image->columns) ||
               (reconstruct_image->rows != image->rows))
-            (void) fprintf(stderr,"Offset: %.20g,%.20g\n",(double)
+            (void) FormatLocaleFile(stderr,"Offset: %.20g,%.20g\n",(double)
               difference_image->page.x,(double) difference_image->page.y);
-          (void) fprintf(stderr,"  Channel distortion: %s\n",
+          (void) FormatLocaleFile(stderr,"  Channel distortion: %s\n",
             CommandOptionToMnemonic(MagickMetricOptions,(ssize_t) metric));
           switch (metric)
           {
@@ -1069,54 +1069,54 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
                 case RGBColorspace:
                 default:
                 {
-                  (void) fprintf(stderr,"    red: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    red: %g (%g)\n",
                     QuantumRange*channel_distortion[RedChannel],
                     channel_distortion[RedChannel]);
-                  (void) fprintf(stderr,"    green: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    green: %g (%g)\n",
                     QuantumRange*channel_distortion[GreenChannel],
                     channel_distortion[GreenChannel]);
-                  (void) fprintf(stderr,"    blue: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    blue: %g (%g)\n",
                     QuantumRange*channel_distortion[BlueChannel],
                     channel_distortion[BlueChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g (%g)\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g (%g)\n",
                       QuantumRange*channel_distortion[OpacityChannel],
                       channel_distortion[OpacityChannel]);
                   break;
                 }
                 case CMYKColorspace:
                 {
-                  (void) fprintf(stderr,"    cyan: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    cyan: %g (%g)\n",
                     QuantumRange*channel_distortion[CyanChannel],
                     channel_distortion[CyanChannel]);
-                  (void) fprintf(stderr,"    magenta: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    magenta: %g (%g)\n",
                     QuantumRange*channel_distortion[MagentaChannel],
                     channel_distortion[MagentaChannel]);
-                  (void) fprintf(stderr,"    yellow: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    yellow: %g (%g)\n",
                     QuantumRange*channel_distortion[YellowChannel],
                     channel_distortion[YellowChannel]);
-                  (void) fprintf(stderr,"    black: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    black: %g (%g)\n",
                     QuantumRange*channel_distortion[BlackChannel],
                     channel_distortion[BlackChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g (%g)\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g (%g)\n",
                       QuantumRange*channel_distortion[OpacityChannel],
                       channel_distortion[OpacityChannel]);
                   break;
                 }
                 case GRAYColorspace:
                 {
-                  (void) fprintf(stderr,"    gray: %g (%g)\n",
+                  (void) FormatLocaleFile(stderr,"    gray: %g (%g)\n",
                     QuantumRange*channel_distortion[GrayChannel],
                     channel_distortion[GrayChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g (%g)\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g (%g)\n",
                       QuantumRange*channel_distortion[OpacityChannel],
                       channel_distortion[OpacityChannel]);
                   break;
                 }
               }
-              (void) fprintf(stderr,"    all: %g (%g)\n",
+              (void) FormatLocaleFile(stderr,"    all: %g (%g)\n",
                 QuantumRange*channel_distortion[CompositeChannels],
                 channel_distortion[CompositeChannels]);
               break;
@@ -1130,49 +1130,49 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info,
                 case RGBColorspace:
                 default:
                 {
-                  (void) fprintf(stderr,"    red: %g\n",
+                  (void) FormatLocaleFile(stderr,"    red: %g\n",
                     channel_distortion[RedChannel]);
-                  (void) fprintf(stderr,"    green: %g\n",
+                  (void) FormatLocaleFile(stderr,"    green: %g\n",
                     channel_distortion[GreenChannel]);
-                  (void) fprintf(stderr,"    blue: %g\n",
+                  (void) FormatLocaleFile(stderr,"    blue: %g\n",
                     channel_distortion[BlueChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g\n",
                       channel_distortion[OpacityChannel]);
                   break;
                 }
                 case CMYKColorspace:
                 {
-                  (void) fprintf(stderr,"    cyan: %g\n",
+                  (void) FormatLocaleFile(stderr,"    cyan: %g\n",
                     channel_distortion[CyanChannel]);
-                  (void) fprintf(stderr,"    magenta: %g\n",
+                  (void) FormatLocaleFile(stderr,"    magenta: %g\n",
                     channel_distortion[MagentaChannel]);
-                  (void) fprintf(stderr,"    yellow: %g\n",
+                  (void) FormatLocaleFile(stderr,"    yellow: %g\n",
                     channel_distortion[YellowChannel]);
-                  (void) fprintf(stderr,"    black: %g\n",
+                  (void) FormatLocaleFile(stderr,"    black: %g\n",
                     channel_distortion[BlackChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g\n",
                       channel_distortion[OpacityChannel]);
                   break;
                 }
                 case GRAYColorspace:
                 {
-                  (void) fprintf(stderr,"    gray: %g\n",
+                  (void) FormatLocaleFile(stderr,"    gray: %g\n",
                     channel_distortion[GrayChannel]);
                   if (image->matte != MagickFalse)
-                    (void) fprintf(stderr,"    alpha: %g\n",
+                    (void) FormatLocaleFile(stderr,"    alpha: %g\n",
                       channel_distortion[OpacityChannel]);
                   break;
                 }
               }
-              (void) fprintf(stderr,"    all: %g\n",
+              (void) FormatLocaleFile(stderr,"    all: %g\n",
                 channel_distortion[CompositeChannels]);
               break;
             }
             case MeanErrorPerPixelMetric:
             {
-              (void) fprintf(stderr,"    %g (%g, %g)\n",
+              (void) FormatLocaleFile(stderr,"    %g (%g, %g)\n",
                 channel_distortion[CompositeChannels],
                 image->error.normalized_mean_error,
                 image->error.normalized_maximum_error);
index 8761f17449b4f2c688194a561f50bd8b905702f7..94eadf08f5038a0a2ddb3055914b28df3ef872ed 100644 (file)
@@ -454,10 +454,10 @@ WandExport MagickBooleanType CompositeImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -1131,7 +1131,7 @@ WandExport MagickBooleanType CompositeImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowCompositeException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowCompositeInvalidArgumentException(option,argv[i]);
@@ -1537,10 +1537,10 @@ WandExport MagickBooleanType CompositeImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
index bb9db5cb34beb891bb2a3ebbffaf77c69fc3830b..898156960865bcb6b518cf4706cfe595900cb84c 100644 (file)
@@ -268,10 +268,10 @@ WandExport MagickBooleanType ConjureImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             return(MagickFalse);
           }
         /*
@@ -291,7 +291,7 @@ WandExport MagickBooleanType ConjureImageCommand(ImageInfo *image_info,
     status=SetImageOption(image_info,"filename",argv[i]);
     if (status == MagickFalse)
       ThrowConjureException(ImageError,"UnableToPersistKey",argv[i]);
-    (void) FormatMagickString(image_info->filename,MaxTextExtent,"msl:%s",
+    (void) FormatLocaleString(image_info->filename,MaxTextExtent,"msl:%s",
       argv[i]);
     image=ReadImages(image_info,exception);
     CatchException(exception);
index e2f6c156fedcb17d13c524607a97f2db56f01e5d..0ab925b007a029d60ded8a762be8d2be94f437f6 100644 (file)
@@ -524,10 +524,10 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -1847,7 +1847,7 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowConvertException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowConvertInvalidArgumentException(option,argv[i]);
@@ -2897,10 +2897,10 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("view",option+1) == 0)
index 25f118992f30eb36cef3dcd1c2d9bcacb2d9b479..1fad2478b831786bf92857d98a885c3a39e3499e 100644 (file)
@@ -135,7 +135,7 @@ static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
       images->filename);
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
     MagickWandId,(double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
@@ -207,7 +207,7 @@ WandExport PixelView *ClonePixelView(const PixelView *pixel_view)
       pixel_view->name);
   (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
   clone_view->id=AcquireWandId();
-  (void) FormatMagickString(clone_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_view->name,MaxTextExtent,"%s-%.20g",
     PixelViewId,(double) clone_view->id);
   clone_view->exception=AcquireExceptionInfo();
   InheritException(clone_view->exception,pixel_view->exception);
@@ -2266,7 +2266,7 @@ WandExport MagickBooleanType MagickSetImageOption(MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(option,MaxTextExtent,"%s:%s=%s",format,key,value);
+  (void) FormatLocaleString(option,MaxTextExtent,"%s:%s=%s",format,key,value);
   return(DefineImageOption(wand->image_info,option));
 }
 \f
@@ -2505,7 +2505,7 @@ WandExport PixelView *NewPixelView(MagickWand *wand)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
   pixel_view->id=AcquireWandId();
-  (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(pixel_view->name,MaxTextExtent,"%s-%.20g",
     PixelViewId,(double) pixel_view->id);
   pixel_view->exception=AcquireExceptionInfo();
   pixel_view->wand=wand;
@@ -2564,7 +2564,7 @@ WandExport PixelView *NewPixelViewRegion(MagickWand *wand,const ssize_t x,
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(pixel_view,0,sizeof(*pixel_view));
   pixel_view->id=AcquireWandId();
-  (void) FormatMagickString(pixel_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(pixel_view->name,MaxTextExtent,"%s-%.20g",
     PixelViewId,(double) pixel_view->id);
   pixel_view->exception=AcquireExceptionInfo();
   pixel_view->view=AcquireCacheView(pixel_view->wand->images);
index a63b3c6f397d0483944471c8cf865ebbd188d6d0..3a80c197edba4f24a2d7780f996320170ac3e948 100644 (file)
@@ -359,10 +359,10 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -1310,7 +1310,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowDisplayException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowDisplayInvalidArgumentException(option,argv[i]);
@@ -1787,10 +1787,10 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("visual",option+1) == 0)
@@ -1844,7 +1844,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowDisplayException(OptionError,"MissingArgument",option);
-            if (StringToDouble(argv[i],(char **) NULL) != 0)
+            if (LocaleToDouble(argv[i],(char **) NULL) != 0)
               resource_info.window_group=argv[i];
             break;
           }
@@ -1863,7 +1863,7 @@ WandExport MagickBooleanType DisplayImageCommand(ImageInfo *image_info,
                   answer[2],
                   *p;
 
-                (void) fprintf(stderr,"Overwrite %s? ",
+                (void) FormatLocaleFile(stderr,"Overwrite %s? ",
                   resource_info.write_filename);
                 p=fgets(answer,(int) sizeof(answer),stdin);
                 (void) p;
index 108a98cd090f6d3d146f35ef5efd287290065d5a..5fc15a07ba051621ad3979eb37c15f7a7f008182 100644 (file)
@@ -565,7 +565,7 @@ WandExport DrawingWand *CloneDrawingWand(const DrawingWand *wand)
       "MemoryAllocationFailed",GetExceptionMessage(errno));
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"DrawingWand-%.20g",
+  (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"DrawingWand-%.20g",
     (double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
@@ -1039,7 +1039,7 @@ WandExport MagickBooleanType DrawComposite(DrawingWand *wand,
       char
         buffer[MaxTextExtent];
 
-      (void) FormatMagickString(buffer,MaxTextExtent,"%.20g bytes",(double)
+      (void) FormatLocaleString(buffer,MaxTextExtent,"%.20g bytes",(double)
         (4L*blob_length/3L+4L));
       ThrowDrawException(ResourceLimitWarning,"MemoryAllocationFailed",
         wand->name);
@@ -2489,7 +2489,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"fill-opacity",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%g",
+      (void) FormatLocaleString(value,MaxTextExtent,"%g",
         (double) QuantumScale*(QuantumRange-CurrentContext->fill.opacity));
       (void) SetXMLTreeContent(child,value);
     }
@@ -2510,7 +2510,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"font-size",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%g",
+      (void) FormatLocaleString(value,MaxTextExtent,"%g",
         CurrentContext->pointsize);
       (void) SetXMLTreeContent(child,value);
     }
@@ -2531,7 +2531,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"font-weight",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
         CurrentContext->weight);
       (void) SetXMLTreeContent(child,value);
     }
@@ -2556,7 +2556,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"stroke-antialias",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%d",
+      (void) FormatLocaleString(value,MaxTextExtent,"%d",
         CurrentContext->stroke_antialias != MagickFalse ? 1 : 0);
       (void) SetXMLTreeContent(child,value);
     }
@@ -2572,7 +2572,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
       {
         if (i != 0)
           (void) ConcatenateString(&dash_pattern,",");
-        (void) FormatMagickString(value,MaxTextExtent,"%g",
+        (void) FormatLocaleString(value,MaxTextExtent,"%g",
           CurrentContext->dash_pattern[i]);
         (void) ConcatenateString(&dash_pattern,value);
       }
@@ -2582,7 +2582,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"stroke-dashoffset",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%g",
+      (void) FormatLocaleString(value,MaxTextExtent,"%g",
         CurrentContext->dash_offset);
       (void) SetXMLTreeContent(child,value);
     }
@@ -2604,21 +2604,21 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"stroke-miterlimit",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+      (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
         CurrentContext->miterlimit);
       (void) SetXMLTreeContent(child,value);
     }
   child=AddChildToXMLTree(xml_info,"stroke-opacity",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%g",
+      (void) FormatLocaleString(value,MaxTextExtent,"%g",
         (double) QuantumScale*(QuantumRange-CurrentContext->stroke.opacity));
       (void) SetXMLTreeContent(child,value);
     }
   child=AddChildToXMLTree(xml_info,"stroke-width",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%g",
+      (void) FormatLocaleString(value,MaxTextExtent,"%g",
         CurrentContext->stroke_width);
       (void) SetXMLTreeContent(child,value);
     }
@@ -2632,7 +2632,7 @@ WandExport char *DrawGetVectorGraphics(DrawingWand *wand)
   child=AddChildToXMLTree(xml_info,"text-antialias",0);
   if (child != (XMLTreeInfo *) NULL)
     {
-      (void) FormatMagickString(value,MaxTextExtent,"%d",
+      (void) FormatLocaleString(value,MaxTextExtent,"%d",
         CurrentContext->text_antialias != MagickFalse ? 1 : 0);
       (void) SetXMLTreeContent(child,value);
     }
@@ -4085,9 +4085,9 @@ WandExport MagickBooleanType DrawPopPattern(DrawingWand *wand)
         wand->name);
       return(MagickFalse);
     }
-  (void) FormatMagickString(key,MaxTextExtent,"%s",wand->pattern_id);
+  (void) FormatLocaleString(key,MaxTextExtent,"%s",wand->pattern_id);
   (void) SetImageArtifact(wand->image,key,wand->mvg+wand->pattern_offset);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
     (double) wand->pattern_bounds.width,(double) wand->pattern_bounds.height,
     (double) wand->pattern_bounds.x,(double) wand->pattern_bounds.y);
   (void) SetImageArtifact(wand->image,key,geometry);
@@ -4814,7 +4814,7 @@ WandExport MagickBooleanType DrawSetFontResolution(DrawingWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",x_resolution,
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",x_resolution,
     y_resolution);
   (void) CloneString(&CurrentContext->density,density);
   return(MagickTrue);
@@ -4910,13 +4910,13 @@ WandExport MagickBooleanType DrawSetFillPatternURL(DrawingWand *wand,
       ThrowDrawException(DrawError,"NotARelativeURL",fill_url);
       return(MagickFalse);
     }
-  (void) FormatMagickString(pattern,MaxTextExtent,"%s",fill_url+1);
+  (void) FormatLocaleString(pattern,MaxTextExtent,"%s",fill_url+1);
   if (GetImageArtifact(wand->image,pattern) == (const char *) NULL)
     {
       ThrowDrawException(DrawError,"URLNotFound",fill_url)
       return(MagickFalse);
     }
-  (void) FormatMagickString(pattern_spec,MaxTextExtent,"url(%s)",fill_url);
+  (void) FormatLocaleString(pattern_spec,MaxTextExtent,"url(%s)",fill_url);
 #if DRAW_BINARY_IMPLEMENTATION
   DrawPatternPath(wand->image,CurrentContext,pattern_spec,
     &CurrentContext->fill_pattern);
@@ -5350,13 +5350,13 @@ WandExport MagickBooleanType DrawSetStrokePatternURL(DrawingWand *wand,
   assert(stroke_url != NULL);
   if (stroke_url[0] != '#')
     ThrowDrawException(DrawError,"NotARelativeURL",stroke_url);
-  (void) FormatMagickString(pattern,MaxTextExtent,"%s",stroke_url+1);
+  (void) FormatLocaleString(pattern,MaxTextExtent,"%s",stroke_url+1);
   if (GetImageArtifact(wand->image,pattern) == (const char *) NULL)
     {
       ThrowDrawException(DrawError,"URLNotFound",stroke_url)
       return(MagickFalse);
     }
-  (void) FormatMagickString(pattern_spec,MaxTextExtent,"url(%s)",stroke_url);
+  (void) FormatLocaleString(pattern_spec,MaxTextExtent,"url(%s)",stroke_url);
 #if DRAW_BINARY_IMPLEMENTATION
   DrawPatternPath(wand->image,CurrentContext,pattern_spec,
     &CurrentContext->stroke_pattern);
@@ -6222,7 +6222,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
         CurrentContext->fill.opacity=ClampToQuantum((MagickRealType)
-          QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
+          QuantumRange*(1.0-LocaleToDouble(value,(char **) NULL)));
     }
   child=GetXMLTreeChild(xml_info,"fill-rule");
   if (child != (XMLTreeInfo *) NULL)
@@ -6243,7 +6243,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->pointsize=StringToDouble(value,(char **) NULL);
+        CurrentContext->pointsize=LocaleToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"font-stretch");
   if (child != (XMLTreeInfo *) NULL)
@@ -6339,7 +6339,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
                 GetMagickToken(q,&q,token);
                 if (*token == ',')
                   GetMagickToken(q,&q,token);
-                CurrentContext->dash_pattern[j]=StringToDouble(token,(char **) NULL);
+                CurrentContext->dash_pattern[j]=LocaleToDouble(token,(char **) NULL);
               }
               if ((x & 0x01) != 0)
                 for ( ; j < (2*x); j++)
@@ -6354,7 +6354,7 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->dash_offset=StringToDouble(value,(char **) NULL);
+        CurrentContext->dash_offset=LocaleToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"stroke-linecap");
   if (child != (XMLTreeInfo *) NULL)
@@ -6385,14 +6385,14 @@ WandExport MagickBooleanType DrawSetVectorGraphics(DrawingWand *wand,
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
         CurrentContext->stroke.opacity=ClampToQuantum((MagickRealType)
-          QuantumRange*(1.0-StringToDouble(value,(char **) NULL)));
+          QuantumRange*(1.0-LocaleToDouble(value,(char **) NULL)));
     }
   child=GetXMLTreeChild(xml_info,"stroke-width");
   if (child != (XMLTreeInfo *) NULL)
     {
       value=GetXMLTreeContent(child);
       if (value != (const char *) NULL)
-        CurrentContext->stroke_width=StringToDouble(value,(char **) NULL);
+        CurrentContext->stroke_width=LocaleToDouble(value,(char **) NULL);
     }
   child=GetXMLTreeChild(xml_info,"text-align");
   if (child != (XMLTreeInfo *) NULL)
@@ -6653,7 +6653,7 @@ WandExport DrawingWand *NewDrawingWand(void)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand,0,sizeof(*wand));
   wand->id=AcquireWandId();
-  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",DrawingWandId,
+  (void) FormatLocaleString(wand->name,MaxTextExtent,"%s-%.20g",DrawingWandId,
     (double) wand->id);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
index be9282a85db033c5d036689197b69dae140e09c1..2cc5f098335a7cc5f70d1eb51e0ab3b7e08b6665 100644 (file)
@@ -57,7 +57,7 @@
     severity; \
  \
   description=MagickGetException(wand,&severity); \
-  (void) fprintf(stderr,"%s %s %lu %s\n",GetMagickModule(),description); \
+  (void) FormatLocaleFile(stderr,"%s %s %lu %s\n",GetMagickModule(),description); \
   description=(char *) MagickRelinquishMemory(description); \
   exit(-1); \
 }
index a71e4c6b1fdbffe078396b77bdd5d878256e1c4c..687d5601c6fc68b930f47eaf85dbd8cf5e77066b 100644 (file)
@@ -243,10 +243,10 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -637,7 +637,7 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowIdentifyException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowIdentifyInvalidArgumentException(option,argv[i]);
index decefa91842579b804f2f5596047dd7e3b5a26c6..19b953e70e1e3524eecb5d26477fe581b6078f33 100644 (file)
@@ -309,10 +309,10 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -942,7 +942,7 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowImportException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowImportInvalidArgumentException(option,argv[i]);
@@ -1272,10 +1272,10 @@ WandExport MagickBooleanType ImportImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         ThrowImportException(OptionError,"UnrecognizedOption",option);
index 352d31f5f4868ea98d4517ca6cf9f3c03e728246..2f95ccd2489efd579ce78f41299ab8c0ee6f927d 100644 (file)
@@ -105,7 +105,7 @@ static MagickWand *CloneMagickWandFromImages(const MagickWand *wand,
       images->filename);
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
     MagickWandId,(double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
@@ -645,7 +645,7 @@ WandExport MagickBooleanType MagickAnnotateImage(MagickWand *wand,
   if (draw_info == (DrawInfo *) NULL)
     return(MagickFalse);
   (void) CloneString(&draw_info->text,text);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%+g%+g",x,y);
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%+g%+g",x,y);
   draw_info->affine.sx=cos(DegreesToRadians(fmod(angle,360.0)));
   draw_info->affine.rx=sin(DegreesToRadians(fmod(angle,360.0)));
   draw_info->affine.ry=(-sin(DegreesToRadians(fmod(angle,360.0))));
@@ -894,7 +894,7 @@ WandExport MagickBooleanType MagickBlackThresholdImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(thresholds,MaxTextExtent,
+  (void) FormatLocaleString(thresholds,MaxTextExtent,
     QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
     PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
     PixelGetBlueQuantum(threshold),PixelGetOpacityQuantum(threshold));
@@ -1599,7 +1599,7 @@ WandExport MagickBooleanType MagickColorizeImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(percent_opaque,MaxTextExtent,
+  (void) FormatLocaleString(percent_opaque,MaxTextExtent,
     "%g,%g,%g,%g",(double) (100.0*QuantumScale*
     PixelGetRedQuantum(opacity)),(double) (100.0*QuantumScale*
     PixelGetGreenQuantum(opacity)),(double) (100.0*QuantumScale*
@@ -6960,7 +6960,7 @@ WandExport MagickBooleanType MagickModulateImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(modulate,MaxTextExtent,"%g,%g,%g",
+  (void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
     brightness,saturation,hue);
   status=ModulateImage(wand->images,modulate);
   if (status == MagickFalse)
@@ -8411,7 +8411,7 @@ WandExport MagickBooleanType MagickRandomThresholdImageChannel(
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(threshold,MaxTextExtent,"%gx%g",low,high);
+  (void) FormatLocaleString(threshold,MaxTextExtent,"%gx%g",low,high);
   status=RandomThresholdImageChannel(wand->images,channel,threshold,
     wand->exception);
   if (status == MagickFalse)
@@ -12135,7 +12135,7 @@ WandExport MagickBooleanType MagickTintImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(percent_opaque,MaxTextExtent,
+  (void) FormatLocaleString(percent_opaque,MaxTextExtent,
     "%g,%g,%g,%g",(double) (100.0*QuantumScale*
     PixelGetRedQuantum(opacity)),(double) (100.0*QuantumScale*
     PixelGetGreenQuantum(opacity)),(double) (100.0*QuantumScale*
@@ -12700,7 +12700,7 @@ WandExport MagickBooleanType MagickWhiteThresholdImage(MagickWand *wand,
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
   if (wand->images == (Image *) NULL)
     ThrowWandException(WandError,"ContainsNoImages",wand->name);
-  (void) FormatMagickString(thresholds,MaxTextExtent,
+  (void) FormatLocaleString(thresholds,MaxTextExtent,
     QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
     PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
     PixelGetBlueQuantum(threshold),PixelGetOpacityQuantum(threshold));
index e090309ddeb425bece02a4fee476558c3c086c5d..c22c0338ca05e67599f037f7a9c9b7c0ad5ced13 100644 (file)
@@ -1538,7 +1538,7 @@ WandExport double *MagickGetSamplingFactors(MagickWand *wand,
     while (((int) *p != 0) && ((isspace((int) ((unsigned char) *p)) != 0) ||
            (*p == ',')))
       p++;
-    sampling_factors[i]=StringToDouble(p,(char **) NULL);
+    sampling_factors[i]=LocaleToDouble(p,(char **) NULL);
     i++;
   }
   *number_factors=(size_t) i;
@@ -2556,7 +2556,7 @@ WandExport MagickBooleanType MagickSetPage(MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g%+.20g",
     (double) width,(double) height,(double) x,(double) y);
   (void) CloneString(&wand->image_info->page,geometry);
   return(MagickTrue);
@@ -2756,7 +2756,7 @@ WandExport MagickBooleanType MagickSetResolution(MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(density,MaxTextExtent,"%gx%g",x_resolution,
+  (void) FormatLocaleString(density,MaxTextExtent,"%gx%g",x_resolution,
     y_resolution);
   (void) CloneString(&wand->image_info->density,density);
   return(MagickTrue);
@@ -2810,12 +2810,12 @@ WandExport MagickBooleanType MagickSetSamplingFactors(MagickWand *wand,
     return(MagickTrue);
   for (i=0; i < (ssize_t) (number_factors-1); i++)
   {
-    (void) FormatMagickString(sampling_factor,MaxTextExtent,"%g,",
+    (void) FormatLocaleString(sampling_factor,MaxTextExtent,"%g,",
       sampling_factors[i]);
     (void) ConcatenateString(&wand->image_info->sampling_factor,
       sampling_factor);
   }
-  (void) FormatMagickString(sampling_factor,MaxTextExtent,"%g",
+  (void) FormatLocaleString(sampling_factor,MaxTextExtent,"%g",
     sampling_factors[i]);
   (void) ConcatenateString(&wand->image_info->sampling_factor,sampling_factor);
   return(MagickTrue);
@@ -2859,7 +2859,7 @@ WandExport MagickBooleanType MagickSetSize(MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g",(double)
     columns,(double) rows);
   (void) CloneString(&wand->image_info->size,geometry);
   return(MagickTrue);
@@ -2906,7 +2906,7 @@ WandExport MagickBooleanType MagickSetSizeOffset(MagickWand *wand,
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g",
+  (void) FormatLocaleString(geometry,MaxTextExtent,"%.20gx%.20g%+.20g",
     (double) columns,(double) rows,(double) offset);
   (void) CloneString(&wand->image_info->size,geometry);
   return(MagickTrue);
index 8e923a32aa839e6ce3dcc77400b9adb219e2e3fe..6b8b615d516e47f57f6928980a8552df685f0ed8 100644 (file)
@@ -135,7 +135,7 @@ WandExport MagickWand *CloneMagickWand(const MagickWand *wand)
       wand->name);
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
     MagickWandId,(double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
@@ -1037,7 +1037,7 @@ WandExport MagickWand *NewMagickWand(void)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand,0,sizeof(*wand));
   wand->id=AcquireWandId();
-  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",MagickWandId,
+  (void) FormatLocaleString(wand->name,MaxTextExtent,"%s-%.20g",MagickWandId,
     (double) wand->id);
   wand->exception=AcquireExceptionInfo();
   wand->image_info=AcquireImageInfo();
index 1df9691d73ab5b6b981d3df85f996ac4aef86c90..17ab1ac9bc53491935049a163e6ce4c6ca609825 100644 (file)
@@ -149,7 +149,7 @@ WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
     if (LocaleCompare("debug",option+1) == 0)
       (void) SetLogEventMask(argv[++i]);
     if (LocaleCompare("duration",option+1) == 0)
-      duration=StringToDouble(argv[++i],(char **) NULL);
+      duration=LocaleToDouble(argv[++i],(char **) NULL);
     if (LocaleCompare("regard-warnings",option+1) == 0)
       regard_warnings=MagickTrue;
   }
@@ -223,7 +223,7 @@ WandExport MagickBooleanType MagickCommandGenesis(ImageInfo *image_info,
     {
       elapsed_time=GetElapsedTime(timer);
       user_time=GetUserTime(timer);
-      (void) fprintf(stderr,
+      (void) FormatLocaleFile(stderr,
         "Performance: %.20gi %gips %0.3fu %.20g:%02g.%03g\n",(double)
         iterations,1.0*iterations/elapsed_time,user_time,(double)
         (elapsed_time/60.0),floor(fmod(elapsed_time,60.0)),(double)
@@ -312,7 +312,7 @@ static inline Image *GetImageCache(const ImageInfo *image_info,const char *path,
   ImageInfo
     *read_info;
 
-  (void) FormatMagickString(key,MaxTextExtent,"cache:%s",path);
+  (void) FormatLocaleString(key,MaxTextExtent,"cache:%s",path);
   sans_exception=AcquireExceptionInfo();
   image=(Image *) GetImageRegistry(ImageRegistryType,key,sans_exception);
   sans_exception=DestroyExceptionInfo(sans_exception);
@@ -363,19 +363,19 @@ static MagickBooleanType MonitorProgress(const char *text,
   p=strrchr(tag,'/');
   if (p != (char *) NULL)
     *p='\0';
-  (void) FormatMagickString(message,MaxTextExtent,"Monitor/%s",tag);
+  (void) FormatLocaleString(message,MaxTextExtent,"Monitor/%s",tag);
   locale_message=GetLocaleMessage(message);
   if (locale_message == message)
     locale_message=tag;
   if (p == (char *) NULL)
-    (void) fprintf(stderr,"%s: %ld of %lu, %02ld%% complete\r",locale_message,
+    (void) FormatLocaleFile(stderr,"%s: %ld of %lu, %02ld%% complete\r",locale_message,
       (long) offset,(unsigned long) extent,(long) (100L*offset/(extent-1)));
   else
-    (void) fprintf(stderr,"%s[%s]: %ld of %lu, %02ld%% complete\r",
+    (void) FormatLocaleFile(stderr,"%s[%s]: %ld of %lu, %02ld%% complete\r",
       locale_message,p+1,(long) offset,(unsigned long) extent,(long)
       (100L*offset/(extent-1)));
   if (offset == (MagickOffsetType) (extent-1))
-    (void) fprintf(stderr,"\n");
+    (void) FormatLocaleFile(stderr,"\n");
   (void) fflush(stderr);
   return(MagickTrue);
 }
@@ -511,7 +511,7 @@ static Image *SparseColorOption(const Image *image,const ChannelType channel,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+    sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
     /* Y coordinate */
     token[0]=','; while ( token[0] == ',' ) GetMagickToken(p,&p,token);
     if ( token[0] == '\0' ) break;
@@ -522,7 +522,7 @@ static Image *SparseColorOption(const Image *image,const ChannelType channel,
       error = MagickTrue;
       break;
     }
-    sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+    sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
     /* color values for this control point */
 #if 0
     if ( (color_from_image ) {
@@ -556,35 +556,35 @@ static Image *SparseColorOption(const Image *image,const ChannelType channel,
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+          sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ( channels & GreenChannel ) {
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+          sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ( channels & BlueChannel ) {
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+          sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ( channels & IndexChannel ) {
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+          sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
         if ( channels & OpacityChannel ) {
           while ( token[0] == ',' ) GetMagickToken(p,&p,token);
           if ( token[0] == '\0' || isalpha((int)token[0]) || token[0] == '#' )
             break;
-          sparse_arguments[x++]=StringToDouble(token,(char **) NULL);
+          sparse_arguments[x++]=LocaleToDouble(token,(char **) NULL);
           token[0] = ','; /* used this token - get another */
         }
       }
@@ -775,7 +775,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               break;
             (void) CloneString(&draw_info->text,text);
             text=DestroyString(text);
-            (void) FormatMagickString(geometry,MaxTextExtent,"%+f%+f",
+            (void) FormatLocaleString(geometry,MaxTextExtent,"%+f%+f",
               geometry_info.xi,geometry_info.psi);
             (void) CloneString(&draw_info->geometry,geometry);
             draw_info->affine.sx=cos(DegreesToRadians(
@@ -1392,7 +1392,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              arguments[x]=StringToDouble(token,(char **) NULL);
+              arguments[x]=LocaleToDouble(token,(char **) NULL);
             }
             args=DestroyString(args);
             mogrify_image=DistortImage(*image,method,number_arguments,arguments,
@@ -1697,7 +1697,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
               GetMagickToken(p,&p,token);
               if (*token == ',')
                 GetMagickToken(p,&p,token);
-              parameters[x]=StringToDouble(token,(char **) NULL);
+              parameters[x]=LocaleToDouble(token,(char **) NULL);
             }
             arguments=DestroyString(arguments);
             (void) FunctionImageChannel(*image,channel,function,
@@ -1716,14 +1716,14 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image);
             if (*option == '+')
-              (*image)->gamma=StringToDouble(argv[i+1],(char **) NULL);
+              (*image)->gamma=LocaleToDouble(argv[i+1],(char **) NULL);
             else
               {
                 if (strchr(argv[i+1],',') != (char *) NULL)
                   (void) GammaImage(*image,argv[i+1]);
                 else
                   (void) GammaImageChannel(*image,channel,
-                    StringToDouble(argv[i+1],(char **) NULL));
+                    LocaleToDouble(argv[i+1],(char **) NULL));
                 InheritException(exception,&(*image)->exception);
               }
             break;
@@ -1968,7 +1968,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("linewidth",option+1) == 0)
           {
-            draw_info->stroke_width=StringToDouble(argv[i+1],(char **) NULL);
+            draw_info->stroke_width=LocaleToDouble(argv[i+1],(char **) NULL);
             break;
           }
         if (LocaleCompare("liquid-rescale",option+1) == 0)
@@ -2389,7 +2389,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
             */
             (void) SyncImageSettings(mogrify_info,*image);
             mogrify_image=RadialBlurImageChannel(*image,channel,
-              StringToDouble(argv[i+1],(char **) NULL),exception);
+              LocaleToDouble(argv[i+1],(char **) NULL),exception);
             break;
           }
         if (LocaleCompare("raise",option+1) == 0)
@@ -2880,7 +2880,7 @@ WandExport MagickBooleanType MogrifyImage(ImageInfo *image_info,const int argc,
           }
         if (LocaleCompare("strokewidth",option+1) == 0)
           {
-            draw_info->stroke_width=StringToDouble(argv[i+1],(char **) NULL);
+            draw_info->stroke_width=LocaleToDouble(argv[i+1],(char **) NULL);
             break;
           }
         if (LocaleCompare("style",option+1) == 0)
@@ -3630,10 +3630,10 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -3705,7 +3705,7 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
         if (path != (char *) NULL)
           {
             GetPathComponent(option,TailPath,filename);
-            (void) FormatMagickString(images->filename,MaxTextExtent,"%s%c%s",
+            (void) FormatLocaleString(images->filename,MaxTextExtent,"%s%c%s",
               path,*DirectorySeparator,filename);
           }
         if (format != (char *) NULL)
@@ -4922,7 +4922,7 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowMogrifyException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowMogrifyInvalidArgumentException(option,argv[i]);
@@ -5950,10 +5950,10 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("view",option+1) == 0)
@@ -6857,10 +6857,10 @@ WandExport MagickBooleanType MogrifyImageInfo(ImageInfo *image_info,
             canonical_page=GetPageGeometry(argv[i+1]);
             flags=ParseAbsoluteGeometry(canonical_page,&geometry);
             canonical_page=DestroyString(canonical_page);
-            (void) FormatMagickString(page,MaxTextExtent,"%lux%lu",
+            (void) FormatLocaleString(page,MaxTextExtent,"%lux%lu",
               (unsigned long) geometry.width,(unsigned long) geometry.height);
             if (((flags & XValue) != 0) || ((flags & YValue) != 0))
-              (void) FormatMagickString(page,MaxTextExtent,"%lux%lu%+ld%+ld",
+              (void) FormatLocaleString(page,MaxTextExtent,"%lux%lu%+ld%+ld",
                 (unsigned long) geometry.width,(unsigned long) geometry.height,
                 (long) geometry.x,(long) geometry.y);
             (void) SetImageOption(image_info,option+1,page);
@@ -8003,7 +8003,7 @@ This has been merged completely into MogrifyImage()
             if (string == (char *) NULL)
               break;
             InheritException(exception,&(*images)->exception);
-            (void) fprintf(stdout,"%s",string);
+            (void) FormatLocaleFile(stdout,"%s",string);
             string=DestroyString(string);
           }
         if (LocaleCompare("process",option+1) == 0)
@@ -8169,7 +8169,7 @@ This has been merged completely into MogrifyImage()
               *write_info;
 
             (void) SyncImagesSettings(mogrify_info,*images);
-            (void) FormatMagickString(key,MaxTextExtent,"cache:%s",argv[i+1]);
+            (void) FormatLocaleString(key,MaxTextExtent,"cache:%s",argv[i+1]);
             (void) DeleteImageRegistry(key);
             write_images=(*images);
             if (*option == '+')
@@ -8265,7 +8265,7 @@ WandExport MagickBooleanType MogrifyImages(ImageInfo *image_info,
   status=0;
 
 #if 0
-fprintf(stderr, "mogrify start %s %d (%s)\n",argv[0],argc,post?"post":"pre");
+FormatLocaleFile(stderr, "mogrify start %s %d (%s)\n",argv[0],argc,post?"post":"pre");
 #endif
 
   /*
@@ -8282,7 +8282,7 @@ fprintf(stderr, "mogrify start %s %d (%s)\n",argv[0],argc,post?"post":"pre");
   for (;;)
   {
 #if 0
-fprintf(stderr, "mogrify %ld of %ld\n",
+FormatLocaleFile(stderr, "mogrify %ld of %ld\n",
   (long)GetImageIndexInList(*images),(long)GetImageListLength(*images));
 #endif
     status&=MogrifyImage(image_info,argc,argv,images,exception);
@@ -8296,7 +8296,7 @@ fprintf(stderr, "mogrify %ld of %ld\n",
   }
   assert( *images != (Image *) NULL );
 #if 0
-fprintf(stderr, "mogrify end %ld of %ld\n",
+FormatLocaleFile(stderr, "mogrify end %ld of %ld\n",
   (long)GetImageIndexInList(*images),(long)GetImageListLength(*images));
 #endif
 
index 6235350a131275b92d1df15f77bb24cb2d05d300..795270b3800a43730e20e9f1a7705c00585a2918 100644 (file)
@@ -334,10 +334,10 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -414,7 +414,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               (void) InterpretImageFilename(image_info,(Image *) NULL,
                 image_info->filename,(int) scene,filename);
               if (LocaleCompare(filename,image_info->filename) == 0)
-                (void) FormatMagickString(filename,MaxTextExtent,"%s.%.20g",
+                (void) FormatLocaleString(filename,MaxTextExtent,"%s.%.20g",
                   image_info->filename,(double) scene);
               (void) CopyMagickString(image_info->filename,filename,
                 MaxTextExtent);
@@ -1134,7 +1134,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowMontageException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowMontageInvalidArgumentException(option,argv[i]);
@@ -1279,7 +1279,7 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
               ThrowMontageException(OptionError,"MissingArgument",option);
             if (IsGeometry(argv[i]) == MagickFalse)
               ThrowMontageInvalidArgumentException(option,argv[i]);
-            montage_info->pointsize=StringToDouble(argv[i],(char **) NULL);
+            montage_info->pointsize=LocaleToDouble(argv[i],(char **) NULL);
             break;
           }
         if (LocaleCompare("polaroid",option+1) == 0)
@@ -1688,10 +1688,10 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
index 0055cfbec19b669f6a4cfd1619775c6a48d50e36..4fcbb6621c714fbd62aaaab0696939b2af3d027c 100644 (file)
@@ -169,7 +169,7 @@ WandExport PixelIterator *ClonePixelIterator(const PixelIterator *iterator)
       iterator->name);
   (void) ResetMagickMemory(clone_iterator,0,sizeof(*clone_iterator));
   clone_iterator->id=AcquireWandId();
-  (void) FormatMagickString(clone_iterator->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_iterator->name,MaxTextExtent,"%s-%.20g",
     PixelIteratorId,(double) clone_iterator->id);
   clone_iterator->exception=AcquireExceptionInfo();
   InheritException(clone_iterator->exception,iterator->exception);
@@ -319,7 +319,7 @@ WandExport PixelIterator *NewPixelIterator(MagickWand *wand)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(iterator,0,sizeof(*iterator));
   iterator->id=AcquireWandId();
-  (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(iterator->name,MaxTextExtent,"%s-%.20g",
     PixelIteratorId,(double) iterator->id);
   iterator->exception=AcquireExceptionInfo();
   iterator->view=view;
@@ -434,7 +434,7 @@ WandExport PixelIterator *NewPixelRegionIterator(MagickWand *wand,
       wand->name);
   (void) ResetMagickMemory(iterator,0,sizeof(*iterator));
   iterator->id=AcquireWandId();
-  (void) FormatMagickString(iterator->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(iterator->name,MaxTextExtent,"%s-%.20g",
     PixelIteratorId,(double) iterator->id);
   iterator->exception=AcquireExceptionInfo();
   iterator->view=view;
index f7b4d93d99ec12dfc1bb6e06f82c226b3cb6586f..45ba46af21c9b563565cb7fb7ff2bea0492df346 100644 (file)
@@ -154,7 +154,7 @@ WandExport PixelWand *ClonePixelWand(const PixelWand *wand)
       wand->name);
   (void) ResetMagickMemory(clone_wand,0,sizeof(*clone_wand));
   clone_wand->id=AcquireWandId();
-  (void) FormatMagickString(clone_wand->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_wand->name,MaxTextExtent,"%s-%.20g",
     PixelWandId,(double) clone_wand->id);
   clone_wand->exception=AcquireExceptionInfo();
   InheritException(clone_wand->exception,wand->exception);
@@ -406,7 +406,7 @@ WandExport PixelWand *NewPixelWand(void)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand,0,sizeof(*wand));
   wand->id=AcquireWandId();
-  (void) FormatMagickString(wand->name,MaxTextExtent,"%s-%.20g",PixelWandId,
+  (void) FormatLocaleString(wand->name,MaxTextExtent,"%s-%.20g",PixelWandId,
     (double) wand->id);
   wand->exception=AcquireExceptionInfo();
   GetMagickPixelPacket((Image *) NULL,&wand->pixel);
@@ -747,15 +747,15 @@ WandExport char *PixelGetColorAsNormalizedString(const PixelWand *wand)
   assert(wand->signature == WandSignature);
   if (wand->debug != MagickFalse)
     (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
-  (void) FormatMagickString(color,MaxTextExtent,"%g,%g,%g",
+  (void) FormatLocaleString(color,MaxTextExtent,"%g,%g,%g",
     (double) (QuantumScale*wand->pixel.red),
     (double) (QuantumScale*wand->pixel.green),
     (double) (QuantumScale*wand->pixel.blue));
   if (wand->pixel.colorspace == CMYKColorspace)
-    (void) FormatMagickString(color+strlen(color),MaxTextExtent,",%g",
+    (void) FormatLocaleString(color+strlen(color),MaxTextExtent,",%g",
       (double) (QuantumScale*wand->pixel.index));
   if (wand->pixel.matte != MagickFalse)
-    (void) FormatMagickString(color+strlen(color),MaxTextExtent,",%g",
+    (void) FormatLocaleString(color+strlen(color),MaxTextExtent,",%g",
       (double) (QuantumScale*wand->pixel.opacity));
   return(ConstantString(color));
 }
index 4f48ce9e5a7d47ca33e8cb95670e49e40296934f..9c3f336e8cb5d2f9ea5cfb8e389f04e9f0241b94 100644 (file)
@@ -231,10 +231,10 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info,
       if ((LocaleCompare("version",option+1) == 0) ||
           (LocaleCompare("-version",option+1) == 0))
         {
-          (void) fprintf(stdout,"Version: %s\n",
+          (void) FormatLocaleFile(stdout,"Version: %s\n",
             GetMagickVersion((size_t *) NULL));
-          (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-          (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+          (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+          (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
           return(MagickFalse);
         }
     }
@@ -545,7 +545,7 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info,
             i++;
             if (i == (ssize_t) argc)
               ThrowStreamException(OptionError,"MissingArgument",option);
-            value=StringToDouble(argv[i],&p);
+            value=LocaleToDouble(argv[i],&p);
             (void) value;
             if ((p == argv[i]) && (LocaleCompare("unlimited",argv[i]) != 0))
               ThrowStreamInvalidArgumentException(option,argv[i]);
@@ -719,10 +719,10 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info,
         if ((LocaleCompare("version",option+1) == 0) ||
             (LocaleCompare("-version",option+1) == 0))
           {
-            (void) fprintf(stdout,"Version: %s\n",
+            (void) FormatLocaleFile(stdout,"Version: %s\n",
               GetMagickVersion((size_t *) NULL));
-            (void) fprintf(stdout,"Copyright: %s\n",GetMagickCopyright());
-            (void) fprintf(stdout,"Features: %s\n\n",GetMagickFeatures());
+            (void) FormatLocaleFile(stdout,"Copyright: %s\n",GetMagickCopyright());
+            (void) FormatLocaleFile(stdout,"Features: %s\n\n",GetMagickFeatures());
             break;
           }
         if (LocaleCompare("virtual-pixel",option+1) == 0)
index 00224146333e3b62913c3f7947a3d3112c9609fa..b18bddf9e6a158335ab2d55a53a0b7c45b30c00b 100644 (file)
@@ -133,7 +133,7 @@ WandExport WandView *CloneWandView(const WandView *wand_view)
       wand_view->name);
   (void) ResetMagickMemory(clone_view,0,sizeof(*clone_view));
   clone_view->id=AcquireWandId();
-  (void) FormatMagickString(clone_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(clone_view->name,MaxTextExtent,"%s-%.20g",
     WandViewId,(double) clone_view->id);
   clone_view->description=ConstantString(wand_view->description);
   clone_view->view=CloneCacheView(wand_view->view);
@@ -772,7 +772,7 @@ WandExport WandView *NewWandView(MagickWand *wand)
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
   wand_view->id=AcquireWandId();
-  (void) FormatMagickString(wand_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
     WandViewId,(double) wand_view->id);
   wand_view->description=ConstantString("WandView");
   wand_view->wand=wand;
@@ -832,7 +832,7 @@ WandExport WandView *NewWandViewExtent(MagickWand *wand,const ssize_t x,
       GetExceptionMessage(errno));
   (void) ResetMagickMemory(wand_view,0,sizeof(*wand_view));
   wand_view->id=AcquireWandId();
-  (void) FormatMagickString(wand_view->name,MaxTextExtent,"%s-%.20g",
+  (void) FormatLocaleString(wand_view->name,MaxTextExtent,"%s-%.20g",
     WandViewId,(double) wand_view->id);
   wand_view->description=ConstantString("WandView");
   wand_view->view=AcquireCacheView(wand_view->wand->images);
index 9cc42b62467d4635cbd82f2cff8c1b3b08bc7730..41d752a8588804713a01f9676ad252a52b2f7d0c 100644 (file)
@@ -67,7 +67,7 @@ int main(int argc,char **argv)
 #define ThrowAPIException(wand) \
 { \
   description=MagickGetException(wand,&severity); \
-  (void) fprintf(stderr,"%s %s %lu %s\n",GetMagickModule(),description); \
+  (void) FormatLocaleFile(stderr,"%s %s %lu %s\n",GetMagickModule(),description); \
   description=(char *) MagickRelinquishMemory(description); \
   exit(-1); \
 }
@@ -424,10 +424,10 @@ int main(int argc,char **argv)
   (void) MagickGetSize(magick_wand,&columns,&rows);
   if ((columns != 640) || (rows != 480))
     {
-      (void) fprintf(stderr,"Unexpected magick wand size\n");
+      (void) FormatLocaleFile(stderr,"Unexpected magick wand size\n");
       exit(1);
     }
-  (void) fprintf(stdout,"Reading images...\n");
+  (void) FormatLocaleFile(stdout,"Reading images...\n");
   {
     char
       *p,
@@ -447,20 +447,20 @@ int main(int argc,char **argv)
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
   if (MagickGetNumberImages(magick_wand) != 5)
-    (void) fprintf(stderr,"read %.20g images; expected 5\n",
+    (void) FormatLocaleFile(stderr,"read %.20g images; expected 5\n",
       (double) MagickGetNumberImages(magick_wand));
-  (void) fprintf(stdout,"Iterate forward...\n");
+  (void) FormatLocaleFile(stdout,"Iterate forward...\n");
   MagickResetIterator(magick_wand);
   while (MagickNextImage(magick_wand) != MagickFalse)
-    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+    (void) FormatLocaleFile(stdout,"index %.20g scene %.20g\n",(double)
       MagickGetIteratorIndex(magick_wand),(double)
       MagickGetImageScene(magick_wand));
-  (void) fprintf(stdout,"Iterate reverse...\n");
+  (void) FormatLocaleFile(stdout,"Iterate reverse...\n");
   while (MagickPreviousImage(magick_wand) != MagickFalse)
-    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+    (void) FormatLocaleFile(stdout,"index %.20g scene %.20g\n",(double)
       MagickGetIteratorIndex(magick_wand),(double)
       MagickGetImageScene(magick_wand));
-  (void) fprintf(stdout,"Remove scene 1...\n");
+  (void) FormatLocaleFile(stdout,"Remove scene 1...\n");
   (void) MagickSetIteratorIndex(magick_wand,1);
   clone_wand=MagickGetImage(magick_wand);
   status=MagickRemoveImage(magick_wand);
@@ -468,20 +468,20 @@ int main(int argc,char **argv)
     ThrowAPIException(magick_wand);
   MagickResetIterator(magick_wand);
   while (MagickNextImage(magick_wand) != MagickFalse)
-    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+    (void) FormatLocaleFile(stdout,"index %.20g scene %.20g\n",(double)
       MagickGetIteratorIndex(magick_wand),(double)
       MagickGetImageScene(magick_wand));
-  (void) fprintf(stdout,"Insert scene 1 back in sequence...\n");
+  (void) FormatLocaleFile(stdout,"Insert scene 1 back in sequence...\n");
   (void) MagickSetIteratorIndex(magick_wand,0);
   status=MagickAddImage(magick_wand,clone_wand);
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
   MagickResetIterator(magick_wand);
   while (MagickNextImage(magick_wand) != MagickFalse)
-    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+    (void) FormatLocaleFile(stdout,"index %.20g scene %.20g\n",(double)
       MagickGetIteratorIndex(magick_wand),(double)
       MagickGetImageScene(magick_wand));
-  (void) fprintf(stdout,"Set scene 2 to scene 1...\n");
+  (void) FormatLocaleFile(stdout,"Set scene 2 to scene 1...\n");
   (void) MagickSetIteratorIndex(magick_wand,2);
   status=MagickSetImage(magick_wand,clone_wand);
   clone_wand=DestroyMagickWand(clone_wand);
@@ -489,10 +489,10 @@ int main(int argc,char **argv)
     ThrowAPIException(magick_wand);
   MagickResetIterator(magick_wand);
   while (MagickNextImage(magick_wand) != MagickFalse)
-    (void) fprintf(stdout,"index %.20g scene %.20g\n",(double)
+    (void) FormatLocaleFile(stdout,"index %.20g scene %.20g\n",(double)
       MagickGetIteratorIndex(magick_wand),(double)
       MagickGetImageScene(magick_wand));
-  (void) fprintf(stdout,"Apply image processing options...\n");
+  (void) FormatLocaleFile(stdout,"Apply image processing options...\n");
   status=MagickCropImage(magick_wand,60,60,10,10);
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
@@ -559,7 +559,7 @@ int main(int argc,char **argv)
     for (i=0; i < 9; i++)
       if (pixels[i] != primary_colors[i])
         {
-          (void) fprintf(stderr,"Get pixels does not match set pixels\n");
+          (void) FormatLocaleFile(stderr,"Get pixels does not match set pixels\n");
           exit(1);
         }
   }
@@ -575,7 +575,7 @@ int main(int argc,char **argv)
   }
   MagickResetIterator(magick_wand);
   (void) MagickSetIteratorIndex(magick_wand,4);
-  (void) fprintf(stdout,"Utilitize pixel iterator to draw diagonal...\n");
+  (void) FormatLocaleFile(stdout,"Utilitize pixel iterator to draw diagonal...\n");
   iterator=NewPixelIterator(magick_wand);
   if (iterator == (PixelIterator *) NULL)
     ThrowAPIException(magick_wand);
@@ -588,15 +588,15 @@ int main(int argc,char **argv)
   }
   (void) PixelSyncIterator(iterator);
   iterator=DestroyPixelIterator(iterator);
-  (void) fprintf(stdout,"Write to wandtest_out.miff...\n");
+  (void) FormatLocaleFile(stdout,"Write to wandtest_out.miff...\n");
   status=MagickWriteImages(magick_wand,"wandtest_out.miff",MagickTrue);
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
-  (void) fprintf(stdout,"Change image format from \"MIFF\" to \"GIF\"...\n");
+  (void) FormatLocaleFile(stdout,"Change image format from \"MIFF\" to \"GIF\"...\n");
   status=MagickSetImageFormat(magick_wand,"GIF");
   if (status == MagickFalse)
      ThrowAPIException(magick_wand);
-  (void) fprintf(stdout,"Set delay between frames to %d seconds...\n",
+  (void) FormatLocaleFile(stdout,"Set delay between frames to %d seconds...\n",
     WandDelay);
   status=MagickSetImageDelay(magick_wand,100*WandDelay);
   if (status == MagickFalse)
@@ -604,14 +604,14 @@ int main(int argc,char **argv)
   delay=MagickGetImageDelay(magick_wand);
   if (delay != (100*WandDelay))
     {
-      (void) fprintf( stderr,"Get delay does not match set delay\n");
+      (void) FormatLocaleFile(stderr,"Get delay does not match set delay\n");
       exit(1);
     }
-  (void) fprintf(stdout,"Write to wandtest_out_0.gif...\n");
+  (void) FormatLocaleFile(stdout,"Write to wandtest_out_0.gif...\n");
   status=MagickWriteImages(magick_wand,"wandtest_out.gif",MagickTrue);
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
-  (void) fprintf(stdout,"Set, list, get, and delete wand option...\n");
+  (void) FormatLocaleFile(stdout,"Set, list, get, and delete wand option...\n");
   status=MagickSetOption(magick_wand,"wand:custom-option",CustomOption);
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
@@ -620,7 +620,7 @@ int main(int argc,char **argv)
       (strlen(option) != strlen(CustomOption)) ||
       (memcmp(option,CustomOption,strlen(option)) != 0))
     {
-      (void) fprintf( stderr,"Option does not match\n");
+      (void) FormatLocaleFile(stderr,"Option does not match\n");
       exit(1);
     }
   options=MagickGetOptions(magick_wand,"*",&number_options);
@@ -628,7 +628,7 @@ int main(int argc,char **argv)
     {
       for (i=0; i < (ssize_t) number_options; i++)
       {
-        (void) fprintf(stdout,"  %s\n",options[i]);
+        (void) FormatLocaleFile(stdout,"  %s\n",options[i]);
         options[i]=(char *) MagickRelinquishMemory(options[i]);
       }
       options=(char **) MagickRelinquishMemory(options);
@@ -636,7 +636,7 @@ int main(int argc,char **argv)
   status=MagickDeleteOption(magick_wand,"wand:custom-option");
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
-  (void) fprintf(stdout,"Set, list, get, and delete wand property...\n");
+  (void) FormatLocaleFile(stdout,"Set, list, get, and delete wand property...\n");
   status=MagickSetImageProperty(magick_wand,"wand:custom-property",
     CustomProperty);
   if (status == MagickFalse)
@@ -646,7 +646,7 @@ int main(int argc,char **argv)
       (strlen(property) != strlen(CustomProperty)) ||
       (memcmp(property,CustomProperty,strlen(property)) != 0))
     {
-      (void) fprintf( stderr,"Property does not match\n");
+      (void) FormatLocaleFile(stderr,"Property does not match\n");
       exit(1);
     }
   properties=MagickGetImageProperties(magick_wand,"*",&number_properties);
@@ -654,7 +654,7 @@ int main(int argc,char **argv)
     {
       for (i=0; i < (ssize_t) number_properties; i++)
       {
-        (void) fprintf(stdout,"  %s\n",properties[i]);
+        (void) FormatLocaleFile(stdout,"  %s\n",properties[i]);
         properties[i]=(char *) MagickRelinquishMemory(properties[i]);
       }
       properties=(char **) MagickRelinquishMemory(properties);
@@ -662,7 +662,7 @@ int main(int argc,char **argv)
   status=MagickDeleteImageProperty(magick_wand,"wand:custom-property");
   if (status == MagickFalse)
     ThrowAPIException(magick_wand);
-  (void) fprintf(stdout,"Set, list, get, and remove sRGB color profile...\n");
+  (void) FormatLocaleFile(stdout,"Set, list, get, and remove sRGB color profile...\n");
   status=MagickSetImageProfile(magick_wand,"sRGB",sRGBProfile,
     sizeof(sRGBProfile));
   if (status == MagickFalse)
@@ -671,7 +671,7 @@ int main(int argc,char **argv)
   if ((profile == (unsigned char *) NULL) || (length != sizeof(sRGBProfile)) ||
       (memcmp(profile,sRGBProfile,length) != 0))
     {
-      (void) fprintf( stderr,"Profile does not match\n");
+      (void) FormatLocaleFile(stderr,"Profile does not match\n");
       exit(1);
     }
   profile=(unsigned char *) MagickRelinquishMemory(profile);
@@ -680,7 +680,7 @@ int main(int argc,char **argv)
     {
       for (i=0; i < (ssize_t) number_profiles; i++)
       {
-        (void) fprintf(stdout,"  %s\n",profiles[i]);
+        (void) FormatLocaleFile(stdout,"  %s\n",profiles[i]);
         profiles[i]=(char *) MagickRelinquishMemory(profiles[i]);
       }
       profiles=(char **) MagickRelinquishMemory(profiles);
@@ -690,11 +690,11 @@ int main(int argc,char **argv)
   if ((profile == (unsigned char *) NULL) || (length != sizeof(sRGBProfile)) ||
       (memcmp(profile,sRGBProfile,length) != 0))
     {
-      (void) fprintf( stderr,"Profile does not match\n");
+      (void) FormatLocaleFile(stderr,"Profile does not match\n");
       exit(1);
     }
   profile=(unsigned char *) MagickRelinquishMemory(profile);
   magick_wand=DestroyMagickWand(magick_wand);
-  (void) fprintf(stdout,"Wand tests pass.\n");
+  (void) FormatLocaleFile(stdout,"Wand tests pass.\n");
   return(0);
 }