summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5diff_attr.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_attr.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_attr.c')
-rw-r--r--tools/lib/h5diff_attr.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/tools/lib/h5diff_attr.c b/tools/lib/h5diff_attr.c
index 6aedaf5..3278bdb 100644
--- a/tools/lib/h5diff_attr.c
+++ b/tools/lib/h5diff_attr.c
@@ -66,6 +66,7 @@ int diff_attr(hid_t loc1_id,
int ret=0;
hsize_t nfound;
int cmp=1;
+ H5T_class_t type_class; /* Datatype class */
if ((n1 = H5Aget_num_attrs(loc1_id))<0)
goto error;
@@ -160,10 +161,27 @@ int diff_attr(hid_t loc1_id,
nelmts1=1;
for (j=0; j<rank1; j++)
nelmts1*=dims1[j];
- if ((mtype1_id=H5Tget_native_type(ftype1_id,H5T_DIR_DEFAULT))<0)
- goto error;
- if ((mtype2_id=H5Tget_native_type(ftype2_id,H5T_DIR_DEFAULT))<0)
- goto error;
+
+ if((type_class = H5Tget_class(ftype1_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype1_id=H5Tcopy(ftype1_id))<0)
+ goto error;
+ } else {
+ if ((mtype1_id=H5Tget_native_type(ftype1_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
+ if((type_class = H5Tget_class(ftype2_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype2_id=H5Tcopy(ftype2_id))<0)
+ goto error;
+ } else {
+ if ((mtype2_id=H5Tget_native_type(ftype2_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
if ((msize1=H5Tget_size(mtype1_id))==0)
goto error;
if ((msize2=H5Tget_size(mtype2_id))==0)