29#ifdef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS
30#undef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS
116 int warn_about_unknown_tags)
123 void *errorhandler_user_data)
131 void *warnhandler_user_data)
138 const char *pszFunction,
142 "Memory allocation of %" PRIu64
143 " bytes is beyond the %" PRIu64
144 " byte limit defined in open options",
149 const char *pszFunction,
154 " bytes is beyond the %" PRIu64
155 " cumulated byte limit defined in open options",
170#define LEADING_AREA_TO_STORE_ALLOC_SIZE (2 * SIZEOF_SIZE_T)
250 memcpy(&oldSize, oldPtr,
sizeof(oldSize));
251 assert(oldSize <= tif->tif_cur_cumulated_mem_alloc);
281 memcpy(&oldSize, oldPtr,
sizeof(oldSize));
282 assert(oldSize <= tif->tif_cur_cumulated_mem_alloc);
296 seekproc, closeproc, sizeproc, mapproc, unmapproc,
307 static const char module[] =
"TIFFClientOpenExt";
333#ifdef WORDS_BIGENDIAN
348 "%s: Memory allocation of %" PRIu64
349 " bytes is beyond the %" PRIu64
350 " byte limit defined in open options",
359 "%s: Memory allocation of %" PRIu64
360 " bytes is beyond the %" PRIu64
361 " cumulated byte limit defined in open options",
370 "%s: Out of memory (TIFF structure)",
name);
401 if (!
readproc || !writeproc || !seekproc || !closeproc || !sizeproc)
404 "One of the client procedures is NULL pointer.");
419#ifdef STRIPCHOP_DEFAULT
483#ifndef WORDS_BIGENDIAN
489#ifdef WORDS_BIGENDIAN
504 "H(ost) mode is deprecated. Since "
505 "libtiff 4.5.1, it is an alias of 'B' / "
506 "FILLORDER_MSB2LSB.");
543#ifdef DEFER_STRILE_LOAD
564#ifdef WORDS_BIGENDIAN
607 if (!
WriteOK(tif, &tif_header_swapped,
642 "Not a TIFF or MDI file, bad magic number %" PRIu16
648 "Not a TIFF file, bad magic number %" PRIu16
657#ifndef WORDS_BIGENDIAN
663#ifdef WORDS_BIGENDIAN
673 "Not a TIFF file, bad version number %" PRIu16
702 "Not a TIFF file, bad BigTIFF offsetsize %" PRIu16
711 "Not a TIFF file, bad BigTIFF unused %" PRIu16
805 const char *old_name = tif->
tif_name;
UINT(* handler)(MSIPACKAGE *)
_ACRTIMP size_t __cdecl strlen(const char *)
#define memcpy(s1, s2, n)
static BOOL readproc(HANDLE proc, LPVOID address, PVOID target, DWORD size)
_Must_inspect_result_ _Out_ LPSIZE psize
void * errorhandler_user_data
tmsize_t max_cumulated_mem_alloc
TIFFErrorHandlerExtR errorhandler
int warn_about_unknown_tags
TIFFErrorHandlerExtR warnhandler
void * warnhandler_user_data
tmsize_t max_single_mem_alloc
TIFFReadWriteProc tif_readproc
int tif_warn_about_unknown_tags
TIFFReadWriteProc tif_writeproc
tmsize_t tif_max_single_mem_alloc
TIFFUnmapFileProc tif_unmapproc
TIFFSeekProc tif_seekproc
int tif_setdirectory_force_absolute
TIFFErrorHandlerExtR tif_errorhandler
tmsize_t tif_rawdataloaded
void * tif_errorhandler_user_data
TIFFCloseProc tif_closeproc
TIFFErrorHandlerExtR tif_warnhandler
tmsize_t tif_cur_cumulated_mem_alloc
void * tif_warnhandler_user_data
TIFFMapFileProc tif_mapproc
TIFFHeaderUnion tif_header
tmsize_t tif_max_cumulated_mem_alloc
TIFFSizeProc tif_sizeproc
void TIFFCleanup(TIFF *tif)
void _TIFFSetDefaultCompressionState(TIFF *tif)
int TIFFDefaultDirectory(TIFF *tif)
int TIFFReadDirectory(TIFF *tif)
void _TIFFErrorEarly(TIFFOpenOptions *opts, thandle_t clientdata, const char *module, const char *fmt,...)
void TIFFErrorExtR(TIFF *tif, const char *module, const char *fmt,...)
void TIFFOpenOptionsSetWarningHandlerExtR(TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *warnhandler_user_data)
void _TIFFfreeExt(TIFF *tif, void *p)
int TIFFGetMode(TIFF *tif)
int TIFFFileno(TIFF *tif)
TIFF * TIFFClientOpenExt(const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc, TIFFOpenOptions *opts)
TIFF * TIFFClientOpen(const char *name, const char *mode, thandle_t clientdata, TIFFReadWriteProc readproc, TIFFReadWriteProc writeproc, TIFFSeekProc seekproc, TIFFCloseProc closeproc, TIFFSizeProc sizeproc, TIFFMapFileProc mapproc, TIFFUnmapFileProc unmapproc)
TIFFReadWriteProc TIFFGetReadProc(TIFF *tif)
void TIFFOpenOptionsSetErrorHandlerExtR(TIFFOpenOptions *opts, TIFFErrorHandlerExtR handler, void *errorhandler_user_data)
int TIFFSetFileno(TIFF *tif, int fd)
TIFFCloseProc TIFFGetCloseProc(TIFF *tif)
static void _TIFFEmitErrorAboveMaxCumulatedMemAlloc(TIFF *tif, const char *pszFunction, tmsize_t s)
const char * TIFFFileName(TIFF *tif)
TIFFSizeProc TIFFGetSizeProc(TIFF *tif)
TIFFOpenOptions * TIFFOpenOptionsAlloc()
int TIFFSetMode(TIFF *tif, int mode)
tdir_t TIFFCurrentDirectory(TIFF *tif)
int _tiffDummyMapProc(thandle_t fd, void **pbase, toff_t *psize)
int TIFFIsMSB2LSB(TIFF *tif)
int TIFFIsByteSwapped(TIFF *tif)
uint32_t TIFFCurrentTile(TIFF *tif)
void * _TIFFreallocExt(TIFF *tif, void *p, tmsize_t s)
TIFFMapFileProc TIFFGetMapFileProc(TIFF *tif)
void TIFFOpenOptionsSetMaxCumulatedMemAlloc(TIFFOpenOptions *opts, tmsize_t max_cumulated_mem_alloc)
int TIFFIsTiled(TIFF *tif)
const char * TIFFSetFileName(TIFF *tif, const char *name)
void TIFFOpenOptionsSetWarnAboutUnknownTags(TIFFOpenOptions *opts, int warn_about_unknown_tags)
int _TIFFgetMode(TIFFOpenOptions *opts, thandle_t clientdata, const char *mode, const char *module)
uint32_t TIFFCurrentRow(TIFF *tif)
TIFFSeekProc TIFFGetSeekProc(TIFF *tif)
void * _TIFFmallocExt(TIFF *tif, tmsize_t s)
int TIFFIsBigTIFF(TIFF *tif)
thandle_t TIFFSetClientdata(TIFF *tif, thandle_t newvalue)
TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF *tif)
void * _TIFFcallocExt(TIFF *tif, tmsize_t nmemb, tmsize_t siz)
int TIFFIsBigEndian(TIFF *tif)
int TIFFIsUpSampled(TIFF *tif)
static void _TIFFEmitErrorAboveMaxSingleMemAlloc(TIFF *tif, const char *pszFunction, tmsize_t s)
TIFFReadWriteProc TIFFGetWriteProc(TIFF *tif)
void TIFFOpenOptionsSetMaxSingleMemAlloc(TIFFOpenOptions *opts, tmsize_t max_single_mem_alloc)
void _tiffDummyUnmapProc(thandle_t fd, void *base, toff_t size)
thandle_t TIFFClientdata(TIFF *tif)
uint32_t TIFFCurrentStrip(TIFF *tif)
#define LEADING_AREA_TO_STORE_ALLOC_SIZE
void TIFFOpenOptionsFree(TIFFOpenOptions *opts)
void TIFFSwabLong8(uint64_t *lp)
void TIFFSwabShort(uint16_t *wp)
void TIFFSwabLong(uint32_t *lp)
void * _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)
void _TIFFmemset(void *p, int v, tmsize_t c)
void * _TIFFmalloc(tmsize_t s)
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
void * _TIFFrealloc(void *p, tmsize_t s)
void TIFFWarningExtR(TIFF *tif, const char *module, const char *fmt,...)
#define FILLORDER_LSB2MSB
#define TIFF_LITTLEENDIAN
#define FILLORDER_MSB2LSB
#define TIFF_VERSION_CLASSIC
#define STRIPCHOP_DEFAULT
int(* TIFFMapFileProc)(thandle_t, void **base, toff_t *size)
int(* TIFFErrorHandlerExtR)(TIFF *, void *user_data, const char *, const char *, va_list)
void(* TIFFUnmapFileProc)(thandle_t, void *base, toff_t size)
#define TIFF_TMSIZE_T_MAX
toff_t(* TIFFSizeProc)(thandle_t)
tmsize_t(* TIFFReadWriteProc)(thandle_t, void *, tmsize_t)
toff_t(* TIFFSeekProc)(thandle_t, toff_t, int)
int(* TIFFCloseProc)(thandle_t)
#define TIFF_NON_EXISTENT_DIR_NUMBER
#define TIFF_LAZYSTRILELOAD
#define WriteOK(tif, buf, size)
#define ReadOK(tif, buf, size)
#define TIFFMapFileContents(tif, paddr, psize)
#define TIFF_DEFERSTRILELOAD
#define isFillOrder(tif, o)
#define TIFFSeekFile(tif, off, whence)