summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Leffler <sam@engr.sgi.com>1996-02-09 22:51:07 +0000
committerRoger Leigh <rleigh@codelibre.net>2022-06-22 18:37:14 +0100
commit963e9c6bc0b30048052bf076e0c8b62ea2f9e90f (patch)
treecfbc5c90031d152c07ec8b2169c4ed0e67578491
parent98ce01d4275de67a73e57548172d9a35caa84b92 (diff)
downloadlibtiff-git-963e9c6bc0b30048052bf076e0c8b62ea2f9e90f.tar.gz
v3.4beta029 releasev3.4beta029
-rw-r--r--Makefile.in11
-rw-r--r--TODO5
-rw-r--r--config.site53
-rwxr-xr-xconfigure16
-rw-r--r--contrib/mac-cw/Makefile.script72
-rw-r--r--contrib/mac-cw/README18
-rw-r--r--contrib/mac-cw/mac_main.c20
-rw-r--r--contrib/mac-cw/mac_main.h12
-rw-r--r--contrib/mac-cw/metrowerks.note84
-rw-r--r--contrib/mac-cw/mkg3_main.c14
-rw-r--r--contrib/mac-cw/version.h4
-rwxr-xr-xcontrib/vms/libtiff/tiffshraxp.optbin3221 -> 3221 bytes
-rw-r--r--dist/tiff.alpha2
-rw-r--r--html/Makefile.in6
-rw-r--r--html/build.html63
-rw-r--r--html/index.html4
-rw-r--r--html/v3.4beta028.html145
-rw-r--r--html/v3.4beta029.html85
-rw-r--r--libtiff/Makefile.in8
-rw-r--r--libtiff/tif_apple.c4
-rw-r--r--libtiff/tif_fax3.c101
-rw-r--r--libtiff/tif_fax3.h42
-rw-r--r--libtiff/tiffcomp.h4
-rw-r--r--man/Makefile.in4
-rw-r--r--port/Makefile.in4
-rw-r--r--tools/Makefile.in12
26 files changed, 691 insertions, 102 deletions
diff --git a/Makefile.in b/Makefile.in
index 14c79064..d9d15abf 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,5 +1,5 @@
#! smake
-# $Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.41 1996/01/10 19:30:44 sam Exp $
+# $Header: /usr/people/sam/tiff/RCS/Makefile.in,v 1.44 1996/02/09 21:29:19 sam Exp $
#
# @WARNING@
#
@@ -38,7 +38,7 @@ SRCDIR = @SRCDIR@
# CXXCOMPILER: @CXXCOMPILER@
#
@SETMAKE@
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
ECHO = echo
GENDIST = ${TOOLROOT}/usr/sbin/gendist
@@ -46,6 +46,8 @@ GENDIST = ${TOOLROOT}/usr/sbin/gendist
all default:
@if [ "@PORT@" = yes ]; then \
${ECHO} "= "port; cd port; ${MAKE}; \
+ else \
+ true; \
fi
@${ECHO} "= "libtiff; cd libtiff; ${MAKE}
@${ECHO} "= "tools; cd tools; ${MAKE}
@@ -59,6 +61,8 @@ install:
clean:
@if [ "@PORT@" = yes ]; then \
${ECHO} "= "port; cd port; ${MAKE} clean; \
+ else \
+ true; \
fi
@${ECHO} "= "libtiff; cd libtiff; ${MAKE} clean
@${ECHO} "= "tools; cd tools; ${MAKE} clean
@@ -256,6 +260,8 @@ TIFFFILES=\
html/misc.html \
html/support.html \
html/tools.html \
+ html/v3.4beta029.html \
+ html/v3.4beta028.html \
html/v3.4beta024.html \
html/v3.4beta018.html \
html/v3.4beta016.html \
@@ -305,6 +311,7 @@ CONTRIBFILES=\
contrib/win32 \
contrib/win95 \
contrib/winnt \
+ contrib/mac-cw \
${NULL}
DISTFILES=\
${TIFFFILES} \
diff --git a/TODO b/TODO
index 1b6beea0..3fd94828 100644
--- a/TODO
+++ b/TODO
@@ -1,10 +1,7 @@
-# $Header: /usr/people/sam/tiff/RCS/TODO,v 1.2 1995/07/03 18:42:38 sam Exp $
+# $Header: /usr/people/sam/tiff/RCS/TODO,v 1.4 1996/02/09 22:09:00 sam Exp $
-o update manual pages
o tiffcmp read data by strip/tile instead of scanline
o YCbCr sampling support
-o html manual pages
o extracate colorspace conversion support
o look at isolating all codecs from TIFF library
-o tiffcp problem with JPEG-encoded image
o JPEG colormode order dependency problem
diff --git a/config.site b/config.site
index 54a1b746..357294c3 100644
--- a/config.site
+++ b/config.site
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.8 1996/01/10 19:31:37 sam Exp $
+# $Header: /usr/people/sam/tiff/RCS/config.site,v 1.10 1996/02/09 05:53:45 sam Exp $
#
# TIFF Software
#
@@ -41,8 +41,8 @@
# Package controls.
#
#DSO="auto" # auto|IRIX configure DSO support for system
-#JPEG="no" # yes|no configure JPEG support
-#ZIP="no" # yes|no configure Deflate support
+#JPEG="no" # yes|no configure JPEG support (see below)
+#ZIP="no" # yes|no configure Deflate support (see below)
#LIBGL="auto" # yes|no|auto configure IRIS GL-based tools
#LIBIMAGE="auto" # yes|no|auto configure SGI RGB image tools
@@ -55,16 +55,48 @@
#DIR_MAN="/usr/local/man" # directory for manual pages
#
-# JPEG-specific parameters; used when JPEG support is enabled.
+# Configuring supporting libraries.
#
-# NB: JPEG support requires release 5 or later of the IJG code,
-# which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
+# The TIFF software makes use of two ancillary packages: the IJG
+# distribution to support the JPEG codec and the zlib distribution
+# to support the Deflate codec. To setup use of these packages you
+# need to specify where each package's include files are located and
+# where the pre-built library (static archive or DSO) is located.
+# These may be different or the same (as when the package is compiled
+# and referenced directly from the place where the software was
+# loaded and compiled).
#
-#DIRS_LIBINC="$DIRS_LIBINC ../jpeg" # directory for JPEG include files
-#LIBJPEG="-L ../jpeg -ljpeg" # JPEG library to load
+# DIRS_LIBINC is a space-separated list of directories to use for
+# locating include files in these packages. Note that it should not
+# include -I options as might be passed to the C preprocessor; these
+# are automatically added by the configure script when the Makefiles
+# are generated.
+#
+# DIR_<package>LIB is the pathname of the directory where <package>'s
+# pre-built library may be found; this is used when building a TIFF
+# DSO (on systems where support is present) and when building the
+# programs in the tools directory. By default the configure script
+# will load the associated library using
+#
+# -L${DIR_<package>LIB} -l<package>
+#
+# e.g. -L${DIR_JPEGLIB} -ljpeg. If this is wrong for your system
+# (e.g. your compiler/loader does not support the -L option), then
+# the LIB<package> parameter can be set explicitly to specify the
+# library to use.
+#
+
+#
+# JPEG-specific parameters; used when JPEG support is enabled (see above).
+#
+# JPEG support requires release 5 or later of the IJG code,
+# which you can find on the Internet at ftp.uu.net:/graphics/jpeg/.
+#
+#DIRS_LIBINC="$DIRS_LIBINC ../src/jpeg-5a" # directory for jpeg include files
+#DIR_JPEGLIB=../src/jpeg-5a # directory for libjpeg
#
-# Deflate-specific parameters; used when Deflate support is enabled.
+# Deflate-specific parameters; used when Deflate support is enabled (see above).
#
# NB: Deflate support requires version 0.92 or later of the zlib
# library written by Jean-loup Gailly and Mark Adler. Starting
@@ -76,7 +108,7 @@
# Look for it also at ftp://ftp.uu.net/pub/archiving/zip/zlib.
#
#DIRS_LIBINC="$DIRS_LIBINC ../zlib" # directory for zlib include files
-#LIBGZ="-L ../zlib -lz" # libgz library to load
+#DIR_GZLIB="../zlib" # directory for libz
#
# Miscellaneous parameters.
@@ -129,4 +161,5 @@
#LN_S="-s" # option to ${LN} to create symlink
#MV_F="-f" # option to ${MV} to force operation
#SED="/bin/sed" # pathname of suitable sed program
+#SCRIPT_SH="/bin/sh" # pathname of suitable shell
#STRIP="/bin/strip" # strip program used by install.sh
diff --git a/configure b/configure
index b68f57b6..9613382d 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#!/bin/sh
-# $Header: /usr/people/sam/tiff/RCS/configure,v 1.32 1996/01/10 19:31:39 sam Exp $
+# $Header: /usr/people/sam/tiff/RCS/configure,v 1.34 1996/02/09 05:53:45 sam Exp $
#
# Tag Image File Format (TIFF) Software
#
@@ -52,7 +52,7 @@ MACHDEPLIBS=-lm
: ${MAKE=make} # make to use
# screws up the test of `-f -'
-unset MAKEFLAGS
+: ${MAKEFLAGS=} # unset MAKEFLAGS
RM="rm -f"
POSIXLY_CORRECT=1; export POSIXLY_CORRECT # disable GNU extensions
@@ -140,7 +140,7 @@ do
-target|--target) ac_prev=TARGET;;
-target=*|--target=*) TARGET="$ac_optarg" ;;
-version|--version)
- echo "This is TIFF configure $Revision: 1.32 $"
+ echo "This is TIFF configure $Revision: 1.34 $"
exit 0
;;
-help|--help) usage; exit 0;;
@@ -1071,6 +1071,7 @@ Note "Selecting programs used during installation."
#
test -z "${CHMOD:-}" && CHMOD=`findAppDef chmod $PATH chmod`
test -z "${LN:-}" && LN=`findAppDef ln $PATH ln`
+test -z "${SCRIPT_SH:-}" && SCRIPT_SH=`findAppDef sh $PATH sh`
test -z "${SED:-}" && SED=`findAppDef sed $PATH sed`
test -z "${STRIP:-}" && STRIP=`findAppDef strip $PATH strip`
@@ -1452,14 +1453,14 @@ esac
if [ "${JPEG}" = yes ]; then
test -z "${CONF_JPEG:-}" && CONF_JPEG="-DJPEG_SUPPORT"
- test -z "${LIBJPEG:-}" && LIBJPEG="${DIR_JPEGLIB}/libjpeg.a"
+ test -z "${LIBJPEG:-}" && LIBJPEG="-L${DIR_JPEGLIB} -ljpeg"
else
CONF_JPEG=
LIBJPEG=
fi
if [ "${ZIP}" = yes ]; then
test -z "${CONF_ZIP:-}" && CONF_ZIP="-DZIP_SUPPORT"
- test -z "${LIBGZ:-}" && LIBGZ="${DIR_GZLIB}/libz.a"
+ test -z "${LIBGZ:-}" && LIBGZ="-L${DIR_GZLIB} -lz"
else
CONF_ZIP=
LIBGZ=
@@ -1476,7 +1477,9 @@ relativize()
if [ $SRCDIR_IS_LIBTIFF = no ]; then
(for i do
case "$i" in
- /*) echo "$i" ;;
+ /*|-l*) echo "$i" ;;
+ -L|-L/*) echo "$i" ;;
+ -L*) echo "$i" | sed 's;-L;-L../;' ;;
*) echo "../$i" ;;
esac
done) | tr '\012' ' '
@@ -1561,6 +1564,7 @@ cat>>confsed<<EOF
/@PORT@/s;;${PORT};g
/@PORTFUNCS@/s;;${PORTFUNCS};g
/@RANLIB@/s;;${RANLIB};g
+/@SCRIPT_SH@/s;;${SCRIPT_SH};g
/@SED@/s;;${SED};g
/@SETMAKE@/s;;${SETMAKE};g
/@SRCDIR@/s;;${SRCDIR};g
diff --git a/contrib/mac-cw/Makefile.script b/contrib/mac-cw/Makefile.script
new file mode 100644
index 00000000..85614c81
--- /dev/null
+++ b/contrib/mac-cw/Makefile.script
@@ -0,0 +1,72 @@
+
+(* You must manually set the top-level PATHNAME here; everything else is automatic *)
+
+set PATHNAME to "ritter:tiff-v3.4beta028:"
+set PRINTING to "NO"
+
+set MKG3STATES to PATHNAME & "mkg3states.mw"
+set LIBTIFF to PATHNAME & "libtiff-68K.mw"
+set TIFFINFO to PATHNAME & "tiffinfo.mw"
+
+with timeout of 60000 seconds
+ tell application "MW C/C++ 68K 1.2.2"
+
+ activate
+
+
+ (* Create tif_fax3sm.c file *)
+ Create Project {file MKG3STATES}
+ Add Files {"mkg3states.c", "mkg3_main.c", "getopt.c"}
+ Add Files {"MacOS.lib"} To Segment 2
+ Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
+ Add Files {"SIOUX.68K.Lib"} To Segment 4
+ Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
+
+ Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
+ Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
+ Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
+ Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
+ Set Preferences To {Project Type:0, File Name:"mkg3states", File Creator:"????", File Type:"APPL"}
+
+ Make Project
+ Run Project
+ Remove Binaries
+ Close Project
+
+
+ (* Create LIBTIFF *)
+ Create Project {file LIBTIFF}
+ Add Files {"tif_apple.c", "tif_aux.c", "tif_close.c", "tif_codec.c", "tif_compress.c", "tif_dumpmode.c", "tif_error.c", "tif_flush.c", "tif_lzw.c", "tif_next.c", "tif_open.c", "tif_packbits.c"}
+ Add Files {"tif_fax3.c"} To Segment 2
+ Add Files {"tif_dirinfo.c", "tif_dir.c", "tif_dirwrite.c", "tif_dirread.c"} To Segment 3
+ Add Files {"tif_predict.c", "tif_print.c", "tif_read.c", "tif_strip.c", "tif_swab.c", "tif_thunder.c", "tif_tile.c", "tif_version.c", "tif_zip.c", "tif_jpeg.c", "tif_warning.c", "tif_write.c"} To Segment 4
+ Add Files {"tif_fax3sm.c"} To Segment 5
+ Add Files {"tif_getimage.c"} To Segment 6
+
+ Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"MacHeaders68K"}
+ Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
+ Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
+ Set Preferences To {MacsBug Symbols:2, Generate SYM File:true, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
+ Set Preferences To {Project Type:2, File Name:"libtiff-68K", File Creator:"????", File Type:"APPL"}
+ Make Project
+ Close Project
+
+ Create Project {file TIFFINFO}
+ Add Files {"tiffinfo.c", "mac_main.c", "getopt.c"}
+ Add Files {"MacOS.lib"} To Segment 2
+ Add Files {"ANSI (4i/8d) C.68K.Lib"} To Segment 3
+ Add Files {"SIOUX.68K.Lib"} To Segment 4
+ Add Files {"MathLib68K (4i/8d).Lib"} To Segment 5
+ Add Files {"libtiff-68K"} To Segment 6
+
+ Set Preferences To {Activate CPlusPlus:false, ARM Conformance:false, ANSI Keywords Only:false, Require Function Prototypes:false, Expand Trigraph Sequences:false, Enums Always Ints:false, MPW Pointer Type Rules:false, Prefix File:"mac_main.h"}
+ Set Preferences To {Illegal Pragmas:false, Empty Declarations:false, Possible Errors:false, Unused Variables:false, Unused Arguments:false, Extra Commas:false, Extended Error Checking:false}
+ Set Preferences To {Code Model:2, Struct Alignment:0, MC68020 CodeGen:false, MC68881 CodeGen:false, Four Bytes Ints:true, Eight Byte Double:true, Peephole Optimizer:true, CSE Optimizer:true, Optimize For Size:true, Far Data:true, Use Profiler:false, Far Virtual Function Tables:false, Far String Constants:true}
+ Set Preferences To {MacsBug Symbols:2, Generate SYM File:false, Full Path In Sym Files:true, Generate Link Map:false, Generate A6 Stack Frames:true, The Debugger Aware:false, Link Single Segment:false, Fast Link:true}
+ Set Preferences To {Project Type:0, File Name:"tiffinfo", File Creator:"????", File Type:"APPL"}
+
+ Make Project
+ Close Project
+
+ end tell
+end timeout
diff --git a/contrib/mac-cw/README b/contrib/mac-cw/README
new file mode 100644
index 00000000..a9734694
--- /dev/null
+++ b/contrib/mac-cw/README
@@ -0,0 +1,18 @@
+----------------------------------------------------
+Build instructions for LIBTIFF - CodeWarrior (6.1):
+----------------------------------------------------
+
+In this directory you will find a Makefile.script Applescript
+file, which should be run in order to build the libtiff code
+using MetroWerks CodeWarrior.
+
+Refer to the "metrowerks.note" instructions on building the
+library for 68k and PowerPC native code, as well as building
+some of the libtiff tools, which are rather unix-like, but
+at least give an example of how to link everything together.
+
+ Questions, comments, bug reports to Niles Ritter
+ (ndr@tazboy.jpl.nasa.gov). Sam Leffler takes no responsibility
+ for the viability of this stuff.
+
+ -Niles.
diff --git a/contrib/mac-cw/mac_main.c b/contrib/mac-cw/mac_main.c
new file mode 100644
index 00000000..294655de
--- /dev/null
+++ b/contrib/mac-cw/mac_main.c
@@ -0,0 +1,20 @@
+/*
+ * mac_main.c -- The REAL entry point which
+ * calls the tools main code. For the tools
+ * the symbol "main" has been #defined to "tool_main"
+ * so that this entry point may be used to access
+ * the user-input first.
+ */
+
+#undef main
+
+int
+main()
+{
+ int argc;
+ char **argv;
+
+ argc=ccommand(&argv);
+
+ return tool_main(argc,argv); // Call the tool "main()" routine
+}
diff --git a/contrib/mac-cw/mac_main.h b/contrib/mac-cw/mac_main.h
new file mode 100644
index 00000000..523300f7
--- /dev/null
+++ b/contrib/mac-cw/mac_main.h
@@ -0,0 +1,12 @@
+/*
+ * mac_main.h -- redefines main entry point
+ */
+
+#ifndef _mac_main_h
+#define _mac_main_h
+
+#undef main
+#define main tool_main
+
+#endif /* _mac_main_h */
+
diff --git a/contrib/mac-cw/metrowerks.note b/contrib/mac-cw/metrowerks.note
new file mode 100644
index 00000000..9917cfd5
--- /dev/null
+++ b/contrib/mac-cw/metrowerks.note
@@ -0,0 +1,84 @@
+----------------------------------------------------
+Build instructions for LIBTIFF - CodeWarrior (6.1):
+----------------------------------------------------
+
+Note: there is a bug in CW earlier than 6.1 which will generate
+16-bit offset link errors for any projects using libtiff; you must
+download the CodeWarrior 6.1 patch located at:
+
+ ftp://ftp.metrowerks.com/pub/updates/metro-patches-61.hqx
+
+unpack the archive, insert the files and recompile the libraries
+using the AppleScript provided.
+
+
+1. Make sure that the directory containing these files is under
+ the "contrib" directory of the tiff folder; otherwise, some
+ access path preferences will need to be updated.
+
+2. The instructions below are for the 68k platform build.
+ A similar script can be put together for the PPC version,
+ or you can just directly convert the projects. Be sure to
+ use the native libraries as well. NOTE: if anyone cooks
+ up an equivalent script for PPC, send it to me and I'll include
+ it with the rest of the package.
+
+3. Open the file Makefile.script with an AppleScript Editor
+ and change the PATHNAME variable to point to your
+ top-level TIFF directory
+
+4. Run the Script. It will do the following things:
+
+ 4a. Prompt you for the current location of the CodeWarrior 68K
+ program.
+
+ 4b. Create the source file "tif_fax3sm.c":
+
+ i) Build the project CW project mkg3states.cw. It will
+ produce a small program called mkg3states. Only a
+ 68k version is provided, since you only have to run
+ this code once, and it only takes a few seconds.
+
+ ii) Run the built mkg3states program:
+
+ The program will temporarily take over ALL of the CPU, so
+ don't panic. After a few seconds it will produce a file called
+ "tif_fax3sm.c".
+
+ 4c. Build the library project libtiff-68K.mw, producing library
+ called libtiff-68K.
+
+ 4d. Build program project tiffinfo.mw; it will produce a
+ program called tiffinfo, which can dump the tiff tags of
+ a named file. Passing in no arguments will dump a help file
+ for the program. It is unix-flavored, but hey, it works.
+
+5 When the script finishes, you will have a usable libtiff-68K
+ library, a passable "tiffinfo" program, and the projects used
+ to build them. Note that to get tiffinfo to work I have put
+ an include file in the project that redefines main(), and
+ then have a mac_main.c program that calls ccommand() first
+ and passes that to the actual main code. A real mac app,
+ of course, would never use this stuff at all...
+
+ . The tiffinfo.mw project may be used as a template to build
+ most of the other libtiff tools, or your own code. When
+ modifying a copy of the project, you will most likely need
+ to update the "Access Paths" directory if it is moved out of
+ the contrib folder.
+
+6. If you are going to create a project from scratch, be sure
+ to set up the preferences with
+
+ 4-byte ints
+ 8-byte doubles
+ Far Code/Far Data
+ Large Linking model
+
+ and everything should work fine. If the console-style error
+ reports bother you, you can always override the error and
+ warning mechanism with TIFFSetErrorHandler to do something
+ more Mac-like.
+
+Questions, comments to Niles Ritter (ndr@tazboy.jpl.nasa.gov).
+
diff --git a/contrib/mac-cw/mkg3_main.c b/contrib/mac-cw/mkg3_main.c
new file mode 100644
index 00000000..b31c8d10
--- /dev/null
+++ b/contrib/mac-cw/mkg3_main.c
@@ -0,0 +1,14 @@
+/*
+ * mkg3_main.c -- passes fake arguments into main
+ */
+
+#undef main
+
+int
+main()
+{
+ static char *argv[4] = {
+ "mkg3states", "-c", "const", "tif_fax3sm.c" };
+
+ return tool_main(4,argv); // Call the tool "main()" routine
+}
diff --git a/contrib/mac-cw/version.h b/contrib/mac-cw/version.h
new file mode 100644
index 00000000..3c5c56e1
--- /dev/null
+++ b/contrib/mac-cw/version.h
@@ -0,0 +1,4 @@
+#define VERSION \
+"LIBTIFF, Version 3.4beta028 \n"\
+"Copyright (c) 1988-1995 Sam Leffler\n"\
+"Copyright (c) 1991-1996 Silicon Graphics, Inc."
diff --git a/contrib/vms/libtiff/tiffshraxp.opt b/contrib/vms/libtiff/tiffshraxp.opt
index 94e6abb4..fbf029e2 100755
--- a/contrib/vms/libtiff/tiffshraxp.opt
+++ b/contrib/vms/libtiff/tiffshraxp.opt
Binary files differ
diff --git a/dist/tiff.alpha b/dist/tiff.alpha
index 3907e4a2..cd85e195 100644
--- a/dist/tiff.alpha
+++ b/dist/tiff.alpha
@@ -1 +1 @@
-define ALPHA 028
+define ALPHA 029
diff --git a/html/Makefile.in b/html/Makefile.in
index 3c7b2909..90d48c57 100644
--- a/html/Makefile.in
+++ b/html/Makefile.in
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/html/RCS/Makefile.in,v 1.6 1996/01/10 19:36:59 sam Exp $
+# $Header: /usr/people/sam/tiff/html/RCS/Makefile.in,v 1.8 1996/02/09 21:28:38 sam Exp $
#
# @WARNING@
#
@@ -39,7 +39,7 @@ PORT = ${DEPTH}/port
# TARGET: @TARGET@
# CCOMPILER: @CCOMPILER@
#
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
ECHO = echo
MV = mv
@@ -65,6 +65,8 @@ HTMLFILES=\
v3.4beta016.html \
v3.4beta018.html \
v3.4beta024.html \
+ v3.4beta028.html \
+ v3.4beta029.html \
${NULL}
IMAGES=\
images/back.gif \
diff --git a/html/build.html b/html/build.html
index 362678f0..51ebb5d3 100644
--- a/html/build.html
+++ b/html/build.html
@@ -20,7 +20,8 @@ for viewing with version 1.1 or newer of the
<UL>
<LI><A HREF=#UNIX>Building on a UNIX system</A>.
-<LI><A HREf=#Mac>Building on a Macintosh system</A>.
+<LI><A HREf=#MacMPW>Building on a Macintosh system with MPW</A>.
+<LI><A HREf=#MacCW>Building on a Macintosh system with CodeWarrior</A>.
<LI><A HREF=#PC>Building on an MS-DOS or Windows system</A>.
<LI><A HREF=#VMS>Building on a VMS system</A>.
<LI><A HREF=#Acorn>Building on an Acorn RISC OS system</A>.
@@ -161,9 +162,7 @@ is located.
Configuration files are just shell scripts that define
shell variables that control the configuration process.
For example, the following file might be used on a BSDI system to
-configure the software for installation in the <B>/usr/contrib</B>
- area and to make use of the Adobe Font Metric files that are already
-distributed as part of the BSDI 1.1 distribution:
+configure the software for installation in the <B>/usr/contrib</B> area.
<PRE>
#
@@ -175,9 +174,9 @@ DIR_MAN="/usr/contrib/man" # directory for manual pages
</PRE>
<P>
-For a complete list of the possible configuration parameters, look
-at the sample <B>config.site</B> file provided in the distribution
-or check the section below.
+For a complete list of the possible configuration parameters look
+at the sample <B>config.site</B> file provided in the distribution; the
+section below describes some of the more important parameters.
<A NAME="Packages"><P><HR WIDTH=65% ALIGN=right><H3>Configuring Optional Packages/Support</H3></A>
@@ -210,6 +209,8 @@ of TIFF images with JPEG-encoded data.
Support for JPEG-encoded data requires the Independent JPEG Group (IJG)
<TT>libjpeg</TT> distribution; this software is available at
<A HREF=ftp://ftp.uu.net/graphics/jpeg/>ftp.uu.net:/graphics/jpeg/</A>.
+If JPEG support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_JPEGLIB</TT>
+parameters should also be set (see below).
By default JPEG support is not configured.
<P>
@@ -221,6 +222,8 @@ Support for deflate-encoded data requires the freely available
this software is available at
<A HREF=ftp://ftp.uu.net/pub/archiving/zip/zlib/>ftp.uu.net:/pub/archiving/zip/zlib/</A>
(or try <A HREF=ftp://quest.jpl.nasa.gov/beta/zlib/>quest.jpl.nasa.gov:/beta/zlib/</A>).
+If ZIP support is enabled the <TT>DIRS_LIBINC</TT> and <TT>DIR_GZLIB</TT>
+parameters should also be set (see below).
By default this package is not configured.
</DL>
@@ -440,6 +443,18 @@ default this is <B>/usr/local/bin</B>.</TD>
</TR>
<TR>
+<TD VALIGN=top><TT>DIR_GZLIB</TT></TD>
+<TD>The options to pass to the C compiler to reference the zlib library
+when ZIP support is enabled; e.g. ``<TT>-L../src/zlib -lgz</TT>''.</TD>
+</TR>
+
+<TR>
+<TD VALIGN=top><TT>DIR_JPEGLIB</TT></TD>
+<TD>The options to pass to the C compiler to reference the JPEG library
+when JPEG support is enabled; e.g. ``<TT>-L/usr/local/lib -ljpeg</TT>''.</TD>
+</TR>
+
+<TR>
<TD VALIGN=top><TT>DIR_LIB</TT></TD>
<TD>The directory to install libraries and DSO's; by default
this is <B>/usr/local/lib</B>.</TD>
@@ -452,6 +467,14 @@ pages should be installed.</TD>
</TR>
<TR>
+<TD VALIGN=top><TT>DIRS_LIBINC</TT></TD>
+<TD>A space-separated list of directories in which to search for
+include files when building the library and tools.
+If JPEG or ZIP support is configured this parameter should include
+the directories where the associated include files are located.</TD>
+</TR>
+
+<TR>
<TD VALIGN=top><TT>DSOOPTS</TT></TD>
<TD>When DSO's are built, the options to specify to <TT>CC</TT>
to create a DSO.</TD>
@@ -565,7 +588,7 @@ Someone needs to fill this in....
</I>
-<A NAME=Mac><P><HR><H2>Building the Software on a Macintosh</H2></A>
+<A NAME=MacMPW><P><HR><H2>Building the Software on a Macintosh with MPW</H2></A>
The directory <B>contrib/mac-mpw</B> contains support for
compiling the library and tools under the MPW Shell on a
@@ -596,6 +619,28 @@ special characters.
+<A NAME=MacCW><P><HR><H2>Building the Software on a Macintosh with CodeWarrior</H2></A>
+
+The directory <B>contrib/mac-cw</B> contains support for
+compiling the library and tools with MetroWerks CodeWarrior 6.1
+on a Macintosh system.
+This support was contributed by Niles Ritter
+(<A HREF=mailto:ndr@tazboy.jpl.nasa.gov>ndr@tazboy.jpl.nasa.gov</A>).
+
+<P>
+[<I>From the file <B>contrib/mac-cw/README</B>.</I>]
+
+In this directory you will find a Makefile.script Applescript
+file, which should be run in order to build the libtiff code
+using MetroWerks CodeWarrior.
+
+Refer to the "metrowerks.note" instructions on building the
+library for 68k and PowerPC native code, as well as building
+some of the libtiff tools, which are rather unix-like, but
+at least give an example of how to link everything together.
+
+
+
<A NAME=VMS><P><HR><H2>Building the Software on a VMS System</H2></A>
The VMS port was done by Karsten Spang
@@ -992,7 +1037,7 @@ libtiff/mkversion.c program to generate libtiff/version.h.
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>.
-Last updated: $Date: 1995/10/16 21:46:06 $
+Last updated: $Date: 1996/02/09 22:08:41 $
</ADDRESS>
</BODY>
diff --git a/html/index.html b/html/index.html
index cc9adf34..86de3779 100644
--- a/html/index.html
+++ b/html/index.html
@@ -12,7 +12,7 @@ TIFF Software
</H1>
<B>Latest Release</B>: <I>None</I><BR>
-<B>Latest Software</B>: <A HREF="v3.4beta028.html">v3.4beta028</A><BR>
+<B>Latest Software</B>: <A HREF="v3.4beta029.html">v3.4beta029</A><BR>
<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
<B>Home Page</B>: <A HREF="http://www-mipl.jpl.nasa.gov/~ndr/tiff/">
http://www-mipl.jpl.nasa.gov/~ndr/tiff/</A> <BR>
@@ -81,7 +81,7 @@ the master FTP site listed above.
<ADDRESS>
<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>.
-Last updated: $Date: 1996/01/10 20:27:41 $
+Last updated: $Date: 1996/02/09 21:28:38 $
</ADDRESS>
</BODY>
diff --git a/html/v3.4beta028.html b/html/v3.4beta028.html
new file mode 100644
index 00000000..bec8b88c
--- /dev/null
+++ b/html/v3.4beta028.html
@@ -0,0 +1,145 @@
+<HTML>
+<HEAD>
+<TITLE>
+Changes in TIFF v3.4beta028
+</TITLE>
+</HEAD>
+
+<BODY>
+
+<BASEFONT SIZE=4>
+<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
+<BASEFONT SIZE=3>
+
+<UL>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+<B>Current Version</B>: v3.4beta028<BR>
+<B>Previous Version</B>: <A HREF=v3.4beta024.html>v3.4beta024</A><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+</UL>
+
+<P>
+This document describes the changes made to the software between the
+<I>previous</I> and <I>current</I> versions (see above).
+If you don't find something listed here, then it was not done in this
+timeframe, or it was not considered important enough to be mentioned.
+The following information is located here:
+<UL>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#tools">Changes in the tools</A>
+<LI><A HREF="#man">Changes in the manual pages</A>
+<LI><A HREF="#contrib">Changes in the contributed software</A>
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+<LI>a <TT>-noninteractive</TT> flag was added to configure to
+ control whether or not it prints and prompts for configuration information
+<LI>various typos and fixes were made in configure for the the
+ library-only build support (this and other configure fixes from
+ Richard Mlynarik <A HREF=mailto:mly@adoc.xerox.com>&lt;mly@adoc.xerox.com&gt;</A>)
+<LI>bugs were fixed in the handling of pathnames supplied for external
+ packages; e.g. <TT>DIR_JPEG</TT>
+<LI>the handling of <TT>SETMAKE</TT> is now done properly
+<LI>the default prototype function declaration for <TT>pow</TT> was corrected
+<LI>a bug was fixed in <B>libtiff/Makefile.in</B> that caused installation
+ to fail on systems without DSO support
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+<LI>Acorn RISC O/S support that was accidentally left out of the
+ left out of the previous distribution is present (from Peter Greenham)
+<LI>complaints about unknown and/or unsupported codecs have been
+ delayed until they are invoked; this permits applications to open
+ images and look at tags even if the image data is compressed with
+ an unknown/unsupported compression scheme
+<LI>bugs in handling unknown tags have been corrected; applications
+ that use multiple codecs, each with codec-specific tags, no longer
+ generate confusing error messages
+<LI>a missing pseudo-tag definition in the CCITT G3 codec was fixed
+ (this problem caused core dumps in the <TT>tiffcp</TT> program)
+<LI>pseudo-tags are now treated specially; they are always considered
+ to be set (i.e. they do not use bits in the <TT>FIELD_*</TT> bit-vectors).
+<LI>the use of strip chopping can now be controlled on a per-file basis
+ through a mode parameter supplied when opening a file (``C'' to
+ enable strip chopping and ``c'' to disable)
+<LI>two bugs were fixed in the writing of opposite-endian byte-order
+ files
+<LI>support was added for three new fax-related tags registered to
+ SGI: FaxRecvParams, FaxRecvTime, and FaxSubAddress
+<LI>the bit order of image data read and written can now be controlled
+ on a per-file basis through a mode parameter supplied when opening
+ a file (``B'' to force MSB2LSB bit order, ``L'' for LSB2MSB bit
+ order, and ``H'' for the bit order of the native CPU)
+<LI>the byte order of image and tag data written to newly-created files
+ can now be controlled on a per-file basis through a mode parameter
+ supplied when openening a file (``b'' to force Big-Endian byte order
+ and ``l'' to force Little-Endian byte order)
+<LI>the use memory-mapped files for images opened read-only can now
+ be controlled on a per-file basis through a mode parameter supplied
+ when opening a file (``M'' to enable use of memory-mapped files
+ and ``m'' to disable use)
+<LI>the use of the <TT>WIN32</TT> define in <B>tiffiop.h</B> has
+ been replaced by <TT>__WIN32__</TT>
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
+
+<UL>
+<LI><TT>fax2ps</TT> now does a <TT>save</TT> and <TT>restore</TT>
+ around each page of PostScript; this fixes a problem with VM
+ overflow when printing a many-page document on some printers
+<LI>a bug in the handling of 3-channel images by <TT>ras2tiff</TT>
+ was fixed
+<LI><TT>tiffcp</TT> has new options to control the byte order of
+ newly created files: <B>-B</B> for Big-Endian byte order, <B>-L</B>
+ for Little-Endian byte order; a <B>-M</B> option to disable the
+ use of memory-mapped files, and a <B>-C</B> option to disable the
+ use of strip chopping
+<LI>bugs were fixed in <TT>tiffcp</TT>'s handling of codec-specific tags
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="man"><B><FONT SIZE=+3>C</FONT>HANGES IN THE MANUAL PAGES:</B></A>
+
+<UL>
+<LI>the <TT>TIFFOpen</TT> page has been updated to reflect the new
+ optional open mode parameters
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
+
+<UL>
+<LI><B>contrib/win95</B> contains information and code from Philippe Tenenhaus
+ <A HREF=mailto:100423.3705@compuserve.com>&lt;100423.3705@compuserve.com&gt;</A>
+ about using the software under Windows 95
+<LI><B>contrib/winnt</B> contains information and code from Dave Dyer
+ <A HREF=mailto:ddyer@triple-i.com>&lt;ddyer@triple-i.com&gt;</A>
+ about using the software under Windows NT
+</UL>
+
+<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
+
+<HR>
+
+<ADDRESS>
+<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
+Last updated $Date: 1996/02/09 21:28:38 $.
+</ADDRESS>
+
+</BODY>
+</HTML>
diff --git a/html/v3.4beta029.html b/html/v3.4beta029.html
new file mode 100644
index 00000000..4b38d0e6
--- /dev/null
+++ b/html/v3.4beta029.html
@@ -0,0 +1,85 @@
+<HTML>
+<HEAD>
+<TITLE>
+Changes in TIFF v3.4beta029
+</TITLE>
+</HEAD>
+
+<BODY>
+
+<BASEFONT SIZE=4>
+<B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
+<BASEFONT SIZE=3>
+
+<UL>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+<B>Current Version</B>: v3.4beta029<BR>
+<B>Previous Version</B>: <A HREF=v3.4beta028.html>v3.4beta028</A><BR>
+<B>Master FTP Site</B>: <A HREF="ftp://ftp.sgi.com/graphics/tiff">ftp.sgi.com (192.48.153.1), directory graphics/tiff</A><BR>
+<HR SIZE=4 WIDTH=65% ALIGN=left>
+</UL>
+
+<P>
+This document describes the changes made to the software between the
+<I>previous</I> and <I>current</I> versions (see above).
+If you don't find something listed here, then it was not done in this
+timeframe, or it was not considered important enough to be mentioned.
+The following information is located here:
+<UL>
+<LI><A HREF="#configure">Changes in the software configuration</A>
+<LI><A HREF="#libtiff">Changes in libtiff</A>
+<LI><A HREF="#contrib">Changes in the contributed software</A>
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
+
+<UL>
+<LI><B>configure</B> now relativizes pathname references given in
+ <TT>-L</TT> options (as frequently specified when configuring
+ ancillary packages)
+<LI>problems related to configuring the software on Ultrix 4.4 have
+ been corrected
+<LI>the shell to use in Makefiles and scripts can now be set with the
+ <TT>SCRIPT_SH</TT> configuration parameter
+<LI>comments in <B>config.site</B> now correctly indicate how to setup the
+ use of ancillary packages
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
+
+<UL>
+<LI>mods for building the software on a Mac using the
+ MetroWerks CodeWarrior compilers
+<LI>a bug in the CCITT T.4/T.6 decoder was fixed where the last codeword in
+ a strip/tile might not be decoded; this was seen only when decoding
+ multi-strip images
+<LI>a bug in the CCITT RLE codecs was fixed whereby the pseudo tags were not
+ being properly registered
+</UL>
+
+<P><HR WIDTH=65% ALIGN=right>
+
+<A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIBUTED SOFTWARE:</B></A>
+
+<UL>
+<LI><B>contrib/mac-cw</B> contains information and code from Niles Ritter
+ <A HREF=mailto:ndr@tazboy.jpl.nasa.gov>&lt;ndr@tazboy.jpl.nasa.gov&gt;</A>
+ about building the software with the MetroWerks CodeWarrior compilers
+ on Macintosh systems
+</UL>
+
+<A HREF="index.html"><IMG SRC="images/back.gif"></A> TIFF home page.<BR>
+
+<HR>
+
+<ADDRESS>
+<A HREF="sam.html">Sam Leffler</A> / <A HREF="mailto:sam@engr.sgi.com">sam@engr.sgi.com</A>
+Last updated $Date: 1996/02/09 21:28:33 $.
+</ADDRESS>
+
+</BODY>
+</HTML>
diff --git a/libtiff/Makefile.in b/libtiff/Makefile.in
index c7b9491f..d29af81b 100644
--- a/libtiff/Makefile.in
+++ b/libtiff/Makefile.in
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.in,v 1.27 1996/01/10 19:35:01 sam Exp $
+# $Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.in,v 1.28 1996/02/09 05:55:00 sam Exp $
#
# Tag Image File Format Library
#
@@ -33,7 +33,7 @@ SRCDIR = @LIBSRCDIR@
# TARGET: @TARGET@
# CCOMPILER: @CCOMPILER@
#
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
CC = @CCOMPILER@
AR = @AR@
@@ -136,6 +136,8 @@ TARGETS = libtiff.a
all: ${TARGETS}
if [ @DSO@dso != nodso ]; then \
${MAKE} @DSO@dso; \
+ else \
+ true; \
fi
libtiff.a: ${OBJS}
@@ -261,6 +263,8 @@ install: all installHdrs
${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_LIB@ -O libtiff.a
if [ @DSO@dso != nodso ]; then \
${MAKE} installDSO; \
+ else \
+ true; \
fi
clean:
diff --git a/libtiff/tif_apple.c b/libtiff/tif_apple.c
index 519b876f..81f87724 100644
--- a/libtiff/tif_apple.c
+++ b/libtiff/tif_apple.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_apple.c,v 1.21 1996/01/10 19:32:54 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_apple.c,v 1.22 1996/02/06 23:50:58 sam Exp $ */
/*
* Copyright (c) 1988-1996 Sam Leffler
@@ -46,7 +46,7 @@
#include <Files.h>
#include <Memory.h>
-#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
+#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__) || defined(applec)
#define CtoPstr c2pstr
#endif
diff --git a/libtiff/tif_fax3.c b/libtiff/tif_fax3.c
index ea32a3bc..2d5df7f0 100644
--- a/libtiff/tif_fax3.c
+++ b/libtiff/tif_fax3.c
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_fax3.c,v 1.133 1996/01/10 19:33:02 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_fax3.c,v 1.135 1996/02/08 20:21:27 sam Exp $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
@@ -592,6 +592,17 @@ Fax3PutBits(TIFF* tif, u_int bits, u_int length)
*/
#define putcode(tif, te) Fax3PutBits(tif, (te)->code, (te)->length)
+#ifdef FAX3_DEBUG
+#define DEBUG_COLOR(w) (tab == TIFFFaxWhiteCodes ? w "W" : w "B")
+#define DEBUG_PRINT(what,len) { \
+ int t; \
+ printf("%08X/%-2d: %s%5d\t", data, bit, DEBUG_COLOR(what), len); \
+ for (t = length-1; t >= 0; t--) \
+ putchar(code & (1<<t) ? '1' : '0'); \
+ putchar('\n'); \
+}
+#endif
+
/*
* Write the sequence of codes that describes
* the specified span of zero's or one's. The
@@ -609,6 +620,9 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
while (span >= 2624) {
const tableentry* te = &tab[63 + (2560>>6)];
code = te->code, length = te->length;
+#ifdef FAX3_DEBUG
+ DEBUG_PRINT("MakeUp", te->runlen);
+#endif
_PutBits(tif, code, length);
span -= te->runlen;
}
@@ -616,10 +630,16 @@ putspan(TIFF* tif, int32 span, const tableentry* tab)
const tableentry* te = &tab[63 + (span>>6)];
assert(te->runlen == 64*(span>>6));
code = te->code, length = te->length;
+#ifdef FAX3_DEBUG
+ DEBUG_PRINT("MakeUp", te->runlen);
+#endif
_PutBits(tif, code, length);
span -= te->runlen;
}
code = tab[span].code, length = tab[span].length;
+#ifdef FAX3_DEBUG
+ DEBUG_PRINT(" Term", tab[span].runlen);
+#endif
_PutBits(tif, code, length);
sp->data = data;
@@ -1070,21 +1090,20 @@ Fax3Cleanup(TIFF* tif)
}
}
-#define FIELD_OPTIONS (FIELD_CODEC+0)
-#define FIELD_BADFAXLINES (FIELD_CODEC+1)
-#define FIELD_CLEANFAXDATA (FIELD_CODEC+2)
-#define FIELD_BADFAXRUN (FIELD_CODEC+3)
-#define FIELD_RECVPARAMS (FIELD_CODEC+4)
-#define FIELD_SUBADDRESS (FIELD_CODEC+5)
-#define FIELD_RECVTIME (FIELD_CODEC+6)
+#define FIELD_BADFAXLINES (FIELD_CODEC+0)
+#define FIELD_CLEANFAXDATA (FIELD_CODEC+1)
+#define FIELD_BADFAXRUN (FIELD_CODEC+2)
+#define FIELD_RECVPARAMS (FIELD_CODEC+3)
+#define FIELD_SUBADDRESS (FIELD_CODEC+4)
+#define FIELD_RECVTIME (FIELD_CODEC+5)
-static const TIFFFieldInfo fax3FieldInfo[] = {
+#define FIELD_OPTIONS (FIELD_CODEC+6)
+
+static const TIFFFieldInfo faxFieldInfo[] = {
{ TIFFTAG_FAXMODE, 0, 0, TIFF_ANY, FIELD_PSEUDO,
FALSE, FALSE, "FaxMode" },
{ TIFFTAG_FAXFILLFUNC, 0, 0, TIFF_ANY, FIELD_PSEUDO,
FALSE, FALSE, "FaxFillFunc" },
- { TIFFTAG_GROUP3OPTIONS, 1, 1, TIFF_LONG, FIELD_OPTIONS,
- FALSE, FALSE, "Group3Options" },
{ TIFFTAG_BADFAXLINES, 1, 1, TIFF_LONG, FIELD_BADFAXLINES,
TRUE, FALSE, "BadFaxLines" },
{ TIFFTAG_BADFAXLINES, 1, 1, TIFF_SHORT, FIELD_BADFAXLINES,
@@ -1102,29 +1121,13 @@ static const TIFFFieldInfo fax3FieldInfo[] = {
{ TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, FIELD_RECVTIME,
TRUE, FALSE, "FaxRecvTime" },
};
+static const TIFFFieldInfo fax3FieldInfo[] = {
+ { TIFFTAG_GROUP3OPTIONS, 1, 1, TIFF_LONG, FIELD_OPTIONS,
+ FALSE, FALSE, "Group3Options" },
+};
static const TIFFFieldInfo fax4FieldInfo[] = {
- { TIFFTAG_FAXMODE, 0, 0, TIFF_ANY, FIELD_PSEUDO,
- FALSE, FALSE, "FaxMode" },
- { TIFFTAG_FAXFILLFUNC, 0, 0, TIFF_ANY, FIELD_PSEUDO,
- FALSE, FALSE, "FaxFillFunc" },
{ TIFFTAG_GROUP4OPTIONS, 1, 1, TIFF_LONG, FIELD_OPTIONS,
FALSE, FALSE, "Group4Options" },
- { TIFFTAG_BADFAXLINES, 1, 1, TIFF_LONG, FIELD_BADFAXLINES,
- TRUE, FALSE, "BadFaxLines" },
- { TIFFTAG_BADFAXLINES, 1, 1, TIFF_SHORT, FIELD_BADFAXLINES,
- TRUE, FALSE, "BadFaxLines" },
- { TIFFTAG_CLEANFAXDATA, 1, 1, TIFF_SHORT, FIELD_CLEANFAXDATA,
- TRUE, FALSE, "CleanFaxData" },
- { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_LONG, FIELD_BADFAXRUN,
- TRUE, FALSE, "ConsecutiveBadFaxLines" },
- { TIFFTAG_CONSECUTIVEBADFAXLINES,1,1, TIFF_SHORT, FIELD_BADFAXRUN,
- TRUE, FALSE, "ConsecutiveBadFaxLines" },
- { TIFFTAG_FAXRECVPARAMS, 1, 1, TIFF_LONG, FIELD_RECVPARAMS,
- TRUE, FALSE, "FaxRecvParams" },
- { TIFFTAG_FAXSUBADDRESS, -1,-1, TIFF_ASCII, FIELD_SUBADDRESS,
- TRUE, FALSE, "FaxSubAddress" },
- { TIFFTAG_FAXRECVTIME, 1, 1, TIFF_LONG, FIELD_RECVTIME,
- TRUE, FALSE, "FaxRecvTime" },
};
#define N(a) (sizeof (a) / sizeof (a[0]))
@@ -1268,8 +1271,8 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
(u_long) sp->recvtime);
}
-int
-TIFFInitCCITTFax3(TIFF* tif, int scheme)
+static int
+InitCCITTFax3(TIFF* tif)
{
Fax3BaseState* sp;
@@ -1291,14 +1294,7 @@ TIFFInitCCITTFax3(TIFF* tif, int scheme)
* Merge codec-specific tag information and
* override parent get/set field methods.
*/
- switch (scheme) {
- case COMPRESSION_CCITTFAX3:
- _TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo));
- break;
- case COMPRESSION_CCITTFAX4:
- _TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo));
- break;
- }
+ _TIFFMergeFieldInfo(tif, faxFieldInfo, N(faxFieldInfo));
sp->vgetparent = tif->tif_vgetfield;
tif->tif_vgetfield = Fax3VGetField; /* hook for codec tags */
sp->vsetparent = tif->tif_vsetfield;
@@ -1308,7 +1304,6 @@ TIFFInitCCITTFax3(TIFF* tif, int scheme)
sp->recvparams = 0;
sp->subaddress = NULL;
- TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
if (tif->tif_mode == O_RDONLY) {
tif->tif_flags |= TIFF_NOBITREV;/* decoder does bit reversal */
DecoderState(tif)->runs = NULL;
@@ -1336,6 +1331,20 @@ TIFFInitCCITTFax3(TIFF* tif, int scheme)
return (1);
}
+int
+TIFFInitCCITTFax3(TIFF* tif, int scheme)
+{
+ if (InitCCITTFax3(tif)) {
+ _TIFFMergeFieldInfo(tif, fax3FieldInfo, N(fax3FieldInfo));
+
+ /*
+ * The default format is Class/F-style w/o RTC.
+ */
+ return TIFFSetField(tif, TIFFTAG_FAXMODE, FAXMODE_CLASSF);
+ } else
+ return (0);
+}
+
/*
* CCITT Group 4 (T.6) Facsimile-compatible
* Compression Scheme Support.
@@ -1419,7 +1428,9 @@ Fax4PostEncode(TIFF* tif)
int
TIFFInitCCITTFax4(TIFF* tif, int scheme)
{
- if (TIFFInitCCITTFax3(tif, scheme)) { /* reuse G3 logic */
+ if (InitCCITTFax3(tif)) { /* reuse G3 support */
+ _TIFFMergeFieldInfo(tif, fax4FieldInfo, N(fax4FieldInfo));
+
tif->tif_decoderow = Fax4Decode;
tif->tif_decodestrip = Fax4Decode;
tif->tif_decodetile = Fax4Decode;
@@ -1492,7 +1503,7 @@ Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
int
TIFFInitCCITTRLE(TIFF* tif, int scheme)
{
- if (TIFFInitCCITTFax3(tif, scheme)) { /* reuse G3 compression */
+ if (InitCCITTFax3(tif)) { /* reuse G3 support */
tif->tif_decoderow = Fax3DecodeRLE;
tif->tif_decodestrip = Fax3DecodeRLE;
tif->tif_decodetile = Fax3DecodeRLE;
@@ -1508,7 +1519,7 @@ TIFFInitCCITTRLE(TIFF* tif, int scheme)
int
TIFFInitCCITTRLEW(TIFF* tif, int scheme)
{
- if (TIFFInitCCITTFax3(tif, scheme)) { /* reuse G3 compression */
+ if (InitCCITTFax3(tif)) { /* reuse G3 support */
tif->tif_decoderow = Fax3DecodeRLE;
tif->tif_decodestrip = Fax3DecodeRLE;
tif->tif_decodetile = Fax3DecodeRLE;
diff --git a/libtiff/tif_fax3.h b/libtiff/tif_fax3.h
index d4ed4a21..224d5e2c 100644
--- a/libtiff/tif_fax3.h
+++ b/libtiff/tif_fax3.h
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_fax3.h,v 1.27 1996/01/10 19:33:22 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/libtiff/RCS/tif_fax3.h,v 1.29 1996/02/09 22:51:07 sam Exp $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
@@ -122,25 +122,49 @@ extern const TIFFFaxTabEnt TIFFFaxBlackTable[];
* data. In any event, we don't prescan and must watch for
* running out of data since we can't permit the library to
* scan past the end of the input data buffer.
+ *
+ * Finally, note that we must handle remaindered data at the end
+ * of a strip specially. The coder asks for a fixed number of
+ * bits when scanning for the next code. This may be more bits
+ * than are actually present in the data stream. If we appear
+ * to run out of data but still have some number of valid bits
+ * remaining then we makeup the requested amount with zeros and
+ * return successfully. If the returned data is incorrect then
+ * we should be called again and get a premature EOF error;
+ * otherwise we should get the right answer.
*/
#ifndef NeedBits8
#define NeedBits8(n,eoflab) do { \
if (BitsAvail < (n)) { \
- if (EndOfData()) goto eoflab; \
- BitAcc |= bitmap[*cp++]<<BitsAvail; \
- BitsAvail += 8; \
+ if (EndOfData()) { \
+ if (BitsAvail == 0) /* no valid bits */ \
+ goto eoflab; \
+ BitsAvail = (n); /* pad with zeros */ \
+ } else { \
+ BitAcc |= bitmap[*cp++]<<BitsAvail; \
+ BitsAvail += 8; \
+ } \
} \
} while (0)
#endif
#ifndef NeedBits16
#define NeedBits16(n,eoflab) do { \
if (BitsAvail < (n)) { \
- if (EndOfData()) goto eoflab; \
- BitAcc |= bitmap[*cp++]<<BitsAvail; \
- if ((BitsAvail += 8) < (n)) { \
- if (EndOfData()) goto eoflab; \
+ if (EndOfData()) { \
+ if (BitsAvail == 0) /* no valid bits */ \
+ goto eoflab; \
+ BitsAvail = (n); /* pad with zeros */ \
+ } else { \
BitAcc |= bitmap[*cp++]<<BitsAvail; \
- BitsAvail += 8; \
+ if ((BitsAvail += 8) < (n)) { \
+ if (EndOfData()) { \
+ /* NB: we know BitsAvail is non-zero here */ \
+ BitsAvail = (n); /* pad with zeros */ \
+ } else { \
+ BitAcc |= bitmap[*cp++]<<BitsAvail; \
+ BitsAvail += 8; \
+ } \
+ } \
} \
} \
} while (0)
diff --git a/libtiff/tiffcomp.h b/libtiff/tiffcomp.h
index bbdd9b20..c208c9ac 100644
--- a/libtiff/tiffcomp.h
+++ b/libtiff/tiffcomp.h
@@ -1,4 +1,4 @@
-/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiffcomp.h,v 1.47 1996/01/10 19:33:24 sam Exp $ */
+/* $Header: /usr/people/sam/tiff/libtiff/RCS/tiffcomp.h,v 1.48 1996/02/06 23:50:58 sam Exp $ */
/*
* Copyright (c) 1990-1996 Sam Leffler
@@ -60,7 +60,7 @@
#if defined(__PPCC__) || defined(__SC__) || defined(__MRC__)
#include <types.h>
-#elif !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acornriscos)
+#elif !defined(__MWERKS__) && !defined(THINK_C) && !defined(__acornriscos) && !defined(applec)
#include <sys/types.h>
#endif
diff --git a/man/Makefile.in b/man/Makefile.in
index 14138d27..150d95dd 100644
--- a/man/Makefile.in
+++ b/man/Makefile.in
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/man/RCS/Makefile.in,v 1.10 1995/10/16 22:50:32 sam Exp $
+# $Header: /usr/people/sam/tiff/man/RCS/Makefile.in,v 1.11 1996/02/09 05:54:37 sam Exp $
#
# @WARNING@
#
@@ -35,7 +35,7 @@ SRCDIR = ${DEPTH}/@SRCDIR@/man
# TARGET: @TARGET@
# CCOMPILER: @CCOMPILER@
#
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
ECHO = echo
MV = mv
diff --git a/port/Makefile.in b/port/Makefile.in
index 47882670..f7da0136 100644
--- a/port/Makefile.in
+++ b/port/Makefile.in
@@ -1,5 +1,5 @@
#! smake
-# $Header: /usr/people/sam/tiff/port/RCS/Makefile.in,v 1.4 1996/01/10 19:36:05 sam Exp $
+# $Header: /usr/people/sam/tiff/port/RCS/Makefile.in,v 1.5 1996/02/09 05:54:37 sam Exp $
#
# @WARNING@
#
@@ -39,7 +39,7 @@ VPATH = ../@SRCDIR@/port
# CCOMPILER: @CCOMPILER@
#
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
CC = @CCOMPILER@
AR = @AR@
diff --git a/tools/Makefile.in b/tools/Makefile.in
index 05726871..5d99c54b 100644
--- a/tools/Makefile.in
+++ b/tools/Makefile.in
@@ -1,4 +1,4 @@
-# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.16 1996/01/10 19:35:25 sam Exp $
+# $Header: /usr/people/sam/tiff/tools/RCS/Makefile.in,v 1.17 1996/02/09 05:55:00 sam Exp $
#
# @WARNING@
#
@@ -36,7 +36,7 @@ LIBDIR = ${DEPTH}/@SRCDIR@/libtiff
# TARGET: @TARGET@
# CCOMPILER: @CCOMPILER@
#
-SHELL = /bin/sh
+SHELL = @SCRIPT_SH@
NULL =
CC = @CCOMPILER@
INSTALL = @INSTALL@
@@ -93,18 +93,26 @@ TARGETS =\
all: ${TARGETS}
@if [ "@LIBIMAGE@" = yes ]; then \
${MAKE} sgi2tiff; \
+ else \
+ true; \
fi
@if [ "@LIBGL@" = yes ]; then \
${MAKE} tiffgt tiffsv; \
+ else \
+ true; \
fi
install: all
${INSTALL} -idb tiff.sw.tools -m 755 -dir @DIR_BIN@
${INSTALL} -idb tiff.sw.tools -m 755 -F @DIR_BIN@ -O ${TARGETS}
@if [ "@LIBIMAGE@" = yes ]; then \
${INSTALL} -idb tiff.sw.tools -m 755 -F @DIR_BIN@ -O sgi2tiff; \
+ else \
+ true; \
fi
@if [ "@LIBGL@" = yes ]; then \
${INSTALL} -idb tiff.sw.tools -m 755 -F @DIR_BIN@ -O tiffgt tiffsv;\
+ else \
+ true; \
fi
clean:
rm -f ${TARGETS} ${OBJS} sgigt.o tiffgt sgisv.o tiffsv \