summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/libtiff/libtiff/tif_thunder.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/libtiff/libtiff/tif_thunder.c')
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_thunder.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/src/3rdparty/libtiff/libtiff/tif_thunder.c b/src/3rdparty/libtiff/libtiff/tif_thunder.c
index db6383a..3e703d8 100644
--- a/src/3rdparty/libtiff/libtiff/tif_thunder.c
+++ b/src/3rdparty/libtiff/libtiff/tif_thunder.c
@@ -61,7 +61,7 @@ static const int threebitdeltas[8] = { 0, 1, 2, 3, 0, -3, -2, -1 };
if (npixels++ & 1) \
*op++ |= lastpixel; \
else \
- op[0] = (uint8) (lastpixel << 4); \
+ op[0] = (uint8_t) (lastpixel << 4); \
} \
}
@@ -83,7 +83,7 @@ ThunderSetupDecode(TIFF* tif)
}
static int
-ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
+ThunderDecode(TIFF* tif, uint8_t* op, tmsize_t maxpixels)
{
static const char module[] = "ThunderDecode";
register unsigned char *bp;
@@ -114,7 +114,7 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
npixels += n;
if (npixels < maxpixels) {
for (; n > 0; n -= 2)
- *op++ = (uint8) lastpixel;
+ *op++ = (uint8_t) lastpixel;
}
if (n == -1)
*--op &= 0xf0;
@@ -139,24 +139,15 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
break;
}
}
- tif->tif_rawcp = (uint8*) bp;
+ tif->tif_rawcp = (uint8_t*) bp;
tif->tif_rawcc = cc;
if (npixels != maxpixels) {
-#if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__))
TIFFErrorExt(tif->tif_clientdata, module,
- "%s data at scanline %lu (%I64u != %I64u)",
+ "%s data at scanline %lu (%"PRIu64" != %"PRIu64")",
npixels < maxpixels ? "Not enough" : "Too much",
(unsigned long) tif->tif_row,
- (unsigned __int64) npixels,
- (unsigned __int64) maxpixels);
-#else
- TIFFErrorExt(tif->tif_clientdata, module,
- "%s data at scanline %lu (%llu != %llu)",
- npixels < maxpixels ? "Not enough" : "Too much",
- (unsigned long) tif->tif_row,
- (unsigned long long) npixels,
- (unsigned long long) maxpixels);
-#endif
+ (uint64_t) npixels,
+ (uint64_t) maxpixels);
return (0);
}
@@ -164,10 +155,10 @@ ThunderDecode(TIFF* tif, uint8* op, tmsize_t maxpixels)
}
static int
-ThunderDecodeRow(TIFF* tif, uint8* buf, tmsize_t occ, uint16 s)
+ThunderDecodeRow(TIFF* tif, uint8_t* buf, tmsize_t occ, uint16_t s)
{
static const char module[] = "ThunderDecodeRow";
- uint8* row = buf;
+ uint8_t* row = buf;
(void) s;
if (occ % tif->tif_scanlinesize)