1994.06.24 11:08 "Re: Think C Libtiff ???", by Niles Ritter
Would anyone out there happen to have already created a Think C version of Libtiff for the Mac?
Well, I'm sure it's been done, so what I'm really asking is if if anyone reading this would be willing to let me get my greedy little hands on it, so I can be lazy.
A lot depends on which version of libtiff, and which version of Think/Symantec C. Are you using the new 3.3 ANSI-compliant version of libtiff? Think 5.0? 6.0? Symantec C++ 7.0+? They all have to be tweeked differently.
For the sake of argument, I will assume you are on the bleeding edge and using the latest and greatest of both. If you want lzw compression, a few changes need to be made because of the large static arrays that make it gag. Also,the fax3 fax4 and g3states stuff wont work at all, so leave out the fax compressions. You can disable these either by editing "tiffconf.h" directly, or by defining COMPRESSION_SUPPORT in the "Prefix" preferences.
Basically, all you have to do to make independent libraries is to split it up into two projects (so you wont have to worry about 32K limitations). Then in the Think C Preferences, turn on the "ANSI" button, and then activate the "Think C" checkbox, the "4-byte int" checkbox (it might work with two-byte ints, but you can't be too careful). You can optionally turn on the 68020 box for speed, but if you turn on the 68881 box your code will no longer be PowerPC compatible.
When you link programs, because you used "4-byte int", you will have to make a copy of the "ANSI" and "unix" library and recompile them with the 4-byte int option as well. Or you can be daring and try building everything without it.
I will put an binhexed archive of two files called libtiff1 and libtiff2 which will do the job, together with an example chunk of code. (I'm pretty sure that Sam has integrated the lzw changes into his next release of libtiff, so there's nothing in these archives that he would care about). The file will be at the location
(about 270K in size)
This is a Symantec 7.0 project, so if you got an earlier version you will have to do what I decribed above. The fixed version of the LZW code and a little more "maclike" tiffinfo utility project is provided as an example. Good luck!