summaryrefslogtreecommitdiff
path: root/tiff/libtiff/tif_jbig.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2022-05-10 17:05:54 +0100
committerChris Liddell <chris.liddell@artifex.com>2022-05-11 09:33:06 +0100
commitb6d377080747ed63f2742bcd9c32bc67255626a1 (patch)
tree1abfea68f4ea1b2bd2196f5907ca0b83accaf0a5 /tiff/libtiff/tif_jbig.c
parent73c17cef9cc0be38219f533a98e35e0d693c3821 (diff)
downloadghostpdl-b6d377080747ed63f2742bcd9c32bc67255626a1.tar.gz
Update libtiff to 4.3.0
Changes to libtiff for gpdl. 1) Ensure that libtiff doesn't mess with 'boolean' in GS builds on Windows. Without this, the jpeg structures used by our JPEG lib build are different in size when called from gs and libtiff, resulting in runtime errors. 2) Update libtiff so that it can correctly call into the jpeg library so that memory operations happen from our pools, not malloc/free. Slightly horrid in that this is more complex with OJPEG than JPEG files. Fix some compiler warnings stemming from libtiff update Various tweaks for libtiff 4.3.0 to build on Windows Mainly "importing" tif_config.vc.h and tiffconf.vc.h - the tiff build now created those with cmake. Then typedef'ing several C99 ***_t style types. Finally defining matching C99 PRI* printf formatting macros
Diffstat (limited to 'tiff/libtiff/tif_jbig.c')
-rw-r--r--tiff/libtiff/tif_jbig.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/tiff/libtiff/tif_jbig.c b/tiff/libtiff/tif_jbig.c
index a3500e0b6..740863384 100644
--- a/tiff/libtiff/tif_jbig.c
+++ b/tiff/libtiff/tif_jbig.c
@@ -46,7 +46,7 @@ static int JBIGSetupDecode(TIFF* tif)
return 1;
}
-static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
+static int JBIGDecode(TIFF* tif, uint8_t* buffer, tmsize_t size, uint16_t s)
{
struct jbg_dec_state decoder;
int decodeStatus = 0;
@@ -101,14 +101,14 @@ static int JBIGDecode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
if( (tmsize_t)decodedSize < size )
{
TIFFWarningExt(tif->tif_clientdata, "JBIG",
- "Only decoded %lu bytes, whereas %lu requested",
- decodedSize, (unsigned long)size);
+ "Only decoded %lu bytes, whereas %"TIFF_SSIZE_FORMAT" requested",
+ decodedSize, size);
}
else if( (tmsize_t)decodedSize > size )
{
TIFFErrorExt(tif->tif_clientdata, "JBIG",
- "Decoded %lu bytes, whereas %lu were requested",
- decodedSize, (unsigned long)size);
+ "Decoded %lu bytes, whereas %"TIFF_SSIZE_FORMAT" were requested",
+ decodedSize, size);
jbg_dec_free(&decoder);
return 0;
}
@@ -133,7 +133,7 @@ static int JBIGSetupEncode(TIFF* tif)
return 1;
}
-static int JBIGCopyEncodedData(TIFF* tif, unsigned char* pp, size_t cc, uint16 s)
+static int JBIGCopyEncodedData(TIFF* tif, unsigned char* pp, size_t cc, uint16_t s)
{
(void) s;
while (cc > 0)
@@ -173,7 +173,7 @@ static void JBIGOutputBie(unsigned char* buffer, size_t len, void* userData)
JBIGCopyEncodedData(tif, buffer, len, 0);
}
-static int JBIGEncode(TIFF* tif, uint8* buffer, tmsize_t size, uint16 s)
+static int JBIGEncode(TIFF* tif, uint8_t* buffer, tmsize_t size, uint16_t s)
{
TIFFDirectory* dir = &tif->tif_dir;
struct jbg_enc_state encoder;