30#ifdef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS
31#undef TIFF_DO_NOT_USE_NON_EXT_ALLOC_FUNCTIONS
36#ifdef HAVE_SYS_TYPES_H
60#define TIFF_IO_MAX 2147483647U
80 for (bytes_read = 0; bytes_read < bytes_total; bytes_read +=
count)
82 char *buf_offset = (
char *)
buf + bytes_read;
83 size_t io_size = bytes_total - bytes_read;
103 size_t bytes_written;
111 for (bytes_written = 0; bytes_written < bytes_total; bytes_written +=
count)
113 const char *buf_offset = (
char *)
buf + bytes_written;
114 size_t io_size = bytes_total - bytes_written;
169 if (size64 && (
uint64_t)sizem == size64)
174 (
void *)mmap(0, (
size_t)sizem, PROT_READ, MAP_SHARED, fdh.
fd, 0);
175 if (*pbase != (
void *)-1)
239 static const char module[] =
"TIFFOpen";
284 static const char module[] =
"TIFFOpenW";
315 "Can't allocate space for filename conversion buffer");
336 return ((
void *)
NULL);
343 if (nmemb == 0 || siz == 0)
344 return ((
void *)
NULL);
346 return calloc((
size_t)nmemb, (
size_t)siz);
362 return (
memcmp(p1, p2, (
size_t)
c));
#define WideCharToMultiByte
char *CDECL strerror(int err)
int WINAPIV _wopen(const wchar_t *path, int flags,...)
int WINAPIV fprintf(FILE *file, const char *format,...)
int CDECL vfprintf(FILE *file, const char *format, va_list valist)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
#define memcpy(s1, s2, n)
_Must_inspect_result_ _Out_ LPSIZE psize
void _TIFFErrorEarly(TIFFOpenOptions *opts, thandle_t clientdata, const char *module, const char *fmt,...)
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)
int _TIFFgetMode(TIFFOpenOptions *opts, thandle_t clientdata, const char *mode, const char *module)
static tmsize_t _tiffReadProc(thandle_t fd, void *buf, tmsize_t size)
static void unixErrorHandler(const char *module, const char *fmt, va_list ap)
TIFFErrorHandler _TIFFwarningHandler
TIFF * TIFFOpenExt(const char *name, const char *mode, TIFFOpenOptions *opts)
TIFF * TIFFFdOpenExt(int fd, const char *name, const char *mode, TIFFOpenOptions *opts)
TIFF * TIFFOpen(const char *name, const char *mode)
union fd_as_handle_union fd_as_handle_union_t
static void _tiffUnmapProc(thandle_t fd, void *base, toff_t size)
static tmsize_t _tiffWriteProc(thandle_t fd, void *buf, tmsize_t size)
void * _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)
void _TIFFmemset(void *p, int v, tmsize_t c)
void * _TIFFmalloc(tmsize_t s)
static uint64_t _tiffSeekProc(thandle_t fd, uint64_t off, int whence)
TIFF * TIFFFdOpen(int fd, const char *name, const char *mode)
static int _tiffCloseProc(thandle_t fd)
static uint64_t _tiffSizeProc(thandle_t fd)
int _TIFFmemcmp(const void *p1, const void *p2, tmsize_t c)
static void unixWarningHandler(const char *module, const char *fmt, va_list ap)
static int _tiffMapProc(thandle_t fd, void **pbase, toff_t *psize)
TIFFErrorHandler _TIFFerrorHandler
void _TIFFmemcpy(void *d, const void *s, tmsize_t c)
void * _TIFFrealloc(void *p, tmsize_t s)
TIFF * TIFFOpenW(const wchar_t *name, const char *mode)
TIFF * TIFFOpenWExt(const wchar_t *name, const char *mode, TIFFOpenOptions *opts)
void(* TIFFErrorHandler)(const char *, const char *, va_list)
#define _TIFF_fstat_f(fildes, stat_buff)
#define _TIFF_lseek_f(fildes, offset, whence)
void int int ULONGLONG int va_list * ap