06148fc56986114866bf1b6cfdd9fb6d28b1f171
[reactos.git] / reactos / sdk / include / reactos / libs / libtiff / rosdiff.patch
1 Index: tiffio.h
2 ===================================================================
3 --- tiffio.h (revision 48037)
4 +++ tiffio.h (working copy)
5 @@ -27,6 +27,30 @@
6 #ifndef _TIFFIO_
7 #define _TIFFIO_
8
9 +#ifndef __GNUC__
10 +# define __DLL_IMPORT__ __declspec(dllimport)
11 +# define __DLL_EXPORT__ __declspec(dllexport)
12 +#else
13 +# define __DLL_IMPORT__ __attribute__((dllimport)) extern
14 +# define __DLL_EXPORT__ __attribute__((dllexport)) extern
15 +#endif
16 +
17 +#if (defined __WIN32__) || (defined _WIN32)
18 +# ifdef BUILD_LIBTIFF_DLL
19 +# define LIBTIFF_DLL_IMPEXP __DLL_EXPORT__
20 +# elif defined(LIBTIFF_STATIC)
21 +# define LIBTIFF_DLL_IMPEXP
22 +# elif defined (USE_LIBTIFF_DLL)
23 +# define LIBTIFF_DLL_IMPEXP __DLL_IMPORT__
24 +# elif defined (USE_LIBTIFF_STATIC)
25 +# define LIBTIFF_DLL_IMPEXP
26 +# else /* assume USE_LIBTIFF_DLL */
27 +# define LIBTIFF_DLL_IMPEXP __DLL_IMPORT__
28 +# endif
29 +#else /* __WIN32__ */
30 +# define LIBTIFF_DLL_IMPEXP
31 +#endif
32 +
33 /*
34 * TIFF I/O Library Definitions.
35 */
36 @@ -80,10 +104,20 @@
37 */
38
39 #if defined(_WINDOWS) || defined(__WIN32__) || defined(_Windows)
40 +# define BINMODE "b"
41 # if !defined(__CYGWIN) && !defined(AVOID_WIN32_FILEIO) && !defined(USE_WIN32_FILEIO)
42 # define AVOID_WIN32_FILEIO
43 # endif
44 -#endif
45 +# include <fcntl.h>
46 +# include <io.h>
47 +# ifdef SET_BINARY
48 +# undef SET_BINARY
49 +# endif /* SET_BINARY */
50 +# define SET_BINARY(f) do {if (!_isatty(f)) _setmode(f,_O_BINARY);} while (0)
51 +#else /* Windows */
52 +# define BINMODE
53 +# define SET_BINARY(f) (void)0
54 +#endif /* Windows */
55
56 #if defined(USE_WIN32_FILEIO)
57 # define VC_EXTRALEAN
58 @@ -268,30 +302,30 @@
59 typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
60 typedef void (*TIFFExtendProc)(TIFF*);
61
62 -extern const char* TIFFGetVersion(void);
63 +LIBTIFF_DLL_IMPEXP const char* TIFFGetVersion(void);
64
65 -extern const TIFFCodec* TIFFFindCODEC(uint16);
66 -extern TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
67 -extern void TIFFUnRegisterCODEC(TIFFCodec*);
68 -extern int TIFFIsCODECConfigured(uint16);
69 -extern TIFFCodec* TIFFGetConfiguredCODECs(void);
70 +LIBTIFF_DLL_IMPEXP const TIFFCodec* TIFFFindCODEC(uint16);
71 +LIBTIFF_DLL_IMPEXP TIFFCodec* TIFFRegisterCODEC(uint16, const char*, TIFFInitMethod);
72 +LIBTIFF_DLL_IMPEXP void TIFFUnRegisterCODEC(TIFFCodec*);
73 +LIBTIFF_DLL_IMPEXP int TIFFIsCODECConfigured(uint16);
74 +LIBTIFF_DLL_IMPEXP TIFFCodec* TIFFGetConfiguredCODECs(void);
75
76 /*
77 * Auxiliary functions.
78 */
79
80 -extern tdata_t _TIFFmalloc(tsize_t);
81 -extern tdata_t _TIFFrealloc(tdata_t, tsize_t);
82 -extern void _TIFFmemset(tdata_t, int, tsize_t);
83 -extern void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
84 -extern int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
85 -extern void _TIFFfree(tdata_t);
86 +LIBTIFF_DLL_IMPEXP tdata_t _TIFFmalloc(tsize_t);
87 +LIBTIFF_DLL_IMPEXP tdata_t _TIFFrealloc(tdata_t, tsize_t);
88 +LIBTIFF_DLL_IMPEXP void _TIFFmemset(tdata_t, int, tsize_t);
89 +LIBTIFF_DLL_IMPEXP void _TIFFmemcpy(tdata_t, const tdata_t, tsize_t);
90 +LIBTIFF_DLL_IMPEXP int _TIFFmemcmp(const tdata_t, const tdata_t, tsize_t);
91 +LIBTIFF_DLL_IMPEXP void _TIFFfree(tdata_t);
92
93 /*
94 ** Stuff, related to tag handling and creating custom tags.
95 */
96 -extern int TIFFGetTagListCount( TIFF * );
97 -extern ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
98 +LIBTIFF_DLL_IMPEXP int TIFFGetTagListCount( TIFF * );
99 +LIBTIFF_DLL_IMPEXP ttag_t TIFFGetTagListEntry( TIFF *, int tag_index );
100
101 #define TIFF_ANY TIFF_NOTYPE /* for field descriptor searching */
102 #define TIFF_VARIABLE -1 /* marker for variable length tags */
103 @@ -317,12 +351,12 @@
104 void *value;
105 } TIFFTagValue;
106
107 -extern void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
108 -extern const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType);
109 -extern const TIFFFieldInfo* TIFFFindFieldInfoByName(TIFF* , const char *,
110 +LIBTIFF_DLL_IMPEXP void TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], int);
111 +LIBTIFF_DLL_IMPEXP const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, ttag_t, TIFFDataType);
112 +LIBTIFF_DLL_IMPEXP const TIFFFieldInfo* TIFFFindFieldInfoByName(TIFF* , const char *,
113 TIFFDataType);
114 -extern const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
115 -extern const TIFFFieldInfo* TIFFFieldWithName(TIFF*, const char *);
116 +LIBTIFF_DLL_IMPEXP const TIFFFieldInfo* TIFFFieldWithTag(TIFF*, ttag_t);
117 +LIBTIFF_DLL_IMPEXP const TIFFFieldInfo* TIFFFieldWithName(TIFF*, const char *);
118
119 typedef int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list);
120 typedef int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list);
121 @@ -334,180 +368,180 @@
122 TIFFPrintMethod printdir; /* directory print routine */
123 } TIFFTagMethods;
124
125 -extern TIFFTagMethods *TIFFAccessTagMethods( TIFF * );
126 -extern void *TIFFGetClientInfo( TIFF *, const char * );
127 -extern void TIFFSetClientInfo( TIFF *, void *, const char * );
128 +LIBTIFF_DLL_IMPEXP TIFFTagMethods *TIFFAccessTagMethods( TIFF * );
129 +LIBTIFF_DLL_IMPEXP void *TIFFGetClientInfo( TIFF *, const char * );
130 +LIBTIFF_DLL_IMPEXP void TIFFSetClientInfo( TIFF *, void *, const char * );
131
132 -extern void TIFFCleanup(TIFF*);
133 -extern void TIFFClose(TIFF*);
134 -extern int TIFFFlush(TIFF*);
135 -extern int TIFFFlushData(TIFF*);
136 -extern int TIFFGetField(TIFF*, ttag_t, ...);
137 -extern int TIFFVGetField(TIFF*, ttag_t, va_list);
138 -extern int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
139 -extern int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list);
140 -extern int TIFFReadDirectory(TIFF*);
141 -extern int TIFFReadCustomDirectory(TIFF*, toff_t, const TIFFFieldInfo[],
142 +LIBTIFF_DLL_IMPEXP void TIFFCleanup(TIFF*);
143 +LIBTIFF_DLL_IMPEXP void TIFFClose(TIFF*);
144 +LIBTIFF_DLL_IMPEXP int TIFFFlush(TIFF*);
145 +LIBTIFF_DLL_IMPEXP int TIFFFlushData(TIFF*);
146 +LIBTIFF_DLL_IMPEXP int TIFFGetField(TIFF*, ttag_t, ...);
147 +LIBTIFF_DLL_IMPEXP int TIFFVGetField(TIFF*, ttag_t, va_list);
148 +LIBTIFF_DLL_IMPEXP int TIFFGetFieldDefaulted(TIFF*, ttag_t, ...);
149 +LIBTIFF_DLL_IMPEXP int TIFFVGetFieldDefaulted(TIFF*, ttag_t, va_list);
150 +LIBTIFF_DLL_IMPEXP int TIFFReadDirectory(TIFF*);
151 +LIBTIFF_DLL_IMPEXP int TIFFReadCustomDirectory(TIFF*, toff_t, const TIFFFieldInfo[],
152 size_t);
153 -extern int TIFFReadEXIFDirectory(TIFF*, toff_t);
154 -extern tsize_t TIFFScanlineSize(TIFF*);
155 -extern tsize_t TIFFOldScanlineSize(TIFF*);
156 -extern tsize_t TIFFNewScanlineSize(TIFF*);
157 -extern tsize_t TIFFRasterScanlineSize(TIFF*);
158 -extern tsize_t TIFFStripSize(TIFF*);
159 -extern tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
160 -extern tsize_t TIFFVStripSize(TIFF*, uint32);
161 -extern tsize_t TIFFTileRowSize(TIFF*);
162 -extern tsize_t TIFFTileSize(TIFF*);
163 -extern tsize_t TIFFVTileSize(TIFF*, uint32);
164 -extern uint32 TIFFDefaultStripSize(TIFF*, uint32);
165 -extern void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
166 -extern int TIFFFileno(TIFF*);
167 -extern int TIFFSetFileno(TIFF*, int);
168 -extern thandle_t TIFFClientdata(TIFF*);
169 -extern thandle_t TIFFSetClientdata(TIFF*, thandle_t);
170 -extern int TIFFGetMode(TIFF*);
171 -extern int TIFFSetMode(TIFF*, int);
172 -extern int TIFFIsTiled(TIFF*);
173 -extern int TIFFIsByteSwapped(TIFF*);
174 -extern int TIFFIsUpSampled(TIFF*);
175 -extern int TIFFIsMSB2LSB(TIFF*);
176 -extern int TIFFIsBigEndian(TIFF*);
177 -extern TIFFReadWriteProc TIFFGetReadProc(TIFF*);
178 -extern TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
179 -extern TIFFSeekProc TIFFGetSeekProc(TIFF*);
180 -extern TIFFCloseProc TIFFGetCloseProc(TIFF*);
181 -extern TIFFSizeProc TIFFGetSizeProc(TIFF*);
182 -extern TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
183 -extern TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*);
184 -extern uint32 TIFFCurrentRow(TIFF*);
185 -extern tdir_t TIFFCurrentDirectory(TIFF*);
186 -extern tdir_t TIFFNumberOfDirectories(TIFF*);
187 -extern uint32 TIFFCurrentDirOffset(TIFF*);
188 -extern tstrip_t TIFFCurrentStrip(TIFF*);
189 -extern ttile_t TIFFCurrentTile(TIFF*);
190 -extern int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
191 -extern int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t);
192 -extern int TIFFSetupStrips(TIFF *);
193 -extern int TIFFWriteCheck(TIFF*, int, const char *);
194 -extern void TIFFFreeDirectory(TIFF*);
195 -extern int TIFFCreateDirectory(TIFF*);
196 -extern int TIFFLastDirectory(TIFF*);
197 -extern int TIFFSetDirectory(TIFF*, tdir_t);
198 -extern int TIFFSetSubDirectory(TIFF*, uint32);
199 -extern int TIFFUnlinkDirectory(TIFF*, tdir_t);
200 -extern int TIFFSetField(TIFF*, ttag_t, ...);
201 -extern int TIFFVSetField(TIFF*, ttag_t, va_list);
202 -extern int TIFFWriteDirectory(TIFF *);
203 -extern int TIFFCheckpointDirectory(TIFF *);
204 -extern int TIFFRewriteDirectory(TIFF *);
205 -extern int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
206 +LIBTIFF_DLL_IMPEXP int TIFFReadEXIFDirectory(TIFF*, toff_t);
207 +LIBTIFF_DLL_IMPEXP tsize_t TIFFScanlineSize(TIFF*);
208 +LIBTIFF_DLL_IMPEXP tsize_t TIFFOldScanlineSize(TIFF*);
209 +LIBTIFF_DLL_IMPEXP tsize_t TIFFNewScanlineSize(TIFF*);
210 +LIBTIFF_DLL_IMPEXP tsize_t TIFFRasterScanlineSize(TIFF*);
211 +LIBTIFF_DLL_IMPEXP tsize_t TIFFStripSize(TIFF*);
212 +LIBTIFF_DLL_IMPEXP tsize_t TIFFRawStripSize(TIFF*, tstrip_t);
213 +LIBTIFF_DLL_IMPEXP tsize_t TIFFVStripSize(TIFF*, uint32);
214 +LIBTIFF_DLL_IMPEXP tsize_t TIFFTileRowSize(TIFF*);
215 +LIBTIFF_DLL_IMPEXP tsize_t TIFFTileSize(TIFF*);
216 +LIBTIFF_DLL_IMPEXP tsize_t TIFFVTileSize(TIFF*, uint32);
217 +LIBTIFF_DLL_IMPEXP uint32 TIFFDefaultStripSize(TIFF*, uint32);
218 +LIBTIFF_DLL_IMPEXP void TIFFDefaultTileSize(TIFF*, uint32*, uint32*);
219 +LIBTIFF_DLL_IMPEXP int TIFFFileno(TIFF*);
220 +LIBTIFF_DLL_IMPEXP int TIFFSetFileno(TIFF*, int);
221 +LIBTIFF_DLL_IMPEXP thandle_t TIFFClientdata(TIFF*);
222 +LIBTIFF_DLL_IMPEXP thandle_t TIFFSetClientdata(TIFF*, thandle_t);
223 +LIBTIFF_DLL_IMPEXP int TIFFGetMode(TIFF*);
224 +LIBTIFF_DLL_IMPEXP int TIFFSetMode(TIFF*, int);
225 +LIBTIFF_DLL_IMPEXP int TIFFIsTiled(TIFF*);
226 +LIBTIFF_DLL_IMPEXP int TIFFIsByteSwapped(TIFF*);
227 +LIBTIFF_DLL_IMPEXP int TIFFIsUpSampled(TIFF*);
228 +LIBTIFF_DLL_IMPEXP int TIFFIsMSB2LSB(TIFF*);
229 +LIBTIFF_DLL_IMPEXP int TIFFIsBigEndian(TIFF*);
230 +LIBTIFF_DLL_IMPEXP TIFFReadWriteProc TIFFGetReadProc(TIFF*);
231 +LIBTIFF_DLL_IMPEXP TIFFReadWriteProc TIFFGetWriteProc(TIFF*);
232 +LIBTIFF_DLL_IMPEXP TIFFSeekProc TIFFGetSeekProc(TIFF*);
233 +LIBTIFF_DLL_IMPEXP TIFFCloseProc TIFFGetCloseProc(TIFF*);
234 +LIBTIFF_DLL_IMPEXP TIFFSizeProc TIFFGetSizeProc(TIFF*);
235 +LIBTIFF_DLL_IMPEXP TIFFMapFileProc TIFFGetMapFileProc(TIFF*);
236 +LIBTIFF_DLL_IMPEXP TIFFUnmapFileProc TIFFGetUnmapFileProc(TIFF*);
237 +LIBTIFF_DLL_IMPEXP uint32 TIFFCurrentRow(TIFF*);
238 +LIBTIFF_DLL_IMPEXP tdir_t TIFFCurrentDirectory(TIFF*);
239 +LIBTIFF_DLL_IMPEXP tdir_t TIFFNumberOfDirectories(TIFF*);
240 +LIBTIFF_DLL_IMPEXP uint32 TIFFCurrentDirOffset(TIFF*);
241 +LIBTIFF_DLL_IMPEXP tstrip_t TIFFCurrentStrip(TIFF*);
242 +LIBTIFF_DLL_IMPEXP ttile_t TIFFCurrentTile(TIFF*);
243 +LIBTIFF_DLL_IMPEXP int TIFFReadBufferSetup(TIFF*, tdata_t, tsize_t);
244 +LIBTIFF_DLL_IMPEXP int TIFFWriteBufferSetup(TIFF*, tdata_t, tsize_t);
245 +LIBTIFF_DLL_IMPEXP int TIFFSetupStrips(TIFF *);
246 +LIBTIFF_DLL_IMPEXP int TIFFWriteCheck(TIFF*, int, const char *);
247 +LIBTIFF_DLL_IMPEXP void TIFFFreeDirectory(TIFF*);
248 +LIBTIFF_DLL_IMPEXP int TIFFCreateDirectory(TIFF*);
249 +LIBTIFF_DLL_IMPEXP int TIFFLastDirectory(TIFF*);
250 +LIBTIFF_DLL_IMPEXP int TIFFSetDirectory(TIFF*, tdir_t);
251 +LIBTIFF_DLL_IMPEXP int TIFFSetSubDirectory(TIFF*, uint32);
252 +LIBTIFF_DLL_IMPEXP int TIFFUnlinkDirectory(TIFF*, tdir_t);
253 +LIBTIFF_DLL_IMPEXP int TIFFSetField(TIFF*, ttag_t, ...);
254 +LIBTIFF_DLL_IMPEXP int TIFFVSetField(TIFF*, ttag_t, va_list);
255 +LIBTIFF_DLL_IMPEXP int TIFFWriteDirectory(TIFF *);
256 +LIBTIFF_DLL_IMPEXP int TIFFCheckpointDirectory(TIFF *);
257 +LIBTIFF_DLL_IMPEXP int TIFFRewriteDirectory(TIFF *);
258 +LIBTIFF_DLL_IMPEXP int TIFFReassignTagToIgnore(enum TIFFIgnoreSense, int);
259
260 #if defined(c_plusplus) || defined(__cplusplus)
261 -extern void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
262 -extern int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
263 -extern int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
264 -extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
265 -extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
266 +LIBTIFF_DLL_IMPEXP void TIFFPrintDirectory(TIFF*, FILE*, long = 0);
267 +LIBTIFF_DLL_IMPEXP int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
268 +LIBTIFF_DLL_IMPEXP int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t = 0);
269 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int = 0);
270 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*,
271 int = ORIENTATION_BOTLEFT, int = 0);
272 #else
273 -extern void TIFFPrintDirectory(TIFF*, FILE*, long);
274 -extern int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t);
275 -extern int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t);
276 -extern int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
277 -extern int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
278 +LIBTIFF_DLL_IMPEXP void TIFFPrintDirectory(TIFF*, FILE*, long);
279 +LIBTIFF_DLL_IMPEXP int TIFFReadScanline(TIFF*, tdata_t, uint32, tsample_t);
280 +LIBTIFF_DLL_IMPEXP int TIFFWriteScanline(TIFF*, tdata_t, uint32, tsample_t);
281 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBAImage(TIFF*, uint32, uint32, uint32*, int);
282 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBAImageOriented(TIFF*, uint32, uint32, uint32*, int, int);
283 #endif
284
285 -extern int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
286 -extern int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
287 -extern int TIFFRGBAImageOK(TIFF*, char [1024]);
288 -extern int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
289 -extern int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
290 -extern void TIFFRGBAImageEnd(TIFFRGBAImage*);
291 -extern TIFF* TIFFOpen(const char*, const char*);
292 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBAStrip(TIFF*, tstrip_t, uint32 * );
293 +LIBTIFF_DLL_IMPEXP int TIFFReadRGBATile(TIFF*, uint32, uint32, uint32 * );
294 +LIBTIFF_DLL_IMPEXP int TIFFRGBAImageOK(TIFF*, char [1024]);
295 +LIBTIFF_DLL_IMPEXP int TIFFRGBAImageBegin(TIFFRGBAImage*, TIFF*, int, char [1024]);
296 +LIBTIFF_DLL_IMPEXP int TIFFRGBAImageGet(TIFFRGBAImage*, uint32*, uint32, uint32);
297 +LIBTIFF_DLL_IMPEXP void TIFFRGBAImageEnd(TIFFRGBAImage*);
298 +LIBTIFF_DLL_IMPEXP TIFF* TIFFOpen(const char*, const char*);
299 # ifdef __WIN32__
300 -extern TIFF* TIFFOpenW(const wchar_t*, const char*);
301 +LIBTIFF_DLL_IMPEXP TIFF* TIFFOpenW(const wchar_t*, const char*);
302 # endif /* __WIN32__ */
303 -extern TIFF* TIFFFdOpen(int, const char*, const char*);
304 -extern TIFF* TIFFClientOpen(const char*, const char*,
305 +LIBTIFF_DLL_IMPEXP TIFF* TIFFFdOpen(int, const char*, const char*);
306 +LIBTIFF_DLL_IMPEXP TIFF* TIFFClientOpen(const char*, const char*,
307 thandle_t,
308 TIFFReadWriteProc, TIFFReadWriteProc,
309 TIFFSeekProc, TIFFCloseProc,
310 TIFFSizeProc,
311 TIFFMapFileProc, TIFFUnmapFileProc);
312 -extern const char* TIFFFileName(TIFF*);
313 -extern const char* TIFFSetFileName(TIFF*, const char *);
314 -extern void TIFFError(const char*, const char*, ...) __attribute__((format (printf,2,3)));
315 -extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
316 -extern void TIFFWarning(const char*, const char*, ...) __attribute__((format (printf,2,3)));
317 -extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
318 -extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
319 -extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
320 -extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
321 -extern TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt);
322 -extern TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
323 -extern ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t);
324 -extern int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t);
325 -extern ttile_t TIFFNumberOfTiles(TIFF*);
326 -extern tsize_t TIFFReadTile(TIFF*,
327 +LIBTIFF_DLL_IMPEXP const char* TIFFFileName(TIFF*);
328 +LIBTIFF_DLL_IMPEXP const char* TIFFSetFileName(TIFF*, const char *);
329 +LIBTIFF_DLL_IMPEXP void TIFFError(const char*, const char*, ...) __attribute__((format (printf,2,3)));
330 +LIBTIFF_DLL_IMPEXP void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
331 +LIBTIFF_DLL_IMPEXP void TIFFWarning(const char*, const char*, ...) __attribute__((format (printf,2,3)));
332 +LIBTIFF_DLL_IMPEXP void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((format (printf,3,4)));
333 +LIBTIFF_DLL_IMPEXP TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler);
334 +LIBTIFF_DLL_IMPEXP TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt);
335 +LIBTIFF_DLL_IMPEXP TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler);
336 +LIBTIFF_DLL_IMPEXP TIFFErrorHandlerExt TIFFSetWarningHandlerExt(TIFFErrorHandlerExt);
337 +LIBTIFF_DLL_IMPEXP TIFFExtendProc TIFFSetTagExtender(TIFFExtendProc);
338 +LIBTIFF_DLL_IMPEXP ttile_t TIFFComputeTile(TIFF*, uint32, uint32, uint32, tsample_t);
339 +LIBTIFF_DLL_IMPEXP int TIFFCheckTile(TIFF*, uint32, uint32, uint32, tsample_t);
340 +LIBTIFF_DLL_IMPEXP ttile_t TIFFNumberOfTiles(TIFF*);
341 +LIBTIFF_DLL_IMPEXP tsize_t TIFFReadTile(TIFF*,
342 tdata_t, uint32, uint32, uint32, tsample_t);
343 -extern tsize_t TIFFWriteTile(TIFF*,
344 +LIBTIFF_DLL_IMPEXP tsize_t TIFFWriteTile(TIFF*,
345 tdata_t, uint32, uint32, uint32, tsample_t);
346 -extern tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t);
347 -extern tstrip_t TIFFNumberOfStrips(TIFF*);
348 -extern tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
349 -extern tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
350 -extern tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
351 -extern tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
352 -extern tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
353 -extern tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
354 -extern tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
355 -extern tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
356 -extern int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
357 -extern void TIFFSetWriteOffset(TIFF*, toff_t);
358 -extern void TIFFSwabShort(uint16*);
359 -extern void TIFFSwabLong(uint32*);
360 -extern void TIFFSwabDouble(double*);
361 -extern void TIFFSwabArrayOfShort(uint16*, unsigned long);
362 -extern void TIFFSwabArrayOfTriples(uint8*, unsigned long);
363 -extern void TIFFSwabArrayOfLong(uint32*, unsigned long);
364 -extern void TIFFSwabArrayOfDouble(double*, unsigned long);
365 -extern void TIFFReverseBits(unsigned char *, unsigned long);
366 -extern const unsigned char* TIFFGetBitRevTable(int);
367 +LIBTIFF_DLL_IMPEXP tstrip_t TIFFComputeStrip(TIFF*, uint32, tsample_t);
368 +LIBTIFF_DLL_IMPEXP tstrip_t TIFFNumberOfStrips(TIFF*);
369 +LIBTIFF_DLL_IMPEXP tsize_t TIFFReadEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
370 +LIBTIFF_DLL_IMPEXP tsize_t TIFFReadRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
371 +LIBTIFF_DLL_IMPEXP tsize_t TIFFReadEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
372 +LIBTIFF_DLL_IMPEXP tsize_t TIFFReadRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
373 +LIBTIFF_DLL_IMPEXP tsize_t TIFFWriteEncodedStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
374 +LIBTIFF_DLL_IMPEXP tsize_t TIFFWriteRawStrip(TIFF*, tstrip_t, tdata_t, tsize_t);
375 +LIBTIFF_DLL_IMPEXP tsize_t TIFFWriteEncodedTile(TIFF*, ttile_t, tdata_t, tsize_t);
376 +LIBTIFF_DLL_IMPEXP tsize_t TIFFWriteRawTile(TIFF*, ttile_t, tdata_t, tsize_t);
377 +LIBTIFF_DLL_IMPEXP int TIFFDataWidth(TIFFDataType); /* table of tag datatype widths */
378 +LIBTIFF_DLL_IMPEXP void TIFFSetWriteOffset(TIFF*, toff_t);
379 +LIBTIFF_DLL_IMPEXP void TIFFSwabShort(uint16*);
380 +LIBTIFF_DLL_IMPEXP void TIFFSwabLong(uint32*);
381 +LIBTIFF_DLL_IMPEXP void TIFFSwabDouble(double*);
382 +LIBTIFF_DLL_IMPEXP void TIFFSwabArrayOfShort(uint16*, unsigned long);
383 +LIBTIFF_DLL_IMPEXP void TIFFSwabArrayOfTriples(uint8*, unsigned long);
384 +LIBTIFF_DLL_IMPEXP void TIFFSwabArrayOfLong(uint32*, unsigned long);
385 +LIBTIFF_DLL_IMPEXP void TIFFSwabArrayOfDouble(double*, unsigned long);
386 +LIBTIFF_DLL_IMPEXP void TIFFReverseBits(unsigned char *, unsigned long);
387 +LIBTIFF_DLL_IMPEXP const unsigned char* TIFFGetBitRevTable(int);
388
389 #ifdef LOGLUV_PUBLIC
390 #define U_NEU 0.210526316
391 #define V_NEU 0.473684211
392 #define UVSCALE 410.
393 -extern double LogL16toY(int);
394 -extern double LogL10toY(int);
395 -extern void XYZtoRGB24(float*, uint8*);
396 -extern int uv_decode(double*, double*, int);
397 -extern void LogLuv24toXYZ(uint32, float*);
398 -extern void LogLuv32toXYZ(uint32, float*);
399 +LIBTIFF_DLL_IMPEXP double LogL16toY(int);
400 +LIBTIFF_DLL_IMPEXP double LogL10toY(int);
401 +LIBTIFF_DLL_IMPEXP void XYZtoRGB24(float*, uint8*);
402 +LIBTIFF_DLL_IMPEXP int uv_decode(double*, double*, int);
403 +LIBTIFF_DLL_IMPEXP void LogLuv24toXYZ(uint32, float*);
404 +LIBTIFF_DLL_IMPEXP void LogLuv32toXYZ(uint32, float*);
405 #if defined(c_plusplus) || defined(__cplusplus)
406 -extern int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
407 -extern int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
408 -extern int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
409 -extern uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
410 -extern uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
411 +LIBTIFF_DLL_IMPEXP int LogL16fromY(double, int = SGILOGENCODE_NODITHER);
412 +LIBTIFF_DLL_IMPEXP int LogL10fromY(double, int = SGILOGENCODE_NODITHER);
413 +LIBTIFF_DLL_IMPEXP int uv_encode(double, double, int = SGILOGENCODE_NODITHER);
414 +LIBTIFF_DLL_IMPEXP uint32 LogLuv24fromXYZ(float*, int = SGILOGENCODE_NODITHER);
415 +LIBTIFF_DLL_IMPEXP uint32 LogLuv32fromXYZ(float*, int = SGILOGENCODE_NODITHER);
416 #else
417 -extern int LogL16fromY(double, int);
418 -extern int LogL10fromY(double, int);
419 -extern int uv_encode(double, double, int);
420 -extern uint32 LogLuv24fromXYZ(float*, int);
421 -extern uint32 LogLuv32fromXYZ(float*, int);
422 +LIBTIFF_DLL_IMPEXP int LogL16fromY(double, int);
423 +LIBTIFF_DLL_IMPEXP int LogL10fromY(double, int);
424 +LIBTIFF_DLL_IMPEXP int uv_encode(double, double, int);
425 +LIBTIFF_DLL_IMPEXP uint32 LogLuv24fromXYZ(float*, int);
426 +LIBTIFF_DLL_IMPEXP uint32 LogLuv32fromXYZ(float*, int);
427 #endif
428 #endif /* LOGLUV_PUBLIC */
429
430 -extern int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
431 -extern void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
432 +LIBTIFF_DLL_IMPEXP int TIFFCIELabToRGBInit(TIFFCIELabToRGB*, TIFFDisplay *, float*);
433 +LIBTIFF_DLL_IMPEXP void TIFFCIELabToXYZ(TIFFCIELabToRGB *, uint32, int32, int32,
434 float *, float *, float *);
435 -extern void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
436 +LIBTIFF_DLL_IMPEXP void TIFFXYZToRGB(TIFFCIELabToRGB *, float, float, float,
437 uint32 *, uint32 *, uint32 *);
438
439 -extern int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
440 -extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
441 +LIBTIFF_DLL_IMPEXP int TIFFYCbCrToRGBInit(TIFFYCbCrToRGB*, float*, float*);
442 +LIBTIFF_DLL_IMPEXP void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
443 uint32 *, uint32 *, uint32 *);
444
445 #if defined(c_plusplus) || defined(__cplusplus)