diff options
author | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-01-26 23:20:20 (GMT) |
---|---|---|
committer | Pedro Vicente Nunes <pvn@hdfgroup.org> | 2004-01-26 23:20:20 (GMT) |
commit | afc3563b76badc2345ca955d7d48fe16cceaf0c8 (patch) | |
tree | a691cf56cc1246acb05f7fc23a050c93f0d7bf6d /tools/h5repack/h5repack_verify.c | |
parent | 2a4253ceb8757c935304be24db989bd0f72effe8 (diff) | |
download | hdf5-afc3563b76badc2345ca955d7d48fe16cceaf0c8.zip hdf5-afc3563b76badc2345ca955d7d48fe16cceaf0c8.tar.gz hdf5-afc3563b76badc2345ca955d7d48fe16cceaf0c8.tar.bz2 |
[svn-r8113] Purpose:
new library function H5Pdelete_filter
deletes one or all filters from a dataset creation property list
this was done for the NONE option of h5repack, added tests for this feature
added a test for the new function in /test/dsets.c
Description:
Solution:
Platforms tested:
linux
solaris
AIX
Misc. update:
Diffstat (limited to 'tools/h5repack/h5repack_verify.c')
-rw-r--r-- | tools/h5repack/h5repack_verify.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tools/h5repack/h5repack_verify.c b/tools/h5repack/h5repack_verify.c index 2283bc5..bbf0492 100644 --- a/tools/h5repack/h5repack_verify.c +++ b/tools/h5repack/h5repack_verify.c @@ -47,11 +47,15 @@ int has_filter(hid_t dcpl_id, /* if no information about the input filter is requested return exit */ if (filtnin==-1) - return 1; + return 1; /* get information about filters */ if ((nfilters = H5Pget_nfilters(dcpl_id))<0) return -1; + + /* if we do not have filters and the requested filter is NONE, return 1 */ + if (!nfilters && filtnin==H5Z_FILTER_NONE) + return 1; for (i=0; i<nfilters; i++) { @@ -190,11 +194,14 @@ int h5repack_verify(const char *fname, } /*------------------------------------------------------------------------- - * layout check + * layout check; check only if a filter exists *------------------------------------------------------------------------- */ - if (has_layout(dcpl_id,obj)==0) - ret=0; + if (obj->filter[j].filtn>H5Z_FILTER_NONE ) + { + if (has_layout(dcpl_id,obj)==0) + ret=0; + } /*------------------------------------------------------------------------- * close @@ -248,7 +255,7 @@ int h5repack_verify(const char *fname, * filter check *------------------------------------------------------------------------- */ - if (options->all_filter==1){ + if (options->all_filter==1 ){ if (has_filter(dcpl_id,options->filter_g.filtn)==0) ret=0; } |