summaryrefslogtreecommitdiffstats
path: root/tools/h5repack/h5repack_refs.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-13 19:09:41 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2004-07-13 19:09:41 (GMT)
commitbc6ab7c0a6ff27d3d52707419385ccd0771ffa0c (patch)
treee21b848fed677413addbdf6bee7fd2240c66c577 /tools/h5repack/h5repack_refs.c
parent803bb3e532c0c2ff26f6b7cc115a8c6f33ea00f5 (diff)
downloadhdf5-bc6ab7c0a6ff27d3d52707419385ccd0771ffa0c.zip
hdf5-bc6ab7c0a6ff27d3d52707419385ccd0771ffa0c.tar.gz
hdf5-bc6ab7c0a6ff27d3d52707419385ccd0771ffa0c.tar.bz2
[svn-r8869] Purpose:
h5repack changes Description: there were some requests to change some minor h5repack features h5repack only made a warning about a non available filter in verbose mode ( -v ) without -v it kept silent, and users sometimes missed this warning the request was that it should print this warning always. so, the new format, is e.g ./h5repack -i test_szip.h5 -o out.h5 Warning: dataset </dset_szip> cannot be read, SZIP filter is not available due to this, and to avoid a lot of these messages in the shell test script, I modified the script h5repack.sh so that it detects the presence of all filters in the environment (previously it only detected SZIP) the test files were also divided in more files , to make the script code easier to follow Solution: Platforms tested: linux AIX (no szip) solaris (no szip, no gzip ) Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_refs.c')
-rw-r--r--tools/h5repack/h5repack_refs.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/tools/h5repack/h5repack_refs.c b/tools/h5repack/h5repack_refs.c
index e824493..ef7f298 100644
--- a/tools/h5repack/h5repack_refs.c
+++ b/tools/h5repack/h5repack_refs.c
@@ -52,19 +52,20 @@ int do_copy_refobjs(hid_t fidin,
trav_table_t *travt,
pack_opt_t *options) /* repack options */
{
- hid_t grp_in=-1; /* group ID */
- hid_t grp_out=-1; /* group ID */
- hid_t dset_in=-1; /* read dataset ID */
- hid_t dset_out=-1; /* write dataset ID */
- hid_t type_in=-1; /* named type ID */
- hid_t dcpl_id=-1; /* dataset creation property list ID */
- hid_t space_id=-1; /* space ID */
- hid_t ftype_id=-1; /* file data type ID */
- hid_t mtype_id=-1; /* memory data type ID */
- size_t msize; /* memory size of memory type */
- hsize_t nelmts; /* number of elements in dataset */
- int rank; /* rank of dataset */
+ hid_t grp_in; /* read group ID */
+ hid_t grp_out; /* write group ID */
+ hid_t dset_in; /* read dataset ID */
+ hid_t dset_out; /* write dataset ID */
+ hid_t type_in; /* named type ID */
+ hid_t dcpl_id; /* dataset creation property list ID */
+ hid_t space_id; /* space ID */
+ hid_t ftype_id; /* file data type ID */
+ hid_t mtype_id; /* memory data type ID */
+ size_t msize; /* memory size of memory type */
+ hsize_t nelmts; /* number of elements in dataset */
+ int rank; /* rank of dataset */
hsize_t dims[H5S_MAX_RANK];/* dimensions of dataset */
+ int next; /* external files */
int i, j;
/*-------------------------------------------------------------------------
@@ -127,13 +128,19 @@ int do_copy_refobjs(hid_t fidin,
goto error;
/*-------------------------------------------------------------------------
+ * check for external files
+ *-------------------------------------------------------------------------
+ */
+ if ((next=H5Pget_external_count (dcpl_id))<0)
+ goto error;
+/*-------------------------------------------------------------------------
* check if the dataset creation property list has filters that
* are not registered in the current configuration
* 1) the external filters GZIP and SZIP might not be available
* 2) the internal filters might be turned off
*-------------------------------------------------------------------------
*/
- if (h5tools_canreadf((options->verbose?travt->objs[i].name:NULL),dcpl_id)==1)
+ if (next==0 && h5tools_canreadf((NULL),dcpl_id)==1)
{
/*-------------------------------------------------------------------------