diff --git a/libtiff/tiffiop.h b/libtiff/tiffiop.h index 3f2df726..f343991d 100644 --- a/libtiff/tiffiop.h +++ b/libtiff/tiffiop.h @@ -1,4 +1,4 @@ -/* $Id: tiffiop.h,v 1.48 2006-06-08 14:27:17 dron Exp $ */ +/* $Id: tiffiop.h,v 1.49 2006-07-28 09:50:14 dron Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -97,25 +97,26 @@ struct tiff { int tif_fd; /* open file descriptor */ int tif_mode; /* open mode (O_*) */ uint32 tif_flags; -#define TIFF_FILLORDER 0x0003 /* natural bit fill order for machine */ -#define TIFF_DIRTYHEADER 0x0004 /* header must be written on close */ -#define TIFF_DIRTYDIRECT 0x0008 /* current directory must be written */ -#define TIFF_BUFFERSETUP 0x0010 /* data buffers setup */ -#define TIFF_CODERSETUP 0x0020 /* encoder/decoder setup done */ -#define TIFF_BEENWRITING 0x0040 /* written 1+ scanlines to file */ -#define TIFF_SWAB 0x0080 /* byte swap file information */ -#define TIFF_NOBITREV 0x0100 /* inhibit bit reversal logic */ -#define TIFF_MYBUFFER 0x0200 /* my raw data buffer; free on close */ -#define TIFF_ISTILED 0x0400 /* file is tile, not strip- based */ -#define TIFF_MAPPED 0x0800 /* file is mapped into memory */ -#define TIFF_POSTENCODE 0x1000 /* need call to postencode routine */ -#define TIFF_INSUBIFD 0x2000 /* currently writing a subifd */ -#define TIFF_UPSAMPLED 0x4000 /* library is doing data up-sampling */ -#define TIFF_STRIPCHOP 0x8000 /* enable strip chopping support */ +#define TIFF_FILLORDER 0x00003 /* natural bit fill order for machine */ +#define TIFF_DIRTYHEADER 0x00004 /* header must be written on close */ +#define TIFF_DIRTYDIRECT 0x00008 /* current directory must be written */ +#define TIFF_BUFFERSETUP 0x00010 /* data buffers setup */ +#define TIFF_CODERSETUP 0x00020 /* encoder/decoder setup done */ +#define TIFF_BEENWRITING 0x00040 /* written 1+ scanlines to file */ +#define TIFF_SWAB 0x00080 /* byte swap file information */ +#define TIFF_NOBITREV 0x00100 /* inhibit bit reversal logic */ +#define TIFF_MYBUFFER 0x00200 /* my raw data buffer; free on close */ +#define TIFF_ISTILED 0x00400 /* file is tile, not strip- based */ +#define TIFF_MAPPED 0x00800 /* file is mapped into memory */ +#define TIFF_POSTENCODE 0x01000 /* need call to postencode routine */ +#define TIFF_INSUBIFD 0x02000 /* currently writing a subifd */ +#define TIFF_UPSAMPLED 0x04000 /* library is doing data up-sampling */ +#define TIFF_STRIPCHOP 0x08000 /* enable strip chopping support */ #define TIFF_HEADERONLY 0x10000 /* read header only, do not process */ /* the first directory */ #define TIFF_NOREADRAW 0x20000 /* skip reading of raw uncompressed */ /* image data */ +#define TIFF_INCUSTOMIFD 0x40000 /* currently writing a custom IFD */ toff_t tif_diroff; /* file offset of current directory */ toff_t tif_nextdiroff; /* file offset of following directory */ toff_t* tif_dirlist; /* list of offsets to already seen */ @@ -123,6 +124,8 @@ struct tiff { tsize_t tif_dirlistsize;/* number of entires in offset list */ uint16 tif_dirnumber; /* number of already seen directories */ TIFFDirectory tif_dir; /* internal rep of current directory */ + TIFFDirectory tif_customdir; /* custom IFDs are separated from + the main ones */ TIFFHeader tif_header; /* file's header block */ const int* tif_typeshift; /* data type shift counts */ const long* tif_typemask; /* data type masks */ @@ -226,7 +229,7 @@ struct tiff { /* NB: the uint32 casts are to silence certain ANSI-C compilers */ #define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) -#define TIFFhowmany8(x) (((x)&0x07)?((uint32)(x)>>3)+1:(uint32)(x)>>3) +#define TIFFhowmany8(x) (((x)&0x07) ? 1 : (uint32)(x)>>3) #define TIFFroundup(x, y) (TIFFhowmany(x,y)*(y)) #define TIFFmax(A,B) ((A)>(B)?(A):(B))