xp_comm_proj/ReadGeoTiff/libtiff/tif_aux.c
/*
 * Append the data to the specified strip.
 *
 * NB: We don't check that there's space in the
 *     file (i.e. that strips do not overlap).
 */
Append the data to the specified strip.
NB: We don't check that there's space in the
file .
Append the data to the specified strip . NB : We don ' t check that there ' s space in the file .
static int
TIFFAppendToStrip(TIFF* tif, tstrip_t strip, tidata_t data, tsize_t cc)
{
	TIFFDirectory *td = &tif->tif_dir;
	static const char module[] = "TIFFAppendToStrip";
	if (td->td_stripoffset[strip] == 0 || tif->tif_curoff == 0) {
		if (td->td_stripoffset[strip] != 0) {
			if (!SeekOK(tif, td->td_stripoffset[strip])) {
				TIFFError(module,
				    "%s: Seek error at scanline %lu",
				    tif->tif_name, (unsigned long) tif->tif_row);
				return (0);
			}
		} else
			td->td_stripoffset[strip] =
			    TIFFSeekFile(tif, (toff_t) 0, SEEK_END);
		tif->tif_curoff = td->td_stripoffset[strip];
	}
	if (!WriteOK(tif, data, cc)) {
		TIFFError(module, "%s: Write error at scanline %lu",
		    tif->tif_name, (unsigned long) tif->tif_row);
		return (0);
	}
	tif->tif_curoff += cc;
	td->td_stripbytecount[strip] += cc;
	return (1);
}
static int TIFFAppendToStrip ( TIFF * tif , tstrip_t strip , tidata_t data , tsize_t cc ) { TIFFDirectory * td = & tif -> tif_dir ; static const char module [ ] = " " ; if ( td -> td_stripoffset [ strip ] == 0 || tif -> tif_curoff == 0 ) { if ( td -> td_stripoffset [ strip ] != 0 ) { if ( ! SeekOK ( tif , td -> td_stripoffset [ strip ] ) ) { TIFFError ( module , " " , tif -> tif_name , ( unsigned long ) tif -> tif_row ) ; return ( 0 ) ; } } else td -> td_stripoffset [ strip ] = TIFFSeekFile ( tif , ( toff_t ) 0 , SEEK_END ) ; tif -> tif_curoff = td -> td_stripoffset [ strip ] ; } if ( ! WriteOK ( tif , data , cc ) ) { TIFFError ( module , " " , tif -> tif_name , ( unsigned long ) tif -> tif_row ) ; return ( 0 ) ; } tif -> tif_curoff += cc ; td -> td_stripbytecount [ strip ] += cc ; return ( 1 ) ; }
Append the data to the specified strip.
Append the data to the specified strip .
/*
		 * No current offset, set the current strip.
		 */