Message-ID: 39E5FC03.CD772B29@maxalaxa.com
To: Frank Warmerdam <warmerda@home.com>
Subject: Re: libtiff-lzw
From: "Michael L. Welles" <mike@maxalaxa.com>
Date: Thu, 12 Oct 2000 13:59:31 -0400
CC: "Michael L. Welles" <mike@onshore.com>, Stanislav Brabec <utx@penguin.cz>, TIFF Mailing List <tiff@olympiakos.com>
Organization: onShore, Inc.
References: <39E5DD9F.E4FEDC9B@home.com>
Reply-To: mike@onshore.com
Sender: owner-tiff@olympiakos.com



tif_lzw included:  No reason beyond carelessness.  

tif_dir:  Given that the only difference is an error message, it is
silly to maintain a seperate file. 

mangle-src.sh: Also agreed. 


Overall, I agree completely.  I really should have done a better job
with the kit. 

Frank Warmerdam wrote:
> 
> Mike,
> 
> Stanislav has submitted some bug patches (or perhaps resubmitted is more
> accurate), one of which relates to the lzw support.  I have put this into
> bugzilla as:
> 
> http://bugzilla.remotesensing.org/show_bug.cgi?id=16
> 
> His patches are reasonable, but I am wondering if we should take a slightly
> different approach.
> 
>  o First, why is tif_lzw still in the default distribution?  It seems that
>    the default distribution should include no LZW implementation code if we
>    are going to offer a whole patch kit for LZW support.
>

>  o Why are the changes to tif_dir.c not implemented within the core
>    distribution based on whether LZW support is enabled, instead of applied
>    via wholesale replacement of tif_dir.c?  One problem is that tif_dir.c in
>    the LZW kit isn't being kept up to date when I make changes to the other
>    one.
> 
>  o The managle-src.sh script seems to apply patches related to removing
>    warnings and stuff.  Shouldn't this be just controlled within the original
>    source by the macro indicating if LZW support is available?
> 
> What I would like to see is the patch just installing a full tif_lzw.c
> implementation, and perhaps updating tiffconf.h to enable LZW.  I think the
> default distribution should contain a tif_lzw.c, but that is empty so we don't
> have to change the makefiles when applying the patch.  Everything else LZW
> related should be driven off the LZW_SUPPORT macro from tiffconf.h.  If a user
> enable LZW by turning on this flag, but doesn't apply the tif_lzw.c patch
> then at link time they would get a TIFFInitLZW() missing link error.
> 
> I feel these changes would:
> 
>  o Remove LZW liability for anyone working with the default kit since the
>    LZW code isn't even physically present.
> 
>  o Make maintenance easier, since there would be no code duplication.
> 
>  o Make it clearer at build time whether LZW is actually enabled or not.
> 
> I can't remember too much about our discussions when you originally
> implemented the LZW patches, but I fear I am contradicting some of my
> advice at the time.  In any event, I am willing to apply the suggested changes
> if you and other agree.
> 
> Best regards,
> 
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam, warmerda@home.com
> light and sound - activate the windows | http://members.home.com/warmerda
> and watch the world go round - Rush    | Geospatial Programmer for Rent

