Changeset 14002

Show
Ignore:
Timestamp:
03/14/08 02:00:24 (2 months ago)
Author:
warmerdam
Message:

refresh from upstream - fixes include #2005

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/frmts/gtiff/libtiff/tif_dirread.c

    r13365 r14002  
    1 /* $Id: tif_dirread.c,v 1.136 2007/11/23 20:49:43 fwarmerdam Exp $ */ 
     1/* $Id: tif_dirread.c,v 1.139 2008/03/14 05:58:40 fwarmerdam Exp $ */ 
    22 
    33/* 
     
    656656                                if (err!=TIFFReadDirEntryErrOk) 
    657657                                        return(err); 
    658                                 *value=(double)(TIFF_INT64_T)m; 
     658                                *value=(double)m; 
    659659                                return(TIFFReadDirEntryErrOk); 
    660660                        } 
     
    724724                return(TIFFReadDirEntryErrOk); 
    725725        } 
     726#ifdef notdef 
    726727        if ((uint64)(4*1024*1024/typesize)<direntry->tdir_count) 
    727728                return(TIFFReadDirEntryErrSizesan); 
    728729        if ((uint64)(4*1024*1024/desttypesize)<direntry->tdir_count) 
    729730                return(TIFFReadDirEntryErrSizesan); 
     731#endif 
    730732        *count=(uint32)direntry->tdir_count; 
    731733        datasize=(*count)*typesize; 
     
    22662268                                        if (tif->tif_flags&TIFF_SWAB) 
    22672269                                                TIFFSwabLong8(ma); 
    2268                                         *mb++=(float)(TIFF_INT64_T)(*ma++); 
     2270                                        *mb++=(float)(*ma++); 
    22692271                                } 
    22702272                        } 
     
    25002502                                        if (tif->tif_flags&TIFF_SWAB) 
    25012503                                                TIFFSwabLong8(ma); 
    2502                                         *mb++=(double)(TIFF_INT64_T)(*ma++); 
     2504                                        *mb++=(double)(*ma++); 
    25032505                                } 
    25042506                        } 
     
    38763878                ChopUpSingleUncompressedStrip(tif); 
    38773879 
     3880        /* 
     3881         * Clear the dirty directory flag.  
     3882         */ 
     3883        tif->tif_flags &= ~TIFF_DIRTYDIRECT; 
     3884        tif->tif_flags &= ~TIFF_DIRTYSTRIP; 
     3885 
    38783886        /* 
    38793887         * Reinitialize i/o since we are starting on a new directory. 
     
    46624670                                assert(fip->field_passcount==0); 
    46634671                                if (dp->tdir_count!=2) 
    4664                                         assert(0); 
    4665                                 else 
    4666                                 { 
    4667                                         err=TIFFReadDirEntryShortArray(tif,dp,&data); 
    4668                                         if (err==TIFFReadDirEntryErrOk) 
    4669                                         { 
    4670                                                 int m; 
    4671                                                 m=TIFFSetField(tif,dp->tdir_tag,data[0],data[1]); 
    4672                                                 _TIFFfree(data); 
    4673                                                 if (!m) 
    4674                                                         return(0); 
    4675                                         } 
     4672                                        return(0); 
     4673                                err=TIFFReadDirEntryShortArray(tif,dp,&data); 
     4674                                if (err==TIFFReadDirEntryErrOk) 
     4675                                { 
     4676                                        int m; 
     4677                                        m=TIFFSetField(tif,dp->tdir_tag,data[0],data[1]); 
     4678                                        _TIFFfree(data); 
     4679                                        if (!m) 
     4680                                                return(0); 
    46764681                                } 
    46774682                        }