--- /dev/null
+#
+# File: makefile.vc
+# Author: David Webster
+# Created: 2000
+# Updated:
+# Copyright: c) 1993, AIAI, University of Edinburgh
+#
+# "%W% %G%"
+#
+# Makefile : Builds os2tiff.lib library for OS/2 3.0/4.0
+
+# Suffixes
+OBJSUFF=obj
+SRCSUFF=cpp
+
+OS2FLAGS=/c /W2 /DOS232 /D__VISAGECPP__ /DOS2_32 /Q /N100
+OS2LINKFLAGS=/BASE:0x00010000 /PMTYPE:PM /NOE /NOD /ALIGN:16
+OS2LIBFLAGS=/NOL /NOE
+OS2LIBS=CPPOM30.lib CPPOOC3.LIB OS2386.LIB
+
+# Change WXDIR or WXWIN to wherever wxWindows is found
+WXDIR = $(WXWIN)
+
+OS2TIFFDIR=$(WXDIR)\src\tiff
+OS2TIFFINC=$(WINTIFFDIR)
+OS2TIFFLIB=$(WXDIR)\lib\os2tiff.lib
+
+INC=-I$(WXDIR)\src\TIFF -I$(OS2TIFFINC)
+
+!ifndef FINAL
+FINAL=0
+!endif
+
+!if "$(NOPCH)" == "1"
+PCH=
+PRECOMP=
+MAKEPRECOMP=
+!else
+PCH=$(WXLIBNAME).pch
+PRECOMP=/Si$(PCH)
+MAKEPRECOMP=/Fi$(PCH)
+!endif
+
+!if "$(FINAL)" == "0"
+D=DebugOS2
+OPT =
+DEBUG_FLAGS= /Ti /D__WXDEBUG__ #/Fb
+LINK_DEBUG_FLAGS=/DEBUG
+CRTFLAG=/Gm /Gd
+!else
+# /O1 - smallest code
+# /O2 - fastest code
+D=RelseOS2
+OPT = /O+ /Oc /G5
+DEBUG_FLAGS=
+LINK_DEBUG_FLAGS=/RELEASE
+CRTFLAG=/Gm /Gd
+!endif
+
+!if [md $(OS2TIFFDIR)\$D]
+!endif
+
+
+CPPFLAGS=$(OS2FLAGS) $(DEBUG_FLAGS) $(PRECOMP) $(INC) $(OPT) $(CRTFLAG)
+
+{..\tiff}.c{..\tiff\$D}.obj:
+ @echo $<
+ icc @<<
+$(CPPFLAGS) /Fo$@ /Tp $<
+<<
+
+OBJECTS = \
+ ..\tiff\$D\tif_aux.obj \
+ ..\tiff\$D\tif_close.obj \
+ ..\tiff\$D\tif_codec.obj \
+ ..\tiff\$D\tif_compress.obj \
+ ..\tiff\$D\tif_dir.obj \
+ ..\tiff\$D\tif_dirinfo.obj \
+ ..\tiff\$D\tif_dirread.obj \
+ ..\tiff\$D\tif_dirwrite.obj \
+ ..\tiff\$D\tif_dumpmode.obj \
+ ..\tiff\$D\tif_error.obj \
+ ..\tiff\$D\tif_fax3.obj \
+ ..\tiff\$D\tif_fax3sm.obj \
+ ..\tiff\$D\tif_flush.obj \
+ ..\tiff\$D\tif_getimage.obj \
+ ..\tiff\$D\tif_jpeg.obj \
+ ..\tiff\$D\tif_luv.obj \
+ ..\tiff\$D\tif_lzw.obj \
+ ..\tiff\$D\tif_next.obj \
+ ..\tiff\$D\tif_open.obj \
+ ..\tiff\$D\tif_packbits.obj \
+ ..\tiff\$D\tif_pixarlog.obj \
+ ..\tiff\$D\tif_predict.obj \
+ ..\tiff\$D\tif_print.obj \
+ ..\tiff\$D\tif_read.obj \
+ ..\tiff\$D\tif_strip.obj \
+ ..\tiff\$D\tif_swab.obj \
+ ..\tiff\$D\tif_thunder.obj \
+ ..\tiff\$D\tif_tile.obj \
+ ..\tiff\$D\tif_version.obj \
+ ..\tiff\$D\tif_warning.obj \
+ ..\tiff\$D\tif_win32.obj \
+ ..\tiff\$D\tif_write.obj \
+ ..\tiff\$D\tif_zip.obj
+
+LIBOBJECTS = \
+ tif_aux.obj \
+ tif_close.obj \
+ tif_codec.obj \
+ tif_compress.obj \
+ tif_dir.obj \
+ tif_dirinfo.obj \
+ tif_dirread.obj \
+ tif_dirwrite.obj \
+ tif_dumpmode.obj \
+ tif_error.obj \
+ tif_fax3.obj \
+ tif_fax3sm.obj \
+ tif_flush.obj \
+ tif_getimage.obj \
+ tif_jpeg.obj \
+ tif_luv.obj \
+ tif_lzw.obj \
+ tif_next.obj \
+ tif_open.obj \
+ tif_packbits.obj \
+ tif_pixarlog.obj \
+ tif_predict.obj \
+ tif_print.obj \
+ tif_read.obj \
+ tif_strip.obj \
+ tif_swab.obj \
+ tif_thunder.obj \
+ tif_tile.obj \
+ tif_version.obj \
+ tif_warning.obj \
+ tif_win32.obj \
+ tif_write.obj \
+ tif_zip.obj
+
+all: $(OBJECTS) $(OS2TIFFLIB)
+
+$(WXDIR)\lib\os2tiff.lib: $(LIBOBJECTS)
+ touch $(WXDIR)\lib\os2tiff.lib
+ del $(WXDIR)\lib\os2tiff.lib
+ ilib $(OS2LIBFLAGS) $@ @<<
+ $**;
+<<
+ del *.obj
+
+clean:
+ del $(OS2TIFFLIB)
+ erase /N $(OS2TIFFDIR)\$D
+ rd $(OS2TIFFDIR)\$D
+
+cleanall: clean
+
+$(LIBOBJECTS):
+ copy ..\tiff\$D\tif_aux.obj \
+ copy ..\tiff\$D\tif_close.obj \
+ copy ..\tiff\$D\tif_codec.obj \
+ copy ..\tiff\$D\tif_compress.obj \
+ copy ..\tiff\$D\tif_dir.obj \
+ copy ..\tiff\$D\tif_dirinfo.obj \
+ copy ..\tiff\$D\tif_dirread.obj \
+ copy ..\tiff\$D\tif_dirwrite.obj \
+ copy ..\tiff\$D\tif_dumpmode.obj \
+ copy ..\tiff\$D\tif_error.obj \
+ copy ..\tiff\$D\tif_fax3.obj \
+ copy ..\tiff\$D\tif_fax3sm.obj \
+ copy ..\tiff\$D\tif_flush.obj \
+ copy ..\tiff\$D\tif_getimage.obj \
+ copy ..\tiff\$D\tif_jpeg.obj \
+ copy ..\tiff\$D\tif_luv.obj \
+ copy ..\tiff\$D\tif_lzw.obj \
+ copy ..\tiff\$D\tif_next.obj \
+ copy ..\tiff\$D\tif_open.obj \
+ copy ..\tiff\$D\tif_packbits.obj \
+ copy ..\tiff\$D\tif_pixarlog.obj \
+ copy ..\tiff\$D\tif_predict.obj \
+ copy ..\tiff\$D\tif_print.obj \
+ copy ..\tiff\$D\tif_read.obj \
+ copy ..\tiff\$D\tif_strip.obj \
+ copy ..\tiff\$D\tif_swab.obj \
+ copy ..\tiff\$D\tif_thunder.obj \
+ copy ..\tiff\$D\tif_tile.obj \
+ copy ..\tiff\$D\tif_version.obj \
+ copy ..\tiff\$D\tif_warning.obj \
+ copy ..\tiff\$D\tif_win32.obj \
+ copy ..\tiff\$D\tif_write.obj \
+ copy ..\tiff\$D\tif_zip.obj
+
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
*/
#include "tiffiop.h"
-static int NotConfigured(TIFF*, int);
+static int _Optlink NotConfigured(TIFF*, int);
#ifndef LZW_SUPPORT
#define TIFFInitLZW NotConfigured
return (0);
}
-static int
+static int _Optlink
NotConfigured(TIFF* tif, int scheme)
{
tif->tif_setupdecode = _notConfigured;
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
static int _TIFFtrue(TIFF* tif) { (void) tif; return (1); }
static void _TIFFvoid(TIFF* tif) { (void) tif; }
-void
+void LINKAGEMODE
_TIFFSetDefaultCompressionState(TIFF* tif)
{
tif->tif_setupdecode = _TIFFtrue;
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
/* end SGI tags */
#ifdef IPTC_SUPPORT
#ifdef PHOTOSHOP_SUPPORT
- { TIFFTAG_RICHTIFFIPTC, -1,-1, TIFF_LONG, FIELD_RICHTIFFIPTC,
+ { TIFFTAG_RICHTIFFIPTC, -1,-1, TIFF_LONG, FIELD_RICHTIFFIPTC,
FALSE, TRUE, "RichTIFFIPTC" },
#else
- { TIFFTAG_RICHTIFFIPTC, -1,-3, TIFF_UNDEFINED, FIELD_RICHTIFFIPTC,
+ { TIFFTAG_RICHTIFFIPTC, -1,-3, TIFF_UNDEFINED, FIELD_RICHTIFFIPTC,
FALSE, TRUE, "RichTIFFIPTC" },
#endif
#endif
#ifdef PHOTOSHOP_SUPPORT
- { TIFFTAG_PHOTOSHOP, -1,-3, TIFF_UNDEFINED, FIELD_PHOTOSHOP,
+ { TIFFTAG_PHOTOSHOP, -1,-3, TIFF_UNDEFINED, FIELD_PHOTOSHOP,
FALSE, TRUE, "Photoshop" },
- { TIFFTAG_PHOTOSHOP, -1,-1, TIFF_BYTE, FIELD_PHOTOSHOP,
+ { TIFFTAG_PHOTOSHOP, -1,-1, TIFF_BYTE, FIELD_PHOTOSHOP,
FALSE, TRUE, "Photoshop" },
#endif
#ifdef ICC_SUPPORT
_TIFFMergeFieldInfo(tif, tiffFieldInfo, N(tiffFieldInfo));
}
-static int
+static int LINKAGEMODE
tagCompare(const void* a, const void* b)
{
const TIFFFieldInfo* ta = *(const TIFFFieldInfo**) a;
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
/*
* Encode a hunk of pixels.
*/
-static int
+static int LINKAGEMODE
DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s)
{
(void) s;
/*
* Decode a hunk of pixels.
*/
-static int
+static int LINKAGEMODE
DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t s)
{
(void) s;
/*
* Seek forwards nrows in the current strip.
*/
-static int
+static int LINKAGEMODE
DumpModeSeek(TIFF* tif, uint32 nrows)
{
tif->tif_rawcp += nrows * tif->tif_scanlinesize;
* Copyright (c) 1990-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
* overriding the definitions used by the decoder.
*/
-static void
+static void LINKAGEMODE
Fax3Unexpected(const char* module, TIFF* tif, uint32 a0)
{
TIFFError(module, "%s: Bad code word at scanline %d (x %lu)",
}
#define unexpected(table, a0) Fax3Unexpected(module, tif, a0)
-static void
+static void LINKAGEMODE
Fax3Extension(const char* module, TIFF* tif, uint32 a0)
{
TIFFError(module,
}
#define extension(a0) Fax3Extension(module, tif, a0)
-static void
+static void LINKAGEMODE
Fax3BadLength(const char* module, TIFF* tif, uint32 a0, uint32 lastx)
{
TIFFWarning(module, "%s: %s at scanline %d (got %lu, expected %lu)",
}
#define badlength(a0,lastx) Fax3BadLength(module, tif, a0, lastx)
-static void
+static void LINKAGEMODE
Fax3PrematureEOF(const char* module, TIFF* tif, uint32 a0)
{
TIFFWarning(module, "%s: Premature EOF at scanline %d (x %lu)",
/*
* Decode the requested amount of G3 1D-encoded data.
*/
-static int
+static int LINKAGEMODE
Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE(tif, sp, "Fax3Decode1D");
/*
* Decode the requested amount of G3 2D-encoded data.
*/
-static int
+static int LINKAGEMODE
Fax3Decode2D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE_2D(tif, sp, "Fax3Decode2D");
* the output stream. Values are
* assumed to be at most 16 bits.
*/
-static void
+static void LINKAGEMODE
Fax3PutBits(TIFF* tif, u_int bits, u_int length)
{
Fax3EncodeState* sp = EncoderState(tif);
* appropriate table that holds the make-up and
* terminating codes is supplied.
*/
-static void
+static void LINKAGEMODE
putspan(TIFF* tif, int32 span, const tableentry* tab)
{
Fax3EncodeState* sp = EncoderState(tif);
* here. We also handle writing the tag bit for the next
* scanline when doing 2d encoding.
*/
-static void
+static void LINKAGEMODE
Fax3PutEOL(TIFF* tif)
{
Fax3EncodeState* sp = EncoderState(tif);
* table. The ``base'' of the bit string is supplied
* along with the start+end bit indices.
*/
-INLINE static int32
+INLINE static int32 LINKAGEMODE
find0span(u_char* bp, int32 bs, int32 be)
{
int32 bits = be - bs;
return (span);
}
-INLINE static int32
+INLINE static int32 LINKAGEMODE
find1span(u_char* bp, int32 bs, int32 be)
{
int32 bits = be - bs;
* a sequence of all-white or all-black spans
* of pixels encoded with Huffman codes.
*/
-static int
+static int LINKAGEMODE
Fax3Encode1DRow(TIFF* tif, u_char* bp, uint32 bits)
{
Fax3EncodeState* sp = EncoderState(tif);
* 2d-encode a row of pixels. Consult the CCITT
* documentation for the algorithm.
*/
-static int
+static int LINKAGEMODE
Fax3Encode2DRow(TIFF* tif, u_char* bp, u_char* rp, uint32 bits)
{
#define PIXEL(buf,ix) ((((buf)[(ix)>>3]) >> (7-((ix)&7))) & 1)
/*
* Encode a buffer of pixels.
*/
-static int
+static int LINKAGEMODE
Fax3Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
{
Fax3EncodeState* sp = EncoderState(tif);
return (1);
}
-static void
+static void LINKAGEMODE
Fax3PrintDir(TIFF* tif, FILE* fd, long flags)
{
Fax3BaseState* sp = Fax3State(tif);
(u_long) sp->recvtime);
}
-static int
+static int LINKAGEMODE
InitCCITTFax3(TIFF* tif)
{
Fax3BaseState* sp;
/*
* Decode the requested amount of G4-encoded data.
*/
-static int
+static int LINKAGEMODE
Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE_2D(tif, sp, "Fax4Decode");
/*
* Encode the requested amount of data.
*/
-static int
+static int LINKAGEMODE
Fax4Encode(TIFF* tif, tidata_t bp, tsize_t cc, tsample_t s)
{
Fax3EncodeState *sp = EncoderState(tif);
/*
* Decode the requested amount of RLE-encoded data.
*/
-static int
+static int LINKAGEMODE
Fax3DecodeRLE(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s)
{
DECLARE_STATE(tif, sp, "Fax3DecodeRLE");
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
typedef void* thandle_t; /* client data handle */
#endif
+#if defined(OS2_32)
+#define LINKAGEMODE _Optlink
+#else
+#define LINKAGEMODE
+#endif
+
#ifndef NULL
#define NULL 0
#endif
/*
* The image reading and conversion routines invoke
* ``put routines'' to copy/image/whatever tiles of
- * raw image data. A default set of routines are
+ * raw image data. A default set of routines are
* provided to convert/copy raw image data to 8-bit
* packed ABGR format rasters. Applications can supply
* alternate routines that unpack the data into a
* different format or, for example, unpack the data
* and draw the unpacked raster on the display.
*/
-typedef void (*tileContigRoutine)
+typedef void (LINKAGEMODE *tileContigRoutine)
(TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
unsigned char*);
-typedef void (*tileSeparateRoutine)
+typedef void (LINKAGEMODE *tileSeparateRoutine)
(TIFFRGBAImage*, uint32*, uint32, uint32, uint32, uint32, int32, int32,
unsigned char*, unsigned char*, unsigned char*, unsigned char*);
/*
uint16* greencmap;
uint16* bluecmap;
/* get image data routine */
- int (*get)(TIFFRGBAImage*, uint32*, uint32, uint32);
+ int (LINKAGEMODE *get)(TIFFRGBAImage*, uint32*, uint32, uint32);
union {
void (*any)(TIFFRGBAImage*);
tileContigRoutine contig;
* More codecs may be registered through calls to the library
* and/or the builtin implementations may be overridden.
*/
-typedef int (*TIFFInitMethod)(TIFF*, int);
+typedef int (LINKAGEMODE *TIFFInitMethod)(TIFF*, int);
typedef struct {
char* name;
uint16 scheme;
#if defined(__cplusplus)
extern "C" {
#endif
-typedef void (*TIFFErrorHandler)(const char*, const char*, va_list);
-typedef tsize_t (*TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
-typedef toff_t (*TIFFSeekProc)(thandle_t, toff_t, int);
-typedef int (*TIFFCloseProc)(thandle_t);
-typedef toff_t (*TIFFSizeProc)(thandle_t);
-typedef int (*TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
-typedef void (*TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
-typedef void (*TIFFExtendProc)(TIFF*);
+typedef void (LINKAGEMODE *TIFFErrorHandler)(const char*, const char*, va_list);
+typedef tsize_t (LINKAGEMODE *TIFFReadWriteProc)(thandle_t, tdata_t, tsize_t);
+typedef toff_t (LINKAGEMODE *TIFFSeekProc)(thandle_t, toff_t, int);
+typedef int (LINKAGEMODE *TIFFCloseProc)(thandle_t);
+typedef toff_t (LINKAGEMODE *TIFFSizeProc)(thandle_t);
+typedef int (LINKAGEMODE *TIFFMapFileProc)(thandle_t, tdata_t*, toff_t*);
+typedef void (LINKAGEMODE *TIFFUnmapFileProc)(thandle_t, tdata_t, toff_t);
+typedef void (LINKAGEMODE *TIFFExtendProc)(TIFF*);
extern const char* TIFFGetVersion(void);
* Copyright (c) 1988-1997 Sam Leffler
* Copyright (c) 1991-1997 Silicon Graphics, Inc.
*
- * Permission to use, copy, modify, distribute, and sell this software and
+ * 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.
- *
+ *
+ * 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
+ * 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.
*/
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 int (LINKAGEMODE *TIFFCodeMethod)(TIFF*, tidata_t, tsize_t, tsample_t);
+typedef int (LINKAGEMODE *TIFFSeekMethod)(TIFF*, uint32);
+typedef void (LINKAGEMODE *TIFFPostMethod)(TIFF*, tidata_t, tsize_t);
typedef int (*TIFFVSetMethod)(TIFF*, ttag_t, va_list);
typedef int (*TIFFVGetMethod)(TIFF*, ttag_t, va_list);
-typedef void (*TIFFPrintMethod)(TIFF*, FILE*, long);
-typedef uint32 (*TIFFStripMethod)(TIFF*, uint32);
-typedef void (*TIFFTileMethod)(TIFF*, uint32*, uint32*);
+typedef void (LINKAGEMODE *TIFFPrintMethod)(TIFF*, FILE*, long);
+typedef uint32 (LINKAGEMODE *TIFFStripMethod)(TIFF*, uint32);
+typedef void (LINKAGEMODE *TIFFTileMethod)(TIFF*, uint32*, uint32*);
struct tiff {
char* tif_name; /* name of open file */
#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_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 */
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 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*);
GLOBALDATA(TIFFErrorHandler,_TIFFwarningHandler);
GLOBALDATA(TIFFErrorHandler,_TIFFerrorHandler);
-extern int TIFFInitDumpMode(TIFF*, int);
+extern int TIFFInitDumpMode(TIFF*, int);
#ifdef PACKBITS_SUPPORT
extern int TIFFInitPackBits(TIFF*, int);
#endif