]> granicus.if.org Git - imagemagick/commitdiff
Make MagickMax()/MagickMin() a macro rather than an inline.
authorcristy <urban-warrior@git.imagemagick.org>
Thu, 25 Dec 2014 18:05:31 +0000 (18:05 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Thu, 25 Dec 2014 18:05:31 +0000 (18:05 +0000)
59 files changed:
MagickCore/animate.c
MagickCore/annotate.c
MagickCore/attribute.c
MagickCore/blob.c
MagickCore/cache.c
MagickCore/channel.c
MagickCore/cipher.c
MagickCore/color.c
MagickCore/colormap.c
MagickCore/compare.c
MagickCore/composite.c
MagickCore/compress.c
MagickCore/display.c
MagickCore/distort.c
MagickCore/draw.c
MagickCore/enhance.c
MagickCore/feature.c
MagickCore/fx.c
MagickCore/gem.c
MagickCore/image-private.h
MagickCore/montage.c
MagickCore/morphology.c
MagickCore/paint.c
MagickCore/pixel.c
MagickCore/property.c
MagickCore/quantize.c
MagickCore/resize.c
MagickCore/segment.c
MagickCore/statistic.c
MagickCore/xwindow.c
MagickWand/mogrify.c
coders/bmp.c
coders/cip.c
coders/dcm.c
coders/dib.c
coders/gif.c
coders/histogram.c
coders/inline.c
coders/jpeg.c
coders/mat.c
coders/miff.c
coders/mpeg.c
coders/palm.c
coders/pcd.c
coders/pcx.c
coders/pdf.c
coders/pict.c
coders/plasma.c
coders/png.c
coders/ps.c
coders/psd.c
coders/rle.c
coders/sgi.c
coders/stegano.c
coders/tga.c
coders/tiff.c
coders/viff.c
coders/xcf.c
coders/xpm.c

index 98de3078fcf4ec0bb3e9024d4e1ea20f3d03ebce..8105c5ba57bab4f4c3d8b8ba0d1b5c4a8c444aad 100644 (file)
@@ -708,13 +708,6 @@ static Image *XMagickCommand(Display *display,XResourceInfo *resource_info,
 %
 */
 
-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
index 378b994d1ac2b06b294804606677982da0f52952..dcd385694aa53e43b1c4cb97ab624cf525263f3b 100644 (file)
@@ -1619,13 +1619,6 @@ static MagickBooleanType RenderFreetype(Image *image,const DrawInfo *draw_info,
 %
 */
 
-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
index 75f8d4f6be2fc2d96e8be8ee7bd5a0c9b6347f11..dbad005830b1a9156c873d811b521f9654434546 100644 (file)
@@ -533,14 +533,6 @@ MagickExport size_t GetImageDepth(const Image *image,ExceptionInfo *exception)
 %      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)
 {
index e60bf8cbff7047e659c4db92eb118db1d9013887..d3e67e664cbc57dcde54cb4447c205a25c26a7dd 100644 (file)
@@ -235,15 +235,6 @@ MagickExport void AttachBlob(BlobInfo *blob_info,const void *blob,
 %    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)
 {
index 757b3bc9872b0761abc1826701134b57005bd9e1..51b92ef8bbe6e171acf103204f4162f1bdfea9fa 100644 (file)
@@ -471,14 +471,6 @@ MagickPrivate void ClonePixelCacheMethods(Cache clone,const Cache cache)
 %
 */
 
-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)
index 8250fa588a706058c8451e054d561aac0065a027..856425e14a9f5d29fb16989ebdeb5f19ad0f831e 100644 (file)
@@ -113,13 +113,6 @@ typedef enum
   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,
index 78224870856e88f1b5f8ed5b8562f523d63f7f2f..2fadb705a52ca57bc18ff2b6fdb7496ff4881fba 100644 (file)
@@ -534,13 +534,6 @@ static inline void IncrementCipherNonce(const size_t length,
   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)
 {
index e80b3312f8fba45f3c91f3e6e71d3760a517b5cd..c3301f365da4b76a93803970ff02215bab45841c 100644 (file)
@@ -1657,14 +1657,6 @@ static MagickBooleanType IsColorCacheInstantiated(ExceptionInfo *exception)
 %    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)
 {
index a73cd52a7dd856371834ba6864489dbf42565964..560d64baa70cfbb1f8f9a5179ac2b8aa8dbeed25 100644 (file)
 %    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)
 {
index ff100733f46a0b105d58089953aa7db2e5e92cb1..057a223edea1547920430876e25a6e3e50d05c8d 100644 (file)
@@ -338,13 +338,6 @@ MagickExport Image *CompareImages(Image *image,const Image *reconstruct_image,
 %
 */
 
-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 @@ static double GetSimilarityMetric(const Image *image,const Image *reference,
   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)
index f19777a8b747464b8c09a0ace95aa5cb559df1aa..71d970b3a9c2a0c227bc4b07c5311fa81c986edd 100644 (file)
        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)
index 5e05b42f25442249e074a55cbca0463fc54c9526..e5b18006a0e572662e3481c4df086ebf338d91ae 100644 (file)
@@ -363,21 +363,6 @@ MagickExport void Ascii85Encode(Image *image,const unsigned char code)
 %    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)
 {
index 3f1c55fa31630db496dd39647f40c67f7a76652c..9fdebf18c0c0e2a5a9c1a91d16f77e3baf8b15e2 100644 (file)
@@ -1802,20 +1802,6 @@ MagickExport MagickBooleanType RemoteDisplayCommand(const ImageInfo *image_info,
 %
 */
 
-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)
index 97c5f092dddac7b8ef2e84b3ed267f2a806df7a1..6f494a1e8d125df392b6cde39f7cbe48503fb582 100644 (file)
 /*
   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 */
index 3478c3669d3aeb85c507b0df92b1acd5875bf7f9..f2cb83524e378a10c30fac16488a990f4599a346 100644 (file)
@@ -1059,27 +1059,6 @@ static AffineMatrix InverseAffineMatrix(const AffineMatrix *affine)
   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)
 {
index f1f8cde807b2fc5e77cd08f4fd12b393d1a03ce4..bc06d88565ebf2ca569bbcfcb4cbc5269685dc9e 100644 (file)
@@ -1922,23 +1922,6 @@ MagickExport MagickBooleanType GammaImage(Image *image,const double gamma,
 %    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)
 {
index 44a1ffb1290b4d0668faebc004653708248fcd19..b8bb0145861cce80f06b8a14b7790bddc728bae8 100644 (file)
@@ -609,13 +609,6 @@ MagickExport Image *CannyEdgeImage(const Image *image,const double radius,
 %
 */
 
-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)
index 44c4e5e56bb4c39725cc65e726162dff840046ac..e5b5dfba6b4dcce9a3f11a95d4d2970a96b50a82 100644 (file)
@@ -1108,13 +1108,6 @@ MagickPrivate FxInfo *DestroyFxInfo(FxInfo *fx_info)
 %
 */
 
-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)
 {
index 15f40c0b05bbda8dd43c6384972461aa8ee15797..a1a0a61ba4a890dc7d7c10e9eccc601eeb3a4f75 100644 (file)
@@ -847,21 +847,6 @@ MagickPrivate void ConvertLCHuvToRGB(const double luma,const double chroma,
 %      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)
 {
index 41c9dcc44ef980624974d0297ddc98d6905a8354..8a854fc40ef55ed462baa031c3034a1f9f555276 100644 (file)
@@ -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
index 3de4b417e7235c08e5aa401408c131b5e2020d2a..c84097d92b160bc1598fcb01fb16e7eca9f6ce81 100644 (file)
@@ -285,20 +285,6 @@ static void GetMontageGeometry(char *geometry,const size_t number_images,
     *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
index 8018edff0f2a6c9f46d090c1d0e1d87ecf88d49e..195bb9ffbd9c13a72450b608c809f3ce3f14cd63 100644 (file)
 /*
   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)
 
index 28e8ae55be098918bcecac1b36cc0251b25795ae..81064df5ebef4bcb1823394be89531cd6732559d 100644 (file)
@@ -405,12 +405,6 @@ MagickExport MagickBooleanType FloodfillPaintImage(Image *image,
 %    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,
index 16dd9cec8b5de734b8dd0f19151cc5c747a55dd6..33f98f8698889174c5a56eb2c5be6dc129432319 100644 (file)
@@ -2217,23 +2217,6 @@ MagickExport void GetPixelInfo(const Image *image,PixelInfo *pixel)
 %    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)
 {
index 3724a12e8dc457473d3d004fbe9551b32a4f2c97..d79f7c3c85f34a2dda954ae8c93faeaa40964136 100644 (file)
@@ -487,20 +487,6 @@ static MagickBooleanType GetIPTCProperty(const Image *image,const char *key,
   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
index 5de7bcf22c05117aa6bdb4e9a5622e11e8503045..134e1e6e395f39f7a279fc145934993713b54e6e 100644 (file)
@@ -1926,20 +1926,6 @@ static MagickBooleanType RiemersmaDither(Image *image,CacheView *image_view,
   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)
 {
index efa0d1233a984427802b23c15b2f1ba379e0b736..6aa1c5f32b6bcce41b64305cfac3af99c1910a3b 100644 (file)
@@ -2383,20 +2383,6 @@ static ContributionInfo **AcquireContributionThreadSet(const size_t count)
   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)
index 3489ee36039c685b319fa051bcf0b10aa7112127..4f267dce5eb8be040d05b96624a9d6f8337b435b 100644 (file)
@@ -696,28 +696,6 @@ static MagickBooleanType Classify(Image *image,short **extrema,
 %      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)
 {
index d01a4dc464bf4e1ad7b88be8b30adce5e5b88080..e9b103712cbfd03f040ac4d3d9d7ce94c45f7f8f 100644 (file)
@@ -225,13 +225,6 @@ static int IntensityCompare(const void *x,const void *y)
 }
 #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 @@ static inline void InsertPixelList(const Quantum pixel,PixelList *pixel_list)
   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
index b41f8374db792f7acb52fb2678cd75894f426e39..8274f1e1a7be376f31320b2a05b1cb7b539c1011 100644 (file)
@@ -1144,22 +1144,6 @@ MagickPrivate void XBestPixel(Display *display,const Colormap colormap,
 %    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)
 {
index b110bfb39b443e50bff88e6ecd780e1f42261595..820d38d23535028686507d0d532359b46276e1cb 100644 (file)
@@ -381,13 +381,6 @@ static inline MagickBooleanType IsPathWritable(const char *path)
   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))
index 25ef657d98859332ee13a34a587065a4e84c7852..1218d89217c2c4557087c5976005121e09592793 100644 (file)
@@ -185,28 +185,6 @@ static MagickBooleanType
 %      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)
 {
index e90f7fae1659d95528a7a6b9060b1810b7de043f..86a3427a065304f12cdc5d85de56e282873cc0c2 100644 (file)
@@ -159,14 +159,6 @@ ModuleExport void UnregisterCIPImage(void)
 %    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)
 {
index 12a4c2e556caf50ca64a35673bbb1c99912e6c82..12d45d2fc10e62d48c2ef0ed2c938edca1426cb2 100644 (file)
@@ -2675,21 +2675,6 @@ static MagickBooleanType IsDCM(const unsigned char *magick,const size_t length)
 %    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
index 17df06a59c21209975581b663d8946b87390f795..9d735a47626aa39ed0e6985bbb8ff94e4815ef12 100644 (file)
@@ -143,14 +143,6 @@ static MagickBooleanType
 %      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 @@ static MagickBooleanType IsDIB(const unsigned char *magick,const size_t length)
 %    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
index ab26ea9d4eaab059ed4142bead7308e36d2ae312..df06bf3adcb8e62e6fc2c6c2959c9575ae6dd91a 100644 (file)
@@ -917,21 +917,6 @@ static ssize_t ReadBlobBlock(Image *image,unsigned char *data)
 %    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
index a91811bd34ef3680c381a8eb789c222caa80bb2a..479b28cb900f0924c26627bf21a2bf415180496b 100644 (file)
@@ -171,14 +171,6 @@ ModuleExport void UnregisterHISTOGRAMImage(void)
 %    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)
 {
index b9d3c765b08f0b05198ceed9164688641e3fa11d..3a51ecae8ddac7babfbe7e4d64a69f4703a3f2ca 100644 (file)
 %    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)
 {
index b445ff45221a50ae3a4864568a9423744db3320c..21688e6b5299d8471f17021f62284077a7a24f69 100644 (file)
@@ -1878,13 +1878,6 @@ static void InitializeDestination(j_compress_ptr cinfo)
   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
index 1bb112fe74e0d4bdde199812130ea7f3d1b9295b..9dd6f4fe3bf7c673fce1c5dbef10733230178b6c 100644 (file)
@@ -594,14 +594,6 @@ UnlinkFile:
 %    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,
index 89a5f0171dacf5e35e4ba0c64e7c5598c70babf6..652392c80d6ec4c65d4ff37ae4be939906165b0a 100644 (file)
@@ -185,20 +185,6 @@ static voidpf AcquireZIPMemory(voidpf context,unsigned int items,
 }
 #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)
 {
index 18aa4b99ee6a0b8981b7b4735c68d8c0efdc3582..b464fa94b9cf192da54bd032128f37b3fd0a6d35 100644 (file)
@@ -366,21 +366,6 @@ ModuleExport void UnregisterMPEGImage(void)
 %    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)
 {
index 9396ee5a2b552dd8bba7ecc1b6ba45a3f797706a..b0d15c352bbf5bc609141d93b6d038bae2f2bac9 100644 (file)
@@ -229,21 +229,6 @@ static ssize_t FindColor(PixelInfo *packet)
 %    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)
 {
index a1b9d942808c92731d92d4fdcb23e5ef4498f767..1586f2975e5c453159f276eb49490c3e6b4ebd9b 100644 (file)
@@ -385,14 +385,6 @@ static MagickBooleanType IsPCD(const unsigned char *magick,const size_t length)
 %    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)
 {
index 60b696d518876fb7510c2ca862bb9d27fc622eac..57fcb1758e01b5dfc6cab5b5057bc0aa8eb5d4a0 100644 (file)
@@ -197,28 +197,6 @@ static MagickBooleanType IsPCX(const unsigned char *magick,const size_t length)
 %    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) \
index 13b8978286040d0179bed5f03fc9bfa61be8353b..1645a39540ef5601304b4a67f3460ff92f02a7e4 100644 (file)
@@ -952,20 +952,6 @@ ModuleExport void UnregisterPDFImage(void)
 %
 */
 
-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
index 175e503bacbff8a3757dd2f86be828b8cd27a9c6..38417d1290d9b51052ee07783dc096481edee4c7 100644 (file)
@@ -778,14 +778,6 @@ static MagickBooleanType IsPICT(const unsigned char *magick,const size_t length)
 %
 */
 
-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);
index 7314b2fdffb5cff27f59861ec0f5de7e3211ea22..469071be4d5c290cce690eecd7b1e00aeebbae50 100644 (file)
 %
 */
 
-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)
 {
index 145dd9405f50b4818ed944bcd13d2ec55b3ad470..9decb30ee181d666191bfbf7aa9134d4a3293f83 100644 (file)
@@ -1038,14 +1038,6 @@ Magick_RenderingIntentString_from_PNG_RenderingIntent(const int ping_intent)
     }
 }
 
-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 @@ Magick_ColorType_from_PNG_ColorType(const int ping_colortype)
     }
 }
 
-
-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 */
 \f
index b11d785eb5764af025bd778d6044ae31e45df415..f9ebfee74f95a389d246e511e7a9420185224e76 100644 (file)
@@ -1143,13 +1143,6 @@ ModuleExport void UnregisterPSImage(void)
 %
 */
 
-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)
 {
index a4d7d455f3fb4fb0005ba40f60400037fd4629b6..4a34344f441944dc6f2e40ebfa23dcd0ad0976cc 100644 (file)
@@ -500,13 +500,6 @@ static inline size_t GetPSDRowSize(Image *image)
     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)
index d4f90fa65f965d08ba19902729acdc130eacd5bc..dd77e43c94bf0043c7484d609f5325266f02e663 100644 (file)
@@ -124,14 +124,6 @@ static MagickBooleanType IsRLE(const unsigned char *magick,const size_t length)
 %
 %
 */
-
-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
index d9d0f8a2175abcb6b7ca197ecdfd7b593b1b5203..97fe91479eb49aee97a2f933b083a2b314b23e5f 100644 (file)
@@ -164,13 +164,6 @@ static MagickBooleanType IsSGI(const unsigned char *magick,const size_t length)
 %
 */
 
-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)
index 823d2ae09655d99f673527243c143a018a2187a3..26c2aff0953d4b0f43d2d6c8bf46e618aa70b5fd 100644 (file)
 %    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)
 {
index 03d2a23322acd5699dafa509b022cc478e65322c..8b614791dc5a33ed1fd6aeddf8ed57e69b7ef17b 100644 (file)
@@ -654,14 +654,6 @@ ModuleExport void UnregisterTGAImage(void)
 %    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)
 {
index 028e12deb53a3016fea454f135af40f546863b38..ec27e9d158a4202a8c15a0a067a867dd47508d58 100644 (file)
@@ -499,20 +499,6 @@ static MagickBooleanType DecodeLabImage(Image *image,ExceptionInfo *exception)
   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 @@ RestoreMSCWarning
         samples_per_pixel);
     if (compress_tag == COMPRESSION_JBIG)
       method=ReadStripMethod;
-    if ((photometric != PHOTOMETRIC_SEPARATED) &&
-
     if (TIFFIsTiled(tiff) != MagickFalse)
       method=ReadTileMethod;
     quantum_info->endian=LSBEndian;
index 85d93e3aadd60a49daa29687c2c77c5d29b4eb64..74329a095373eccc249052a4e5992f8802929eb9 100644 (file)
@@ -841,14 +841,6 @@ ModuleExport void UnregisterVIFFImage(void)
 %    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)
 {
index b27d55fd875692695f0cbc28538bbb7b371dfd55..577bdcd28f5963c1e019615e62302bc1638c1601 100644 (file)
@@ -287,13 +287,6 @@ static CompositeOperator GIMPBlendModeToCompositeOperator(
 %
 */
 
-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)
 {
index f2e8e36f28aceebdefd05968ab7675ed1ed498c8..10d5337afbd92385011bb84bb346a17573d45947 100644 (file)
@@ -172,13 +172,6 @@ static char *NextXPMLine(char *p)
   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