#ifndef _TIFFIOP_
#define _TIFFIOP_
#include "tiffconf.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
#include <string.h>
#ifdef HAVE_ASSERT_H
#include <assert.h>
#else
#define assert …
#endif
#include "tif_hash_set.h"
#include "tiffio.h"
#include "tif_dir.h"
#include <limits.h>
#ifndef STRIP_SIZE_DEFAULT
#define STRIP_SIZE_DEFAULT …
#endif
#ifndef TIFF_MAX_DIR_COUNT
#define TIFF_MAX_DIR_COUNT …
#endif
#define TIFF_NON_EXISTENT_DIR_NUMBER …
#define streq(a, b) …
#define strneq(a, b, n) …
#ifndef TRUE
#define TRUE …
#define FALSE …
#endif
TIFFClientInfoLink;
tidataval_t;
tidata_t;
TIFFVoidMethod;
TIFFBoolMethod;
TIFFPreMethod;
TIFFCodeMethod;
TIFFSeekMethod;
TIFFPostMethod;
TIFFStripMethod;
TIFFTileMethod;
struct TIFFOffsetAndDirNumber
{ … };
TIFFOffsetAndDirNumber;
struct tiff
{ … };
struct TIFFOpenOptions
{ … };
#define isPseudoTag(t) …
#define isTiled(tif) …
#define isMapped(tif) …
#define isFillOrder(tif, o) …
#define isUpSampled(tif) …
#define TIFFReadFile(tif, buf, size) …
#define TIFFWriteFile(tif, buf, size) …
#define TIFFSeekFile(tif, off, whence) …
#define TIFFCloseFile(tif) …
#define TIFFGetFileSize(tif) …
#define TIFFMapFileContents(tif, paddr, psize) …
#define TIFFUnmapFileContents(tif, addr, size) …
#ifndef ReadOK
#define ReadOK(tif, buf, size) …
#endif
#ifndef SeekOK
#define SeekOK(tif, off) …
#endif
#ifndef WriteOK
#define WriteOK(tif, buf, size) …
#endif
#define TIFFhowmany_32(x, y) …
#define TIFFhowmany_32_maxuint_compat(x, y) …
#define TIFFhowmany8_32(x) …
#define TIFFroundup_32(x, y) …
#define TIFFhowmany_64(x, y) …
#define TIFFhowmany8_64(x) …
#define TIFFroundup_64(x, y) …
#define TIFFSafeMultiply(t, v, m) …
#define TIFFmax(A, B) …
#define TIFFmin(A, B) …
#define TIFFArrayCount(a) …
#if defined(HAVE_FSEEKO)
#if defined(HAVE_FSEEKO)
#define fseek …
#define ftell …
#endif
#endif
#if defined(__WIN32__) && !(defined(_MSC_VER) && _MSC_VER < 1400) && \
!(defined(__MSVCRT_VERSION__) && __MSVCRT_VERSION__ < 0x800)
typedef unsigned int TIFFIOSize_t;
#define _TIFF_lseek_f …
#define _TIFF_fseek_f …
#define _TIFF_fstat_f …
#define _TIFF_stat_s …
#define _TIFF_off_t …
#else
TIFFIOSize_t;
#define _TIFF_lseek_f(fildes, offset, whence) …
#define _TIFF_fseek_f(stream, offset, whence) …
#define _TIFF_fstat_f(fildes, stat_buff) …
#define _TIFF_stat_s …
#define _TIFF_off_t …
#endif
#if defined(__has_attribute) && defined(__clang__)
#if __has_attribute(no_sanitize)
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW …
#else
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
#endif
#else
#define TIFF_NOSANITIZE_UNSIGNED_INT_OVERFLOW
#endif
#if defined(__cplusplus)
extern "C"
{
#endif
extern int _TIFFgetMode(TIFFOpenOptions *opts, thandle_t clientdata,
const char *mode, const char *module);
extern int _TIFFNoRowEncode(TIFF *tif, uint8_t *pp, tmsize_t cc,
uint16_t s);
extern int _TIFFNoStripEncode(TIFF *tif, uint8_t *pp, tmsize_t cc,
uint16_t s);
extern int _TIFFNoTileEncode(TIFF *, uint8_t *pp, tmsize_t cc, uint16_t s);
extern int _TIFFNoRowDecode(TIFF *tif, uint8_t *pp, tmsize_t cc,
uint16_t s);
extern int _TIFFNoStripDecode(TIFF *tif, uint8_t *pp, tmsize_t cc,
uint16_t s);
extern int _TIFFNoTileDecode(TIFF *, uint8_t *pp, tmsize_t cc, uint16_t s);
extern void _TIFFNoPostDecode(TIFF *tif, uint8_t *buf, tmsize_t cc);
extern int _TIFFNoPreCode(TIFF *tif, uint16_t s);
extern int _TIFFNoSeek(TIFF *tif, uint32_t off);
extern void _TIFFSwab16BitData(TIFF *tif, uint8_t *buf, tmsize_t cc);
extern void _TIFFSwab24BitData(TIFF *tif, uint8_t *buf, tmsize_t cc);
extern void _TIFFSwab32BitData(TIFF *tif, uint8_t *buf, tmsize_t cc);
extern void _TIFFSwab64BitData(TIFF *tif, uint8_t *buf, tmsize_t cc);
extern int TIFFFlushData1(TIFF *tif);
extern int TIFFDefaultDirectory(TIFF *tif);
extern void _TIFFSetDefaultCompressionState(TIFF *tif);
extern int _TIFFRewriteField(TIFF *, uint16_t, TIFFDataType, tmsize_t,
void *);
extern int TIFFSetCompressionScheme(TIFF *tif, int scheme);
extern int TIFFSetDefaultCompressionState(TIFF *tif);
extern uint32_t _TIFFDefaultStripSize(TIFF *tif, uint32_t s);
extern void _TIFFDefaultTileSize(TIFF *tif, uint32_t *tw, uint32_t *th);
extern void _TIFFsetByteArray(void **, const void *, uint32_t);
extern void _TIFFsetByteArrayExt(TIFF *, void **, const void *, uint32_t);
extern void _TIFFsetShortArray(uint16_t **, const uint16_t *, uint32_t);
extern void _TIFFsetShortArrayExt(TIFF *, uint16_t **, const uint16_t *,
uint32_t);
extern void _TIFFsetLongArray(uint32_t **, const uint32_t *, uint32_t);
extern void _TIFFsetLongArrayExt(TIFF *, uint32_t **, const uint32_t *,
uint32_t);
extern void _TIFFsetFloatArray(float **, const float *, uint32_t);
extern void _TIFFsetFloatArrayExt(TIFF *, float **, const float *,
uint32_t);
extern void _TIFFsetDoubleArray(double **, const double *, uint32_t);
extern void _TIFFsetDoubleArrayExt(TIFF *, double **, const double *,
uint32_t);
extern void _TIFFprintAscii(FILE *, const char *);
extern void _TIFFprintAsciiTag(FILE *, const char *, const char *);
extern TIFFErrorHandler _TIFFwarningHandler;
extern TIFFErrorHandler _TIFFerrorHandler;
extern TIFFErrorHandlerExt _TIFFwarningHandlerExt;
extern TIFFErrorHandlerExt _TIFFerrorHandlerExt;
void _TIFFErrorEarly(TIFFOpenOptions *opts, thandle_t clientdata,
const char *module, const char *fmt, ...)
TIFF_ATTRIBUTE((__format__(__printf__, 4, 5)));
extern uint32_t _TIFFMultiply32(TIFF *, uint32_t, uint32_t, const char *);
extern uint64_t _TIFFMultiply64(TIFF *, uint64_t, uint64_t, const char *);
extern tmsize_t _TIFFMultiplySSize(TIFF *, tmsize_t, tmsize_t,
const char *);
extern tmsize_t _TIFFCastUInt64ToSSize(TIFF *, uint64_t, const char *);
extern void *_TIFFCheckMalloc(TIFF *, tmsize_t, tmsize_t, const char *);
extern void *_TIFFCheckRealloc(TIFF *, void *, tmsize_t, tmsize_t,
const char *);
extern double _TIFFUInt64ToDouble(uint64_t);
extern float _TIFFUInt64ToFloat(uint64_t);
extern float _TIFFClampDoubleToFloat(double);
extern uint32_t _TIFFClampDoubleToUInt32(double);
extern void _TIFFCleanupIFDOffsetAndNumberMaps(TIFF *tif);
extern tmsize_t _TIFFReadEncodedStripAndAllocBuffer(TIFF *tif,
uint32_t strip,
void **buf,
tmsize_t bufsizetoalloc,
tmsize_t size_to_read);
extern tmsize_t _TIFFReadEncodedTileAndAllocBuffer(TIFF *tif, uint32_t tile,
void **buf,
tmsize_t bufsizetoalloc,
tmsize_t size_to_read);
extern tmsize_t _TIFFReadTileAndAllocBuffer(TIFF *tif, void **buf,
tmsize_t bufsizetoalloc,
uint32_t x, uint32_t y,
uint32_t z, uint16_t s);
extern int _TIFFSeekOK(TIFF *tif, toff_t off);
extern int TIFFInitDumpMode(TIFF *, int);
#ifdef PACKBITS_SUPPORT
extern int TIFFInitPackBits(TIFF *, int);
#endif
#ifdef CCITT_SUPPORT
extern int TIFFInitCCITTRLE(TIFF *, int), TIFFInitCCITTRLEW(TIFF *, int);
extern int TIFFInitCCITTFax3(TIFF *, int), TIFFInitCCITTFax4(TIFF *, int);
#endif
#ifdef THUNDER_SUPPORT
extern int TIFFInitThunderScan(TIFF *, int);
#endif
#ifdef NEXT_SUPPORT
extern int TIFFInitNeXT(TIFF *, int);
#endif
#ifdef LZW_SUPPORT
extern int TIFFInitLZW(TIFF *, int);
#endif
#ifdef OJPEG_SUPPORT
extern int TIFFInitOJPEG(TIFF *, int);
#endif
#ifdef JPEG_SUPPORT
extern int TIFFInitJPEG(TIFF *, int);
extern int TIFFJPEGIsFullStripRequired(TIFF *);
#endif
#ifdef JBIG_SUPPORT
extern int TIFFInitJBIG(TIFF *, int);
#endif
#ifdef ZIP_SUPPORT
extern int TIFFInitZIP(TIFF *, int);
#endif
#ifdef PIXARLOG_SUPPORT
extern int TIFFInitPixarLog(TIFF *, int);
#endif
#ifdef LOGLUV_SUPPORT
extern int TIFFInitSGILog(TIFF *, int);
#endif
#ifdef LERC_SUPPORT
extern int TIFFInitLERC(TIFF *tif, int);
#endif
#ifdef LZMA_SUPPORT
extern int TIFFInitLZMA(TIFF *, int);
#endif
#ifdef ZSTD_SUPPORT
extern int TIFFInitZSTD(TIFF *, int);
#endif
#ifdef WEBP_SUPPORT
extern int TIFFInitWebP(TIFF *, int);
#endif
extern const TIFFCodec _TIFFBuiltinCODECS[];
extern void TIFFCIELab16ToXYZ(TIFFCIELabToRGB *, uint32_t l, int32_t a,
int32_t b, float *, float *, float *);
extern void *_TIFFmallocExt(TIFF *tif, tmsize_t s);
extern void *_TIFFcallocExt(TIFF *tif, tmsize_t nmemb, tmsize_t siz);
extern void *_TIFFreallocExt(TIFF *tif, void *p, tmsize_t s);
extern void _TIFFfreeExt(TIFF *tif, void *p);
#if defined(__cplusplus)
}
#endif
#endif