1993.10.19 11:17 "Patches for running v3.3beta003 on DEC Alpha", by Jean-Daniel Fekete

1993.10.19 15:46 "Re: Patches for running v3.3beta003 on DEC Alpha", by Sam Leffler

It seems to work for most files. It needs more testing though. I had a (maybe bad) idea concerning type checking. Most errors are due to calls to TIFFGetField with a pointer of the wrong type. Wouldn't it be possible to use the table described in tif_dirinfo.c and generate a header file and a c file with properly prototyped functions. These function would look like:

int TIFFGet<tag name>(TIFF*, <tag type>*);

and the c function would look like:

int TIFFGet<tag name>(TIFF* tiff, <tag type>* t)
    return TIFFGetField(tiff, TIFFTAG_<TAG NAME>, t);

It would certainly be even more valuable to have a C++ class wrapper defined this way, using only inline functions of a TIFF class.

Maybe deriving the pointer type from the tiffFieldInfo is not that easy?

It probably is possible, but the code is so old and has changed so much that doing something enlightened like you suggest wasn't worth the effort back when only a few tags were involved. Right now the code has reached its "life expectancy" and putting much effort into it is not really worth it. Any future major effort will almost certainly be done in C++ at which time many of the current problems such as private tags can be dealt with cleanly using C++ language features.

Anyway, here are the diffs.

Thank you. I'll try to integrate them into the next beta. I leave in a few weeks and hope to get a new version of the software out on sgi.com that includes all the mods people have sent me since I put out v3.3beta002. (Yes, I know, I promised it for months ago...)