31 #if defined(__TURBOC__) 52 r = Fread((
int) fd, size, buf);
65 r = Fwrite((
int) fd, size,
buf);
74 _tiffSeekProc(
thandle_t fd, off_t off,
int whence)
77 long current_off, expected_off, new_off;
80 return Fseek(off, (
int) fd, whence);
81 current_off = Fseek(0, (
int) fd,
SEEK_CUR);
85 expected_off = off + current_off;
86 new_off = Fseek(off, (
int) fd, whence);
87 if (new_off == expected_off)
91 new_off = Fseek(0, (
int) fd,
SEEK_END);
93 while (expected_off > new_off) {
94 off = expected_off - new_off;
95 if (off >
sizeof(buf))
97 if ((current_off = Fwrite((
int) fd, off, buf)) != off)
98 return (current_off > 0) ?
99 new_off + current_off : new_off;
110 r = Fclose((
int) fd);
150 _tiffReadProc, _tiffWriteProc, _tiffSeekProc, _tiffCloseProc,
151 _tiffSizeProc, _tiffMapProc, _tiffUnmapProc);
163 static const char module[] =
"TIFFOpen";
171 fd = Fcreate(name, 0);
174 if (fd ==
AEFILNF && m & O_CREAT)
175 fd = Fcreate(name, 0);
191 return (
malloc((
size_t) s));
203 return (realloc(p, (
size_t) s));
209 memset(p, v, (
size_t) c);
215 memcpy(d, s, (
size_t) c);
221 return (memcmp(p1, p2, (
size_t) c));
225 atariWarningHandler(
const char* module,
const char* fmt, va_list ap)
228 fprintf(stderr,
"%s: ", module);
229 fprintf(stderr,
"Warning, ");
230 vfprintf(stderr, fmt, ap);
231 fprintf(stderr,
".\n");
236 atariErrorHandler(
const char* module,
const char* fmt, va_list ap)
239 fprintf(stderr,
"%s: ", module);
240 vfprintf(stderr, fmt, ap);
241 fprintf(stderr,
".\n");
TIFFErrorHandler _TIFFerrorHandler
void(* TIFFErrorHandler)(const char *, const char *, va_list)
GLenum GLuint GLenum GLsizei const GLchar * buf
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)
TIFFErrorHandler _TIFFwarningHandler
int _TIFFmemcmp(const tdata_t p1, const tdata_t p2, tsize_t c)
GLdouble GLdouble GLdouble r
tdata_t _TIFFrealloc(tdata_t p, tsize_t s)
void TIFFErrorExt(thandle_t fd, const char *module, const char *fmt,...)
TIFF * TIFFOpen(const char *name, const char *mode)
tdata_t _TIFFmalloc(tsize_t s)
GLuint const GLchar * name
void _TIFFmemset(tdata_t p, int v, size_t c)
void _TIFFmemcpy(tdata_t d, const tdata_t s, size_t c)
int _TIFFgetMode(const char *mode, const char *module)
TIFF * TIFFFdOpen(int fd, const char *name, const char *mode)
void _TIFFfree(tdata_t p)