From: cristy Date: Sun, 29 May 2011 01:28:05 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~7473 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=20ec75933833a479a457aeb76c7f9338e1e1c093;p=imagemagick --- diff --git a/magick/identify.c b/magick/identify.c index bbeb756d0..4ecebf177 100644 --- a/magick/identify.c +++ b/magick/identify.c @@ -144,7 +144,7 @@ % */ -static int PrintChannelFeatures(FILE *file,const ChannelType channel, +static ssize_t PrintChannelFeatures(FILE *file,const ChannelType channel, const char *name,const ChannelFeatures *channel_features) { #define PrintFeature(feature) \ @@ -184,10 +184,10 @@ static int PrintChannelFeatures(FILE *file,const ChannelType channel, " Maximum Correlation Coefficient:\n" \ " %.*g, %.*g, %.*g, %.*g, %.*g\n" - int - status; + ssize_t + n; - status=FormatLocaleFile(file,FeaturesFormat,name, + n=FormatLocaleFile(file,FeaturesFormat,name, PrintFeature(channel_features[channel].angular_second_moment), PrintFeature(channel_features[channel].contrast), PrintFeature(channel_features[channel].correlation), @@ -202,10 +202,10 @@ static int PrintChannelFeatures(FILE *file,const ChannelType channel, PrintFeature(channel_features[channel].measure_of_correlation_1), PrintFeature(channel_features[channel].measure_of_correlation_2), PrintFeature(channel_features[channel].maximum_correlation_coefficient)); - return(status); + return(n); } -static int PrintChannelStatistics(FILE *file,const ChannelType channel, +static ssize_t PrintChannelStatistics(FILE *file,const ChannelType channel, const char *name,const double scale, const ChannelStatistics *channel_statistics) { @@ -214,12 +214,12 @@ static int PrintChannelStatistics(FILE *file,const ChannelType channel, " mean: %g (%g)\n standard deviation: %g (%g)\n" \ " kurtosis: %g\n skewness: %g\n" - int - status; + ssize_t + n; if (channel == AlphaChannel) { - status=FormatLocaleFile(file,StatisticsFormat,name,ClampToQuantum(scale* + n=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)), @@ -230,9 +230,9 @@ static int PrintChannelStatistics(FILE *file,const ChannelType channel, channel_statistics[channel].standard_deviation/(double) QuantumRange, channel_statistics[channel].kurtosis, channel_statistics[channel].skewness); - return(status); + return(n); } - status=FormatLocaleFile(file,StatisticsFormat,name,ClampToQuantum(scale* + n=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/ @@ -241,7 +241,7 @@ static int PrintChannelStatistics(FILE *file,const ChannelType channel, channel_statistics[channel].standard_deviation, channel_statistics[channel].standard_deviation/(double) QuantumRange, channel_statistics[channel].kurtosis,channel_statistics[channel].skewness); - return(status); + return(n); } MagickExport MagickBooleanType IdentifyImage(Image *image,FILE *file, diff --git a/magick/locale.c b/magick/locale.c index b6a1262bb..76564b6b2 100644 --- a/magick/locale.c +++ b/magick/locale.c @@ -237,7 +237,7 @@ MagickExport LinkedListInfo *DestroyLocaleOptions(LinkedListInfo *messages) MagickExport ssize_t FormatLocaleFileList(FILE *file, const char *restrict format,va_list operands) { - int + ssize_t n; #if defined(MAGICKCORE_HAVE_VFPRINTF_L) @@ -247,12 +247,12 @@ MagickExport ssize_t FormatLocaleFileList(FILE *file, locale=AcquireCLocale(); if (locale == (locale_t) NULL) - n=vfprintf(file,format,operands); + n=(ssize_t) vfprintf(file,format,operands); else #if defined(MAGICKCORE_WINDOWS_SUPPORT) - n=vfprintf_l(file,format,locale,operands); + n=(ssize_t) vfprintf_l(file,format,locale,operands); #else - n=vfprintf_l(file,locale,format,operands); + n=(ssize_t) vfprintf_l(file,locale,format,operands); #endif } #else @@ -264,19 +264,19 @@ MagickExport ssize_t FormatLocaleFileList(FILE *file, locale=AcquireCLocale(); if (locale == (locale_t) NULL) - n=vfprintf(file,format,operands); + n=(ssize_t) vfprintf(file,format,operands); else { previous_locale=uselocale(locale); - n=vfprintf(file,format,operands); + n=(ssize_t) vfprintf(file,format,operands); uselocale(previous_locale); } } #else - n=vfprintf(file,format,operands); + n=(ssize_t) vfprintf(file,format,operands); #endif #endif - return((ssize_t) n); + return(); } MagickExport ssize_t FormatLocaleFile(FILE *file,const char *restrict format, @@ -289,7 +289,7 @@ MagickExport ssize_t FormatLocaleFile(FILE *file,const char *restrict format, operands; va_start(operands,format); - n=(ssize_t) FormatLocaleFileList(file,format,operands); + n=FormatLocaleFileList(file,format,operands); va_end(operands); return(n); } @@ -328,7 +328,7 @@ MagickExport ssize_t FormatLocaleFile(FILE *file,const char *restrict format, MagickExport ssize_t FormatLocaleStringList(char *restrict string, const size_t length,const char *restrict format,va_list operands) { - int + ssize_t n; #if defined(MAGICKCORE_HAVE_VSNPRINTF_L) @@ -338,12 +338,12 @@ MagickExport ssize_t FormatLocaleStringList(char *restrict string, locale=AcquireCLocale(); if (locale == (locale_t) NULL) - n=vsnprintf(string,length,format,operands); + n=(ssize_t) vsnprintf(string,length,format,operands); else #if defined(MAGICKCORE_WINDOWS_SUPPORT) - n=vsnprintf_l(string,length,format,locale,operands); + n=(ssize_t) vsnprintf_l(string,length,format,locale,operands); #else - n=vsnprintf_l(string,length,locale,format,operands); + n=(ssize_t) vsnprintf_l(string,length,locale,format,operands); #endif } #elif defined(MAGICKCORE_HAVE_VSNPRINTF) @@ -355,23 +355,23 @@ MagickExport ssize_t FormatLocaleStringList(char *restrict string, locale=AcquireCLocale(); if (locale == (locale_t) NULL) - n=vsnprintf(string,length,format,operands); + n=(ssize_t) vsnprintf(string,length,format,operands); else { previous_locale=uselocale(locale); - n=vsnprintf(string,length,format,operands); + n=(ssize_t) vsnprintf(string,length,format,operands); uselocale(previous_locale); } } #else - n=vsnprintf(string,length,format,operands); + n=(ssize_t) vsnprintf(string,length,format,operands); #endif #else - n=vsprintf(string,format,operands); + n=(ssize_t) vsprintf(string,format,operands); #endif if (n < 0) string[length-1]='\0'; - return((ssize_t) n); + return(n); } MagickExport ssize_t FormatLocaleString(char *restrict string, @@ -384,7 +384,7 @@ MagickExport ssize_t FormatLocaleString(char *restrict string, operands; va_start(operands,format); - n=(ssize_t) FormatLocaleStringList(string,length,format,operands); + n=FormatLocaleStringList(string,length,format,operands); va_end(operands); return(n); } diff --git a/magick/property.c b/magick/property.c index 5d8929948..86a266819 100644 --- a/magick/property.c +++ b/magick/property.c @@ -327,7 +327,7 @@ MagickExport MagickBooleanType FormatImageProperty(Image *image, char value[MaxTextExtent]; - int + ssize_t n; va_list