summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRoger Leigh <rleigh@codelibre.net>2021-01-01 11:51:37 +0000
committerRoger Leigh <rleigh@codelibre.net>2021-01-06 09:25:36 +0000
commit08118b51ac4ae08445aff2fbf5f98d2a1f3e6002 (patch)
treec6c0dabfd847dbdd990cce0eb1c94bd153f28a89 /tools
parent17d2aa03b801b97b0f38d71c62eead81388520b3 (diff)
downloadlibtiff-git-08118b51ac4ae08445aff2fbf5f98d2a1f3e6002.tar.gz
Use stdint.h types when available
Diffstat (limited to 'tools')
-rw-r--r--tools/tiff2pdf.c14
-rw-r--r--tools/tiff2ps.c2
-rw-r--r--tools/tiff2rgba.c4
-rw-r--r--tools/tiffcp.c4
-rw-r--r--tools/tiffcrop.c2
5 files changed, 13 insertions, 13 deletions
diff --git a/tools/tiff2pdf.c b/tools/tiff2pdf.c
index 785d318a..e72361d3 100644
--- a/tools/tiff2pdf.c
+++ b/tools/tiff2pdf.c
@@ -1087,7 +1087,7 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
if(t2p->tiff_pages==NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_pages array, %s",
+ "Can't allocate %" TIFF_SIZE_FORMAT " bytes of memory for tiff_pages array, %s",
(TIFF_SIZE_T) directorycount * sizeof(T2P_PAGE),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
@@ -1098,7 +1098,7 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
if(t2p->tiff_tiles==NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for tiff_tiles array, %s",
+ "Can't allocate %" TIFF_SIZE_FORMAT " bytes of memory for tiff_tiles array, %s",
(TIFF_SIZE_T) directorycount * sizeof(T2P_TILES),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
@@ -1271,7 +1271,7 @@ void t2p_read_tiff_init(T2P* t2p, TIFF* input){
if( t2p->tiff_tiles[i].tiles_tiles == NULL){
TIFFError(
TIFF2PDF_MODULE,
- "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory for t2p_read_tiff_init, %s",
+ "Can't allocate %" TIFF_SIZE_FORMAT " bytes of memory for t2p_read_tiff_init, %s",
(TIFF_SIZE_T) t2p->tiff_tiles[i].tiles_tilecount * sizeof(T2P_TILE),
TIFFFileName(input));
t2p->t2p_error = T2P_ERR_ERROR;
@@ -3002,7 +3002,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
buffer= (unsigned char*) _TIFFmalloc(t2p->tiff_datasize);
if(buffer==NULL){
TIFFError(TIFF2PDF_MODULE,
- "Can't allocate " TIFF_SIZE_FORMAT " bytes of memory "
+ "Can't allocate %" TIFF_SIZE_FORMAT " bytes of memory "
"for t2p_readwrite_pdf_image_tile, %s",
(TIFF_SIZE_T) t2p->tiff_datasize,
TIFFFileName(input));
@@ -3312,7 +3312,7 @@ tsize_t t2p_readwrite_pdf_image_tile(T2P* t2p, TIFF* input, TIFF* output, ttile_
if (TIFFStripSize(output) > t2p->tiff_datasize) {
TIFFError(TIFF2PDF_MODULE,
- "Size mismatch input %ld, output %ld",
+ "Size mismatch input %" TIFF_SSIZE_FORMAT ", output %" TIFF_SSIZE_FORMAT,
t2p->tiff_datasize, TIFFStripSize(output));
_TIFFfree(buffer);
t2p->t2p_error = T2P_ERR_ERROR;
@@ -5675,7 +5675,7 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
t2p_read_tiff_size_tile(t2p, input, i2);
if (t2p->tiff_maxdatasize && (t2p->tiff_datasize > t2p->tiff_maxdatasize)) {
TIFFError(TIFF2PDF_MODULE,
- "Allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ". Use -m option to change limit",
+ "Allocation of %" TIFF_UINT64_FORMAT " bytes is forbidden. Limit is %" TIFF_UINT64_FORMAT ". Use -m option to change limit",
(uint64)t2p->tiff_datasize, (uint64)t2p->tiff_maxdatasize);
t2p->t2p_error = T2P_ERR_ERROR;
return (0);
@@ -5705,7 +5705,7 @@ tsize_t t2p_write_pdf(T2P* t2p, TIFF* input, TIFF* output){
t2p_read_tiff_size(t2p, input);
if (t2p->tiff_maxdatasize && (t2p->tiff_datasize > t2p->tiff_maxdatasize)) {
TIFFError(TIFF2PDF_MODULE,
- "Allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ". Use -m option to change limit",
+ "Allocation of %" TIFF_UINT64_FORMAT " bytes is forbidden. Limit is %" TIFF_UINT64_FORMAT ". Use -m option to change limit",
(uint64)t2p->tiff_datasize, (uint64)t2p->tiff_maxdatasize);
t2p->t2p_error = T2P_ERR_ERROR;
return (0);
diff --git a/tools/tiff2ps.c b/tools/tiff2ps.c
index 32c0f702..3783c0f7 100644
--- a/tools/tiff2ps.c
+++ b/tools/tiff2ps.c
@@ -253,7 +253,7 @@ static void usage(int);
static void* limitMalloc(tmsize_t s)
{
if (maxMalloc && (s > maxMalloc)) {
- fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n",
+ fprintf(stderr, "MemoryLimitError: allocation of %" TIFF_UINT64_FORMAT " bytes is forbidden. Limit is %" TIFF_UINT64_FORMAT ".\n",
(uint64)s, (uint64)maxMalloc);
fprintf(stderr, " use -M option to change limit.\n");
return NULL;
diff --git a/tools/tiff2rgba.c b/tools/tiff2rgba.c
index f179c0a7..4fbc10c7 100644
--- a/tools/tiff2rgba.c
+++ b/tools/tiff2rgba.c
@@ -418,7 +418,7 @@ cvt_whole_image( TIFF *in, TIFF *out )
}
if (maxMalloc != 0 && (tmsize_t)pixel_count * (tmsize_t)sizeof(uint32) > maxMalloc) {
TIFFError(TIFFFileName(in),
- "Raster size " TIFF_UINT64_FORMAT " over memory limit (" TIFF_UINT64_FORMAT "), try -b option.",
+ "Raster size %" TIFF_UINT64_FORMAT " over memory limit (%" TIFF_UINT64_FORMAT "), try -b option.",
(uint64)pixel_count * sizeof(uint32), (uint64)maxMalloc);
return 0;
}
@@ -550,7 +550,7 @@ tiffcvt(TIFF* in, TIFF* out)
if (maxMalloc != 0 && TIFFStripSize(in) > maxMalloc)
{
TIFFError(TIFFFileName(in),
- "Strip Size " TIFF_UINT64_FORMAT " over memory limit (" TIFF_UINT64_FORMAT ")",
+ "Strip Size %" TIFF_UINT64_FORMAT " over memory limit (%" TIFF_UINT64_FORMAT ")",
(uint64)TIFFStripSize(in), (uint64)maxMalloc);
return 0;
}
diff --git a/tools/tiffcp.c b/tools/tiffcp.c
index 6a98eeaf..0f32c5a4 100644
--- a/tools/tiffcp.c
+++ b/tools/tiffcp.c
@@ -110,7 +110,7 @@ static int pageInSeq = 0;
static void* limitMalloc(tmsize_t s)
{
if (maxMalloc && (s > maxMalloc)) {
- fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n",
+ fprintf(stderr, "MemoryLimitError: allocation of %" TIFF_UINT64_FORMAT " bytes is forbidden. Limit is %" TIFF_UINT64_FORMAT ".\n",
(uint64)s, (uint64)maxMalloc);
fprintf(stderr, " use -m option to change limit.\n");
return NULL;
@@ -316,7 +316,7 @@ main(int argc, char* argv[])
}
if (diroff != 0 && !TIFFSetSubDirectory(in, diroff)) {
TIFFError(TIFFFileName(in),
- "Error, setting subdirectory at " TIFF_UINT64_FORMAT, diroff);
+ "Error, setting subdirectory at %" TIFF_UINT64_FORMAT, diroff);
(void) TIFFClose(in);
(void) TIFFClose(out);
return (EXIT_FAILURE);
diff --git a/tools/tiffcrop.c b/tools/tiffcrop.c
index 62c4ea18..1ac3481e 100644
--- a/tools/tiffcrop.c
+++ b/tools/tiffcrop.c
@@ -632,7 +632,7 @@ static tmsize_t maxMalloc = DEFAULT_MAX_MALLOC;
static void* limitMalloc(tmsize_t s)
{
if (maxMalloc && (s > maxMalloc)) {
- fprintf(stderr, "MemoryLimitError: allocation of " TIFF_UINT64_FORMAT " bytes is forbidden. Limit is " TIFF_UINT64_FORMAT ".\n",
+ fprintf(stderr, "MemoryLimitError: allocation of %" TIFF_UINT64_FORMAT " bytes is forbidden. Limit is %" TIFF_UINT64_FORMAT ".\n",
(uint64)s, (uint64)maxMalloc);
fprintf(stderr, " use -k option to change limit.\n"); return NULL;
}