diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2012-07-12 15:38:44 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2012-07-12 15:38:44 (GMT) |
commit | b54b3fcf290d532de381e135254dfc343d338d24 (patch) | |
tree | 167a494e2aff12bf3f95229fe72d4e4f00ccffe3 /tools/lib/h5trav.c | |
parent | 4bba12dbee46b5ea8a383ec90b42ab98f722d9e1 (diff) | |
download | hdf5-b54b3fcf290d532de381e135254dfc343d338d24.zip hdf5-b54b3fcf290d532de381e135254dfc343d338d24.tar.gz hdf5-b54b3fcf290d532de381e135254dfc343d338d24.tar.bz2 |
[svn-r22563] HDFFV-8095: index order of links wrong
Create setters for indexing options in h5trav.c to be set before the obj table is created.
Revert h5trav_print to remove now duplicated parameters.
Added test and testfiles.
Tested: local linux with cmake
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r-- | tools/lib/h5trav.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/tools/lib/h5trav.c b/tools/lib/h5trav.c index 833b8c4..170e612 100644 --- a/tools/lib/h5trav.c +++ b/tools/lib/h5trav.c @@ -67,6 +67,23 @@ static void trav_table_addlink(trav_table_t *table, static H5_index_t trav_index_by = H5_INDEX_NAME; static H5_iter_order_t trav_index_order = H5_ITER_INC; + +/*------------------------------------------------------------------------- + * Function: h5trav_set_index + * + * Purpose: Set indexing properties for the objects & links in the file + * + * Return: none + * + *------------------------------------------------------------------------- + */ +void +h5trav_set_index(H5_index_t print_index_by, H5_iter_order_t print_index_order) +{ + trav_index_by = print_index_by; + trav_index_order = print_index_order; +} + /*------------------------------------------------------------------------- * "h5trav info" public functions. used in h5diff *------------------------------------------------------------------------- @@ -955,14 +972,11 @@ trav_print_visit_lnk(const char *path, const H5L_info_t *linfo, void *udata) */ int -h5trav_print(hid_t fid, H5_index_t print_index_by, H5_iter_order_t print_index_order) +h5trav_print(hid_t fid) { trav_print_udata_t print_udata; /* User data for traversal */ trav_visitor_t print_visitor; /* Visitor structure for printing objects */ - trav_index_by = print_index_by; - trav_index_order = print_index_order; - /* Init user data for printing */ print_udata.fid = fid; |