-
2011.04.12 13:14 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.12 13:30 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Bob Friesenhahn
-
2011.04.12 15:55 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.12 17:05 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Lee Howard
-
2011.04.12 18:01 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.13 02:30 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Graeme Gill
- 2011.04.13 13:08 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.13 02:30 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Graeme Gill
-
2011.04.12 18:01 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.12 17:05 "Re: [Tiff] Bug 1941, Was: Libtiff v4.0.0beta7 released", by Lee Howard
-
2011.04.12 15:55 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Edward Lam
- 2011.04.12 15:19 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Edward Lam
-
2011.04.12 13:30 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Bob Friesenhahn
- 2011.04.13 15:40 "Re: [Tiff] Libtiff v4.0.0beta7 released - libtiff.def changes required", by Edward Lam
- 2011.04.23 09:41 "Re: [Tiff] [GM-help] PDF version", by Hunter1972
2011.04.13 14:32 "Re: [Tiff] Libtiff v4.0.0beta7 released", by Edward Lam
On 4/13/2011 9:44 AM, Bob Friesenhahn wrote:
If a function no longer has any use, we should simply delete it since this is the time to do so. To me "deprecate" means that the function continues to work, but that code should move away from it.
Even better, do I need to submit a patch? :)
Patches always help. :-)
Attached.
-Edward
diff -urN tiff-4.0.0beta7.orig/libtiff/libtiff.def tiff-4.0.0beta7/libtiff/libtiff.def --- tiff-4.0.0beta7.orig/libtiff/libtiff.def 2010-11-27 12:25:48.000000000 -0500 +++ tiff-4.0.0beta7/libtiff/libtiff.def 2011-04-13 10:26:22.397250000 -0400
@@ -106,9 +106,6 @@
_TIFFmemcmp
TIFFCreateDirectory
TIFFSetTagExtender
- TIFFMergeFieldInfo
- TIFFFindFieldInfo
- TIFFFindFieldInfoByName
- TIFFFieldWithName
- TIFFFieldWithTag
- TIFFCurrentDirOffset diff -urN tiff-4.0.0beta7.orig/libtiff/tif_dirinfo.c tiff-4.0.0beta7/libtiff/tif_dirinfo.c --- tiff-4.0.0beta7.orig/libtiff/tif_dirinfo.c 2011-02-19 11:26:09.000000000 -0500 +++ tiff-4.0.0beta7/libtiff/tif_dirinfo.c 2011-04-13 10:24:58.850375000 -0400 @@ -826,145 +826,6 @@
- return TIFF_SETGET_UNDEFINED;
- }
-int
-TIFFMergeFieldInfo(TIFF* tif, const TIFFFieldInfo info[], uint32 n)
-{
- static const char module[] = "TIFFMergeFieldInfo";
- static const char reason[] = "for fields array";
- TIFFField *tp;
- size_t nfields;
- uint32 i;
-
- if (tif->tif_nfieldscompat > 0) {
- tif->tif_fieldscompat = (TIFFFieldArray *)
- _TIFFCheckRealloc(tif, tif->tif_fieldscompat,
- tif->tif_nfieldscompat + 1,
- sizeof(TIFFFieldArray), reason);
- } else {
- tif->tif_fieldscompat = (TIFFFieldArray *)
- _TIFFCheckMalloc(tif, 1, sizeof(TIFFFieldArray),
- reason);
- }
- if (!tif->tif_fieldscompat) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "Failed to allocate fields array");
- return -1;
- }
- nfields = tif->tif_nfieldscompat++;
-
- tif->tif_fieldscompat[nfields].type = tfiatOther;
- tif->tif_fieldscompat[nfields].allocated_size = n;
- tif->tif_fieldscompat[nfields].count = n;
- tif->tif_fieldscompat[nfields].fields =
- (TIFFField *)_TIFFCheckMalloc(tif, n, sizeof(TIFFField),
- reason);
- if (!tif->tif_fieldscompat[nfields].fields) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "Failed to allocate fields array");
- return -1;
- }
-
- tp = tif->tif_fieldscompat[nfields].fields;
- for (i = 0; i < n; i++) {
- tp->field_tag = info[i].field_tag;
- tp->field_readcount = info[i].field_readcount;
- tp->field_writecount = info[i].field_writecount;
- tp->field_type = info[i].field_type;
- tp->reserved = 0;
- tp->set_field_type =
- _TIFFSetGetType(info[i].field_type,
- info[i].field_readcount,
- info[i].field_passcount);
- tp->get_field_type =
- _TIFFSetGetType(info[i].field_type,
- info[i].field_readcount,
- info[i].field_passcount);
- tp->field_bit = info[i].field_bit;
- tp->field_oktochange = info[i].field_oktochange;
- tp->field_passcount = info[i].field_passcount;
- tp->field_name = info[i].field_name;
- tp->field_subfields = NULL;
- tp++;
- }
-
- if (!_TIFFMergeFields(tif, tif->tif_fieldscompat[nfields].fields, n)) {
- TIFFErrorExt(tif->tif_clientdata, module,
- "Setting up field info failed");
- return -1;
- }
-
- return 0;
-}
-
-const TIFFFieldInfo*
-TIFFFindFieldInfoByName(TIFF* tif, const char *field_name, TIFFDataType dt)
-{
-#if 0
- TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL};
- TIFFFieldInfo* pkey = &key;
- const TIFFFieldInfo **ret;
- if (tif->tif_foundfield
- && streq(tif->tif_foundfield->field_name, field_name)
- && (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type))
- return (tif->tif_foundfield);
-
- /* If we are invoked with no field information, then just return. */
- if ( !tif->tif_fields ) {
- return NULL;
- }
-
- /* NB: use sorted search (e.g. binary search) */
-
- key.field_name = (char *)field_name;
- key.field_type = dt;
-
- ret = (const TIFFFieldInfo **)
- td_lfind(&pkey, tif->tif_fields, &tif->tif_nfields,
- sizeof(TIFFFieldInfo *), tagNameCompare );
- return tif->tif_foundfield = (ret ? *ret : NULL);
-#else
- (void) tif;
- (void) field_name;
- (void) dt;
-#endif
- return NULL;
-}
-
-const TIFFFieldInfo*
-TIFFFindFieldInfo(TIFF* tif, uint32 tag, TIFFDataType dt)
-{
-#if 0
- TIFFFieldInfo key = {0, 0, 0, TIFF_NOTYPE, 0, 0, 0, 0, 0, 0, NULL, NULL};
- TIFFFieldInfo* pkey = &key;
- const TIFFFieldInfo **ret;
- if (tif->tif_foundfield && tif->tif_foundfield->field_tag == tag &&
- (dt == TIFF_ANY || dt == tif->tif_foundfield->field_type))
- return tif->tif_foundfield;
-
- /* If we are invoked with no field information, then just return. */
- if ( !tif->tif_fields ) {
- return NULL;
- }
-
- /* NB: use sorted search (e.g. binary search) */
-
- key.field_tag = tag;
- key.field_type = dt;
-
- ret = (const TIFFFieldInfo **) bsearch(&pkey,
- tif->tif_fields,
- tif->tif_nfields,
- sizeof(TIFFFieldInfo *),
- tagCompare);
- return tif->tif_foundfield = (ret ? *ret : NULL);
-#else
- (void) tif;
- (void) tag;
- (void) dt;
-#endif
- return NULL;
-}
-
/* vim: set ts=8 sts=8 sw=8 noet: */
/*
diff -urN tiff-4.0.0beta7.orig/libtiff/tiffio.h tiff-4.0.0beta7/libtiff/tiffio.h
--- tiff-4.0.0beta7.orig/libtiff/tiffio.h 2010-03-10 13:56:49.000000000 -0500
+++ tiff-4.0.0beta7/libtiff/tiffio.h 2011-04-13 10:24:58.850375000 -0400
@@ -512,28 +512,6 @@
extern void TIFFYCbCrtoRGB(TIFFYCbCrToRGB *, uint32, int32, int32,
uint32 *, uint32 *, uint32 *);
-/****************************************************************************
- * O B S O L E T E D I N T E R F A C E S
- *
- * Don't use this stuff in your applications, it may be removed in the future
- * libtiff versions.
- ****************************************************************************/ -typedef struct {
- ttag_t field_tag; /* field's tag */
- short field_readcount; /* read count/TIFF_VARIABLE/TIFF_SPP */
- short field_writecount; /* write count/TIFF_VARIABLE */
- TIFFDataType field_type; /* type of associated data */
- unsigned short field_bit; /* bit in fieldsset bit vector */
- unsigned char field_oktochange; /* if true, can change while writing */
- unsigned char field_passcount; /* if true, pass dir count on set */
- char *field_name; /* ASCII name */ -} TIFFFieldInfo; - -extern int TIFFMergeFieldInfo(TIFF*, const TIFFFieldInfo[], uint32); -extern const TIFFFieldInfo* TIFFFindFieldInfo(TIFF*, uint32, TIFFDataType); -extern const TIFFFieldInfo* TIFFFindFieldInfoByName(TIFF* , const char *,
- TIFFDataType);
-
#if defined(c_plusplus) || defined(__cplusplus)
}
#endif