added support for printing FIELD_CUSTOM strings without passcount set

This commit is contained in:
Frank Warmerdam 2002-03-27 06:31:29 +00:00
parent 39c69d9b52
commit c12023cf56

View File

@ -1,4 +1,4 @@
/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_print.c,v 1.6 2002-02-24 16:13:13 warmerda Exp $ */ /* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_print.c,v 1.7 2002-03-27 06:31:29 warmerda Exp $ */
/* /*
* Copyright (c) 1988-1997 Sam Leffler * Copyright (c) 1988-1997 Sam Leffler
@ -351,8 +351,6 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
_TIFFprintAsciiTag(fd, "Date & Time", td->td_datetime); _TIFFprintAsciiTag(fd, "Date & Time", td->td_datetime);
if (TIFFFieldSet(tif,FIELD_HOSTCOMPUTER)) if (TIFFFieldSet(tif,FIELD_HOSTCOMPUTER))
_TIFFprintAsciiTag(fd, "Host Computer", td->td_hostcomputer); _TIFFprintAsciiTag(fd, "Host Computer", td->td_hostcomputer);
if (TIFFFieldSet(tif,FIELD_SOFTWARE))
_TIFFprintAsciiTag(fd, "Software", td->td_software);
if (TIFFFieldSet(tif,FIELD_COPYRIGHT)) if (TIFFFieldSet(tif,FIELD_COPYRIGHT))
_TIFFprintAsciiTag(fd, "Copyright", td->td_copyright); _TIFFprintAsciiTag(fd, "Copyright", td->td_copyright);
if (TIFFFieldSet(tif,FIELD_DOCUMENTNAME)) if (TIFFFieldSet(tif,FIELD_DOCUMENTNAME))
@ -539,6 +537,14 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags)
} }
fprintf( fd, "\n" ); fprintf( fd, "\n" );
} }
else if( !fld->field_passcount
&& fld->field_type == TIFF_ASCII )
{
char *data;
if( TIFFGetField( tif, tag, &data ) )
fprintf(fd, " %s: %s\n", fld->field_name, data );
}
} }
} }