summaryrefslogtreecommitdiffstats
path: root/tools/h5repack
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/h5repack
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/h5repack')
-rw-r--r--tools/h5repack/h5repack_copy.c28
-rw-r--r--tools/h5repack/h5repack_refs.c28
2 files changed, 48 insertions, 8 deletions
diff --git a/tools/h5repack/h5repack_copy.c b/tools/h5repack/h5repack_copy.c
index 110069b..5908809 100644
--- a/tools/h5repack/h5repack_copy.c
+++ b/tools/h5repack/h5repack_copy.c
@@ -259,6 +259,7 @@ int do_copy_objects(hid_t fidin,
#endif /* LATER */
int i, j;
int wrote=0;
+ H5T_class_t type_class; /* datatype class */
/*-------------------------------------------------------------------------
* copy the suppplied object list
@@ -321,8 +322,17 @@ int do_copy_objects(hid_t fidin,
nelmts=1;
for (j=0; j<rank; j++)
nelmts*=dims[j];
- if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
- goto error;
+
+ if((type_class = H5Tget_class(ftype_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype_id=H5Tcopy(ftype_id))<0)
+ goto error;
+ } else {
+ if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
@@ -608,6 +618,7 @@ int copy_attr(hid_t loc_in,
char name[255];
int n, j;
unsigned u;
+ H5T_class_t type_class;
if ((n = H5Aget_num_attrs(loc_in))<0)
goto error;
@@ -646,8 +657,17 @@ int copy_attr(hid_t loc_in,
nelmts=1;
for (j=0; j<rank; j++)
nelmts*=dims[j];
- if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
- goto error;
+
+ if((type_class = H5Tget_class(ftype_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype_id=H5Tcopy(ftype_id))<0)
+ goto error;
+ } else {
+ if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 1a09b02..4662341 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -67,6 +67,7 @@ int do_copy_refobjs(hid_t fidin,
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
int next; /* external files */
int i, j;
+ H5T_class_t type_class; /* datatype class */
/*-------------------------------------------------------------------------
* browse
@@ -122,8 +123,17 @@ int do_copy_refobjs(hid_t fidin,
nelmts=1;
for (j=0; j<rank; j++)
nelmts*=dims[j];
- if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
- goto error;
+
+ if((type_class = H5Tget_class(ftype_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype_id=H5Tcopy(ftype_id))<0)
+ goto error;
+ } else {
+ if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
@@ -476,6 +486,7 @@ static int copy_refs_attr(hid_t loc_in,
char name[255];
int n, j;
unsigned u;
+ H5T_class_t type_class; /* datatype class */
if ((n = H5Aget_num_attrs(loc_in))<0)
goto error;
@@ -515,8 +526,17 @@ static int copy_refs_attr(hid_t loc_in,
nelmts=1;
for (j=0; j<rank; j++)
nelmts*=dims[j];
- if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
- goto error;
+
+ if((type_class = H5Tget_class(ftype_id))<0)
+ goto error;
+ if(type_class==H5T_BITFIELD) {
+ if((mtype_id=H5Tcopy(ftype_id))<0)
+ goto error;
+ } else {
+ if ((mtype_id=H5Tget_native_type(ftype_id,H5T_DIR_DEFAULT))<0)
+ goto error;
+ }
+
if ((msize=H5Tget_size(mtype_id))==0)
goto error;