1 The following patch should allow you to compile XV 3.10a against the latest
2 version of Sam Leffler's TIFF Library (libtiff 3.4).
4 You do *not* need to apply this patch to compile XV 3.10a against the
5 older version of the TIFF library (3.3) that is included in the XV
6 3.10a distribution. This is only necessary if you wish to upgrade to
7 the newer version of the TIFF library.
9 You can get the latest version of the TIFF library via anonymous ftp on
10 ftp.sgi.com, in 'graphics/tiff'.
12 Thanks to Dan McCoy (mccoy@pixar.com) for supplying this patch!
15 -----------------------------------------------------------------------
18 *** xvtiff.c.orig Fri Jan 13 14:53:34 1995
19 --- xvtiff.c Thu Sep 5 16:55:46 1996
26 + /* XXXX Work around some collisions with the new library. */
27 + #define tileContigRoutine _tileContigRoutine
28 + #define tileSeparateRoutine _tileSeparateRoutine
30 typedef void (*tileContigRoutine) PARM((byte*, u_char*, RGBvalue*,
31 uint32, uint32, int, int));
35 uint32, uint32, int, int));
36 static void put4bitbwtile PARM((byte *, u_char *, RGBvalue *,
37 uint32, uint32, int, int));
38 ! static void put16bitbwtile PARM((byte *, u_char *, RGBvalue *,
39 uint32, uint32, int, int));
41 static void putRGBcontig8bittile PARM((byte *, u_char *, RGBvalue *,
43 uint32, uint32, int, int));
44 static void put4bitbwtile PARM((byte *, u_char *, RGBvalue *,
45 uint32, uint32, int, int));
46 ! static void put16bitbwtile PARM((byte *, u_short *, RGBvalue *,
47 uint32, uint32, int, int));
49 static void putRGBcontig8bittile PARM((byte *, u_char *, RGBvalue *,
53 static void put16bitbwtile(cp, pp, Map, w, h, fromskew, toskew)
61 static void put16bitbwtile(cp, pp, Map, w, h, fromskew, toskew)
72 ! *cp++ = Map[(pp[0] << 8) + pp[1]];
87 case PHOTOMETRIC_MINISWHITE:
88 case PHOTOMETRIC_MINISBLACK:
89 switch (bitspersample) {
90 ! case 16: put = put16bitbwtile; break;
91 case 8: put = putgreytile; break;
92 case 4: put = put4bitbwtile; break;
93 case 2: put = put2bitbwtile; break;
95 case PHOTOMETRIC_MINISWHITE:
96 case PHOTOMETRIC_MINISBLACK:
97 switch (bitspersample) {
98 ! case 16: put = (tileContigRoutine) put16bitbwtile; break;
99 case 8: put = putgreytile; break;
100 case 4: put = put4bitbwtile; break;
101 case 2: put = put2bitbwtile; break;