Implemented TIFFhowmany8() macro.
This commit is contained in:
parent
18b1c312f7
commit
94d3ece8d8
@ -1,4 +1,4 @@
|
||||
/* $Id: tiffiop.h,v 1.25 2004-09-14 07:01:49 dron Exp $ */
|
||||
/* $Id: tiffiop.h,v 1.26 2004-09-22 13:48:20 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -206,9 +206,9 @@ struct tiff {
|
||||
(TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size)
|
||||
#endif
|
||||
|
||||
/* NB: the uint32 casts are to silence certain ANSI-C compilers */
|
||||
#define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y)))
|
||||
#define TIFFroundup(x, y) (TIFFhowmany(x,y)*((uint32)(y)))
|
||||
#define TIFFhowmany(x, y) (((x)+((y)-1))/(y))
|
||||
#define TIFFhowmany8(x) (((x)&0x07)?((x)>>3)+1:(x)>>3)
|
||||
#define TIFFroundup(x, y) (TIFFhowmany(x,y)*(y))
|
||||
|
||||
#define TIFFmax(A,B) ((A)>(B)?(A):(B))
|
||||
#define TIFFmin(A,B) ((A)<(B)?(A):(B))
|
||||
|
Loading…
Reference in New Issue
Block a user