Index: configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- configure.in 26 Sep 2004 10:37:14 -0000 1.1.1.1 +++ configure.in 26 Sep 2004 15:37:17 -0000 1.2 @@ -43,8 +43,7 @@ CC=`echo $CC | sed -e 's/ .*$//'` TEA_CONFIG_COLLECT -TEA_CONFIG_SUBDIR(libz/tcl, []) -TEA_CONFIG_SUBDIR(libpng/tcl, [--with-zlibtcl=`pwd`/libz/tcl]) +TEA_CONFIG_SUBDIR(libpng/tcl, []) TEA_CONFIG_SUBDIR(libtiff/tcl,[]) TEA_CONFIG_SUBDIR(libjpeg/tcl,[]) TEA_CONFIG_SUBDIR(base, []) @@ -54,13 +53,13 @@ TEA_CONFIG_SUBDIR(jpeg, [--with-tkimg=`pwd`/base --with-jpegtcl=`pwd`/libjpeg/tcl]) TEA_CONFIG_SUBDIR(pcx, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(pixmap, [--with-tkimg=`pwd`/base]) -TEA_CONFIG_SUBDIR(png, [--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng/tcl --with-zlibtcl=`pwd`/libz/tcl]) +TEA_CONFIG_SUBDIR(png, [--with-tkimg=`pwd`/base --with-pngtcl=`pwd`/libpng/tcl]) TEA_CONFIG_SUBDIR(ppm, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(ps, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(sgi, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(sun, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(tga, [--with-tkimg=`pwd`/base]) -TEA_CONFIG_SUBDIR(tiff, [--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff/tcl --with-zlibtcl=`pwd`/libz/tcl --with-jpegtcl=`pwd`/libjpeg/tcl]) +TEA_CONFIG_SUBDIR(tiff, [--with-tkimg=`pwd`/base --with-tifftcl=`pwd`/libtiff/tcl --with-jpegtcl=`pwd`/libjpeg/tcl]) TEA_CONFIG_SUBDIR(window, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(xbm, [--with-tkimg=`pwd`/base]) TEA_CONFIG_SUBDIR(xpm, [--with-tkimg=`pwd`/base]) Index: demo.tcl =================================================================== RCS file: /var/cvs/modules/tkimg/demo.tcl,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- demo.tcl 26 Sep 2004 10:37:14 -0000 1.1.1.1 +++ demo.tcl 26 Sep 2004 15:37:17 -0000 1.2 @@ -1,15 +1,15 @@ #!/bin/sh # The next line restarts using wish8.3 \ -exec wish8.3 $0 ${1+"$@"} +exec wish8.4 $0 ${1+"$@"} source [file join [file dirname [info script]] imgmsg.tcl] - +lappend auto_path [file join [file dirname [info script]] Img exec_prefix lib] # # Make the Image format available. # set rundir [file dirname [info script]] -set auto_path "[list $rundir] $auto_path" +# set auto_path "[list $rundir] $auto_path" set img_version [package require Img] wm title . [mc {Tests for available image formats}] Index: libjpeg/tcl/Makefile.in =================================================================== RCS file: /var/cvs/modules/tkimg/libjpeg/tcl/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libjpeg/tcl/Makefile.in 26 Sep 2004 10:37:15 -0000 1.1.1.1 +++ libjpeg/tcl/Makefile.in 26 Sep 2004 15:37:17 -0000 1.2 @@ -31,30 +31,11 @@ jpegtcl.c \ jpegtclStubInit.c \ jpegtclStubLib.c \ - $(jpeg_Sources) \ @EXTRA_SOURCES@ WIN_SOURCES = UNIX_SOURCES = -jpeg_Sources = \ - jcapimin.c jcapistd.c jccoefct.c \ - jccolor.c jcdctmgr.c jchuff.c \ - jcinit.c jcmainct.c jcmarker.c \ - jcmaster.c jcomapi.c jcparam.c \ - jcphuff.c jcprepct.c jcsample.c \ - jctrans.c jdapimin.c jdapistd.c \ - jdatadst.c jdatasrc.c jdcoefct.c \ - jdcolor.c jddctmgr.c jdhuff.c \ - jdinput.c jdmainct.c jdmarker.c \ - jdmaster.c jdmerge.c jdphuff.c \ - jdpostct.c jdsample.c jdtrans.c \ - jerror.c jfdctflt.c jfdctfst.c \ - jfdctint.c jidctflt.c jidctfst.c \ - jidctint.c jidctred.c jquant1.c \ - jquant2.c jutils.c jmemmgr.c \ - jmemansi.c - #======================================================================== # Identify the object files. This replaces .c with .$(OBJEXT) for all # the named source files. These objects are created and linked into the @@ -190,16 +171,16 @@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ -INCLUDES = -I$(srcdir) -I./libjpeg @TCL_INCLUDES@ +INCLUDES = -I$(srcdir) @TCL_INCLUDES@ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ DEFS = $(TCL_DEFS) @DEFS@ $(EXTRA_CFLAGS) -CONFIG_CLEAN_FILES = Makefile jpegtclConfig.sh pkgIndex.tcl libjpeg +CONFIG_CLEAN_FILES = Makefile jpegtclConfig.sh pkgIndex.tcl CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(PACKAGE)\" -LIBS = @LIBS@ +LIBS = @LIBS@ -ljpeg AR = ar CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) Index: libjpeg/tcl/configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/libjpeg/tcl/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libjpeg/tcl/configure.in 26 Sep 2004 10:37:15 -0000 1.1.1.1 +++ libjpeg/tcl/configure.in 26 Sep 2004 15:37:17 -0000 1.2 @@ -82,9 +82,7 @@ # the basic setup necessary to compile executables. #----------------------------------------------------------------------- -JPEG_CFLAGS="$CFLAGS" TEA_SETUP_COMPILER -JPEG_CC=$CC #-------------------------------------------------------------------- # __CHANGE__ @@ -189,27 +187,6 @@ TEA_EXPORT_CONFIG(jpegtcl) #-------------------------------------------------------------------- -# We call the configure for the jpeg code on our own, without using -# AC_CONFIG_SUBDIR ... Using that requires a symlink, thus making setup -# difficult, and the transfer information ot it is busted, due to how -# TEA handles CFLAGS. -#-------------------------------------------------------------------- - -case "$srcdir" in -.) # No --srcdir option. We are building in place. - jpegdir=$srcdir/.. ;; -/*) # Absolute path. - jpegdir=$srcdir/.. ;; -*) # Relative path. - jpegdir=../$ac_dots$srcdir/.. ;; -esac - -mkdir libjpeg -cd libjpeg -env CC="$JPEG_CC" CFLAGS="$JPEG_CFLAGS" $jpegdir/configure -cd .. - -#-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. Index: libjpeg/tcl/jerror.h =================================================================== RCS file: libjpeg/tcl/jerror.h diff -N libjpeg/tcl/jerror.h --- libjpeg/tcl/jerror.h 26 Sep 2004 10:37:15 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ - -/* - * Redirect the zlib definitions through the stub definitions of the - * binding. A wrapper for a support library using zlib has to use this - * header to ensure usage of the stub macros during the compilation of - * the support library itself. In this way we avoid the need for - * changing the original sources. - * - * This header has to be avoided when building the libz wrapper itself. - */ - -#include "jpegtclDecls.h" Index: libjpeg/tcl/jpeglib.h =================================================================== RCS file: libjpeg/tcl/jpeglib.h diff -N libjpeg/tcl/jpeglib.h --- libjpeg/tcl/jpeglib.h 26 Sep 2004 10:37:15 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ - -/* - * Redirect the zlib definitions through the stub definitions of the - * binding. A wrapper for a support library using zlib has to use this - * header to ensure usage of the stub macros during the compilation of - * the support library itself. In this way we avoid the need for - * changing the original sources. - * - * This header has to be avoided when building the libz wrapper itself. - */ - -#include "jpegtclDecls.h" Index: libjpeg/tcl/jpegtclDecls.h =================================================================== RCS file: /var/cvs/modules/tkimg/libjpeg/tcl/jpegtclDecls.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libjpeg/tcl/jpegtclDecls.h 26 Sep 2004 10:37:15 -0000 1.1.1.1 +++ libjpeg/tcl/jpegtclDecls.h 26 Sep 2004 15:37:17 -0000 1.2 @@ -20,8 +20,8 @@ #undef EXTERN #include -#include <../jpeglib.h> -#include <../jerror.h> +#include +#include #include /* Index: libpng/tcl/Makefile.in =================================================================== RCS file: /var/cvs/modules/tkimg/libpng/tcl/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libpng/tcl/Makefile.in 26 Sep 2004 10:37:16 -0000 1.1.1.1 +++ libpng/tcl/Makefile.in 26 Sep 2004 15:37:17 -0000 1.2 @@ -31,19 +31,11 @@ pngtcl.c \ pngtclStubInit.c \ pngtclStubLib.c \ - $(png_Sources) \ @EXTRA_SOURCES@ WIN_SOURCES = UNIX_SOURCES = -png_Sources = \ - png.c pngerror.c pngmem.c \ - pngpread.c pngread.c pngrio.c \ - pngrtran.c pngrutil.c pngset.c \ - pngtrans.c pngwio.c pngwrite.c \ - pngwtran.c pngwutil.c pngget.c - #======================================================================== # Identify the object files. This replaces .c with .$(OBJEXT) for all # the named source files. These objects are created and linked into the @@ -62,10 +54,6 @@ pngtclstub_OBJECTS = pngtclStubLib.$(OBJEXT) pngtclstub_LIB_FILE = @pngtclstub_LIB_FILE@ -zlibtcl_STUB_LIB_FILE = @zlibtcl_STUB_LIB_FILE@ -zlibtcl_SRC_PATH = @zlibtcl_SRC_PATH@ -zlibtcl_VERSION = @zlibtcl_VERSION@ - #======================================================================== # RUNTIME_SOURCES identifies Tcl runtime files that are associated with # this package that need to be installed, if any. @@ -183,7 +171,7 @@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ -INCLUDES = -I$(zlibtcl_SRC_PATH) -I$(srcdir) @TCL_INCLUDES@ +INCLUDES = -I$(srcdir) @TCL_INCLUDES@ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ @@ -192,9 +180,8 @@ CONFIG_CLEAN_FILES = Makefile pngtclConfig.sh pkgIndex.tcl CPPFLAGS = @CPPFLAGS@ \ - -DZLIBTCL_VERSION=\"$(zlibtcl_VERSION)\" \ -DPACKAGE_NAME=\"$(PACKAGE)\" -LIBS = @LIBS@ +LIBS = @LIBS@ -lpng AR = ar CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) Index: libpng/tcl/configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/libpng/tcl/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libpng/tcl/configure.in 26 Sep 2004 10:37:16 -0000 1.1.1.1 +++ libpng/tcl/configure.in 26 Sep 2004 15:37:17 -0000 1.2 @@ -84,30 +84,6 @@ TEA_SETUP_COMPILER -TEA_PATH_CONFIG(zlibtcl) -TEA_LOAD_CONFIG(zlibtcl) -AC_SUBST(zlibtcl_VERSION) - -#-------------------------------------------------------------------- -# Compute an absolute path to the src directory of 'zlibtcl'. We -# need the special 'zlib.h' header which routes through -# 'zlibtcl.h' to splice the stub definitions into the unchanged -# sources of png. -#-------------------------------------------------------------------- - -case $zlibtcl_SRC_DIR in -/*) zlibtcl_SRC_PATH=$zlibtcl_SRC_DIR - ;; -*) # SRC_DIR relative, splice with BUILD_PATH - zlibtcl_SRC_PATH=`dirname $zlibtcl_BUILD_STUB_LIB_PATH`/$zlibtcl_SRC_DIR -esac - -if test "${TEA_PLATFORM}" = "windows" ; then - zlibtcl_SRC_PATH="\"`$CYGPATH $zlibtcl_SRC_PATH`\"" -fi - -AC_SUBST(zlibtcl_SRC_PATH) - #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very @@ -182,7 +158,6 @@ #-------------------------------------------------------------------- AC_DEFINE(USE_TCL_STUBS) -AC_DEFINE(USE_ZLIBTCL_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It @@ -197,12 +172,6 @@ # Add platform libs to LIBS or SHLIB_LD_LIBS as necessary. #-------------------------------------------------------------------- -if test "${TEA_PLATFORM}" = "windows" -a "$GCC" != "yes" ; then - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\"" -else - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}" -fi - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TCL_LIBS}" #-------------------------------------------------------------------- Index: libpng/tcl/png.h =================================================================== RCS file: libpng/tcl/png.h diff -N libpng/tcl/png.h --- libpng/tcl/png.h 26 Sep 2004 10:37:16 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ - -/* - * Redirect the png definitions through the stub definitions of the - * binding. A wrapper for a support library using png has to use this - * header to ensure usage of the stub macros during the compilation of - * the support library itself. In this way we avoid the need for - * changing the original sources. - * - * This header has to be avoided when building the libpng wrapper itself. - */ - -#include "pngtclDecls.h" Index: libpng/tcl/pngtcl.c =================================================================== RCS file: /var/cvs/modules/tkimg/libpng/tcl/pngtcl.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libpng/tcl/pngtcl.c 26 Sep 2004 10:37:16 -0000 1.1.1.1 +++ libpng/tcl/pngtcl.c 26 Sep 2004 15:37:16 -0000 1.2 @@ -18,7 +18,6 @@ * */ -#include "zlibtcl.h" #include "pngtcl.h" #define TCL_DOES_STUBS \ Index: libpng/tcl/pngtclDecls.h =================================================================== RCS file: /var/cvs/modules/tkimg/libpng/tcl/pngtclDecls.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libpng/tcl/pngtclDecls.h 26 Sep 2004 10:37:16 -0000 1.1.1.1 +++ libpng/tcl/pngtclDecls.h 26 Sep 2004 15:37:16 -0000 1.2 @@ -16,7 +16,7 @@ #include #include -#include <../png.h> +#include #include /* !BEGIN!: Do not edit below this line. */ Index: libtiff/tcl/Makefile.in =================================================================== RCS file: /var/cvs/modules/tkimg/libtiff/tcl/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libtiff/tcl/Makefile.in 26 Sep 2004 10:37:17 -0000 1.1.1.1 +++ libtiff/tcl/Makefile.in 26 Sep 2004 15:37:16 -0000 1.2 @@ -31,26 +31,11 @@ tifftcl.c \ tifftclStubInit.c \ tifftclStubLib.c \ - $(tiff_Sources) \ @EXTRA_SOURCES@ WIN_SOURCES = tif_win32.c UNIX_SOURCES = tif_unix.c -tiff_Sources = \ - tif_aux.c tif_close.c tif_codec.c \ - tif_compress.c tif_dir.c tif_dirinfo.c \ - tif_dirread.c tif_dirwrite.c tif_dumpmode.c \ - tif_error.c tif_fax3.c tif_fax3sm.c \ - tif_getimage.c tif_flush.c tif_luv.c \ - tif_lzw.c tif_next.c tif_open.c \ - tif_packbits.c tif_predict.c tif_print.c \ - tif_read.c tif_swab.c tif_strip.c \ - tif_thunder.c tif_tile.c tif_version.c \ - tif_warning.c tif_write.c \ - \ - tif_color.c tif_extension.c - #======================================================================== # Identify the object files. This replaces .c with .$(OBJEXT) for all # the named source files. These objects are created and linked into the @@ -186,7 +171,7 @@ TCLSH = $(TCLSH_ENV) $(TCLSH_PROG) SHARED_BUILD = @SHARED_BUILD@ -INCLUDES = -I$(srcdir) -I. -I./libtiff -I$(srcdir)/../libtiff @TCL_INCLUDES@ +INCLUDES = -I$(srcdir) -I. @TCL_INCLUDES@ EXTRA_CFLAGS = $(MEM_DEBUG_FLAGS) @EXTRA_CFLAGS@ @@ -195,7 +180,7 @@ CONFIG_CLEAN_FILES = Makefile tifftclConfig.sh pkgIndex.tcl port.h CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(PACKAGE)\" -LIBS = @LIBS@ +LIBS = @LIBS@ -ltiff AR = ar CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) Index: libtiff/tcl/configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/libtiff/tcl/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libtiff/tcl/configure.in 26 Sep 2004 10:37:17 -0000 1.1.1.1 +++ libtiff/tcl/configure.in 26 Sep 2004 15:37:16 -0000 1.2 @@ -85,12 +85,6 @@ TEA_SETUP_COMPILER AC_HEADER_STDC -# Determine a full path for the chosen compiler to ensure that the -# libtiff configure tool is using the same one as ourselves. - -TIFFCC=`echo "$CC" | sed -e 's/-pipe//'` -TIFFCC=`which $TIFFCC 2>/dev/null` - #-------------------------------------------------------------------- # __CHANGE__ # Choose which headers you need. Extension authors should try very @@ -194,33 +188,6 @@ TEA_EXPORT_CONFIG(tifftcl) #-------------------------------------------------------------------- -# Run the configuration of TIFF itself, and do some special checks -# to if the configuration agress with the sources of tiff itself. -# F.e. tiff is hardwired to use "stdarg.h". If the chosen compiler -# does not support this we have to bail out. -#-------------------------------------------------------------------- - -if test `grep STDC_HEADERS confdefs.h | wc -l` -eq 0 -then - AC_MSG_ERROR([Compiler does not use stdarg.h, required for TIFF]) -fi - -if test "X$host" = X -o "X$host" = XNONE -then - ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC" -else - ${srcdir}/../configure --noninteractive "--with-CC=$TIFFCC" $host -fi - -# If the TIFF configure fails we use a predefined 'port.unix' to setup -# the configuration. - -if test ! -r port.h -then - cp ${srcdir}/libtiff/port.unix port.h -fi - -#-------------------------------------------------------------------- # Finally, substitute all of the various values into the Makefile. # You may alternatively have a special pkgIndex.tcl.in or other files # which require substituting th AC variables in. Include these here. Index: libtiff/tcl/port.h =================================================================== RCS file: libtiff/tcl/port.h diff -N libtiff/tcl/port.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libtiff/tcl/port.h 26 Sep 2004 15:37:16 -0000 1.1 @@ -0,0 +1,32 @@ +/* + * Warning, this file was automatically created by the TIFF configure script + * VERSION: v3.6.1 + * RELEASE: + * DATE: Sun Sep 26 16:53:31 MSD 2004 + * TARGET: i586-alt-linux-gnu + * CCOMPILER: /usr/bin/gcc-3.3.3-alt5) + */ +#ifndef _PORT_ +#define _PORT_ 1 +#ifdef __cplusplus +extern "C" { +#endif +#include +#define HOST_FILLORDER FILLORDER_LSB2MSB +#define HOST_BIGENDIAN 0 +#include +#include +#include +#include +#include +typedef double dblparam_t; +#ifdef __STRICT_ANSI__ +#define INLINE __inline__ +#else +#define INLINE inline +#endif +#define GLOBALDATA(TYPE,NAME) extern TYPE NAME +#ifdef __cplusplus +} +#endif +#endif Index: libtiff/tcl/tif_dir.h =================================================================== RCS file: libtiff/tcl/tif_dir.h diff -N libtiff/tcl/tif_dir.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libtiff/tcl/tif_dir.h 26 Sep 2004 15:37:16 -0000 1.1 @@ -0,0 +1,267 @@ +/* $Header: /var/cvs/modules/tkimg/libtiff/tcl/tif_dir.h,v 1.1 2004/09/26 15:37:16 me Exp $ */ + +/* + * Copyright (c) 1988-1997 Sam Leffler + * Copyright (c) 1991-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _TIFFDIR_ +#define _TIFFDIR_ +/* + * ``Library-private'' Directory-related Definitions. + */ + +/* + * Internal format of a TIFF directory entry. + */ +typedef struct { +#define FIELD_SETLONGS 4 + /* bit vector of fields that are set */ + u_long td_fieldsset[FIELD_SETLONGS]; + + uint32 td_imagewidth, td_imagelength, td_imagedepth; + uint32 td_tilewidth, td_tilelength, td_tiledepth; + uint32 td_subfiletype; + uint16 td_bitspersample; + uint16 td_sampleformat; + uint16 td_compression; + uint16 td_photometric; + uint16 td_threshholding; + uint16 td_fillorder; + uint16 td_orientation; + uint16 td_samplesperpixel; + uint32 td_rowsperstrip; + uint16 td_minsamplevalue, td_maxsamplevalue; + double td_sminsamplevalue, td_smaxsamplevalue; + float td_xresolution, td_yresolution; + uint16 td_resolutionunit; + uint16 td_planarconfig; + float td_xposition, td_yposition; + uint16 td_pagenumber[2]; + uint16* td_colormap[3]; + uint16 td_halftonehints[2]; + uint16 td_extrasamples; + uint16* td_sampleinfo; + double td_stonits; + char* td_documentname; + char* td_artist; + char* td_datetime; + char* td_hostcomputer; + char* td_imagedescription; + char* td_make; + char* td_model; + char* td_copyright; + char* td_pagename; + tstrip_t td_stripsperimage; + tstrip_t td_nstrips; /* size of offset & bytecount arrays */ + uint32* td_stripoffset; + uint32* td_stripbytecount; +#if SUBIFD_SUPPORT + uint16 td_nsubifd; + uint32* td_subifd; +#endif +#ifdef YCBCR_SUPPORT + float* td_ycbcrcoeffs; + uint16 td_ycbcrsubsampling[2]; + uint16 td_ycbcrpositioning; +#endif +#ifdef COLORIMETRY_SUPPORT + float* td_whitepoint; + float* td_primarychromas; + float* td_refblackwhite; + uint16* td_transferfunction[3]; +#endif +#ifdef CMYK_SUPPORT + uint16 td_inkset; + uint16 td_ninks; + uint16 td_dotrange[2]; + int td_inknameslen; + char* td_inknames; + char* td_targetprinter; +#endif +#ifdef ICC_SUPPORT + uint32 td_profileLength; + void *td_profileData; +#endif +#ifdef PHOTOSHOP_SUPPORT + uint32 td_photoshopLength; + void *td_photoshopData; +#endif +#ifdef IPTC_SUPPORT + uint32 td_richtiffiptcLength; + void *td_richtiffiptcData; +#endif + /* Begin Pixar Tag values. */ + uint32 td_imagefullwidth, td_imagefulllength; + char* td_textureformat; + char* td_wrapmodes; + float td_fovcot; + float* td_matrixWorldToScreen; + float* td_matrixWorldToCamera; + /* End Pixar Tag Values. */ + uint32 td_xmlpacketLength; + void *td_xmlpacketData; + int td_customValueCount; + TIFFTagValue *td_customValues; +} TIFFDirectory; + +/* + * Field flags used to indicate fields that have + * been set in a directory, and to reference fields + * when manipulating a directory. + */ + +/* + * FIELD_IGNORE is used to signify tags that are to + * be processed but otherwise ignored. This permits + * antiquated tags to be quietly read and discarded. + * Note that a bit *is* allocated for ignored tags; + * this is understood by the directory reading logic + * which uses this fact to avoid special-case handling + */ +#define FIELD_IGNORE 0 + +/* multi-item fields */ +#define FIELD_IMAGEDIMENSIONS 1 +#define FIELD_TILEDIMENSIONS 2 +#define FIELD_RESOLUTION 3 +#define FIELD_POSITION 4 + +/* single-item fields */ +#define FIELD_SUBFILETYPE 5 +#define FIELD_BITSPERSAMPLE 6 +#define FIELD_COMPRESSION 7 +#define FIELD_PHOTOMETRIC 8 +#define FIELD_THRESHHOLDING 9 +#define FIELD_FILLORDER 10 +#define FIELD_DOCUMENTNAME 11 +#define FIELD_IMAGEDESCRIPTION 12 +#define FIELD_MAKE 13 +#define FIELD_MODEL 14 +#define FIELD_ORIENTATION 15 +#define FIELD_SAMPLESPERPIXEL 16 +#define FIELD_ROWSPERSTRIP 17 +#define FIELD_MINSAMPLEVALUE 18 +#define FIELD_MAXSAMPLEVALUE 19 +#define FIELD_PLANARCONFIG 20 +#define FIELD_PAGENAME 21 +#define FIELD_RESOLUTIONUNIT 22 +#define FIELD_PAGENUMBER 23 +#define FIELD_STRIPBYTECOUNTS 24 +#define FIELD_STRIPOFFSETS 25 +#define FIELD_COLORMAP 26 +#define FIELD_ARTIST 27 +#define FIELD_DATETIME 28 +#define FIELD_HOSTCOMPUTER 29 +/* unused - was FIELD_SOFTWARE 30 */ +#define FIELD_EXTRASAMPLES 31 +#define FIELD_SAMPLEFORMAT 32 +#define FIELD_SMINSAMPLEVALUE 33 +#define FIELD_SMAXSAMPLEVALUE 34 +#define FIELD_IMAGEDEPTH 35 +#define FIELD_TILEDEPTH 36 +#define FIELD_HALFTONEHINTS 37 +#define FIELD_YCBCRCOEFFICIENTS 38 +#define FIELD_YCBCRSUBSAMPLING 39 +#define FIELD_YCBCRPOSITIONING 40 +#define FIELD_REFBLACKWHITE 41 +#define FIELD_WHITEPOINT 42 +#define FIELD_PRIMARYCHROMAS 43 +#define FIELD_TRANSFERFUNCTION 44 +#define FIELD_INKSET 45 +#define FIELD_INKNAMES 46 +#define FIELD_DOTRANGE 47 +#define FIELD_TARGETPRINTER 48 +#define FIELD_SUBIFD 49 +#define FIELD_NUMBEROFINKS 50 +#define FIELD_ICCPROFILE 51 +#define FIELD_PHOTOSHOP 52 +#define FIELD_RICHTIFFIPTC 53 +#define FIELD_STONITS 54 +/* Begin PIXAR */ +#define FIELD_IMAGEFULLWIDTH 55 +#define FIELD_IMAGEFULLLENGTH 56 +#define FIELD_TEXTUREFORMAT 57 +#define FIELD_WRAPMODES 58 +#define FIELD_FOVCOT 59 +#define FIELD_MATRIX_WORLDTOSCREEN 60 +#define FIELD_MATRIX_WORLDTOCAMERA 61 +#define FIELD_COPYRIGHT 62 +#define FIELD_XMLPACKET 63 +/* FIELD_CUSTOM (see tiffio.h) 65 */ +/* end of support for well-known tags; codec-private tags follow */ +#define FIELD_CODEC 66 /* base of codec-private tags */ + + +/* + * Pseudo-tags don't normally need field bits since they + * are not written to an output file (by definition). + * The library also has express logic to always query a + * codec for a pseudo-tag so allocating a field bit for + * one is a waste. If codec wants to promote the notion + * of a pseudo-tag being ``set'' or ``unset'' then it can + * do using internal state flags without polluting the + * field bit space defined for real tags. + */ +#define FIELD_PSEUDO 0 + +#define FIELD_LAST (32*FIELD_SETLONGS-1) + +#define TIFFExtractData(tif, type, v) \ + ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \ + ((v) >> (tif)->tif_typeshift[type]) & (tif)->tif_typemask[type] : \ + (v) & (tif)->tif_typemask[type])) +#define TIFFInsertData(tif, type, v) \ + ((uint32) ((tif)->tif_header.tiff_magic == TIFF_BIGENDIAN ? \ + ((v) & (tif)->tif_typemask[type]) << (tif)->tif_typeshift[type] : \ + (v) & (tif)->tif_typemask[type])) + + +#define BITn(n) (((u_long)1L)<<((n)&0x1f)) +#define BITFIELDn(tif, n) ((tif)->tif_dir.td_fieldsset[(n)/32]) +#define TIFFFieldSet(tif, field) (BITFIELDn(tif, field) & BITn(field)) +#define TIFFSetFieldBit(tif, field) (BITFIELDn(tif, field) |= BITn(field)) +#define TIFFClrFieldBit(tif, field) (BITFIELDn(tif, field) &= ~BITn(field)) + +#define FieldSet(fields, f) (fields[(f)/32] & BITn(f)) +#define ResetFieldBit(fields, f) (fields[(f)/32] &= ~BITn(f)) + +#if defined(__cplusplus) +extern "C" { +#endif +extern void _TIFFSetupFieldInfo(TIFF*); +extern void _TIFFPrintFieldInfo(TIFF*, FILE*); +extern TIFFDataType _TIFFSampleToTagType(TIFF*); +extern const TIFFFieldInfo* _TIFFFindOrRegisterFieldInfo( TIFF *tif, + ttag_t tag, + TIFFDataType dt ); +extern TIFFFieldInfo* _TIFFCreateAnonFieldInfo( TIFF *tif, ttag_t tag, + TIFFDataType dt ); + +#define _TIFFMergeFieldInfo TIFFMergeFieldInfo +#define _TIFFFindFieldInfo TIFFFindFieldInfo +#define _TIFFFieldWithTag TIFFFieldWithTag + +#if defined(__cplusplus) +} +#endif +#endif /* _TIFFDIR_ */ Index: libtiff/tcl/tif_predict.h =================================================================== RCS file: libtiff/tcl/tif_predict.h diff -N libtiff/tcl/tif_predict.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libtiff/tcl/tif_predict.h 26 Sep 2004 15:37:16 -0000 1.1 @@ -0,0 +1,61 @@ +/* $Header: /var/cvs/modules/tkimg/libtiff/tcl/tif_predict.h,v 1.1 2004/09/26 15:37:16 me Exp $ */ + +/* + * Copyright (c) 1995-1997 Sam Leffler + * Copyright (c) 1995-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _TIFFPREDICT_ +#define _TIFFPREDICT_ +/* + * ``Library-private'' Support for the Predictor Tag + */ + +/* + * Codecs that want to support the Predictor tag must place + * this structure first in their private state block so that + * the predictor code can cast tif_data to find its state. + */ +typedef struct { + int predictor; /* predictor tag value */ + int stride; /* sample stride over data */ + tsize_t rowsize; /* tile/strip row size */ + + TIFFPostMethod pfunc; /* horizontal differencer/accumulator */ + TIFFCodeMethod coderow; /* parent codec encode/decode row */ + TIFFCodeMethod codestrip; /* parent codec encode/decode strip */ + TIFFCodeMethod codetile; /* parent codec encode/decode tile */ + TIFFVGetMethod vgetparent; /* super-class method */ + TIFFVSetMethod vsetparent; /* super-class method */ + TIFFPrintMethod printdir; /* super-class method */ + TIFFBoolMethod setupdecode; /* super-class method */ + TIFFBoolMethod setupencode; /* super-class method */ +} TIFFPredictorState; + +#if defined(__cplusplus) +extern "C" { +#endif +extern int TIFFPredictorInit(TIFF*); +#if defined(__cplusplus) +} +#endif +#endif /* _TIFFPREDICT_ */ Index: libtiff/tcl/tiffio.h =================================================================== RCS file: libtiff/tcl/tiffio.h diff -N libtiff/tcl/tiffio.h --- libtiff/tcl/tiffio.h 26 Sep 2004 10:37:17 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ - -/* - * Redirect the zlib definitions through the stub definitions of the - * binding. A wrapper for a support library using zlib has to use this - * header to ensure usage of the stub macros during the compilation of - * the support library itself. In this way we avoid the need for - * changing the original sources. - * - * This header has to be avoided when building the libz wrapper itself. - */ - -#include "tifftclDecls.h" Index: libtiff/tcl/tiffiop.h =================================================================== RCS file: libtiff/tcl/tiffiop.h diff -N libtiff/tcl/tiffiop.h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ libtiff/tcl/tiffiop.h 26 Sep 2004 15:37:16 -0000 1.1 @@ -0,0 +1,293 @@ +/* $Header: /var/cvs/modules/tkimg/libtiff/tcl/tiffiop.h,v 1.1 2004/09/26 15:37:16 me Exp $ */ + +/* + * Copyright (c) 1988-1997 Sam Leffler + * Copyright (c) 1991-1997 Silicon Graphics, Inc. + * + * Permission to use, copy, modify, distribute, and sell this software and + * its documentation for any purpose is hereby granted without fee, provided + * that (i) the above copyright notices and this permission notice appear in + * all copies of the software and related documentation, and (ii) the names of + * Sam Leffler and Silicon Graphics may not be used in any advertising or + * publicity relating to the software without the specific, prior written + * permission of Sam Leffler and Silicon Graphics. + * + * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, + * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY + * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + * + * IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR + * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, + * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF + * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ + +#ifndef _TIFFIOP_ +#define _TIFFIOP_ +/* + * ``Library-private'' definitions. + */ +/* + * UNIX systems should run the configure script to generate + * a port.h file that reflects the system capabilities. + * Doing this obviates all the dreck done in tiffcomp.h. + */ +#if defined(unix) || defined(__unix) +#ifdef linux +/* Enable 64-bit file operations. Offsets and size are otherwise restricted to + _signed_ 32 bit, i.e. max 2Gb, while TIFF allows unsigned (4Gb) */ +#define _FILE_OFFSET_BITS 64 +#endif +#include "port.h" +#include "tiffconf.h" +#else +#include "tiffconf.h" +#include "tiffcomp.h" +#endif +#include "tiffio.h" +#include "tif_dir.h" + +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + +typedef struct client_info { + struct client_info *next; + void *data; + char *name; +} TIFFClientInfoLink; + +/* + * Typedefs for ``method pointers'' used internally. + */ +typedef unsigned char tidataval_t; /* internal image data value type */ +typedef tidataval_t* tidata_t; /* reference to internal image data */ + +typedef void (*TIFFVoidMethod)(TIFF*); +typedef int (*TIFFBoolMethod)(TIFF*); +typedef int (*TIFFPreMethod)(TIFF*, tsample_t); +typedef int (*TIFFCodeMethod)(TIFF*, tidata_t, tsize_t, tsample_t); +typedef int (*TIFFSeekMethod)(TIFF*, uint32); +typedef void (*TIFFPostMethod)(TIFF*, tidata_t, tsize_t); +typedef uint32 (*TIFFStripMethod)(TIFF*, uint32); +typedef void (*TIFFTileMethod)(TIFF*, uint32*, uint32*); + +struct tiff { + char* tif_name; /* name of open file */ + int tif_fd; /* open file descriptor */ + int tif_mode; /* open mode (O_*) */ + uint32 tif_flags; +#define TIFF_FILLORDER 0x0003 /* natural bit fill order for machine */ +#define TIFF_DIRTYHEADER 0x0004 /* header must be written on close */ +#define TIFF_DIRTYDIRECT 0x0008 /* current directory must be written */ +#define TIFF_BUFFERSETUP 0x0010 /* data buffers setup */ +#define TIFF_CODERSETUP 0x0020 /* encoder/decoder setup done */ +#define TIFF_BEENWRITING 0x0040 /* written 1+ scanlines to file */ +#define TIFF_SWAB 0x0080 /* byte swap file information */ +#define TIFF_NOBITREV 0x0100 /* inhibit bit reversal logic */ +#define TIFF_MYBUFFER 0x0200 /* my raw data buffer; free on close */ +#define TIFF_ISTILED 0x0400 /* file is tile, not strip- based */ +#define TIFF_MAPPED 0x0800 /* file is mapped into memory */ +#define TIFF_POSTENCODE 0x1000 /* need call to postencode routine */ +#define TIFF_INSUBIFD 0x2000 /* currently writing a subifd */ +#define TIFF_UPSAMPLED 0x4000 /* library is doing data up-sampling */ +#define TIFF_STRIPCHOP 0x8000 /* enable strip chopping support */ + toff_t tif_diroff; /* file offset of current directory */ + toff_t tif_nextdiroff; /* file offset of following directory */ + toff_t* tif_dirlist; /* list of offsets to already seen */ + /* directories to prevent IFD looping */ + uint16 tif_dirnumber; /* number of already seen directories */ + TIFFDirectory tif_dir; /* internal rep of current directory */ + TIFFHeader tif_header; /* file's header block */ + const int* tif_typeshift; /* data type shift counts */ + const long* tif_typemask; /* data type masks */ + uint32 tif_row; /* current scanline */ + tdir_t tif_curdir; /* current directory (index) */ + tstrip_t tif_curstrip; /* current strip for read/write */ + toff_t tif_curoff; /* current offset for read/write */ + toff_t tif_dataoff; /* current offset for writing dir */ +#if SUBIFD_SUPPORT + uint16 tif_nsubifd; /* remaining subifds to write */ + toff_t tif_subifdoff; /* offset for patching SubIFD link */ +#endif +/* tiling support */ + uint32 tif_col; /* current column (offset by row too) */ + ttile_t tif_curtile; /* current tile for read/write */ + tsize_t tif_tilesize; /* # of bytes in a tile */ +/* compression scheme hooks */ + int tif_decodestatus; + TIFFBoolMethod tif_setupdecode;/* called once before predecode */ + TIFFPreMethod tif_predecode; /* pre- row/strip/tile decoding */ + TIFFBoolMethod tif_setupencode;/* called once before preencode */ + int tif_encodestatus; + TIFFPreMethod tif_preencode; /* pre- row/strip/tile encoding */ + TIFFBoolMethod tif_postencode; /* post- row/strip/tile encoding */ + TIFFCodeMethod tif_decoderow; /* scanline decoding routine */ + TIFFCodeMethod tif_encoderow; /* scanline encoding routine */ + TIFFCodeMethod tif_decodestrip;/* strip decoding routine */ + TIFFCodeMethod tif_encodestrip;/* strip encoding routine */ + TIFFCodeMethod tif_decodetile; /* tile decoding routine */ + TIFFCodeMethod tif_encodetile; /* tile encoding routine */ + TIFFVoidMethod tif_close; /* cleanup-on-close routine */ + TIFFSeekMethod tif_seek; /* position within a strip routine */ + TIFFVoidMethod tif_cleanup; /* cleanup state routine */ + TIFFStripMethod tif_defstripsize;/* calculate/constrain strip size */ + TIFFTileMethod tif_deftilesize;/* calculate/constrain tile size */ + tidata_t tif_data; /* compression scheme private data */ +/* input/output buffering */ + tsize_t tif_scanlinesize;/* # of bytes in a scanline */ + tsize_t tif_scanlineskew;/* scanline skew for reading strips */ + tidata_t tif_rawdata; /* raw data buffer */ + tsize_t tif_rawdatasize;/* # of bytes in raw data buffer */ + tidata_t tif_rawcp; /* current spot in raw buffer */ + tsize_t tif_rawcc; /* bytes unread from raw buffer */ +/* memory-mapped file support */ + tidata_t tif_base; /* base of mapped file */ + toff_t tif_size; /* size of mapped file region (bytes) */ + TIFFMapFileProc tif_mapproc; /* map file method */ + TIFFUnmapFileProc tif_unmapproc;/* unmap file method */ +/* input/output callback methods */ + thandle_t tif_clientdata; /* callback parameter */ + TIFFReadWriteProc tif_readproc; /* read method */ + TIFFReadWriteProc tif_writeproc;/* write method */ + TIFFSeekProc tif_seekproc; /* lseek method */ + TIFFCloseProc tif_closeproc; /* close method */ + TIFFSizeProc tif_sizeproc; /* filesize method */ +/* post-decoding support */ + TIFFPostMethod tif_postdecode; /* post decoding routine */ +/* tag support */ + TIFFFieldInfo** tif_fieldinfo; /* sorted table of registered tags */ + int tif_nfields; /* # entries in registered tag table */ + TIFFTagMethods tif_tagmethods; /* tag get/set/print routines */ + TIFFClientInfoLink *tif_clientinfo; /* extra client information. */ +}; + +#define isPseudoTag(t) (t > 0xffff) /* is tag value normal or pseudo */ + +#define isTiled(tif) (((tif)->tif_flags & TIFF_ISTILED) != 0) +#define isMapped(tif) (((tif)->tif_flags & TIFF_MAPPED) != 0) +#define isFillOrder(tif, o) (((tif)->tif_flags & (o)) != 0) +#define isUpSampled(tif) (((tif)->tif_flags & TIFF_UPSAMPLED) != 0) +#define TIFFReadFile(tif, buf, size) \ + ((*(tif)->tif_readproc)((tif)->tif_clientdata,buf,size)) +#define TIFFWriteFile(tif, buf, size) \ + ((*(tif)->tif_writeproc)((tif)->tif_clientdata,buf,size)) +#define TIFFSeekFile(tif, off, whence) \ + ((*(tif)->tif_seekproc)((tif)->tif_clientdata,(toff_t)(off),whence)) +#define TIFFCloseFile(tif) \ + ((*(tif)->tif_closeproc)((tif)->tif_clientdata)) +#define TIFFGetFileSize(tif) \ + ((*(tif)->tif_sizeproc)((tif)->tif_clientdata)) +#define TIFFMapFileContents(tif, paddr, psize) \ + ((*(tif)->tif_mapproc)((tif)->tif_clientdata,paddr,psize)) +#define TIFFUnmapFileContents(tif, addr, size) \ + ((*(tif)->tif_unmapproc)((tif)->tif_clientdata,addr,size)) + +/* + * Default Read/Seek/Write definitions. + */ +#ifndef ReadOK +#define ReadOK(tif, buf, size) \ + (TIFFReadFile(tif, (tdata_t) buf, (tsize_t)(size)) == (tsize_t)(size)) +#endif +#ifndef SeekOK +#define SeekOK(tif, off) \ + (TIFFSeekFile(tif, (toff_t) off, SEEK_SET) == (toff_t) off) +#endif +#ifndef WriteOK +#define WriteOK(tif, buf, size) \ + (TIFFWriteFile(tif, (tdata_t) buf, (tsize_t) size) == (tsize_t) size) +#endif + +/* NB: the uint32 casts are to silence certain ANSI-C compilers */ +#define TIFFhowmany(x, y) ((((uint32)(x))+(((uint32)(y))-1))/((uint32)(y))) +#define TIFFroundup(x, y) (TIFFhowmany(x,y)*((uint32)(y))) + +#define TIFFmax(A,B) ((A)>(B)?(A):(B)) +#define TIFFmin(A,B) ((A)<(B)?(A):(B)) + +#if defined(__cplusplus) +extern "C" { +#endif +extern int _TIFFgetMode(const char*, const char*); +extern int _TIFFNoRowEncode(TIFF*, tidata_t, tsize_t, tsample_t); +extern int _TIFFNoStripEncode(TIFF*, tidata_t, tsize_t, tsample_t); +extern int _TIFFNoTileEncode(TIFF*, tidata_t, tsize_t, tsample_t); +extern int _TIFFNoRowDecode(TIFF*, tidata_t, tsize_t, tsample_t); +extern int _TIFFNoStripDecode(TIFF*, tidata_t, tsize_t, tsample_t); +extern int _TIFFNoTileDecode(TIFF*, tidata_t, tsize_t, tsample_t); +extern void _TIFFNoPostDecode(TIFF*, tidata_t, tsize_t); +extern int _TIFFNoPreCode (TIFF*, tsample_t); +extern int _TIFFNoSeek(TIFF*, uint32); +extern void _TIFFSwab16BitData(TIFF*, tidata_t, tsize_t); +extern void _TIFFSwab32BitData(TIFF*, tidata_t, tsize_t); +extern void _TIFFSwab64BitData(TIFF*, tidata_t, tsize_t); +extern int TIFFFlushData1(TIFF*); +extern void TIFFFreeDirectory(TIFF*); +extern int TIFFDefaultDirectory(TIFF*); +extern int TIFFSetCompressionScheme(TIFF*, int); +extern int TIFFSetDefaultCompressionState(TIFF*); +extern uint32 _TIFFDefaultStripSize(TIFF*, uint32); +extern void _TIFFDefaultTileSize(TIFF*, uint32*, uint32*); + +extern void _TIFFsetByteArray(void**, void*, long); +extern void _TIFFsetString(char**, char*); +extern void _TIFFsetShortArray(uint16**, uint16*, long); +extern void _TIFFsetLongArray(uint32**, uint32*, long); +extern void _TIFFsetFloatArray(float**, float*, long); +extern void _TIFFsetDoubleArray(double**, double*, long); + +extern void _TIFFprintAscii(FILE*, const char*); +extern void _TIFFprintAsciiTag(FILE*, const char*, const char*); + +GLOBALDATA(TIFFErrorHandler,_TIFFwarningHandler); +GLOBALDATA(TIFFErrorHandler,_TIFFerrorHandler); + +extern int TIFFInitDumpMode(TIFF*, int); +#ifdef PACKBITS_SUPPORT +extern int TIFFInitPackBits(TIFF*, int); +#endif +#ifdef CCITT_SUPPORT +extern int TIFFInitCCITTRLE(TIFF*, int), TIFFInitCCITTRLEW(TIFF*, int); +extern int TIFFInitCCITTFax3(TIFF*, int), TIFFInitCCITTFax4(TIFF*, int); +#endif +#ifdef THUNDER_SUPPORT +extern int TIFFInitThunderScan(TIFF*, int); +#endif +#ifdef NEXT_SUPPORT +extern int TIFFInitNeXT(TIFF*, int); +#endif +#ifdef LZW_SUPPORT +extern int TIFFInitLZW(TIFF*, int); +#endif +#ifdef OJPEG_SUPPORT +extern int TIFFInitOJPEG(TIFF*, int); +#endif +#ifdef JPEG_SUPPORT +extern int TIFFInitJPEG(TIFF*, int); +#endif +#ifdef JBIG_SUPPORT +extern int TIFFInitJBIG(TIFF*, int); +#endif +#ifdef ZIP_SUPPORT +extern int TIFFInitZIP(TIFF*, int); +#endif +#ifdef PIXARLOG_SUPPORT +extern int TIFFInitPixarLog(TIFF*, int); +#endif +#ifdef LOGLUV_SUPPORT +extern int TIFFInitSGILog(TIFF*, int); +#endif +#ifdef VMS +extern const TIFFCodec _TIFFBuiltinCODECS[]; +#else +extern TIFFCodec _TIFFBuiltinCODECS[]; +#endif + +#if defined(__cplusplus) +} +#endif +#endif /* _TIFFIOP_ */ Index: libtiff/tcl/tifftclDecls.h =================================================================== RCS file: /var/cvs/modules/tkimg/libtiff/tcl/tifftclDecls.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- libtiff/tcl/tifftclDecls.h 26 Sep 2004 10:37:17 -0000 1.1.1.1 +++ libtiff/tcl/tifftclDecls.h 26 Sep 2004 15:37:16 -0000 1.2 @@ -16,9 +16,9 @@ #include #include -#include <../libtiff/tiffio.h> -#include <../libtiff/tiffiop.h> -#include <../libtiff/tif_predict.h> +#include +#include +#include #include /* !BEGIN!: Do not edit below this line. */ Index: png/Makefile.in =================================================================== RCS file: /var/cvs/modules/tkimg/png/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- png/Makefile.in 26 Sep 2004 10:37:18 -0000 1.1.1.1 +++ png/Makefile.in 26 Sep 2004 17:01:39 -0000 1.2 @@ -55,10 +55,6 @@ pngtcl_BUILD_PATH = @pngtcl_BUILD_PATH@ pngtcl_VERSION = @pngtcl_VERSION@ -zlibtcl_SRC_PATH = @zlibtcl_SRC_PATH@ -zlibtcl_BUILD_PATH = @zlibtcl_BUILD_PATH@ -zlibtcl_VERSION = @zlibtcl_VERSION@ - tkimg_SRC_PATH = @tkimg_SRC_PATH@ tkimg_BUILD_PATH = @tkimg_BUILD_PATH@ tkimg_VERSION = @tkimg_VERSION@ @@ -195,8 +191,6 @@ -I$(tkimg_SRC_PATH) \ -I$(pngtcl_SRC_PATH) \ -I$(pngtcl_BUILD_PATH) \ - -I$(zlibtcl_SRC_PATH) \ - -I$(zlibtcl_BUILD_PATH) \ -I. -I$(srcdir) \ @TCL_INCLUDES@ \ @TK_INCLUDES@ \ @@ -209,8 +203,7 @@ CONFIG_CLEAN_FILES = Makefile pkgIndex.tcl CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\" \ - -DPNGTCL_VERSION=\"$(pngtcl_VERSION)\" \ - -DPNGTCL_VERSION=\"$(zlibtcl_VERSION)\" + -DPNGTCL_VERSION=\"$(pngtcl_VERSION)\" LIBS = @LIBS@ AR = ar Index: png/configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/png/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- png/configure.in 26 Sep 2004 10:37:19 -0000 1.1.1.1 +++ png/configure.in 26 Sep 2004 17:01:39 -0000 1.2 @@ -99,13 +99,8 @@ TEA_LOAD_CONFIG(pngtcl) AC_SUBST(pngtcl_VERSION) -TEA_PATH_CONFIG(zlibtcl) -TEA_LOAD_CONFIG(zlibtcl) -AC_SUBST(zlibtcl_VERSION) - IMG_SRCPATH(tkimg) IMG_SRCPATH(pngtcl) -IMG_SRCPATH(zlibtcl) #-------------------------------------------------------------------- # __CHANGE__ @@ -192,7 +187,6 @@ AC_DEFINE(USE_TK_STUBS) AC_DEFINE(USE_TKIMG_STUBS) AC_DEFINE(USE_PNGTCL_STUBS) -AC_DEFINE(USE_ZLIBTCL_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It Index: tiff/Makefile.in =================================================================== RCS file: /var/cvs/modules/tkimg/tiff/Makefile.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tiff/Makefile.in 26 Sep 2004 10:37:19 -0000 1.1.1.1 +++ tiff/Makefile.in 26 Sep 2004 15:37:16 -0000 1.2 @@ -62,10 +62,6 @@ jpegtcl_BUILD_PATH = @jpegtcl_BUILD_PATH@ jpegtcl_VERSION = @jpegtcl_VERSION@ -zlibtcl_SRC_PATH = @zlibtcl_SRC_PATH@ -zlibtcl_BUILD_PATH = @zlibtcl_BUILD_PATH@ -zlibtcl_VERSION = @zlibtcl_VERSION@ - tkimg_SRC_PATH = @tkimg_SRC_PATH@ tkimg_BUILD_PATH = @tkimg_BUILD_PATH@ tkimg_VERSION = @tkimg_VERSION@ @@ -204,8 +200,6 @@ -I$(tifftcl_BUILD_PATH)/libtiff \ -I$(jpegtcl_SRC_PATH) \ -I$(jpegtcl_BUILD_PATH)/libjpeg \ - -I$(zlibtcl_SRC_PATH) \ - -I$(zlibtcl_BUILD_PATH) \ -I. -I$(srcdir) \ @TCL_INCLUDES@ \ @TK_INCLUDES@ \ @@ -219,8 +213,7 @@ CPPFLAGS = @CPPFLAGS@ -DPACKAGE_NAME=\"$(DPACKAGE)\" \ -DTIFFTCL_VERSION=\"$(tifftcl_VERSION)\" \ - -DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\" \ - -DZLIBTCL_VERSION=\"$(zlibtcl_VERSION)\" + -DJPEGTCL_VERSION=\"$(jpegtcl_VERSION)\" LIBS = @LIBS@ AR = ar Index: tiff/configure.in =================================================================== RCS file: /var/cvs/modules/tkimg/tiff/configure.in,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tiff/configure.in 26 Sep 2004 10:37:20 -0000 1.1.1.1 +++ tiff/configure.in 26 Sep 2004 15:37:16 -0000 1.2 @@ -103,14 +103,9 @@ TEA_LOAD_CONFIG(jpegtcl) AC_SUBST(jpegtcl_VERSION) -TEA_PATH_CONFIG(zlibtcl) -TEA_LOAD_CONFIG(zlibtcl) -AC_SUBST(zlibtcl_VERSION) - IMG_SRCPATH(tkimg) IMG_SRCPATH(tifftcl) IMG_SRCPATH(jpegtcl) -IMG_SRCPATH(zlibtcl) #-------------------------------------------------------------------- # __CHANGE__ @@ -198,7 +193,6 @@ AC_DEFINE(USE_TKIMG_STUBS) AC_DEFINE(USE_TIFFTCL_STUBS) AC_DEFINE(USE_JPEGTCL_STUBS) -AC_DEFINE(USE_ZLIBTCL_STUBS) #-------------------------------------------------------------------- # This macro generates a line to use when building a library. It @@ -217,12 +211,10 @@ SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tkimg_STUB_LIB_PATH}`\"" SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${tifftcl_STUB_LIB_PATH}`\"" SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${jpegtcl_STUB_LIB_PATH}`\"" - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \"`${CYGPATH} ${zlibtcl_STUB_LIB_PATH}`\"" else SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tkimg_STUB_LIB_SPEC}" SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${tifftcl_STUB_LIB_SPEC}" SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${jpegtcl_STUB_LIB_SPEC}" - SHLIB_LD_LIBS="${SHLIB_LD_LIBS} ${zlibtcl_STUB_LIB_SPEC}" fi SHLIB_LD_LIBS="${SHLIB_LD_LIBS} \${TK_LIBS}" Index: tiff/tiff.c =================================================================== RCS file: /var/cvs/modules/tkimg/tiff/tiff.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tiff/tiff.c 26 Sep 2004 10:37:20 -0000 1.1.1.1 +++ tiff/tiff.c 26 Sep 2004 15:37:16 -0000 1.2 @@ -17,7 +17,7 @@ #include #include #include -#include +#include static int SetupTiffLibrary _ANSI_ARGS_ ((Tcl_Interp *interp)); @@ -114,9 +114,6 @@ TIFFVSetField && TIFFSwabArrayOfShort ) { - if (Zlibtcl_InitStubs(interp, "1.0", 0) == NULL) { - return TCL_ERROR; - } TIFFRegisterCODEC (COMPRESSION_DEFLATE, "Deflate", TkimgTIFFInitZip); if (Jpegtcl_InitStubs(interp, "1.0", 0) == NULL) { Index: tiff/tiffPixar.c =================================================================== RCS file: /var/cvs/modules/tkimg/tiff/tiffPixar.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tiff/tiffPixar.c 26 Sep 2004 10:37:20 -0000 1.1.1.1 +++ tiff/tiffPixar.c 26 Sep 2004 15:37:16 -0000 1.2 @@ -83,8 +83,7 @@ * */ -#include "zlibtcl.h" - +#include #include #include Index: tiff/tiffZip.c =================================================================== RCS file: /var/cvs/modules/tkimg/tiff/tiffZip.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- tiff/tiffZip.c 26 Sep 2004 10:37:20 -0000 1.1.1.1 +++ tiff/tiffZip.c 26 Sep 2004 15:37:16 -0000 1.2 @@ -47,7 +47,7 @@ * last found at ftp://ftp.uu.net/pub/archiving/zip/zlib/zlib-0.99.tar.gz. */ -#include +#include #include