| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread1994.06.24 20:45 "Re: Think C Libtiff ???", by Niles Rittermccoy@pixar.com writes,
> lzw?
> static arrays?
> We use the libtiff 3.3 tif_lzw.c unchanged, it works with Think 5,6,7,...
Actually, you are right; the libtiff code will compile fine with
Symantec C; I now realize the changes I had to make were because
the *MPW* compiler gags on any structure definition whose
physical size is > 32K (even with 32-bit everything).
> tif_lzw.c hasn't had any static arrays since libtiff 3.0,
You are right; this is the MPW-offending structure:
typedef struct {
LZWState base;
long dec_nbitsmask; /* lzw_nbits 1 bits, right adjusted */
long dec_restart; /* restart count */
#ifdef LZW_CHECKEOS
long dec_bitsleft; /* available bits in raw data */
#endif
decodeFunc dec_decode; /* regular or backwards compatible */
code_t *dec_codep; /* current recognized code */
code_t *dec_oldcodep; /* previously recognized code */
code_t *dec_free_entp; /* next free entry */
code_t *dec_maxcodep; /* max available entry */
code_t dec_codetab[CSIZE];
} LZWDecodeState;
The "dec_codetab[CSIZE]" array is what screws up MPW; my modification
changes this to a pointer, which is dynamically allocated.
>The mac-tiffinfo sounds like it might be a good addition to the library tools.
>I'm always having to tell the mac users to move their problem tiff files
>over to a unix box so I can look at them and tell them what's wrong.
It's not that much more "maclike"; I just added the console support. It
just brings up the "commandline" dialog box into which the usual unix-
flavored command is put, and the output is either displayed or dumped
to a text file.
--Niles.
|
|||||||