From 94fbea122fab5a025cde3f7637f6729a9621bf1f Mon Sep 17 00:00:00 2001 From: David Webster Date: Wed, 16 Feb 2000 06:26:12 +0000 Subject: [PATCH] OS/2 updates, basically linkage mode settings on static procs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6071 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/tiff/MAKEFILE.VA | 193 ++++++++++++++++++++++++++++++++++++++++ src/tiff/tif_codec.c | 20 ++--- src/tiff/tif_compress.c | 18 ++-- src/tiff/tif_dirinfo.c | 26 +++--- src/tiff/tif_dumpmode.c | 22 ++--- src/tiff/tif_fax3.c | 54 +++++------ src/tiff/tiffio.h | 48 +++++----- src/tiff/tiffiop.h | 42 ++++----- 8 files changed, 311 insertions(+), 112 deletions(-) create mode 100644 src/tiff/MAKEFILE.VA diff --git a/src/tiff/MAKEFILE.VA b/src/tiff/MAKEFILE.VA new file mode 100644 index 0000000000..ae1bee90e5 --- /dev/null +++ b/src/tiff/MAKEFILE.VA @@ -0,0 +1,193 @@ +# +# 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 + diff --git a/src/tiff/tif_codec.c b/src/tiff/tif_codec.c index 8b87b80d84..0230f04050 100644 --- a/src/tiff/tif_codec.c +++ b/src/tiff/tif_codec.c @@ -4,23 +4,23 @@ * 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. */ @@ -31,7 +31,7 @@ */ #include "tiffiop.h" -static int NotConfigured(TIFF*, int); +static int _Optlink NotConfigured(TIFF*, int); #ifndef LZW_SUPPORT #define TIFFInitLZW NotConfigured @@ -107,7 +107,7 @@ _notConfigured(TIFF* tif) return (0); } -static int +static int _Optlink NotConfigured(TIFF* tif, int scheme) { tif->tif_setupdecode = _notConfigured; diff --git a/src/tiff/tif_compress.c b/src/tiff/tif_compress.c index 10e5e9ffe3..97a08c2079 100644 --- a/src/tiff/tif_compress.c +++ b/src/tiff/tif_compress.c @@ -4,23 +4,23 @@ * 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. */ @@ -122,7 +122,7 @@ _TIFFNoPreCode(TIFF* tif, tsample_t s) 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; diff --git a/src/tiff/tif_dirinfo.c b/src/tiff/tif_dirinfo.c index 1c49c9a32e..b7494e4bbd 100644 --- a/src/tiff/tif_dirinfo.c +++ b/src/tiff/tif_dirinfo.c @@ -4,23 +4,23 @@ * 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. */ @@ -218,17 +218,17 @@ static const TIFFFieldInfo tiffFieldInfo[] = { /* 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 @@ -250,7 +250,7 @@ _TIFFSetupFieldInfo(TIFF* tif) _TIFFMergeFieldInfo(tif, tiffFieldInfo, N(tiffFieldInfo)); } -static int +static int LINKAGEMODE tagCompare(const void* a, const void* b) { const TIFFFieldInfo* ta = *(const TIFFFieldInfo**) a; diff --git a/src/tiff/tif_dumpmode.c b/src/tiff/tif_dumpmode.c index 2c1e2b9f78..3fbcc11643 100644 --- a/src/tiff/tif_dumpmode.c +++ b/src/tiff/tif_dumpmode.c @@ -4,23 +4,23 @@ * 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. */ @@ -34,7 +34,7 @@ /* * Encode a hunk of pixels. */ -static int +static int LINKAGEMODE DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t s) { (void) s; @@ -64,7 +64,7 @@ DumpModeEncode(TIFF* tif, tidata_t pp, tsize_t cc, tsample_t 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; @@ -88,7 +88,7 @@ DumpModeDecode(TIFF* tif, tidata_t buf, tsize_t cc, tsample_t 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; diff --git a/src/tiff/tif_fax3.c b/src/tiff/tif_fax3.c index 4be62aedea..32271b0ed3 100644 --- a/src/tiff/tif_fax3.c +++ b/src/tiff/tif_fax3.c @@ -4,23 +4,23 @@ * 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. */ @@ -182,7 +182,7 @@ Fax3PreDecode(TIFF* tif, tsample_t s) * 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)", @@ -190,7 +190,7 @@ Fax3Unexpected(const char* module, TIFF* tif, uint32 a0) } #define unexpected(table, a0) Fax3Unexpected(module, tif, a0) -static void +static void LINKAGEMODE Fax3Extension(const char* module, TIFF* tif, uint32 a0) { TIFFError(module, @@ -199,7 +199,7 @@ Fax3Extension(const char* module, TIFF* tif, uint32 a0) } #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)", @@ -209,7 +209,7 @@ Fax3BadLength(const char* module, TIFF* tif, uint32 a0, uint32 lastx) } #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)", @@ -222,7 +222,7 @@ Fax3PrematureEOF(const char* module, TIFF* tif, uint32 a0) /* * 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"); @@ -262,7 +262,7 @@ Fax3Decode1D(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s) /* * 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"); @@ -574,7 +574,7 @@ static const int _msbmask[9] = * 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); @@ -609,7 +609,7 @@ Fax3PutBits(TIFF* tif, u_int bits, u_int length) * 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); @@ -652,7 +652,7 @@ putspan(TIFF* tif, int32 span, const tableentry* tab) * 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); @@ -778,7 +778,7 @@ static int32 find1span(u_char*, int32, int32); * 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; @@ -837,7 +837,7 @@ find0span(u_char* bp, int32 bs, int32 be) return (span); } -INLINE static int32 +INLINE static int32 LINKAGEMODE find1span(u_char* bp, int32 bs, int32 be) { int32 bits = be - bs; @@ -916,7 +916,7 @@ find1span(u_char* bp, int32 bs, int32 be) * 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); @@ -962,7 +962,7 @@ static const tableentry vcodes[7] = { * 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) @@ -1007,7 +1007,7 @@ Fax3Encode2DRow(TIFF* tif, u_char* bp, u_char* rp, uint32 bits) /* * 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); @@ -1215,7 +1215,7 @@ Fax3VGetField(TIFF* tif, ttag_t tag, va_list ap) return (1); } -static void +static void LINKAGEMODE Fax3PrintDir(TIFF* tif, FILE* fd, long flags) { Fax3BaseState* sp = Fax3State(tif); @@ -1271,7 +1271,7 @@ Fax3PrintDir(TIFF* tif, FILE* fd, long flags) (u_long) sp->recvtime); } -static int +static int LINKAGEMODE InitCCITTFax3(TIFF* tif) { Fax3BaseState* sp; @@ -1354,7 +1354,7 @@ TIFFInitCCITTFax3(TIFF* tif, int scheme) /* * 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"); @@ -1394,7 +1394,7 @@ Fax4Decode(TIFF* tif, tidata_t buf, tsize_t occ, tsample_t s) /* * 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); @@ -1454,7 +1454,7 @@ TIFFInitCCITTFax4(TIFF* tif, int scheme) /* * 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"); diff --git a/src/tiff/tiffio.h b/src/tiff/tiffio.h index dfa49e2b30..8aaeec25b7 100644 --- a/src/tiff/tiffio.h +++ b/src/tiff/tiffio.h @@ -4,23 +4,23 @@ * 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. */ @@ -88,6 +88,12 @@ typedef HFILE thandle_t; /* client data handle */ 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 @@ -114,17 +120,17 @@ typedef struct _TIFFRGBAImage TIFFRGBAImage; /* * 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*); /* @@ -154,7 +160,7 @@ struct _TIFFRGBAImage { 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; @@ -185,7 +191,7 @@ struct _TIFFRGBAImage { * 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; @@ -198,14 +204,14 @@ typedef struct { #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); diff --git a/src/tiff/tiffiop.h b/src/tiff/tiffiop.h index cd46330cd5..91264785f3 100644 --- a/src/tiff/tiffiop.h +++ b/src/tiff/tiffiop.h @@ -4,23 +4,23 @@ * 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. */ @@ -58,14 +58,14 @@ 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 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 */ @@ -85,7 +85,7 @@ struct tiff { #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 */ @@ -210,11 +210,11 @@ 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 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*); @@ -231,7 +231,7 @@ extern void _TIFFprintAsciiTag(FILE*, const char*, const char*); 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 -- 2.45.2