summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_refs.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2003-12-29 20:26:21 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2003-12-29 20:26:21 (GMT)
commitf503a7249136b967e010bbccc413a866947b3def (patch)
tree8adf168462479d39e2880d6b7fb6a8cf68cf2976 /tools/h5repack/h5repack_refs.c
parent5db6c61f18198ac4477a6ba99d405ff82cf467a7 (diff)
downloadhdf5-f503a7249136b967e010bbccc413a866947b3def.zip
hdf5-f503a7249136b967e010bbccc413a866947b3def.tar.gz
hdf5-f503a7249136b967e010bbccc413a866947b3def.tar.bz2
[svn-r7994] Purpose:
h5repack new features Description: added checking routines for the filters that were applied to the output file added tests for szip filter Solution: Platforms tested: linux solaris (IRIX is not available) : Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_refs.c')
-rw-r--r--tools/h5repack/h5repack_refs.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index 81bafab..d02038d 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -130,6 +130,8 @@ int do_copy_refobjs(hid_t fidin,
hobj_ref_t *refbuf;
const char* refname;
hobj_ref_t *buf;
+ unsigned u;
+
/*-------------------------------------------------------------------------
* read to memory
@@ -152,17 +154,17 @@ int do_copy_refobjs(hid_t fidin,
printf( "cannot allocate memory\n" );
goto error;
}
- for ( j=0; j<nelmts; j++)
+ for ( u=0; u<nelmts; u++)
{
- if ((refobj_id = H5Rdereference(dset_in,H5R_OBJECT,&buf[j]))<0)
+ if ((refobj_id = H5Rdereference(dset_in,H5R_OBJECT,&buf[u]))<0)
goto error;
/* get the name. a valid name could only occur in the
second traversal of the file */
- if ((refname=MapIdToName(refobj_id,travt,options))!=NULL)
+ if ((refname=MapIdToName(refobj_id,travt))!=NULL)
{
/* create the reference */
- if (H5Rcreate(&refbuf[j],fidout,refname,H5R_OBJECT,-1)<0)
+ if (H5Rcreate(&refbuf[u],fidout,refname,H5R_OBJECT,-1)<0)
goto error;
if (options->verbose)
@@ -412,7 +414,7 @@ int do_copy_refobjs_inattr(hid_t loc_in,
H5G_obj_t obj_type;
hid_t refobj_id;
hobj_ref_t *refbuf;
- int i;
+ unsigned k;
const char* refname;
hobj_ref_t *buf;
@@ -432,17 +434,17 @@ int do_copy_refobjs_inattr(hid_t loc_in,
printf( "cannot allocate memory\n" );
goto error;
}
- for ( i=0; i<nelmts; i++)
+ for ( k=0; k<nelmts; k++)
{
- if ((refobj_id = H5Rdereference(attr_id,H5R_OBJECT,&buf[i]))<0)
+ if ((refobj_id = H5Rdereference(attr_id,H5R_OBJECT,&buf[k]))<0)
goto error;
/* get the name. a valid name could only occur in the
second traversal of the file */
- if ((refname=MapIdToName(refobj_id,travt,options))!=NULL)
+ if ((refname=MapIdToName(refobj_id,travt))!=NULL)
{
/* create the reference */
- if (H5Rcreate(&refbuf[i],fidout,refname,H5R_OBJECT,-1)<0)
+ if (H5Rcreate(&refbuf[k],fidout,refname,H5R_OBJECT,-1)<0)
goto error;
if (options->verbose)
@@ -503,7 +505,7 @@ error:
*-------------------------------------------------------------------------
*/
-static void close_obj(H5G_obj_t obj_type, hid_t obj_id)
+void close_obj(H5G_obj_t obj_type, hid_t obj_id)
{
switch (obj_type) {
@@ -531,8 +533,7 @@ static void close_obj(H5G_obj_t obj_type, hid_t obj_id)
*/
const char* MapIdToName(hid_t refobj_id,
- trav_table_t *travt,
- pack_opt_t *options) /* repack options */
+ trav_table_t *travt)
{
hid_t id;
hid_t fid;