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;
}
else
geometry += '+';
- FormatMagickString( buffer, MaxTextExtent, "%.20g", (double) _xOff);
+ FormatLocaleString( buffer, MaxTextExtent, "%.20g", (double) _xOff);
geometry += buffer;
if ( _yNegative )
else
geometry += '+';
- FormatMagickString( buffer, MaxTextExtent, "%.20g", (double) _yOff);
+ FormatLocaleString( buffer, MaxTextExtent, "%.20g", (double) _yOff);
geometry += buffer;
}
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
}
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 );
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 );
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();
{
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();
}
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();
using MagickCore::FlipImage;
using MagickCore::FloodfillPaintImage;
using MagickCore::FlopImage;
- using MagickCore::FormatMagickString;
+ using MagickCore::FormatLocaleString;
using MagickCore::ForwardFourierTransformImage;
using MagickCore::FrameImage;
using MagickCore::FrameInfo;
{
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' )
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 \
magick/list.h \
magick/locale.c \
magick/locale_.h \
- magick/locale-private.h \
magick/log.c \
magick/log.h \
magick/mac.h \
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 \
\
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 ? " (" : "", \
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)
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;
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);
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,
/*
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)
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,
{
#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))); \
}
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,
{
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);
{
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);
{
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);
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);
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);
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);
{
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);
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);
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);
{
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);
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);
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),
{
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);
{
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);
{
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);
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)));
}
{
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;
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;
{
default:
{
- (void) FormatMagickString(message,MaxTextExtent,"%.20g",(double) ix);
+ (void) FormatLocaleString(message,MaxTextExtent,"%.20g",(double) ix);
ThrowPerlException(exception,OptionError,
"UnrecognizedPerlMagickMethod",message);
goto PerlException;
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);
/*
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);
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);
(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 */
(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);
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)
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);
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);
char
message[MaxTextExtent];
- (void) FormatMagickString(message,MaxTextExtent,
+ (void) FormatLocaleString(message,MaxTextExtent,
"invalid %.60s value",attribute);
ThrowPerlException(exception,OptionError,message,
SvPV(ST(i),na));
{
#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))); \
}
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");
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);
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;
(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");
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);
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);
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);
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);
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)
(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)
(((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;
}
(((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,
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);
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;
}
/*
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,
group=0;
element=0;
if (image_info->verbose != MagickFalse)
- (void) fprintf(stdout,
+ (void) FormatLocaleFile(stdout,
"Corrupted image - trying explicit format\n");
break;
}
(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)
{
if (image_info->verbose != MagickFalse)
{
if (data == (unsigned char *) NULL)
- (void) fprintf(stdout,"%d\n",datum);
+ (void) FormatLocaleFile(stdout,"%d\n",datum);
else
{
/*
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)
(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)
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);
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);
}
char
alpha[MaxTextExtent];
- (void) FormatMagickString(alpha,MaxTextExtent,",%.20g ",
+ (void) FormatLocaleString(alpha,MaxTextExtent,",%.20g ",
(double) (QuantumRange-pixel.opacity));
(void) ConcatenateMagickString(tuple,alpha,MaxTextExtent);
}
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);
}
*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);
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) &&
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)
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))
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");
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");
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);
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>");
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)
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;
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;
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);
(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;
}
{
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;
}
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;
}
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;
}
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,
(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);
/*
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);
(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);
/*
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);
(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);
}
/*
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);
(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);
}
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
{
(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 ?
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);
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,
{
(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;
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,
{
(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,
}
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)
*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;
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);
char
pointsize[MaxTextExtent];
- (void) FormatMagickString(pointsize,MaxTextExtent,"%.20g",
+ (void) FormatLocaleString(pointsize,MaxTextExtent,"%.20g",
draw_info->pointsize);
(void) SetImageProperty(image,"label:pointsize",pointsize);
}
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");
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)
{
(void) memcpy(&local_time,localtime(¤t_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);
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);
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");
(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;
/* 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 );
/* 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 );
* 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)
{
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- image->gamma=StringToDouble(options,(char **) NULL);
+ image->gamma=LocaleToDouble(options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"gravity") == 0)
{
if (LocaleCompare(keyword,"version") == 0)
{
- version=StringToDouble(options,(char **) NULL);
+ version=LocaleToDouble(options,(char **) NULL);
break;
}
(void) SetImageProperty(image,keyword,options);
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);
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);
}
(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);
{
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);
}
/*
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,
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);
}
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);
}
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);
}
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)
}
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);
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- image->gamma=StringToDouble(options,(char **) NULL);
+ image->gamma=LocaleToDouble(options,(char **) NULL);
break;
}
if (LocaleCompare(keyword,"green-primary") == 0)
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)
(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);
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);
}
(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);
{
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);
}
/*
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,
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);
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);
}
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);
}
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)
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);
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);
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);
}
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);
(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);
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);
}
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);
*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)
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value,(char **) NULL);
+ draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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))));
}
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;
}
}
}
- (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);
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = StringToDouble(value,(char **) NULL);
+ radius = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
}
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",
{
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;
}
}
}
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);
*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)
}
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value,(char **) NULL);
+ draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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))));
}
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;
}
}
}
}
- (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);
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"blue") == 0)
{
- pixel.blue=StringToDouble(value,(char **) NULL);
+ pixel.blue=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
if (LocaleCompare(keyword,"green") == 0)
{
- pixel.green=StringToDouble(value,(char **) NULL);
+ pixel.green=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"red") == 0)
{
- pixel.red=StringToDouble(value,(char **) NULL);
+ pixel.red=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
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)
{
{
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;
{
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;
{
if (LocaleCompare(keyword,"amount") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"black") == 0)
{
- levelBlack = StringToDouble(value,(char **) NULL);
+ levelBlack = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"gamma") == 0)
{
- levelGamma = StringToDouble(value,(char **) NULL);
+ levelGamma = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"white") == 0)
{
- levelWhite = StringToDouble(value,(char **) NULL);
+ levelWhite = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
/* 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;
{
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",
{
if (LocaleCompare(keyword,"opacity") == 0)
{
- opacity=StringToDouble(value,(char **) NULL);
+ opacity=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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",
{
if (LocaleCompare(keyword,"hue") == 0)
{
- geometry_info.xi=StringToDouble(value,(char **) NULL);
+ geometry_info.xi=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"lightness") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"saturation") == 0)
{
- geometry_info.sigma=StringToDouble(value,(char **) NULL);
+ geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"whiteness") == 0)
{
- geometry_info.sigma=StringToDouble(value,(char **) NULL);
+ geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
}
}
- (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;
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
}
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",
{
if (LocaleCompare(keyword,"output") == 0)
{
- (void) fprintf(stdout,"%s",value);
+ (void) FormatLocaleFile(stdout,"%s",value);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
*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)
{
if (LocaleCompare(keyword,"pointsize") == 0)
{
- draw_info->pointsize=StringToDouble(value,(char **) NULL);
+ draw_info->pointsize=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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))));
}
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;
}
}
}
}
- (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);
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
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);
{
if (LocaleCompare(keyword,"x-resolution") == 0)
{
- x_resolution=StringToDouble(value,(char **) NULL);
+ x_resolution=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"y-resolution") == 0)
{
- y_resolution=StringToDouble(value,(char **) NULL);
+ y_resolution=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"support") == 0)
{
- blur=StringToDouble(value,(char **) NULL);
+ blur=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- degrees = StringToDouble(value,(char **) NULL);
+ degrees = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
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)
{
if (LocaleCompare(keyword,"smoothing-threshold") == 0)
{
- geometry_info.sigma=StringToDouble(value,(char **) NULL);
+ geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
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);
{
if (LocaleCompare(keyword,"azimuth") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"elevation") == 0)
{
- geometry_info.sigma=StringToDouble(value,(char **) NULL);
+ geometry_info.sigma=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.xi=StringToDouble(value,(char **) NULL);
+ geometry_info.xi=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword, "radius") == 0)
{
- radius = StringToDouble(value,(char **) NULL);
+ radius = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",keyword);
{
if (LocaleCompare(keyword,"x") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"radius") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"degrees") == 0)
{
- geometry_info.rho=StringToDouble(value,(char **) NULL);
+ geometry_info.rho=LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",
{
if (LocaleCompare(keyword,"threshold") == 0)
{
- threshold = StringToDouble(value,(char **) NULL);
+ threshold = LocaleToDouble(value,(char **) NULL);
break;
}
ThrowMSLException(OptionError,"UnrecognizedAttribute",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);
/*
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++)
{
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;
(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);
(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);
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;
*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,
*/
(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 */
(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),
}
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);
}
{
case NoCompression:
{
- (void) FormatMagickString(buffer,MaxTextExtent,"\033*b0M");
+ (void) FormatLocaleString(buffer,MaxTextExtent,"\033*b0M");
(void) WriteBlobString(image,buffer);
break;
}
}
(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;
}
}
(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;
}
{
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);
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);
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);
/*
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))
/*
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);
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)
{
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)
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);
*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,
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)
*/
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);
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");
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");
*/
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);
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);
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");
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);
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");
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");
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");
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");
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))
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");
{
(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");
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);
}
case JPEG2000Compression:
{
- (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"JPXDecode");
+ (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"JPXDecode");
if (image->colorspace != CMYKColorspace)
break;
(void) WriteBlobString(image,buffer);
}
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:
(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");
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");
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)
(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);
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");
{
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);
}
case JPEG2000Compression:
{
- (void) FormatMagickString(buffer,MaxTextExtent,CFormat,"JPXDecode");
+ (void) FormatLocaleString(buffer,MaxTextExtent,CFormat,"JPXDecode");
if (image->colorspace != CMYKColorspace)
break;
(void) WriteBlobString(image,buffer);
}
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:
(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");
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) &&
(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");
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");
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");
{
(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");
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)
*/
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);
#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");
*/
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);
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,
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);
*/
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)
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,
*/
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);
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);
/* 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);
}
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))
#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);
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);
#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);
#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);
}
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);
(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 */
(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);
(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);
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;
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);
}
(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,
scale[MaxTextExtent];
(void) ReadBlobString(image,scale);
- quantum_scale=StringToDouble(scale,(char **) NULL);
+ quantum_scale=LocaleToDouble(scale,(char **) NULL);
}
else
{
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)
{
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);
}
/*
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);
}
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);
}
{
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);
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)));
*/
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);
*/
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);
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);
/*
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)
/*
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);
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));
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);
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';
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);
(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,
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
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;
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);
}
/*
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);
}
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);
*/
(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);
/*
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+
*/
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");
{
(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)
(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));
/*
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;
{
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]);
/*
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);
/*
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);
/*
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);
/*
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);
/*
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));
(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);
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
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;
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);
}
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);
}
{
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;
}
{
(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)
(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));
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);
/*
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;
{
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]);
((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);
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)
/*
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));
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);
(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);
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);
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;
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;
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);
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
(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;
}
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);
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);
}
{
(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);
}
}
(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));
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);
/*
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);
/*
/*
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);
/*
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);
/*
/*
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);
/*
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);
(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);
*/
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);
/*
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);
(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 );
}
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;
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);
#include "librsvg/librsvg-features.h"
#endif
\f
-/*
- Define declarations.
-*/
-#define MVGPrintf (void) fprintf
-\f
/*
Typedef declarations.
*/
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
{
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;
{
if (LocaleCompare((const char *) name,"defs") == 0)
{
- MVGPrintf(svg_info->file,"push defs\n");
+ (void) FormatLocaleFile(svg_info->file,"push defs\n");
break;
}
break;
{
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;
{
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;
{
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;
{
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);
{
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);
}
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;
{
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,
}
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;
{
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;
{
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)
*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);
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;
{
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;
}
{
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)
{
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;
{
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;
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);
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;
}
if (LocaleCompare(keyword,"opacity") == 0)
{
- MVGPrintf(svg_info->file,"opacity '%s'\n",value);
+ (void) FormatLocaleFile(svg_info->file,"opacity '%s'\n",value);
break;
}
break;
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)
{
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;
}
{
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)
{
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;
{
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;
{
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;
}
{
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;
}
{
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;
}
{
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;
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))));
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);
{
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;
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)
{
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()," )");
{
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;
{
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)
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;
{
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;
{
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;
{
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;
{
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;
{
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;
{
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;
*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)
*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);
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)
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);
#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");
(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;
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;
(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);
"<!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);
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);
"<!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);
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)
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
}
if (LocaleCompare("gradient",token) == 0)
{
- (void) FormatMagickString(message,MaxTextExtent,
+ (void) FormatLocaleString(message,MaxTextExtent,
"</%sGradient>\n",type);
(void) WriteBlobString(image,message);
break;
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;
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);
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,
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,
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;
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;
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;
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;
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;
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;
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);
}
break;
}
GetMagickToken(q,&q,token);
- (void) FormatMagickString(message,MaxTextExtent,
+ (void) FormatLocaleString(message,MaxTextExtent,
"stroke-dasharray:%s;",token);
(void) WriteBlobString(image,message);
break;
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;
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;
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;
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;
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;
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;
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;
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;
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);
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);
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,
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-
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);
}
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));
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)
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)
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);
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,
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);
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)
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:
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:
rational;
if (TIFFGetField(tiff,exif_info[i].tag,&rational) != 0)
- (void) FormatMagickString(value,MaxTextExtent,"%g",rational);
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",rational);
break;
}
default:
(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);
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);
}
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)
{
"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);
float
rational;
- rational=StringToDouble(value,(char **) NULL);
+ rational=LocaleToDouble(value,(char **) NULL);
(void) TIFFSetField(tiff,exif_info[i].tag,rational);
break;
}
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)
*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");
(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);
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);
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) 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,
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);
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);
}
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++)
(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,
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,
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);
*/
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);
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:
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);
/* 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)
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);
/*
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++;
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++;
*/
(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);
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);
}
(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,
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)
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);
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);
}
(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)
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.
(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);
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);
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;
*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,
/* 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
<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"/>
MAGICK_LIBRARY_VERSION_INFO=$MAGICK_LIBRARY_CURRENT:$MAGICK_LIBRARY_REVISION:$MAGICK_LIBRARY_AGE
-MAGICK_SVN_REVISION=4455
+MAGICK_SVN_REVISION=4458
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"
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().
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)
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)
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);
magick/list.h \
magick/locale.c \
magick/locale_.h \
- magick/locale-private.h \
magick/log.c \
magick/log.h \
magick/mac.h \
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 \
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);
*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)
{
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);
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)
{
(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;
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,
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);
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;
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);
*/
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);
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);
}
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)
/*
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);
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);
}
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)
{
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);
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);
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);
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);
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.
*/
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)
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);
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));
#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"
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);
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);
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);
(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);
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);
char
message[MaxTextExtent];
- (void) FormatMagickString(message,MaxTextExtent,"destroy %s",
+ (void) FormatLocaleString(message,MaxTextExtent,"destroy %s",
cache_info->filename);
(void) LogMagickEvent(CacheEvent,GetMagickModule(),"%s",message);
}
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);
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;
{
(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,
{
(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)
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);
(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);
{
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;
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);
}
}
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);
}
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;
(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);
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)
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)
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);
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);
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
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
*/
(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
/*
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);
/*
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)
/*
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));
}
(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 **)
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);
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)
(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;
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]);
% 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:
char
key[MaxTextExtent];
- (void) FormatMagickString(key,MaxTextExtent,"%.20g\n",(double) id);
+ (void) FormatLocaleString(key,MaxTextExtent,"%.20g\n",(double) id);
return(DeleteImageRegistry(key));
}
\f
% %
% %
% %
+% 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 %
% %
% %
operands;
va_start(operands,format);
- (void) FormatMagickStringList(string,MaxTextExtent,format,operands);
+ (void) FormatLocaleStringList(string,MaxTextExtent,format,operands);
va_end(operands);
return;
}
/*
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);
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);
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)
/*
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);
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
(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)
*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);
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);
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));
/*
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);
}
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:
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);
/*
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);
}
*/
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);
/*
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);
}
/*
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);
}
GXinvert);
if (*factor == '\0')
break;
- blend=StringToDouble(factor,(char **) NULL);
+ blend=LocaleToDouble(factor,(char **) NULL);
compose=DissolveCompositeOp;
break;
}
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);
/*
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);
}
*/
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);
/*
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);
/*
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));
/*
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);
}
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);
(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);
*/
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,
/*
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);
/*
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);
*/
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,
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);
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)
/*
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);
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);
/*
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)
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)
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)
/*
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')
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)
(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);
(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);
(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);
(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);
(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);
(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);
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);
/*
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);
}
/*
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);
}
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);
}
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,
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);
*/
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);
/*
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);
}
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",
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);
/*
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);
}
*/
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);
/*
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);
/*
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));
*/
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,
/*
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;
/*
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;
}
/*
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;
}
/*
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);
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);
/*
/*
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);
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
/*
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);
*/
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;
/*
(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)
{
(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;
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,
*/
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));
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;
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);
*/
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);
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);
(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);
/*
Redisplay image.
*/
- (void) FormatMagickString(
+ (void) FormatLocaleString(
resource_info->image_info->filename,MaxTextExtent,
"%s:%s",display_image->magick,
display_image->filename);
/* 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 }";
}
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;
}
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:
*/
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;
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;
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;
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);
double
value;
- value=StringToDouble(point,&p);
+ value=LocaleToDouble(point,&p);
return((value == 0.0) && (p == point) ? MagickFalse : MagickTrue);
}
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)
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);
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)
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)
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;
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;
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;
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);
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);
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),
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);
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);
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))));
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;
}
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);
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++)
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)
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;
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;
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;
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);
double
value;
- value=StringToDouble(s,&t);
+ value=LocaleToDouble(s,&t);
(void) value;
if (s == t)
{
(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);
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);
/*
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);
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,
(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(
(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);
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);
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);
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;
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;
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);
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)
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);
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);
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;
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;
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;
}
}
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);
}
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);
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);
{
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;
}
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;
}
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:
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:
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:
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:
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;
}
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;
}
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;
}
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;
}
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;
}
{
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:
}
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;
}
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;
}
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;
}
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;
}
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;
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;
}
{
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;
}
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)
}
(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;
}
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);
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;
}
}
}
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;
}
}
}
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;
}
}
}
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);
{
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
{
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);
{
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
*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)
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);
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();
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);
}
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)
{
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)
(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)
{
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)
{
(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)
{
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)
{
(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)
{
(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
}
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);
}
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(
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);
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);
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(
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);
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);
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;
}
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;
}
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 == '-'))
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;
}
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);
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*
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 == ',') ||
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;
((*p != '+') && (*p != '-')))
{
q=p;
- value=StringToDouble(p,&p);
+ value=LocaleToDouble(p,&p);
if (p != q)
{
flags|=SigmaValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=StringToDouble(p,&p);
+ value=LocaleToDouble(p,&p);
if (p != q)
{
flags|=XiValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=StringToDouble(p,&p);
+ value=LocaleToDouble(p,&p);
if (p != q)
{
flags|=PsiValue;
if ((*p == ',') || (*p == '/') || (*p == ':'))
p++;
q=p;
- value=StringToDouble(p,&p);
+ value=LocaleToDouble(p,&p);
if (p != q)
{
flags|=ChiValue;
(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
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),
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)),
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/
*/
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);
}
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)
{
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;
}
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)
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)
}
if (channel_statistics != (ChannelStatistics *) NULL)
{
- (void) fprintf(file," Channel statistics:\n");
+ (void) FormatLocaleFile(file," Channel statistics:\n");
switch (colorspace)
{
case RGBColorspace:
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);
}
}
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:
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)
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
(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) ||
/*
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
*/
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;
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);
/*
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);
/*
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) ||
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);
}
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++];
/*
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);
}
}
/*
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);
(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);
}
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);
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);
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);
#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"
*/
#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
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
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)":"",
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)":"");
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
}
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 )
*/
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)":"");
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
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
* 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)":"");
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)":"");
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
}
}
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++;
}
+++ /dev/null
-/*
- 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
instantiate_locale = MagickFalse;
static volatile locale_t
- locale_cache = (locale_t) NULL;
+ c_locale = (locale_t) NULL;
\f
/*
Forward declarations.
% %
% %
% %
-+ 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
/*
% %
% %
% %
-+ 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
/*
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)
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);
(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 **)
{
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);
}
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);
+}
*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 *);
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);
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;
}
(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);
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;
}
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"
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':
}
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;
}
case 'u':
{
- q+=FormatMagickString(q,extent,"%0.3fu",user_time);
+ q+=FormatLocaleString(q,extent,"%0.3fu",user_time);
break;
}
case 'v':
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 'p':
{
- q+=FormatMagickString(q,extent,"%.20g",(double) getpid());
+ q+=FormatLocaleString(q,extent,"%.20g",(double) getpid());
break;
}
case 'v':
}
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)
(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;
}
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);
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);
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)
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);
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)
(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
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);
#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
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)
(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
{
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);
#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)
(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);
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));
}
break;
}
}
- (void) FormatMagickString(path,MaxTextExtent,"%s%s",directory,filename);
+ (void) FormatLocaleString(path,MaxTextExtent,"%s%s",directory,filename);
if (IsPathAccessible(path) == MagickFalse)
{
ThrowFileException(exception,ConfigureWarning,
"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)
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
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);
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
}
(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
/*
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)
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
/*
(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);
/*
(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);
/*
(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)
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
(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
(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
}
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));
}
(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);
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-
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);
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);
/*
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),
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] );
#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
/* 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);
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);
/* 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
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,
} /* 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 */
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),
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),
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 */
}
** 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,
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;
#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
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");
}
}
}
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);
}
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 |
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)
(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++)
{
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);
/*
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;
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);
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);
#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
{
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);
}
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 *)
/*
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);
}
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; \
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; \
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;
}
}
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
}
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++)
{
*/
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++)
*/
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);
/*
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);
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));
}
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++)
{
{
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++)
{
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);
/*
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);
char
value[MaxTextExtent];
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),(double) alpha);
(void) SetImageProperty((Image *) image,property,value);
}
/*
Image channels.
*/
- (void) FormatMagickString(value,MaxTextExtent,"%s",
+ (void) FormatLocaleString(value,MaxTextExtent,"%s",
CommandOptionToMnemonic(MagickColorspaceOptions,(ssize_t)
image->colorspace));
LocaleLower(value);
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;
{
if (LocaleNCompare("depth",property,5) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
image->depth);
break;
}
{
if (LocaleNCompare("group",property,5) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"0x%lx",
+ (void) FormatLocaleString(value,MaxTextExtent,"0x%lx",
(unsigned long) image_info->group);
break;
}
{
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;
}
(void) GetImageChannelKurtosis(image,image_info->channel,&kurtosis,
&skewness,&image->exception);
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),kurtosis);
break;
}
(void) GetImageChannelRange(image,image_info->channel,&minimum,
&maximum,&image->exception);
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),maximum);
break;
}
(void) GetImageChannelMean(image,image_info->channel,&mean,
&standard_deviation,&image->exception);
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),mean);
break;
}
(void) GetImageChannelRange(image,image_info->channel,&minimum,
&maximum,&image->exception);
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),minimum);
break;
}
{
if (LocaleNCompare("page",property,4) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%.20g",(double)
+ (void) FormatLocaleString(value,MaxTextExtent,"%.20g",(double)
GetImageIndexInList(image)+1);
break;
}
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;
}
(void) GetImageChannelKurtosis(image,image_info->channel,&kurtosis,
&skewness,&image->exception);
- (void) FormatMagickString(value,MaxTextExtent,"%.*g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%.*g",
GetMagickPrecision(),skewness);
break;
}
(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;
}
{
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;
}
{
if (LocaleNCompare("xresolution",property,11) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",
image->x_resolution);
break;
}
{
if (LocaleNCompare("yresolution",property,11) == 0)
{
- (void) FormatMagickString(value,MaxTextExtent,"%g",
+ (void) FormatLocaleString(value,MaxTextExtent,"%g",
image->y_resolution);
break;
}
/*
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);
/*
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;
/*
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;
}
/*
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;
}
/*
Number of images in the list.
*/
- q+=FormatMagickString(q,extent,"%.20g",(double)
+ q+=FormatLocaleString(q,extent,"%.20g",(double)
GetImageListLength(image));
break;
}
/*
Image index in list.
*/
- q+=FormatMagickString(q,extent,"%.20g",(double)
+ q+=FormatLocaleString(q,extent,"%.20g",(double)
GetImageIndexInList(image));
break;
}
/*
Image depth.
*/
- q+=FormatMagickString(q,extent,"%.20g",(double)
+ q+=FormatLocaleString(q,extent,"%.20g",(double)
MAGICKCORE_QUANTUM_DEPTH);
break;
}
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" : "");
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':
/*
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;
}
/*
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;
/*
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;
/*
Image depth.
*/
- q+=FormatMagickString(q,extent,"%.20g",(double) image->depth);
+ q+=FormatLocaleString(q,extent,"%.20g",(double) image->depth);
break;
}
case 'A':
/*
Image alpha channel.
*/
- q+=FormatMagickString(q,extent,"%s",CommandOptionToMnemonic(
+ q+=FormatLocaleString(q,extent,"%s",CommandOptionToMnemonic(
MagickBooleanOptions,(ssize_t) image->matte));
break;
}
/*
Image compression method.
*/
- q+=FormatMagickString(q,extent,"%s",CommandOptionToMnemonic(
+ q+=FormatLocaleString(q,extent,"%s",CommandOptionToMnemonic(
MagickCompressOptions,(ssize_t) image->compression));
break;
}
/*
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':
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':
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);
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;
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
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 ?
}
#if DEBUG_ELLIPSE
- fprintf(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
+ FormatLocaleFile(stderr, "u0=%lf; v0=%lf;\n", u0, v0);
#endif
/*
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
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 */
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++;
}
}
#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
/*
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
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;
#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
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
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
/* 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);
/* 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;
/* 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
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.
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. */
}
}
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 */
(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);
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 != '/')
(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);
/*
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);
/*
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);
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
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;
}
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;
#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"
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;
% %
% %
% %
-% 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 %
% %
% %
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);
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);
}
% %
% %
% %
-% 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 %
% %
% %
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)
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 *),
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
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;
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);
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);
}
char
*q;
- value=StringToDouble(p,&q);
+ value=LocaleToDouble(p,&q);
(void) value;
if ((p != q) && (*p != ','))
{
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)
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);
/*
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)
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;
}
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
/*
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);
}
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)
}
if (verbose != MagickFalse)
{
- (void) fprintf(stderr,"%s\n",command);
+ (void) FormatLocaleFile(stderr,"%s\n",command);
(void) fflush(stderr);
}
shell_command=(char *) command;
#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"
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));
*/
#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
/*
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);
(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);
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--;
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);
{
case '&':
{
- i+=FormatMagickString(canonical_content+i,extent,"&");
+ i+=FormatLocaleString(canonical_content+i,extent,"&");
break;
}
case '<':
{
- i+=FormatMagickString(canonical_content+i,extent,"<");
+ i+=FormatLocaleString(canonical_content+i,extent,"<");
break;
}
case '>':
{
- i+=FormatMagickString(canonical_content+i,extent,">");
+ i+=FormatLocaleString(canonical_content+i,extent,">");
break;
}
case '"':
{
- i+=FormatMagickString(canonical_content+i,extent,""");
+ i+=FormatLocaleString(canonical_content+i,extent,""");
break;
}
case '\n':
canonical_content[i++]=(char) (*p);
break;
}
- i+=FormatMagickString(canonical_content+i,extent,"
");
+ i+=FormatLocaleString(canonical_content+i,extent,"
");
break;
}
case '\t':
canonical_content[i++]=(char) (*p);
break;
}
- i+=FormatMagickString(canonical_content+i,extent,"	");
+ i+=FormatLocaleString(canonical_content+i,extent,"	");
break;
}
case '\r':
{
- i+=FormatMagickString(canonical_content+i,extent,"
");
+ i+=FormatLocaleString(canonical_content+i,extent,"
");
break;
}
default:
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);
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]);
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) &&
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);
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++;
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];
}
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];
}
/*
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);
}
/*
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);
}
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.
*/
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.
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);
/*
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);
}
/*
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))
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,
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
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);
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);
((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));
}
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);
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);
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)
(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);
/*
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;
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);
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);
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;
}
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);
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;
}
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);
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;
}
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);
(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;
}
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);
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);
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),
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;
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;
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);
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;
/*
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;
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);
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);
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),
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;
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;
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;
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;
/*
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;
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);
(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++)
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,
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;
}
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;
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);
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);
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;
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);
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;
}
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);
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;
}
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);
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)
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,
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);
}
{
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)),
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);
}
}
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]);
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)
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);
}
}
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)
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]);
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)
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:
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)
{
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;
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);
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);
}
}
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]);
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)
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);
}
/*
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);
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);
}
}
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]);
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)
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);
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);
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
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;
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);
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);
}
}
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]);
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)
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;
}
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;
"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);
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);
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);
}
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);
}
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);
}
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);
}
{
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);
}
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);
}
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);
}
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);
}
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);
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);
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);
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);
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)
{
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)
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++)
{
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)
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)
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);
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); \
}
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);
}
}
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]);
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);
}
}
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]);
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);
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);
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))));
(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));
(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*
(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)
(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)
(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*
(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));
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;
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);
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);
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);
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);
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);
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);
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();
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;
}
{
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)
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);
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);
}
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;
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 ) {
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 */
}
}
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(
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,
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,
*/
(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;
}
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)
*/
(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)
}
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)
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);
}
}
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)
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]);
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)
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);
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)
*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 == '+')
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
/*
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);
}
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
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);
}
}
(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);
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]);
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)
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)
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);
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;
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;
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);
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);
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));
}
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);
}
}
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]);
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)
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);
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;
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);
#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); \
}
(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,
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);
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);
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);
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);
}
}
}
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);
}
(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)
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);
(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);
{
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);
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)
(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);
{
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);
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)
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);
{
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);
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);
}