third_party/codecs/tiff/libtiff/tif_flush.c
/*
 * Flush buffered data to the file.
 *
 * Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
 * is not set, so that TIFFFlush() will proceed to write out the directory.
 * The documentation says returning 1 is an error indicator, but not having
 * been writing isn't exactly a an error.  Hopefully this doesn't cause
 * problems for other people. 
 */
Flush buffered data to the file.
Frank Warmerdam'2000: I modified this to return 1 if TIFF_BEENWRITING
is not set, so that TIFFFlush() will proceed to write out the directory.
The documentation says returning 1 is an error indicator, but not having
been writing isn't exactly a an error.  Hopefully this doesn't cause
problems for other people.
Flush buffered data to the file . Frank Warmerdam ' 2000 : I modified this to return 1 if TIFF_BEENWRITING is not set so that TIFFFlush () will proceed to write out the directory . The documentation says returning 1 is an error indicator but not having been writing isn ' t exactly a an error . Hopefully this doesn ' t cause problems for other people .
int
TIFFFlushData(TIFF* tif)
{
	if ((tif->tif_flags & TIFF_BEENWRITING) == 0)
		return (0);
	if (tif->tif_flags & TIFF_POSTENCODE) {
		tif->tif_flags &= ~TIFF_POSTENCODE;
		if (!(*tif->tif_postencode)(tif))
			return (0);
	}
	return (TIFFFlushData1(tif));
}
int TIFFFlushData ( TIFF * tif ) { if ( ( tif -> tif_flags & TIFF_BEENWRITING ) == 0 ) return ( 0 ) ; if ( tif -> tif_flags & TIFF_POSTENCODE ) { tif -> tif_flags &= ~ TIFF_POSTENCODE ; if ( ! ( * tif -> tif_postencode ) ( tif ) ) return ( 0 ) ; } return ( TIFFFlushData1 ( tif ) ) ; }
Flush buffered data to the file.
Flush buffered data to the file .