diff options
Diffstat (limited to 'tools/h5repack/h5repack_filters.c')
-rw-r--r-- | tools/h5repack/h5repack_filters.c | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/tools/h5repack/h5repack_filters.c b/tools/h5repack/h5repack_filters.c index c7a58dc..98ef07e 100644 --- a/tools/h5repack/h5repack_filters.c +++ b/tools/h5repack/h5repack_filters.c @@ -171,8 +171,7 @@ int aux_assign_obj(const char* name, /* object name from traverse lis *obj = tmp; return 1; -} - +} /*------------------------------------------------------------------------- @@ -194,7 +193,7 @@ int aux_assign_obj(const char* name, /* object name from traverse lis int apply_filters(const char* name, /* object name from traverse list */ int rank, /* rank of dataset */ hsize_t *dims, /* dimensions of dataset */ - hid_t dcpl_id, /* (IN,OUT) dataset creation property list */ + hid_t dcpl_id, /* dataset creation property list */ pack_opt_t *options, /* repack options */ int *has_filter) /* (OUT) object NAME has a filter */ @@ -415,48 +414,3 @@ int apply_filters(const char* name, /* object name from traverse list */ return 0; } -/*------------------------------------------------------------------------- - * Function: print_filters - * - * Purpose: print the filters in DCPL - * - * Return: 0, ok, -1 no - * - *------------------------------------------------------------------------- - */ - -int print_filters(hid_t dcpl_id) -{ - int nfilters; /* number of filters */ - unsigned filt_flags; /* filter flags */ - H5Z_filter_t filtn; /* filter identification number */ - unsigned cd_values[20]; /* filter client data values */ - size_t cd_nelmts; /* filter client number of values */ - size_t cd_num; /* filter client data counter */ - char f_name[256]; /* filter name */ - char s[64]; /* temporary string buffer */ - int i; - - /* get information about filters */ - if((nfilters = H5Pget_nfilters(dcpl_id)) < 0) - return -1; - - for(i = 0; i < nfilters; i++) { - cd_nelmts = NELMTS(cd_values); - filtn = H5Pget_filter2(dcpl_id, (unsigned)i, &filt_flags, &cd_nelmts, - cd_values, sizeof(f_name), f_name, NULL); - - f_name[sizeof(f_name)-1] = '\0'; - sprintf(s, "Filter-%d:", i); - printf(" %-10s %s-%u %s {", s, - f_name[0] ? f_name : "method", - (unsigned)filtn, - filt_flags & H5Z_FLAG_OPTIONAL?"OPT":""); - for(cd_num = 0; cd_num < cd_nelmts; cd_num++) - printf("%s%u", cd_num?", ":"", cd_values[cd_num]); - printf("}\n"); - } - - return 0; -} - |