summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_refs.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/h5repack/h5repack_refs.c')
-rw-r--r--tools/h5repack/h5repack_refs.c36
1 files changed, 10 insertions, 26 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 4662341..f093d12 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -22,7 +22,7 @@
static const char* MapIdToName(hid_t refobj_id,
trav_table_t *travt);
-static void close_obj(H5G_obj_t1 obj_type, hid_t obj_id);
+static void close_obj(H5G_obj_t obj_type, hid_t obj_id);
static int copy_refs_attr(hid_t loc_in,
@@ -67,7 +67,6 @@ 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
@@ -124,15 +123,8 @@ int do_copy_refobjs(hid_t fidin,
for (j=0; j<rank; j++)
nelmts*=dims[j];
- 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 ((mtype_id=h5tools_get_native_type(ftype_id))<0)
+ goto error;
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
@@ -165,7 +157,7 @@ int do_copy_refobjs(hid_t fidin,
*/
if (H5Tequal(mtype_id, H5T_STD_REF_OBJ))
{
- H5G_obj_t1 obj_type;
+ H5G_obj_t obj_type;
hid_t refobj_id;
hobj_ref_t *refbuf=NULL; /* buffer for object references */
hobj_ref_t *buf=NULL;
@@ -240,7 +232,7 @@ int do_copy_refobjs(hid_t fidin,
*/
else if (H5Tequal(mtype_id, H5T_STD_REF_DSETREG))
{
- H5G_obj_t1 obj_type;
+ H5G_obj_t obj_type;
hid_t refobj_id;
hdset_reg_ref_t *refbuf=NULL; /* input buffer for region references */
hdset_reg_ref_t *buf=NULL; /* output buffer */
@@ -486,7 +478,6 @@ 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;
@@ -527,15 +518,8 @@ static int copy_refs_attr(hid_t loc_in,
for (j=0; j<rank; j++)
nelmts*=dims[j];
- 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 ((mtype_id=h5tools_get_native_type(ftype_id))<0)
+ goto error;
if ((msize=H5Tget_size(mtype_id))==0)
goto error;
@@ -547,7 +531,7 @@ static int copy_refs_attr(hid_t loc_in,
*/
if (H5Tequal(mtype_id, H5T_STD_REF_OBJ))
{
- H5G_obj_t1 obj_type;
+ H5G_obj_t obj_type;
hid_t refobj_id;
hobj_ref_t *refbuf=NULL;
unsigned k;
@@ -624,7 +608,7 @@ static int copy_refs_attr(hid_t loc_in,
*/
else if (H5Tequal(mtype_id, H5T_STD_REF_DSETREG))
{
- H5G_obj_t1 obj_type;
+ H5G_obj_t obj_type;
hid_t refobj_id;
hdset_reg_ref_t *refbuf=NULL; /* input buffer for region references */
hdset_reg_ref_t *buf=NULL; /* output buffer */
@@ -734,7 +718,7 @@ error:
*-------------------------------------------------------------------------
*/
-static void close_obj(H5G_obj_t1 obj_type, hid_t obj_id)
+static void close_obj(H5G_obj_t obj_type, hid_t obj_id)
{
H5E_BEGIN_TRY
{