AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2000.04.28 02:38 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 04:32 "Re: VC++ Release build causes problems", by Roy Darrall
2000.04.28 06:16 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 06:25 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 09:19 "VC++ Release build causes problems", by John Aldridge
2000.04.28 17:49 "Re: VC++ Release build causes problems", by Daniel McCoy
2000.04.29 00:27 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 17:27 "VC++ Release build causes problems", by Peter Montgomery
2000.04.28 18:33 "Re: VC++ Release build causes problems", by Jan Nijtmans
2000.04.28 20:39 "Re: VC++ Release build causes problems", by Daniel McCoy

2000.04.28 18:33 "Re: VC++ Release build causes problems", by Jan Nijtmans

  unsigned char VCCCompilerFix;

  VCCCompilerFix = 255;
  for (code = 255; code >= 0; code--) {
   sp->dec_codetab[code].value = VCCCompilerFix;
   sp->dec_codetab[code].firstchar = VCCCompilerFix;

sp->dec_codetab[code].length = 1;

>    sp->dec_codetab[code].next = NULL;

    VCCCompilerFix--;
  }

How about:

   code = 255;
   do {
      sp->dec_codetab[code].value = code;
      sp->dec_codetab[code].firstchar = code;
      sp->dec_codetab[code].length = 1;
      sp->dec_codetab[code].next = NULL;
   } while (code--)

It's just as efficient as the original code, and now it's save to make the "code" variable an unsigned char. Wouldn't that make everybody happy?

I didn't test this code with VC++ 5.0, but theoretically it should work.

Regards,
--
Jan Nijtmans, CMG Arnhem B.V.
email: j.nijtmans@chello.nl (private)
       jan.nijtmans@cmg.nl (work)
url: http://purl.oclc.org/net/nijtmans/