Use "%I64d" printf() formatter instead of "%lld" with MSVC compiler.
This commit is contained in:
parent
7c7f07f5d4
commit
9b76d52ad3
@ -1,4 +1,4 @@
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.11 2007-07-10 02:40:06 joris Exp $ */
|
||||
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_dumpmode.c,v 1.12 2007-07-19 13:25:43 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -80,11 +80,19 @@ DumpModeDecode(TIFF* tif, uint8* buf, tmsize_t cc, uint16 s)
|
||||
static const char module[] = "DumpModeDecode";
|
||||
(void) s;
|
||||
if (tif->tif_rawcc < cc) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data for scanline %lud, expected a request for at most %lld bytes, got a request for %lld bytes",
|
||||
(unsigned long) tif->tif_row,
|
||||
(signed long long) tif->tif_rawcc,
|
||||
(signed long long) cc);
|
||||
"Not enough data for scanline %lu, expected a request for at most %I64d bytes, got a request for %I64d bytes",
|
||||
(unsigned long) tif->tif_row,
|
||||
(signed __int64) tif->tif_rawcc,
|
||||
(signed __int64) cc);
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data for scanline %lu, expected a request for at most %lld bytes, got a request for %lld bytes",
|
||||
(unsigned long) tif->tif_row,
|
||||
(signed long long) tif->tif_rawcc,
|
||||
(signed long long) cc);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_luv.c,v 1.30 2007-07-09 09:26:57 dron Exp $ */
|
||||
/* $Id: tif_luv.c,v 1.31 2007-07-19 13:25:43 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 Greg Ward Larson
|
||||
@ -224,9 +224,17 @@ LogL16Decode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
tp[i++] |= (int16)*bp++ << shft;
|
||||
}
|
||||
if (i != npixels) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lud (short %llud pixels)",
|
||||
(unsigned long) tif->tif_row, (unsigned long long) (npixels - i));
|
||||
"Not enough data at row %lu (short %I64d pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned __int64) (npixels - i));
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lu (short %llu pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned long long) (npixels - i));
|
||||
#endif
|
||||
tif->tif_rawcp = (uint8*) bp;
|
||||
tif->tif_rawcc = cc;
|
||||
return (0);
|
||||
@ -274,9 +282,17 @@ LogLuvDecode24(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
tif->tif_rawcp = (uint8*) bp;
|
||||
tif->tif_rawcc = cc;
|
||||
if (i != npixels) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lud (short %llud pixels)",
|
||||
(unsigned long) tif->tif_row, (unsigned long long) (npixels - i));
|
||||
"Not enough data at row %lu (short %I64d pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned __int64) (npixels - i));
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lu (short %llu pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned long long) (npixels - i));
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
(*sp->tfunc)(sp, op, npixels);
|
||||
@ -331,9 +347,17 @@ LogLuvDecode32(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
|
||||
tp[i++] |= (uint32)*bp++ << shft;
|
||||
}
|
||||
if (i != npixels) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lud (short %llud pixels)",
|
||||
(unsigned long) tif->tif_row, (unsigned long long) (npixels - i));
|
||||
"Not enough data at row %lu (short %I64d pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned __int64) (npixels - i));
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at row %lu (short %llu pixels)",
|
||||
(unsigned long) tif->tif_row,
|
||||
(unsigned long long) (npixels - i));
|
||||
#endif
|
||||
tif->tif_rawcp = (uint8*) bp;
|
||||
tif->tif_rawcc = cc;
|
||||
return (0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $Id: tif_lzw.c,v 1.35 2007-06-27 16:09:58 joris Exp $ */
|
||||
/* $Id: tif_lzw.c,v 1.36 2007-07-19 13:25:43 dron Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988-1997 Sam Leffler
|
||||
@ -527,9 +527,15 @@ LZWDecode(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
|
||||
sp->dec_maxcodep = maxcodep;
|
||||
|
||||
if (occ > 0) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at scanline %d (short %llud bytes)",
|
||||
tif->tif_row, (unsigned long long) occ);
|
||||
"Not enough data at scanline %d (short %I64d bytes)",
|
||||
tif->tif_row, (unsigned __int64) occ);
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at scanline %d (short %llu bytes)",
|
||||
tif->tif_row, (unsigned long long) occ);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
@ -710,9 +716,15 @@ LZWDecodeCompat(TIFF* tif, uint8* op0, tmsize_t occ0, uint16 s)
|
||||
sp->dec_maxcodep = maxcodep;
|
||||
|
||||
if (occ > 0) {
|
||||
#if defined(__WIN32__) && defined(_MSC_VER)
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at scanline %d (short %llud bytes)",
|
||||
tif->tif_row, (unsigned long long) occ);
|
||||
"Not enough data at scanline %d (short %I64d bytes)",
|
||||
tif->tif_row, (unsigned __int64) occ);
|
||||
#else
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"Not enough data at scanline %d (short %llu bytes)",
|
||||
tif->tif_row, (unsigned long long) occ);
|
||||
#endif
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
@ -732,7 +744,8 @@ LZWSetupEncode(TIFF* tif)
|
||||
assert(sp != NULL);
|
||||
sp->enc_hashtab = (hash_t*) _TIFFmalloc(HSIZE*sizeof (hash_t));
|
||||
if (sp->enc_hashtab == NULL) {
|
||||
TIFFErrorExt(tif->tif_clientdata, module, "No space for LZW hash table");
|
||||
TIFFErrorExt(tif->tif_clientdata, module,
|
||||
"No space for LZW hash table");
|
||||
return (0);
|
||||
}
|
||||
return (1);
|
||||
|
Loading…
Reference in New Issue
Block a user