Use _TIFFRewriteField() instead of TIFFRewriteField().

This commit is contained in:
Andrey Kiselev 2008-04-15 12:53:07 +00:00
parent 35b0e74065
commit 481c2432f2

View File

@ -1,4 +1,4 @@
/* $Id: rewrite_tag.c,v 1.2 2008-03-28 01:42:06 bfriesen Exp $ */ /* $Id: rewrite_tag.c,v 1.3 2008-04-15 12:53:07 dron Exp $ */
/* /*
* Copyright (c) 2007, Frank Warmerdam <warmerdam@pobox.com> * Copyright (c) 2007, Frank Warmerdam <warmerdam@pobox.com>
@ -26,7 +26,7 @@
/* /*
* TIFF Library * TIFF Library
* *
* Module to test TIFFRewriteField(). * Module to test _TIFFRewriteField().
*/ */
#include "tif_config.h" #include "tif_config.h"
@ -38,6 +38,7 @@
#endif #endif
#include "tiffio.h" #include "tiffio.h"
#include "tiffiop.h"
const uint32 width = 10; const uint32 width = 10;
const uint32 length = 40; const uint32 length = 40;
@ -142,11 +143,11 @@ int rewrite_test( const char *filename, int length, int bigtiff,
{ {
TIFF *tif; TIFF *tif;
int i; int i;
unsigned char buf[10] = {5,6,7,8,9,10,11,12,13,14}; unsigned char buf[10] = {5,6,7,8,9,10,11,12,13,14};
uint64 *rowoffset, *rowbytes; uint64 *rowoffset, *rowbytes;
uint64 *upd_rowoffset; uint64 *upd_rowoffset;
uint32 *upd_bytecount; uint32 *upd_bytecount;
/* Test whether we can write tags. */ /* Test whether we can write tags. */
if( bigtiff ) if( bigtiff )
@ -222,8 +223,8 @@ int rewrite_test( const char *filename, int length, int bigtiff,
for( i = 0; i < length; i++ ) for( i = 0; i < length; i++ )
upd_rowoffset[i] = base_value + i*10; upd_rowoffset[i] = base_value + i*10;
if( !TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8, if( !_TIFFRewriteField( tif, TIFFTAG_STRIPOFFSETS, TIFF_LONG8,
length, upd_rowoffset ) ) length, upd_rowoffset ) )
{ {
fprintf (stderr, "Can't rewrite STRIPOFFSETS.\n"); fprintf (stderr, "Can't rewrite STRIPOFFSETS.\n");
goto failure; goto failure;
@ -235,8 +236,8 @@ int rewrite_test( const char *filename, int length, int bigtiff,
for( i = 0; i < length; i++ ) for( i = 0; i < length; i++ )
upd_bytecount[i] = 100 + i*10; upd_bytecount[i] = 100 + i*10;
if( !TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG, if( !_TIFFRewriteField( tif, TIFFTAG_STRIPBYTECOUNTS, TIFF_LONG,
length, upd_bytecount ) ) length, upd_bytecount ) )
{ {
fprintf (stderr, "Can't rewrite STRIPBYTECOUNTS.\n"); fprintf (stderr, "Can't rewrite STRIPBYTECOUNTS.\n");
goto failure; goto failure;