From 8d7c269d96748c018c5e938641275dba1107c2cf Mon Sep 17 00:00:00 2001 From: Andrey Kiselev Date: Sun, 9 Nov 2003 10:19:06 +0000 Subject: [PATCH] New macros: TIFFmax, TIFFmin and TIFFrint. --- libtiff/tiffiop.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h index e3e8da19..171d6262 100644 --- a/libtiff/tiffiop.h +++ b/libtiff/tiffiop.h @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tiffiop.h,v 1.7 2003-09-25 08:36:21 dron Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tiffiop.h,v 1.8 2003-11-09 10:19:06 dron Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -201,6 +201,10 @@ struct tiff { #define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) #define TIFFroundup(x, y) (TIFFhowmany(x,y)*((uint32)(y))) +#define TIFFmax(A,B) ((A)>(B)?(A):(B)) +#define TIFFmin(A,B) ((A)<(B)?(A):(B)) +#define TIFFrint( R ) ((int)((R)>0?((R)+0.5):((R)-0.5))) + #if defined(__cplusplus) extern "C" { #endif