Make MagickMax()/MagickMin() a macro rather than an inline.
diff --git a/MagickCore/animate.c b/MagickCore/animate.c
index 98de307..8105c5b 100644
--- a/MagickCore/animate.c
+++ b/MagickCore/animate.c
@@ -708,13 +708,6 @@
%
*/
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/MagickCore/annotate.c b/MagickCore/annotate.c
index 378b994..dcd3856 100644
--- a/MagickCore/annotate.c
+++ b/MagickCore/annotate.c
@@ -1619,13 +1619,6 @@
%
*/
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static char *EscapeParenthesis(const char *text)
{
char
diff --git a/MagickCore/attribute.c b/MagickCore/attribute.c
index 75f8d4f..dbad005 100644
--- a/MagickCore/attribute.c
+++ b/MagickCore/attribute.c
@@ -533,14 +533,6 @@
% a maximum of MAGICKCORE_QUANTUM_DEPTH.
%
*/
-
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport size_t GetImageQuantumDepth(const Image *image,
const MagickBooleanType constrain)
{
diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index e60bf8c..d3e67e6 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -235,15 +235,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline MagickSizeType MagickMin(const MagickSizeType x,
- const MagickSizeType y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType BlobToFile(char *filename,const void *blob,
const size_t length,ExceptionInfo *exception)
{
diff --git a/MagickCore/cache.c b/MagickCore/cache.c
index 757b3bc..51b92ef 100644
--- a/MagickCore/cache.c
+++ b/MagickCore/cache.c
@@ -471,14 +471,6 @@
%
*/
-static inline MagickSizeType MagickMin(const MagickSizeType x,
- const MagickSizeType y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType ClonePixelCacheRepository(
CacheInfo *restrict clone_info,CacheInfo *restrict cache_info,
ExceptionInfo *exception)
diff --git a/MagickCore/channel.c b/MagickCore/channel.c
index 8250fa5..856425e 100644
--- a/MagickCore/channel.c
+++ b/MagickCore/channel.c
@@ -113,13 +113,6 @@
TransferChannelOp
} ChannelFx;
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType ChannelImage(Image *destination_image,
const PixelChannel destination_channel,const ChannelFx channel_op,
const Image *source_image,const PixelChannel source_channel,
diff --git a/MagickCore/cipher.c b/MagickCore/cipher.c
index 7822487..2fadb70 100644
--- a/MagickCore/cipher.c
+++ b/MagickCore/cipher.c
@@ -534,13 +534,6 @@
ThrowFatalException(ResourceLimitFatalError,"Sequence wrap error `%s'");
}
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType DecipherImage(Image *image,
const char *passphrase,ExceptionInfo *exception)
{
diff --git a/MagickCore/color.c b/MagickCore/color.c
index e80b331..c3301f3 100644
--- a/MagickCore/color.c
+++ b/MagickCore/color.c
@@ -1657,14 +1657,6 @@
% o q: Pixel q.
%
*/
-
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
MagickPrivate MagickBooleanType IsEquivalentAlpha(const Image *image,
const PixelInfo *p,const PixelInfo *q)
{
diff --git a/MagickCore/colormap.c b/MagickCore/colormap.c
index a73cd52..560d64b 100644
--- a/MagickCore/colormap.c
+++ b/MagickCore/colormap.c
@@ -101,15 +101,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,
- const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType AcquireImageColormap(Image *image,
const size_t colors,ExceptionInfo *exception)
{
diff --git a/MagickCore/compare.c b/MagickCore/compare.c
index ff10073..057a223 100644
--- a/MagickCore/compare.c
+++ b/MagickCore/compare.c
@@ -338,13 +338,6 @@
%
*/
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static MagickBooleanType GetAbsoluteDistortion(const Image *image,
const Image *reconstruct_image,double *distortion,ExceptionInfo *exception)
{
@@ -1682,13 +1675,6 @@
return(distortion);
}
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport Image *SimilarityImage(Image *image,const Image *reference,
const MetricType metric,const double similarity_threshold,
RectangleInfo *offset,double *similarity_metric,ExceptionInfo *exception)
diff --git a/MagickCore/composite.c b/MagickCore/composite.c
index f19777a..71d970b 100644
--- a/MagickCore/composite.c
+++ b/MagickCore/composite.c
@@ -178,22 +178,6 @@
operations.
*/
-static inline MagickRealType MagickMin(const MagickRealType x,
- const MagickRealType y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
-static inline MagickRealType MagickMax(const MagickRealType x,
- const MagickRealType y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static void HCLComposite(const MagickRealType hue,const MagickRealType chroma,
const MagickRealType luma,MagickRealType *red,MagickRealType *green,
MagickRealType *blue)
diff --git a/MagickCore/compress.c b/MagickCore/compress.c
index 5e05b42..e5b1800 100644
--- a/MagickCore/compress.c
+++ b/MagickCore/compress.c
@@ -363,21 +363,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType HuffmanDecodeImage(Image *image,
ExceptionInfo *exception)
{
diff --git a/MagickCore/display.c b/MagickCore/display.c
index 3f1c55f..9fdebf1 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -1802,20 +1802,6 @@
%
*/
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType XAnnotateEditImage(Display *display,
XResourceInfo *resource_info,XWindows *windows,Image *image,
ExceptionInfo *exception)
diff --git a/MagickCore/distort.c b/MagickCore/distort.c
index 97c5f09..6f494a1 100644
--- a/MagickCore/distort.c
+++ b/MagickCore/distort.c
@@ -77,15 +77,6 @@
/*
Numerous internal routines for image distortions.
*/
-static inline double MagickMin(const double x,const double y)
-{
- return( x < y ? x : y);
-}
-static inline double MagickMax(const double x,const double y)
-{
- return( x > y ? x : y);
-}
-
static inline void AffineArgsToCoefficients(double *affine)
{
/* map external sx,ry,rx,sy,tx,ty to internal c0,c2,c4,c1,c3,c5 */
diff --git a/MagickCore/draw.c b/MagickCore/draw.c
index 3478c36..f2cb835 100644
--- a/MagickCore/draw.c
+++ b/MagickCore/draw.c
@@ -1059,27 +1059,6 @@
return(inverse_affine);
}
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType DrawAffineImage(Image *image,
const Image *source,const AffineMatrix *affine,ExceptionInfo *exception)
{
diff --git a/MagickCore/enhance.c b/MagickCore/enhance.c
index f1f8cde..bc06d88 100644
--- a/MagickCore/enhance.c
+++ b/MagickCore/enhance.c
@@ -1922,23 +1922,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline MagickRealType MagickMax(const MagickRealType x,
- const MagickRealType y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline MagickRealType MagickMin(const MagickRealType x,
- const MagickRealType y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickBooleanType GrayscaleImage(Image *image,
const PixelIntensityMethod method,ExceptionInfo *exception)
{
diff --git a/MagickCore/feature.c b/MagickCore/feature.c
index 44a1ffb..b8bb014 100644
--- a/MagickCore/feature.c
+++ b/MagickCore/feature.c
@@ -609,13 +609,6 @@
%
*/
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
static inline double MagickLog10(const double x)
{
#define Log10Epsilon (1.0e-11)
diff --git a/MagickCore/fx.c b/MagickCore/fx.c
index 44c4e5e..e5b5dfb 100644
--- a/MagickCore/fx.c
+++ b/MagickCore/fx.c
@@ -1108,13 +1108,6 @@
%
*/
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static double FxChannelStatistics(FxInfo *fx_info,Image *image,
PixelChannel channel,const char *symbol,ExceptionInfo *exception)
{
diff --git a/MagickCore/gem.c b/MagickCore/gem.c
index 15f40c0..a1a0a61 100644
--- a/MagickCore/gem.c
+++ b/MagickCore/gem.c
@@ -847,21 +847,6 @@
% component of the HCL color space.
%
*/
-
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickPrivate void ConvertRGBToHCL(const double red,const double green,
const double blue,double *hue,double *chroma,double *luma)
{
diff --git a/MagickCore/image-private.h b/MagickCore/image-private.h
index 41c9dcc..8a854fc 100644
--- a/MagickCore/image-private.h
+++ b/MagickCore/image-private.h
@@ -22,6 +22,9 @@
extern "C" {
#endif
+#define MagickAbsoluteValue(x) ((x) < 0 ? -(x) : (x))
+#define MagickMax(x,y) (((x) > (y)) ? (x) : (y))
+#define MagickMin(x,y) (((x) < (y)) ? (x) : (y))
#define Magick2PI 6.28318530717958647692528676655900576839433879875020
#define MagickPHI 1.61803398874989484820458683436563811772030917980576
#define MagickPI 3.14159265358979323846264338327950288419716939937510
diff --git a/MagickCore/montage.c b/MagickCore/montage.c
index 3de4b41..c84097d 100644
--- a/MagickCore/montage.c
+++ b/MagickCore/montage.c
@@ -285,20 +285,6 @@
*tiles_per_row=(size_t) ceil((double) number_images/(*tiles_per_column));
}
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif
diff --git a/MagickCore/morphology.c b/MagickCore/morphology.c
index 8018edf..195bb9f 100644
--- a/MagickCore/morphology.c
+++ b/MagickCore/morphology.c
@@ -89,14 +89,6 @@
/*
Other global definitions used by module.
*/
-static inline double MagickMin(const double x,const double y)
-{
- return( x < y ? x : y);
-}
-static inline double MagickMax(const double x,const double y)
-{
- return( x > y ? x : y);
-}
#define Minimize(assign,value) assign=MagickMin(assign,value)
#define Maximize(assign,value) assign=MagickMax(assign,value)
diff --git a/MagickCore/paint.c b/MagickCore/paint.c
index 28e8ae5..81064df 100644
--- a/MagickCore/paint.c
+++ b/MagickCore/paint.c
@@ -405,12 +405,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline double MagickMax(const double x,const double y)
-{
- return(x > y ? x : y);
-}
-
MagickExport MagickBooleanType GradientImage(Image *image,
const GradientType type,const SpreadMethod method,
const PixelInfo *start_color,const PixelInfo *stop_color,
diff --git a/MagickCore/pixel.c b/MagickCore/pixel.c
index 16dd9ce..33f98f8 100644
--- a/MagickCore/pixel.c
+++ b/MagickCore/pixel.c
@@ -2217,23 +2217,6 @@
% o pixel: Specifies a pointer to a Quantum structure.
%
*/
-
-static inline MagickRealType MagickMax(const MagickRealType x,
- const MagickRealType y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline MagickRealType MagickMin(const MagickRealType x,
- const MagickRealType y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickExport MagickRealType GetPixelIntensity(const Image *restrict image,
const Quantum *restrict pixel)
{
diff --git a/MagickCore/property.c b/MagickCore/property.c
index 3724a12..d79f7c3 100644
--- a/MagickCore/property.c
+++ b/MagickCore/property.c
@@ -487,20 +487,6 @@
return(MagickTrue);
}
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static inline int ReadPropertyByte(const unsigned char **p,size_t *length)
{
int
diff --git a/MagickCore/quantize.c b/MagickCore/quantize.c
index 5de7bcf..134e1e6 100644
--- a/MagickCore/quantize.c
+++ b/MagickCore/quantize.c
@@ -1926,20 +1926,6 @@
return(MagickTrue);
}
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType DitherImage(Image *image,CubeInfo *cube_info,
ExceptionInfo *exception)
{
diff --git a/MagickCore/resize.c b/MagickCore/resize.c
index efa0d12..6aa1c5f 100644
--- a/MagickCore/resize.c
+++ b/MagickCore/resize.c
@@ -2383,20 +2383,6 @@
return(contribution);
}
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType HorizontalFilter(const ResizeFilter *resize_filter,
const Image *image,Image *resize_image,const double x_factor,
const MagickSizeType span,MagickOffsetType *offset,ExceptionInfo *exception)
diff --git a/MagickCore/segment.c b/MagickCore/segment.c
index 3489ee3..4f267dc 100644
--- a/MagickCore/segment.c
+++ b/MagickCore/segment.c
@@ -696,28 +696,6 @@
% in the zero_crossing array.
%
*/
-
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static void ConsolidateCrossings(ZeroCrossing *zero_crossing,
const size_t number_crossings)
{
diff --git a/MagickCore/statistic.c b/MagickCore/statistic.c
index d01a4dc..e9b1037 100644
--- a/MagickCore/statistic.c
+++ b/MagickCore/statistic.c
@@ -225,13 +225,6 @@
}
#endif
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static double ApplyEvaluateOperator(RandomInfo *random_info,const Quantum pixel,
const MagickEvaluateOperator op,const double value)
{
@@ -2915,20 +2908,6 @@
AddNodePixelList(pixel_list,index);
}
-static inline double MagickAbsoluteValue(const double x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static void ResetPixelList(PixelList *pixel_list)
{
int
diff --git a/MagickCore/xwindow.c b/MagickCore/xwindow.c
index b41f837..8274f1e 100644
--- a/MagickCore/xwindow.c
+++ b/MagickCore/xwindow.c
@@ -1144,22 +1144,6 @@
% o resource_info: Specifies a pointer to a X11 XResourceInfo structure.
%
*/
-
-static inline int MagickMax(const int x,const int y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const unsigned int x,
- const unsigned int y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
MagickPrivate XVisualInfo *XBestVisualInfo(Display *display,
XStandardColormap *map_info,XResourceInfo *resource_info)
{
diff --git a/MagickWand/mogrify.c b/MagickWand/mogrify.c
index b110bfb..820d38d 100644
--- a/MagickWand/mogrify.c
+++ b/MagickWand/mogrify.c
@@ -381,13 +381,6 @@
return(MagickTrue);
}
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static MagickBooleanType MonitorProgress(const char *text,
const MagickOffsetType offset,const MagickSizeType extent,
void *wand_unused(client_data))
diff --git a/coders/bmp.c b/coders/bmp.c
index 25ef657..1218d89 100644
--- a/coders/bmp.c
+++ b/coders/bmp.c
@@ -185,28 +185,6 @@
% the decoding process.
%
*/
-
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType DecodeImage(Image *image,const size_t compression,
unsigned char *pixels)
{
diff --git a/coders/cip.c b/coders/cip.c
index e90f7fa..86a3427 100644
--- a/coders/cip.c
+++ b/coders/cip.c
@@ -159,14 +159,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType WriteCIPImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
diff --git a/coders/dcm.c b/coders/dcm.c
index 12a4c2e..12d45d2 100644
--- a/coders/dcm.c
+++ b/coders/dcm.c
@@ -2675,21 +2675,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
typedef struct _DCMStreamInfo
{
size_t
diff --git a/coders/dib.c b/coders/dib.c
index 17df06a..9d735a4 100644
--- a/coders/dib.c
+++ b/coders/dib.c
@@ -143,14 +143,6 @@
% the decoding process.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType DecodeImage(Image *image,
const MagickBooleanType compression,unsigned char *pixels)
{
@@ -441,21 +433,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static Image *ReadDIBImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
DIBInfo
diff --git a/coders/gif.c b/coders/gif.c
index ab26ea9..df06bf3 100644
--- a/coders/gif.c
+++ b/coders/gif.c
@@ -917,21 +917,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType PingGIFImage(Image *image,ExceptionInfo *exception)
{
unsigned char
diff --git a/coders/histogram.c b/coders/histogram.c
index a91811b..479b28c 100644
--- a/coders/histogram.c
+++ b/coders/histogram.c
@@ -171,14 +171,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static MagickBooleanType WriteHISTOGRAMImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
diff --git a/coders/inline.c b/coders/inline.c
index b9d3c76..3a51eca 100644
--- a/coders/inline.c
+++ b/coders/inline.c
@@ -86,14 +86,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *ReadINLINEImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
diff --git a/coders/jpeg.c b/coders/jpeg.c
index b445ff4..21688e6 100644
--- a/coders/jpeg.c
+++ b/coders/jpeg.c
@@ -1878,13 +1878,6 @@
destination->manager.free_in_buffer=MaxBufferExtent;
}
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static void TerminateDestination(j_compress_ptr cinfo)
{
DestinationManager
diff --git a/coders/mat.c b/coders/mat.c
index 1bb112f..9dd6f4f 100644
--- a/coders/mat.c
+++ b/coders/mat.c
@@ -594,14 +594,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
Image *image, *image2=NULL,
diff --git a/coders/miff.c b/coders/miff.c
index 89a5f01..652392c 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -185,20 +185,6 @@
}
#endif
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static void PushRunlengthPacket(Image *image,const unsigned char *pixels,
size_t *length,PixelInfo *pixel,ExceptionInfo *exception)
{
diff --git a/coders/mpeg.c b/coders/mpeg.c
index 18aa4b9..b464fa9 100644
--- a/coders/mpeg.c
+++ b/coders/mpeg.c
@@ -366,21 +366,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline double MagickMax(const double x,const double y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline double MagickMin(const double x,const double y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType CopyDelegateFile(const char *source,
const char *destination)
{
diff --git a/coders/palm.c b/coders/palm.c
index 9396ee5..b0d15c3 100644
--- a/coders/palm.c
+++ b/coders/palm.c
@@ -229,21 +229,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *ReadPALMImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
diff --git a/coders/pcd.c b/coders/pcd.c
index a1b9d94..1586f29 100644
--- a/coders/pcd.c
+++ b/coders/pcd.c
@@ -385,14 +385,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *OverviewImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
diff --git a/coders/pcx.c b/coders/pcx.c
index 60b696d..57fcb17 100644
--- a/coders/pcx.c
+++ b/coders/pcx.c
@@ -197,28 +197,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *ReadPCXImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define ThrowPCXException(severity,tag) \
diff --git a/coders/pdf.c b/coders/pdf.c
index 13b8978..1645a39 100644
--- a/coders/pdf.c
+++ b/coders/pdf.c
@@ -952,20 +952,6 @@
%
*/
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static char *EscapeParenthesis(const char *text)
{
register char
diff --git a/coders/pict.c b/coders/pict.c
index 175e503..38417d1 100644
--- a/coders/pict.c
+++ b/coders/pict.c
@@ -778,14 +778,6 @@
%
*/
-static inline size_t MagickMax(const size_t x,
- const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static MagickBooleanType ReadRectangle(Image *image,PICTRectangle *rectangle)
{
rectangle->top=(short) ReadBlobMSBShort(image);
diff --git a/coders/plasma.c b/coders/plasma.c
index 7314b2f..469071b 100644
--- a/coders/plasma.c
+++ b/coders/plasma.c
@@ -91,13 +91,6 @@
%
*/
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static inline void PlasmaPixel(Image *image,RandomInfo *random_info,double x,
double y,ExceptionInfo *exception)
{
diff --git a/coders/png.c b/coders/png.c
index 145dd94..9decb30 100644
--- a/coders/png.c
+++ b/coders/png.c
@@ -1038,14 +1038,6 @@
}
}
-static inline ssize_t MagickMax(const ssize_t x,const ssize_t y)
-{
- if (x > y)
- return(x);
-
- return(y);
-}
-
static const char *
Magick_ColorType_from_PNG_ColorType(const int ping_colortype)
{
@@ -1071,14 +1063,6 @@
}
}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
-
- return(y);
-}
#endif /* PNG_LIBPNG_VER > 10011 */
#endif /* MAGICKCORE_PNG_DELEGATE */
diff --git a/coders/ps.c b/coders/ps.c
index b11d785..f9ebfee 100644
--- a/coders/ps.c
+++ b/coders/ps.c
@@ -1143,13 +1143,6 @@
%
*/
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static inline unsigned char *PopHexPixel(const char **hex_digits,
const size_t pixel,unsigned char *pixels)
{
diff --git a/coders/psd.c b/coders/psd.c
index a4d7d45..4a34344 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -500,13 +500,6 @@
return(image->columns*GetPSDPacketSize(image));
}
-static inline ssize_t MagickAbsoluteValue(const ssize_t x)
-{
- if (x < 0)
- return(-x);
- return(x);
-}
-
static const char *ModeToString(PSDImageType type)
{
switch (type)
diff --git a/coders/rle.c b/coders/rle.c
index d4f90fa..dd77e43 100644
--- a/coders/rle.c
+++ b/coders/rle.c
@@ -124,14 +124,6 @@
%
%
*/
-
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
static Image *ReadRLEImage(const ImageInfo *image_info,ExceptionInfo *exception)
{
#define SkipLinesOp 0x01
diff --git a/coders/sgi.c b/coders/sgi.c
index d9d0f8a..97fe914 100644
--- a/coders/sgi.c
+++ b/coders/sgi.c
@@ -164,13 +164,6 @@
%
*/
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType SGIDecode(const size_t bytes_per_pixel,
ssize_t number_packets,unsigned char *packets,ssize_t number_pixels,
unsigned char *pixels)
diff --git a/coders/stegano.c b/coders/stegano.c
index 823d2ae..26c2aff 100644
--- a/coders/stegano.c
+++ b/coders/stegano.c
@@ -87,15 +87,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMin(const size_t x,
- const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static Image *ReadSTEGANOImage(const ImageInfo *image_info,
ExceptionInfo *exception)
{
diff --git a/coders/tga.c b/coders/tga.c
index 03d2a23..8b61479 100644
--- a/coders/tga.c
+++ b/coders/tga.c
@@ -654,14 +654,6 @@
% o image: The image.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static inline void WriteTGAPixel(Image *image,TGAImageType image_type,
const Quantum *p,const QuantumAny range,const double midpoint)
{
diff --git a/coders/tiff.c b/coders/tiff.c
index 028e12d..ec27e9d 100644
--- a/coders/tiff.c
+++ b/coders/tiff.c
@@ -499,20 +499,6 @@
return(status);
}
-static inline size_t MagickMax(const size_t x,const size_t y)
-{
- if (x > y)
- return(x);
- return(y);
-}
-
-static inline ssize_t MagickMin(const ssize_t x,const ssize_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType ReadProfile(Image *image,const char *name,
unsigned char *datum,ssize_t length,ExceptionInfo *exception)
{
@@ -1435,8 +1421,6 @@
samples_per_pixel);
if (compress_tag == COMPRESSION_JBIG)
method=ReadStripMethod;
- if ((photometric != PHOTOMETRIC_SEPARATED) &&
-
if (TIFFIsTiled(tiff) != MagickFalse)
method=ReadTileMethod;
quantum_info->endian=LSBEndian;
diff --git a/coders/viff.c b/coders/viff.c
index 85d93e3..74329a0 100644
--- a/coders/viff.c
+++ b/coders/viff.c
@@ -841,14 +841,6 @@
% o exception: return any errors or warnings in this structure.
%
*/
-
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static MagickBooleanType WriteVIFFImage(const ImageInfo *image_info,
Image *image,ExceptionInfo *exception)
{
diff --git a/coders/xcf.c b/coders/xcf.c
index b27d55f..577bdcd 100644
--- a/coders/xcf.c
+++ b/coders/xcf.c
@@ -287,13 +287,6 @@
%
*/
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static char *ReadBlobStringWithLongSize(Image *image,char *string,size_t max,
ExceptionInfo *exception)
{
diff --git a/coders/xpm.c b/coders/xpm.c
index f2e8e36..10d5337 100644
--- a/coders/xpm.c
+++ b/coders/xpm.c
@@ -172,13 +172,6 @@
return(p);
}
-static inline size_t MagickMin(const size_t x,const size_t y)
-{
- if (x < y)
- return(x);
- return(y);
-}
-
static char *ParseXPMColor(char *color,MagickBooleanType search_start)
{
#define NumberTargets 6