summaryrefslogtreecommitdiffstats
path: root/tools/lib/h5trav.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/lib/h5trav.c')
-rw-r--r--tools/lib/h5trav.c22
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;