summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_dset.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2004-10-05 14:31:14 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2004-10-05 14:31:14 (GMT)
commit7ba45c05b3e9345bc8d77a5d205bb41086b78f1e (patch)
treee8b2ff9381a5c47415eee3941dc66ff6907d8354 /tools/lib/h5diff_dset.c
parent71737e02ec70bbfd85ae4eb3f9a16d31b0f9789f (diff)
downloadhdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.zip
hdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.tar.gz
hdf5-7ba45c05b3e9345bc8d77a5d205bb41086b78f1e.tar.bz2
[svn-r9364]
Purpose: change feature Description: Back up support bitfield and time datatypes in H5Tget_native_type.Leave it to future support. Let it return "not supported" error message for now. Platforms tested: h5committest and fuss. Misc. update: RELEASE.txt
Diffstat (limited to 'tools/lib/h5diff_dset.c')
-rw-r--r--tools/lib/h5diff_dset.c45
1 files changed, 41 insertions, 4 deletions
diff --git a/tools/lib/h5diff_dset.c b/tools/lib/h5diff_dset.c
index 69acfbd..767587d 100644
--- a/tools/lib/h5diff_dset.c
+++ b/tools/lib/h5diff_dset.c
@@ -155,6 +155,7 @@ hsize_t diff_datasetid( hid_t dset1_id,
hsize_t storage_size1;
hsize_t storage_size2;
hsize_t nfound=0; /* number of differences found */
+ H5T_class_t type_class; /* data type class */
int cmp=1; /* do diff or not */
int i;
@@ -266,9 +267,25 @@ hsize_t diff_datasetid( hid_t dset1_id,
* memory type and sizes
*-------------------------------------------------------------------------
*/
+ if((type_class = H5Tget_class(f_type1))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((m_type1=H5Tcopy(f_type1))<0)
+ goto error;
+ } else {
+ if ((m_type1=H5Tget_native_type(f_type1,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
- m_type1 = H5Tget_native_type( f_type1 , H5T_DIR_DEFAULT);
- m_type2 = H5Tget_native_type( f_type2 , H5T_DIR_DEFAULT);
+ if((type_class = H5Tget_class(f_type2))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((m_type2=H5Tcopy(f_type2))<0)
+ goto error;
+ } else {
+ if ((m_type2=H5Tget_native_type(f_type2,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
m_size1 = H5Tget_size( m_type1 );
m_size2 = H5Tget_size( m_type2 );
@@ -304,13 +321,33 @@ hsize_t diff_datasetid( hid_t dset1_id,
if ( m_size1 < m_size2 )
{
H5Tclose(m_type1);
- m_type1 = H5Tget_native_type( f_type2 , H5T_DIR_DEFAULT);
+
+ if((type_class = H5Tget_class(f_type2))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((m_type1=H5Tcopy(f_type2))<0)
+ goto error;
+ } else {
+ if ((m_type1=H5Tget_native_type(f_type2,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
m_size1 = H5Tget_size( m_type1 );
}
else
{
H5Tclose(m_type2);
- m_type2 = H5Tget_native_type( f_type1 , H5T_DIR_DEFAULT);
+
+ if((type_class = H5Tget_class(f_type1))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((m_type2=H5Tcopy(f_type1))<0)
+ goto error;
+ } else {
+ if ((m_type2=H5Tget_native_type(f_type1,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
m_size2 = H5Tget_size( m_type2 );
}
#if defined (H5DIFF_DEBUG)